        :root {
            --color-bg-primary: #1e2a3a; 
            --color-bg-secondary: #2a3b4f; 
            --color-bg-secondary-rgb: 42, 59, 79;
            --color-bg-input: #1e2a3a;
            --color-border: #4a5c75;
            --color-border-rgb: 74, 92, 117;
            --color-accent-gold: #ffc82c;
            --color-accent-gold-dark: #e0a800;
            --color-accent-green: #58c858;
            --color-accent-red: #e74c3c;
            --color-text-primary: #ffffff;
            --color-text-secondary: #a0b3ce;
            --font-heading: 'Luckiest Guy', cursive;
            --font-body: 'Lato', sans-serif;
        }

        html.light-mode {
            --color-bg-primary: #f4f1e9; 
            --color-bg-secondary: #ffffff;
            --color-bg-secondary-rgb: 255, 255, 255;
            --color-bg-input: #ffffff;
            --color-border: #dcd1b3; 
            --color-border-rgb: 220, 209, 179;
            --color-accent-gold: #e5a500;
            --color-accent-gold-dark: #c88f00;
            --color-accent-green: #4caf50;
            --color-accent-red: #d32f2f;
            --color-text-primary: #4a3f30; 
            --color-text-secondary: #7a6a53;
        }


        html, body {
            height: 100%;
        }
        body {
            display: flex;
            flex-direction: column;
            background-color: var(--color-bg-primary);
            color: var(--color-text-primary);
            font-family: var(--font-body);
            transition: background-color 0.3s ease, color 0.3s ease;
            background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%2334495e" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
        }
        main {
            flex-grow: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        h1, h2, h3 {
            font-family: var(--font-heading);
            letter-spacing: 1px;
            color: var(--color-text-primary);
            text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
        }

        .btn-coc {
            font-family: var(--font-heading);
            color: white;
            border: 3px solid #1a2533;
            border-radius: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 1.5rem;
            padding: 12px 30px;
            cursor: pointer;
            transition: all 0.2s ease-out;
            position: relative;
            box-shadow: inset 0 -6px 0 rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.4);
            text-shadow: 2px 2px 3px rgba(0,0,0,0.5);
        }
        .btn-coc:active {
            transform: translateY(2px);
            box-shadow: inset 0 -4px 0 rgba(0,0,0,0.3), 0 2px 3px rgba(0,0,0,0.4);
        }
        .btn-coc-primary {
            background: linear-gradient(to bottom, #f7b733, #fc4a1a); /* Orange/Yellow */
        }
        .btn-coc-secondary {
            background: linear-gradient(to bottom, var(--color-accent-green), #3a9d3a); /* Green */
        }
        .btn-coc:disabled {
            background: #6c757d;
            cursor: not-allowed;
            opacity: 0.7;
            box-shadow: inset 0 -6px 0 rgba(0,0,0,0.2);
        }

        .mfp-bg {
            background: rgba(13, 17, 23, 0.8);
            backdrop-filter: blur(5px);
        }
        #modal-container {
            background: var(--color-bg-secondary);
            border: 5px solid #1a2533;
            border-image: linear-gradient(to bottom, #4a5c75, #1e2a3a) 1;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            border-radius: 15px;
            overflow: hidden;
        }

        @keyframes swoop-in {
            0% {
                opacity: 0;
                transform: translateY(-50px) scale(0.9);
            }
            70% {
                opacity: 1;
                transform: translateY(10px) scale(1.02);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .mfp-swoop-in .mfp-content {
            animation: swoop-in 0.5s ease-out;
        }
        .mfp-swoop-in.mfp-removing .mfp-content {
             animation: swoop-in 0.5s ease-out reverse;
        }
        
        .gem-card {
            background-color: var(--color-bg-input);
            border: 3px solid var(--color-border);
            border-radius: 10px;
            transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
        }
        .gem-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 0 20px rgba(255, 200, 44, 0.5);
        }
        .gem-card.selected {
             border-color: var(--color-accent-gold);
             box-shadow: 0 0 25px rgba(255, 200, 44, 0.8);
             transform: translateY(-5px) scale(1.05);
             background-color: #3e526b;
        }

        #generation-progress-bar-container {
            width: 100%;
            background-color: #1a2533;
            border-radius: 9999px;
            height: 12px;
            margin-bottom: 1.5rem;
            border: 2px solid var(--color-border);
            overflow: hidden;
        }
        #generation-progress-bar {
            width: 0%;
            height: 100%;
            background: linear-gradient(to right, #58c858, #8eff8e);
            border-radius: 9999px;
            transition: width 2.5s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
        }
        .checklist-item.completed { color: var(--color-accent-green); }
        