* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            /* Lofi (default) */
            --bg-primary: #2d2520;
            --bg-secondary: #3e342b;
            --bg-tertiary: #4a3d35;
            --text-primary: #f5f1eb;
            --text-secondary: #d4c7b8;
            --accent: #c49a6b;
            --accent-hover: #d4a876;
            --border: #5a4d44;
            --error: #d97757;
            --success: #8db894;
            --shadow: rgba(0, 0, 0, 0.4);
        }

        .game-info {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.info-box {
    background-color: var(--cell-bg);
    border: 2px solid var(--grid-border);
    border-radius: 8px;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 4px var(--shadow);
    min-width: 120px;
}

.info-label {
    font-size: 0.8em;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text-color);
}

.timer-value {
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
}

.score-value {
    color: var(--success-color);
}

.sudoku-container {
    background-color: var(--cell-bg);
    border: 3px solid var(--grid-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.sudoku-container.win-animation {
    animation: celebrate 2s ease-in-out;
    box-shadow: 0 4px 20px var(--success-color);
}


        .theme-bw {
            --bg-primary: #000000;
            --bg-secondary: #1a1a1a;
            --bg-tertiary: #2a2a2a;
            --text-primary: #ffffff;
            --text-secondary: #cccccc;
            --accent: #ffffff;
            --accent-hover: #e0e0e0;
            --border: #444444;
            --error: #888888;
            --success: #cccccc;
            --shadow: rgba(255, 255, 255, 0.1);
        }

        .theme-cyber {
            --bg-primary: #0a0a0f;
            --bg-secondary: #1a0f2e;
            --bg-tertiary: #2d1b42;
            --text-primary: #00ffff;
            --text-secondary: #00cccc;
            --accent: #ff00ff;
            --accent-hover: #ff44ff;
            --border: #330066;
            --error: #ff0066;
            --success: #00ff88;
            --shadow: rgba(255, 0, 255, 0.3);
        }

        body {
            font-family: 'Courier New', monospace;
            background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            transition: all 0.3s ease;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
        }

        .title {
            font-size: 2.5rem;
            font-weight: bold;
            color: var(--accent);
            text-shadow: 2px 2px 4px var(--shadow);
            margin-bottom: 10px;
            letter-spacing: 2px;
        }

        .subtitle {
            font-size: 1rem;
            color: var(--text-secondary);
            font-style: italic;
        }

        .controls {
            display: flex;
            gap: 20px;
            margin-bottom: 30px;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
        }

        .control-group {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .control-label {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-right: 5px;
        }

        .theme-btn, .difficulty-btn, .btn {
            padding: 8px 16px;
            background: var(--bg-tertiary);
            border: 2px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: inherit;
            font-size: 0.9rem;
            position: relative;
            overflow: hidden;
        }

        .theme-btn:hover,
        .theme-btn.active,
        .difficulty-btn:hover,
        .difficulty-btn.active {
            background: var(--accent);
            border-color: var(--accent);
            color: var(--bg-primary);
            box-shadow: 0 4px 8px var(--shadow);
            transform: translateY(-2px);
        }

        .btn {
            padding: 10px 20px;
            font-size: 1rem;
        }

        .btn:hover {
            background: var(--accent);
            border-color: var(--accent);
            color: var(--bg-primary);
            box-shadow: 0 4px 8px var(--shadow);
            transform: translateY(-2px);
        }

        .sudoku-container {
            background: var(--bg-secondary);
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 15px 35px var(--shadow);
            border: 2px solid var(--border);
            position: relative;
        }

        .sudoku-grid {
            display: grid;
            grid-template-columns: repeat(9, 1fr);
            gap: 1px;
            background: var(--border);
            border: 3px solid var(--accent);
            border-radius: 8px;
            overflow: hidden;
        }

        .cell {
            width: 50px;
            height: 50px;
            background: var(--bg-tertiary);
            border: none;
            text-align: center;
            font-size: 1.2rem;
            font-family: inherit;
            font-weight: bold;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.2s ease;
            outline: none;
        }

        .cell:hover {
            background: var(--accent);
            color: var(--bg-primary);
            transform: scale(1.05);
        }

        .cell:focus {
            background: var(--accent-hover);
            color: var(--bg-primary);
            box-shadow: inset 0 0 10px var(--shadow);
        }

        .cell.given {
            background: var(--bg-secondary);
            color: var(--accent);
            cursor: default;
            font-weight: 900;
        }

        .cell.given:hover {
            background: var(--bg-secondary);
            color: var(--accent);
            transform: none;
        }

        .cell.error {
            background: var(--error);
            color: white;
            animation: shake 0.5s ease-in-out;
        }

        .cell.success {
            background: var(--success);
            color: var(--bg-primary);
        }

        /* Grid borders for 3x3 sections */
        .cell:nth-child(3n):not(:nth-child(9n)) {
            border-right: 2px solid var(--accent);
        }

        .cell:nth-child(n+19):nth-child(-n+27),
        .cell:nth-child(n+46):nth-child(-n+54) {
            border-bottom: 2px solid var(--accent);
        }

        .status {
            margin-top: 20px;
            text-align: center;
            font-size: 1.1rem;
            color: var(--text-secondary);
            min-height: 30px;
        }

        .status.win {
            color: var(--success);
            font-weight: bold;
            font-size: 1.3rem;
            animation: pulse 2s infinite;
        }

        .difficulty-info {
            margin-top: 15px;
            text-align: center;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .loading {
            color: var(--accent);
            font-style: italic;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        @keyframes glow {
            0%, 100% { box-shadow: 0 0 10px var(--accent); }
            50% { box-shadow: 0 0 30px var(--accent), 0 0 40px var(--accent); }
        }

        .win-animation {
            animation: glow 2s ease-in-out infinite;
        }

        /* Cyber theme special effects */
        .theme-cyber .cell {
            text-shadow: 0 0 10px currentColor;
        }

        .theme-cyber .title {
            text-shadow: 0 0 20px var(--accent);
        }

        .theme-cyber .sudoku-container {
            box-shadow: 0 0 30px var(--accent);
        }

        @media (max-width: 768px) {
            .cell {
                width: 35px;
                height: 35px;
                font-size: 1rem;
            }
            
            .title {
                font-size: 2rem;
            }
            
            .controls {
                flex-direction: column;
                gap: 15px;
            }
            
            .control-group {
                justify-content: center;
            }
        }
        .difficulty-info {
    text-align: center;
    font-size: 0.9em;
    color: var(--accent-color);
    margin-top: 10px;
}

.score-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.score-content {
    background-color: var(--cell-bg);
    border: 3px solid var(--accent-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 24px var(--shadow);
    max-width: 400px;
    width: 90%;
}

.score-content h2 {
    color: var(--success-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.score-details {
    margin-bottom: 20px;
}

.score-details p {
    margin: 8px 0;
    font-size: 1.1em;
}

.final-score {
    font-size: 1.3em !important;
    color: var(--success-color) !important;
    border-top: 2px solid var(--grid-border);
    padding-top: 15px;
    margin-top: 15px;
}

.close-popup-btn {
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    transition: all 0.3s ease;
}

.close-popup-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}