﻿        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --accent-color: #4cc9f0;
            --success-color: #4ade80;
            --warning-color: #facc15;
            --danger-color: #f87171;
            --light-bg: #f8fafc;
            --dark-bg: #1e293b;
            --card-bg: #ffffff;
            --border-color: #cbd5e1;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        
        /* 黑夜模式变量 */
        [data-theme="dark"] {
            --primary-color: #60a5fa;
            --secondary-color: #3b82f6;
            --accent-color: #0ea5e9;
            --success-color: #22c55e;
            --warning-color: #eab308;
            --danger-color: #ef4444;
            --light-bg: #0f172a;
            --dark-bg: #1e293b;
            --card-bg: #1e293b;
            --border-color: #334155;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            margin: 0;
            min-height: 100vh;
            color: var(--text-primary);
            transition: background 0.5s ease, color 0.3s ease;
            position: relative;
            overflow-x: hidden;
            background: #87CEEB;
        }
        
        /* ====== 河边场景 ====== */
        .scene {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
            overflow: hidden;
        }
        
        /* 天空 */
        .sky {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 65%;
            background: linear-gradient(180deg, #4A90D9 0%, #87CEEB 40%, #B0E0E6 70%, #E0F0FF 100%);
            transition: background 0.5s ease;
        }
        
        /* 太阳 */
        .sun {
            position: absolute;
            top: 40px;
            right: 80px;
            width: 70px;
            height: 70px;
            background: radial-gradient(circle, #FFD700 25%, #FFA500 60%, transparent 70%);
            border-radius: 50%;
            box-shadow: 0 0 50px #FFD700, 0 0 100px rgba(255, 165, 0, 0.5);
            animation: sun-glow 4s ease-in-out infinite alternate;
        }
        
        @keyframes sun-glow {
            0% { box-shadow: 0 0 50px #FFD700, 0 0 100px rgba(255, 165, 0, 0.5); }
            100% { box-shadow: 0 0 70px #FFD700, 0 0 130px rgba(255, 165, 0, 0.6); }
        }
        
        /* 月亮 */
        .moon {
            position: absolute;
            top: 40px;
            right: 80px;
            width: 55px;
            height: 55px;
            background: radial-gradient(circle at 35% 35%, #FFFACD 20%, #F5F3CE 50%, #E8E4B8 80%);
            border-radius: 50%;
            box-shadow: 0 0 30px rgba(255, 250, 205, 0.6), 0 0 60px rgba(255, 250, 205, 0.3);
            opacity: 0;
            transition: opacity 0.5s ease;
        }
        
        /* 云朵 */
        .clouds { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
        
        .cloud {
            position: absolute;
            font-size: 3rem;
            opacity: 0.8;
            animation: cloud-drift 20s linear infinite;
        }
        .cloud-1 { top: 50px; left: 5%; font-size: 3.5rem; animation-duration: 25s; }
        .cloud-2 { top: 90px; left: 35%; font-size: 2.8rem; animation-duration: 30s; animation-delay: -5s; }
        .cloud-3 { top: 30px; left: 65%; font-size: 3rem; animation-duration: 22s; animation-delay: -10s; }
        
        @keyframes cloud-drift {
            0% { transform: translateX(0); }
            100% { transform: translateX(100vw); }
        }
        
        /* 星星 */
        .stars { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; }
        
        .star {
            position: absolute;
            animation: twinkle 2s ease-in-out infinite alternate;
        }
        .star-1 { top: 30px; left: 10%; font-size: 1.2rem; animation-delay: 0s; }
        .star-2 { top: 60px; left: 25%; font-size: 0.9rem; animation-delay: 0.3s; }
        .star-3 { top: 20px; left: 45%; font-size: 1.4rem; animation-delay: 0.6s; }
        .star-4 { top: 80px; left: 55%; font-size: 1rem; animation-delay: 0.9s; }
        .star-5 { top: 40px; left: 70%; font-size: 1.3rem; animation-delay: 1.2s; }
        .star-6 { top: 100px; left: 80%; font-size: 0.8rem; animation-delay: 1.5s; }
        .star-7 { top: 55px; left: 90%; font-size: 1.1rem; animation-delay: 0.4s; }
        
        @keyframes twinkle {
            0% { opacity: 0.3; transform: scale(0.8); }
            100% { opacity: 1; transform: scale(1.2); }
        }
        
        /* 远景树林 */
        .forest-bg {
            position: absolute;
            bottom: 35%;
            left: 0;
            width: 100%;
            height: 60px;
            display: flex;
            justify-content: space-around;
            align-items: flex-end;
        }
        
        .tree-bg {
            font-size: 2.5rem;
            opacity: 0.6;
            filter: brightness(0.7) saturate(0.8);
        }
        
        /* 河边地面 */
        .riverbank {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 40%;
        }
        
        .grass {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 30%;
            background: linear-gradient(180deg, #4CAF50 0%, #388E3C 30%, #2E7D32 60%, #6D4C41 100%);
            border-radius: 50% 50% 0 0 / 20px 20px 0 0;
        }
        
        /* 近景树木 */
        .trees { position: absolute; top: -30px; left: 0; width: 100%; height: 80px; }
        
        .tree {
            position: absolute;
            font-size: 3.5rem;
            filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.3));
        }
        .tree-left { left: 2%; font-size: 4rem; }
        .tree-left-2 { left: 10%; font-size: 3.2rem; top: 5px; }
        .tree-right { right: 2%; font-size: 4rem; }
        .tree-right-2 { right: 10%; font-size: 3.2rem; top: 5px; }
        
        /* 河流 */
        .river {
            position: absolute;
            top: 28%;
            left: 0;
            width: 100%;
            height: 35%;
            background: linear-gradient(180deg, 
                rgba(100, 180, 220, 0.8) 0%, 
                rgba(70, 150, 200, 0.9) 30%, 
                rgba(50, 130, 180, 0.85) 60%, 
                rgba(80, 160, 210, 0.8) 100%);
            overflow: hidden;
        }
        
        .river-shimmer {
            position: absolute;
            width: 60px;
            height: 3px;
            background: rgba(255, 255, 255, 0.4);
            border-radius: 50%;
            top: 30%;
            left: 20%;
            animation: shimmer 3s ease-in-out infinite;
        }
        .shimmer-2 { top: 50%; left: 55%; animation-delay: 1s; width: 80px; }
        .shimmer-3 { top: 70%; left: 35%; animation-delay: 2s; width: 50px; }
        
        @keyframes shimmer {
            0%, 100% { opacity: 0.2; transform: translateX(0) scaleX(1); }
            50% { opacity: 0.6; transform: translateX(20px) scaleX(1.3); }
        }
        
        /* 对岸 */
        .far-bank {
            position: absolute;
            top: 60%;
            left: 0;
            width: 100%;
            height: 40%;
            background: linear-gradient(180deg, #5D4037 0%, #4CAF50 20%, #388E3C 100%);
        }
        
        .far-tree {
            position: absolute;
            font-size: 2rem;
            bottom: 60%;
            opacity: 0.7;
        }
        .ft1 { left: 10%; } .ft2 { left: 28%; } .ft3 { left: 48%; } .ft4 { left: 68%; } .ft5 { left: 85%; }
        
        /* 白天小动物 */
        .animals { position: absolute; top: 5%; left: 0; width: 100%; height: 25%; }
        
        .animal {
            position: absolute;
            font-size: 1.8rem;
            filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.3));
        }
        .animal-1 { bottom: 10%; left: 18%; animation: hop 2s ease-in-out infinite; }
        .animal-2 { bottom: 5%; left: 35%; animation: sneak 4s ease-in-out infinite; }
        .animal-3 { bottom: 15%; right: 25%; animation: hop 2.5s ease-in-out infinite 0.5s; }
        .animal-4 { top: 20%; left: 45%; font-size: 1.4rem; animation: flutter 3s ease-in-out infinite; }
        .animal-5 { top: 10%; right: 30%; font-size: 1.3rem; animation: flutter 3.5s ease-in-out infinite 1s; }
        
        @keyframes hop {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        @keyframes sneak {
            0%, 100% { transform: translateX(0); }
            50% { transform: translateX(15px); }
        }
        @keyframes flutter {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(8px, -5px) rotate(5deg); }
            75% { transform: translate(-8px, -3px) rotate(-5deg); }
        }
        
        /* 夜晚小动物 */
        .night-animals { 
            position: absolute; top: 5%; left: 0; width: 100%; height: 25%;
            opacity: 0; transition: opacity 0.5s ease;
        }
        
        .night-animal {
            position: absolute;
            font-size: 1.8rem;
            filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.5));
        }
        .na-1 { bottom: 15%; left: 20%; animation: hop 3s ease-in-out infinite; }
        .na-2 { top: 10%; right: 25%; font-size: 1.5rem; animation: flutter 2.5s ease-in-out infinite; }
        .na-3 { bottom: 5%; right: 35%; animation: hop 2s ease-in-out infinite 0.5s; }
        
        /* 花草 */
        .flowers { position: absolute; top: -5px; left: 0; width: 100%; height: 30px; }
        
        .flower {
            position: absolute;
            font-size: 1.3rem;
        }
        .f1 { bottom: 0; left: 15%; } .f2 { bottom: 2px; left: 30%; }
        .f3 { bottom: 0; left: 55%; } .f4 { bottom: 3px; right: 25%; }
        .f5 { bottom: 0; right: 12%; }
        
        /* ====== 夜晚主题切换 ====== */
        [data-theme="dark"] body {
            background: #0a1628;
        }
        
        [data-theme="dark"] .sky {
            background: linear-gradient(180deg, #0a0e27 0%, #121a44 40%, #1a2555 70%, #1e3050 100%);
        }
        
        [data-theme="dark"] .sun { opacity: 0; }
        [data-theme="dark"] .moon { opacity: 1; }
        [data-theme="dark"] .clouds { opacity: 0.15; }
        [data-theme="dark"] .stars { opacity: 1; }
        
        [data-theme="dark"] .grass {
            background: linear-gradient(180deg, #1B5E20 0%, #0D3B0F 30%, #0A2E0A 60%, #3E2723 100%);
        }
        
        [data-theme="dark"] .river {
            background: linear-gradient(180deg, 
                rgba(20, 50, 80, 0.9) 0%, 
                rgba(15, 40, 70, 0.95) 30%, 
                rgba(10, 35, 65, 0.9) 60%, 
                rgba(20, 45, 75, 0.85) 100%);
        }
        
        [data-theme="dark"] .river-shimmer {
            background: rgba(200, 220, 255, 0.25);
        }
        
        [data-theme="dark"] .far-bank {
            background: linear-gradient(180deg, #2E1B0E 0%, #1B3A1B 20%, #0D2B0D 100%);
        }
        
        [data-theme="dark"] .animals { opacity: 0; }
        [data-theme="dark"] .night-animals { opacity: 1; }
        [data-theme="dark"] .flowers { opacity: 0.3; }
        
        [data-theme="dark"] .tree-bg { filter: brightness(0.3) saturate(0.5); }
        [data-theme="dark"] .far-tree { opacity: 0.4; filter: brightness(0.5); }
        
        /* 容器要在场景之上 */
        .container {
            max-width: 1000px;
            width: 100%;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }
        
        header {
            text-align: center;
            margin-bottom: 25px;
            padding: 20px;
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(8px);
            border-radius: 12px;
            box-shadow: var(--shadow);
            width: 100%;
        }
        
        [data-theme="dark"] header {
            background: rgba(30, 41, 59, 0.75);
        }
        
        h1 {
            color: var(--primary-color);
            font-size: 2.5rem;
            margin-bottom: 10px;
            font-weight: 700;
            letter-spacing: 1px;
        }
        
        .subtitle {
            color: var(--text-secondary);
            font-size: 1.1rem;
        }
        
        .tips {
            background-color: rgba(67, 97, 238, 0.1);
            border-left: 4px solid var(--primary-color);
            padding: 12px 15px;
            margin-top: 15px;
            border-radius: 0 8px 8px 0;
            max-width: 600px;
            margin: 15px auto 0;
        }
        
        .tips p {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.95rem;
        }
        
        /* 音效控制样式 */
        .sound-control {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 10px;
            font-size: 14px;
            color: var(--text-secondary);
        }
        
        /* 主题切换按钮 */
        .theme-toggle-container {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 15px;
        }
        
        .theme-label {
            font-size: 14px;
            color: var(--text-secondary);
        }
        
        .theme-toggle {
            width: 60px;
            height: 28px;
            border-radius: 14px;
            background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
            cursor: pointer;
            position: relative;
            transition: all 0.3s ease;
            border: none;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        .theme-toggle.on {
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .theme-toggle::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: white;
            transition: transform 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fbbf24'%3E%3Cpath d='M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18.75a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0v-2.25a.75.75 0 01.75-.75zM7.166 17.834a.75.75 0 001.061 1.06l1.59-1.591a.75.75 0 10-1.06-1.06l-1.591 1.59zM5.25 12a.75.75 0 01-.75.75H2.25a.75.75 0 010-1.5H4.5a.75.75 0 01.75.75zM6.166 5.166a.75.75 0 001.06 1.06l1.591-1.59a.75.75 0 10-1.061-1.061l-1.59 1.59z'/%3E%3C/svg%3E");
            background-size: 14px;
            background-repeat: no-repeat;
            background-position: center;
        }
        
        .theme-toggle.on::after {
            transform: translateX(32px);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18.75a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0v-2.25a.75.75 0 01.75-.75zM7.166 17.834a.75.75 0 001.061 1.06l1.59-1.591a.75.75 0 10-1.06-1.06l-1.591 1.59zM5.25 12a.75.75 0 01-.75.75H2.25a.75.75 0 010-1.5H4.5a.75.75 0 01.75.75zM6.166 5.166a.75.75 0 001.06 1.06l1.591-1.59a.75.75 0 10-1.061-1.061l-1.59 1.59z'/%3E%3C/svg%3E");
        }
        
        /* 语言切换按钮 */
        .lang-toggle-container {
            display: flex;
            align-items: center;
            margin-left: 10px;
        }
        
        .lang-toggle-btn {
            padding: 4px 12px;
            border-radius: 14px;
            border: 2px solid var(--border-color);
            background: var(--card-bg);
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
        }
        
        .lang-toggle-btn:hover {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .sound-toggle {
            width: 50px;
            height: 24px;
            background-color: #cbd5e1;
            border-radius: 12px;
            position: relative;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        
        .sound-toggle.on {
            background-color: var(--success-color);
        }
        
        .sound-toggle::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: white;
            top: 2px;
            left: 2px;
            transition: transform 0.3s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        
        .sound-toggle.on::after {
            transform: translateX(26px);
        }
        
        .game-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 25px;
            width: 100%;
        }
        
        .controls {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            justify-content: center;
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(8px);
            padding: 15px;
            border-radius: 12px;
            box-shadow: var(--shadow);
            width: 100%;
            max-width: 600px;
        }
        
        [data-theme="dark"] .controls {
            background: rgba(30, 41, 59, 0.75);
        }
        
        .btn {
            padding: 12px 20px;
            font-size: 16px;
            cursor: pointer;
            border: none;
            border-radius: 8px;
            background-color: var(--primary-color);
            color: white;
            transition: all 0.3s ease;
            font-weight: 500;
            box-shadow: var(--shadow);
        }
        
        .btn:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }
        
        .btn:active {
            transform: translateY(0);
        }
        
        .btn-success {
            background-color: var(--success-color);
        }
        
        .btn-success:hover {
            background-color: #22c55e;
        }
        
        .btn-warning {
            background-color: var(--warning-color);
            color: var(--dark-bg);
        }
        
        .btn-warning:hover {
            background-color: #eab308;
        }
        
        .btn-danger {
            background-color: var(--danger-color);
        }
        
        .btn-danger:hover {
            background-color: #ef4444;
        }
        
        select {
            padding: 12px;
            font-size: 16px;
            border-radius: 8px;
            border: 2px solid var(--border-color);
            background-color: var(--card-bg);
            color: var(--text-primary);
            cursor: pointer;
            transition: border-color 0.3s ease;
            box-shadow: var(--shadow);
        }
        
        select:focus {
            outline: none;
            border-color: var(--primary-color);
        }
        
        .sudoku-grid {
            display: grid;
            grid-template-columns: repeat(9, 1fr);
            grid-gap: 1px;
            background-color: var(--border-color);
            border: 3px solid var(--border-color);
            max-width: 500px;
            border-radius: 4px;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
        }
        
        .cell {
            width: 45px;
            height: 45px;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: var(--card-bg);
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            user-select: none;
            transition: all 0.2s ease;
            position: relative;
            color: var(--text-primary);
        }
        
        .cell:hover:not(.pre-filled) {
            background-color: #e6f7ff;
            transform: scale(1.05);
        }
        
        .cell:nth-child(3n):not(:nth-child(9n)) {
            border-right: 2px solid var(--border-color);
        }
        
        .cell:nth-child(n+19):nth-child(-n+27),
        .cell:nth-child(n+46):nth-child(-n+54) {
            border-bottom: 2px solid var(--border-color);
        }
        
        .cell.pre-filled {
            background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
            color: var(--dark-bg);
            font-weight: 700;
            position: relative;
        }
        
        .cell.pre-filled::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, transparent 0%, rgba(79, 70, 229, 0.03) 100%);
            border-radius: 4px;
        }
        
        .cell.selected {
            background-color: #bae6fd;
            box-shadow: inset 0 0 0 2px var(--accent-color);
        }
        
        .cell.error {
            background-color: #fecaca;
            animation: shake 0.5s ease-in-out;
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-3px); }
            75% { transform: translateX(3px); }
        }
        
        .timer {
            font-size: 1.2rem;
            margin-top: 10px;
            font-weight: 600;
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(8px);
            padding: 12px 20px;
            border-radius: 8px;
            box-shadow: var(--shadow);
            color: var(--primary-color);
        }
        
        [data-theme="dark"] .timer {
            background: rgba(30, 41, 59, 0.75);
        }
        
        .message {
            margin-top: 15px;
            padding: 15px;
            border-radius: 8px;
            font-weight: 500;
            text-align: center;
            width: 100%;
            max-width: 500px;
            box-shadow: var(--shadow);
        }
        
        .success {
            background-color: #dcfce7;
            color: #166534;
            border: 1px solid #bbf7d0;
        }
        
        .error-message {
            background-color: #fef2f2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }
        
        /* 成功动画效果 */
        .success-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 2000;
            display: none;
        }
        
        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            opacity: 0;
        }
        
        .celebration-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 5em;
            font-weight: bold;
            color: gold;
            text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
            opacity: 0;
            animation: celebrate-pulse 1.5s ease-in-out;
            animation-fill-mode: forwards;
            z-index: 3000;
        }
        
        .win-message {
            position: absolute;
            top: 60%;
            left: 50%;
            transform: translateX(-50%);
            font-size: 1.5em;
            font-weight: bold;
            color: white;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
            opacity: 0;
            animation: message-appear 2s ease-in-out 0.5s forwards;
            z-index: 3001;
        }
        
        @keyframes message-appear {
            0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
            50% { opacity: 1; transform: translateX(-50%) translateY(-10px); }
            100% { opacity: 1; transform: translateX(-50%) translateY(0); }
        }
        
        @keyframes confetti-fall {
            0% {
                transform: translateY(-100px) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) rotate(720deg);
                opacity: 0;
            }
        }
        
        @keyframes celebrate-pulse {
            0% {
                transform: translate(-50%, -50%) scale(0.1);
                opacity: 0;
            }
            50% {
                transform: translate(-50%, -50%) scale(1.2);
                opacity: 1;
            }
            100% {
                transform: translate(-50%, -50%) scale(1);
                opacity: 1;
            }
        }
        
        /* 气球样式 */
        .balloon {
            position: absolute;
            width: 36px;
            height: 46px;
            border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
            opacity: 0;
            z-index: 2999;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }
        
        .balloon::before {
            content: '';
            position: absolute;
            bottom: -6px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 8px solid var(--balloon-color, #999);
        }
        
        .balloon::after {
            content: '';
            position: absolute;
            bottom: -40px;
            left: 50%;
            transform: translateX(-50%);
            width: 1px;
            height: 34px;
            background: rgba(255,255,255,0.6);
        }
        
        @keyframes balloon-rise-left {
            0% {
                transform: translateY(0) translateX(0) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 0.95;
            }
            50% {
                transform: translateY(-45vh) translateX(-15px) rotate(-8deg);
                opacity: 0.9;
            }
            100% {
                transform: translateY(-95vh) translateX(-25px) rotate(-12deg);
                opacity: 0;
            }
        }
        
        @keyframes balloon-rise-right {
            0% {
                transform: translateY(0) translateX(0) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 0.95;
            }
            50% {
                transform: translateY(-45vh) translateX(15px) rotate(8deg);
                opacity: 0.9;
            }
            100% {
                transform: translateY(-95vh) translateX(25px) rotate(12deg);
                opacity: 0;
            }
        }
        
        /* 开始按钮样式 */
        .timer-container {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 10px;
        }
        
        .start-btn {
            padding: 12px 24px;
            font-size: 1rem;
            font-weight: 600;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
            transition: all 0.3s ease;
        }
        
        .start-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
        }
        
        .start-btn:active {
            transform: translateY(0);
        }
        
        .start-btn.hidden {
            display: none;
        }
        
        /* 虚拟键盘样式 */
        .virtual-keyboard {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: rgba(30, 41, 59, 0.95);
            padding: 20px 15px;
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 12px;
            z-index: 1000;
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .virtual-keyboard.active {
            transform: translateY(0);
        }
        
        .key {
            background-color: rgba(255, 255, 255, 0.95);
            border: none;
            border-radius: 12px;
            padding: 18px 5px;
            font-size: 22px;
            font-weight: bold;
            cursor: pointer;
            text-align: center;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            color: #1e293b;
            transition: all 0.2s ease;
        }
        
        .key:hover {
            background-color: rgba(255, 255, 255, 1);
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0,0,0,0.15);
        }
        
        .key:active {
            transform: translateY(0);
        }
        
        .key.action {
            background-color: rgba(76, 175, 80, 0.95);
            color: white;
        }
        
        .key.delete {
            background-color: rgba(244, 67, 54, 0.95);
            color: white;
        }
        
        .keyboard-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.7);
            z-index: 999;
            display: none;
        }
        
        .keyboard-overlay.active {
            display: block;
        }
        
        @media (min-width: 601px) {
            .virtual-keyboard {
                display: none;
            }
            
            .cell {
                width: 50px;
                height: 50px;
            }
            
            .sudoku-grid {
                max-width: 550px;
            }
        }
        
        @media (max-width: 600px) {
            .cell {
                width: 35px;
                height: 35px;
                font-size: 18px;
            }
            
            .sudoku-grid {
                max-width: 350px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .controls {
                gap: 8px;
                padding: 12px;
            }
            
            .btn {
                padding: 10px 15px;
                font-size: 14px;
            }
            
            select {
                padding: 10px;
                font-size: 14px;
            }
        }
        
        /*排榜模态框样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 2000;
            backdrop-filter: blur(5px);
        }
        
        .modal-overlay.active {
            display: flex;
        }
        
        .modal-content {
            background: var(--card-bg);
            border-radius: 16px;
            width: 90%;
            max-width: 600px;
            max-height: 80vh;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
            animation: modal-pop 0.3s ease-out;
        }
        
        @keyframes modal-pop {
            0% {
                transform: scale(0.8);
                opacity: 0;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
        }
        
        .modal-header h2 {
            margin: 0;
            font-size: 1.8rem;
            font-weight: 600;
        }
        
        .close-btn {
            background: none;
            border: none;
            font-size: 2rem;
            color: white;
            cursor: pointer;
            padding: 0;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background-color 0.2s ease;
        }
        
        .close-btn:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }
        
        .modal-body {
            padding: 20px;
        }
        
        .leaderboard-filters {
            margin-bottom: 20px;
            text-align: center;
        }
        
        .leaderboard-filters select {
            padding: 10px 15px;
            font-size: 16px;
            border-radius: 8px;
            border: 2px solid var(--border-color);
            background-color: var(--card-bg);
            color: var(--text-primary);
            cursor: pointer;
            transition: border-color 0.3s ease;
        }
        
        .leaderboard-filters select:focus {
            outline: none;
            border-color: var(--primary-color);
        }
        
        .leaderboard-container {
            max-height: 500px;
            overflow-y: auto;
        }
        
        .leaderboard-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .leaderboard-item {
            display: flex;
            align-items: center;
            padding: 15px;
            background: var(--light-bg);
            border-radius: 12px;
            box-shadow: var(--shadow);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        
        .leaderboard-item:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }
        
        .leaderboard-item.clicked-light {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
        }
        
        .leaderboard-item.clicked-light .player-name,
        .leaderboard-item.clicked-light .player-time,
        .leaderboard-item.clicked-light .player-date {
            color: white !important;
        }
        
        .leaderboard-item.clicked-dark {
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
        }
        
        .leaderboard-item.clicked-dark .player-name,
        .leaderboard-item.clicked-dark .player-time,
        .leaderboard-item.clicked-dark .player-date {
            color: #1f2937 !important;
        }
        
        .rank {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 1.2rem;
            margin-right: 15px;
            border-radius: 50%;
        }
        
        .rank-1 {
            background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
            color: #8B4513;
        }
        
        .rank-2 {
            background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
            color: #696969;
        }
        
        .rank-3 {
            background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);
            color: #8B4513;
        }
        
        .rank-other {
            background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
            color: var(--text-secondary);
        }
        
        .player-info {
            flex: 1;
        }
        
        .player-name {
            font-weight: 600;
            font-size: 1.1rem;
            color: var(--text-primary);
            margin-bottom: 4px;
        }
        
        .player-details {
            display: flex;
            gap: 15px;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        
        .player-time {
            font-weight: 500;
            color: var(--primary-color);
        }
        
        .player-date {
            font-size: 0.85rem;
        }
        
        .difficulty-tag {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        .difficulty-easy {
            background-color: #dcfce7;
            color: #166534;
        }
        
        .difficulty-medium {
            background-color: #fef3c7;
            color: #92400e;
        }
        
        .difficulty-hard {
            background-color: #fee2e2;
            color: #991b1b;
        }
        
        .empty-leaderboard {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-secondary);
        }
        
        .empty-leaderboard p {
            font-size: 1.1rem;
            margin-bottom: 10px;
        }
        
        .empty-leaderboard .emoji {
            font-size: 3rem;
            margin-bottom: 15px;
            display: block;
        }
        
        /* 名字输入模态框样式 */
        .name-input-container {
            text-align: center;
            padding: 20px;
        }
        
        .success-message {
            font-size: 1.3rem;
            color: var(--success-color);
            font-weight: 600;
            margin-bottom: 15px;
        }
        
        .time-display {
            font-size: 1.2rem;
            color: var(--primary-color);
            font-weight: 500;
            margin-bottom: 25px;
        }
        
        .name-input-group {
            margin-bottom: 25px;
        }
        
        .name-input-group label {
            display: block;
            font-size: 1.1rem;
            color: var(--text-primary);
            margin-bottom: 10px;
            font-weight: 500;
        }
        
        #playerName {
            width: 100%;
            max-width: 300px;
            padding: 12px 15px;
            font-size: 16px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            background-color: var(--card-bg);
            color: var(--text-primary);
            text-align: center;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        
        #playerName:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
        }
        
        #playerName::placeholder {
            color: var(--text-secondary);
        }
        
        .name-input-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }
        
        @media (max-width: 480px) {
            .name-input-buttons {
                flex-direction: column;
                align-items: center;
            }
            
            .name-input-buttons .btn {
                width: 100%;
                max-width: 200px;
            }
        }
