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

        body {
            font-family: 'Microsoft YaHei', 'SF Pro Display', -apple-system, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #2c3e50;
            padding: 20px;
            overflow-x: hidden;
        }

        .game-container {
            max-width: 800px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 30px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
        }

        h1 {
            text-align: center;
            font-size: 2.8rem;
            color: #2c3e50;
            margin-bottom: 30px;
            font-weight: 700;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .game-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
        }

        .stat-item {
            background: linear-gradient(135deg, #9B59B6, #8E44AD);
            color: white;
            padding: 15px;
            border-radius: 16px;
            text-align: center;
            box-shadow: 0 8px 25px rgba(155, 89, 182, 0.3);
            transition: transform 0.3s ease;
        }

        .stat-item:hover {
            transform: translateY(-2px);
        }

        .stat-label {
            font-size: 0.85rem;
            font-weight: 600;
            opacity: 0.9;
            margin-bottom: 5px;
        }

        .stat-value {
            font-size: 1.4rem;
            font-weight: 700;
        }

        .mode-selector {
            margin-bottom: 25px;
            text-align: center;
            background: rgba(255, 255, 255, 0.8);
            padding: 20px;
            border-radius: 16px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .mode-selector h3 {
            color: #2c3e50;
            margin-bottom: 15px;
            font-size: 1.2rem;
        }

        .mode-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .mode-btn {
            padding: 10px 20px;
            border: 2px solid #e2e8f0;
            border-radius: 25px;
            background: white;
            color: #2c3e50;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .mode-btn:hover {
            background: #f8fafc;
            transform: translateY(-2px);
        }

        .mode-btn.active {
            background: linear-gradient(135deg, #9B59B6, #8E44AD);
            color: white;
            border-color: #9B59B6;
        }

        .game-controls {
            display: flex;
            gap: 15px;
            margin-bottom: 30px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 50px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn.secondary {
            background: linear-gradient(135deg, #4ECDC4, #44A08D);
            box-shadow: 0 6px 20px rgba(78, 205, 196, 0.3);
        }

        .btn.secondary:hover {
            box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
        }

        .btn.success {
            background: linear-gradient(135deg, #4CAF50, #45a049);
            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
        }

        .btn.success:hover {
            box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
        }

        .beat-display {
            background: #34495e;
            border-radius: 16px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            text-align: center;
        }

        .bpm-display {
            color: white;
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 20px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .beat-indicator {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: white;
            transition: all 0.2s ease;
            box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
        }

        .beat-indicator.active {
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            transform: scale(1.1);
            box-shadow: 0 12px 35px rgba(39, 174, 96, 0.5);
        }

        .beat-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            margin-bottom: 20px;
        }

        .beat-btn {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            border: none;
            font-size: 1.5rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        }

        .beat-btn.primary {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
        }

        .beat-btn.secondary {
            background: linear-gradient(135deg, #f39c12, #e67e22);
            color: white;
        }

        .beat-btn:hover {
            transform: scale(1.05);
        }

        .beat-btn:active {
            transform: scale(0.95);
        }

        .rhythm-pattern {
            background: rgba(255, 255, 255, 0.8);
            padding: 25px;
            border-radius: 16px;
            margin-bottom: 30px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .rhythm-pattern h3 {
            color: #2c3e50;
            margin-bottom: 20px;
            font-size: 1.3rem;
            text-align: center;
        }

        .pattern-display {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .pattern-beat {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #bdc3c7;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            transition: all 0.3s ease;
        }

        .pattern-beat.strong {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            color: white;
        }

        .pattern-beat.weak {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
        }

        .pattern-beat.current {
            transform: scale(1.3);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        .accuracy-meter {
            background: rgba(255, 255, 255, 0.8);
            padding: 20px;
            border-radius: 16px;
            margin-bottom: 20px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .accuracy-bar {
            width: 100%;
            height: 20px;
            background: #e2e8f0;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 10px;
        }

        .accuracy-fill {
            height: 100%;
            background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60);
            border-radius: 10px;
            transition: width 0.3s ease;
            width: 0%;
        }

        .accuracy-text {
            text-align: center;
            font-weight: 600;
            color: #2c3e50;
        }

        .game-complete-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .complete-content {
            background: white;
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            max-width: 400px;
            margin: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        .complete-content h2 {
            color: #27ae60;
            margin-bottom: 20px;
            font-size: 2rem;
        }

        .complete-stats {
            margin-bottom: 25px;
        }

        .complete-stats p {
            margin-bottom: 10px;
            font-size: 1.1rem;
            color: #2c3e50;
        }

        .celebration {
            font-size: 3rem;
            margin-bottom: 20px;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        .instructions {
            background: rgba(255, 255, 255, 0.8);
            padding: 25px;
            border-radius: 16px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .instructions h3 {
            color: #2c3e50;
            margin-bottom: 20px;
            font-size: 1.3rem;
            text-align: center;
        }

        .instruction-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .instruction-item {
            background: white;
            padding: 15px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .instruction-icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #9B59B6, #8E44AD);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .instruction-text {
            flex: 1;
        }

        .instruction-text h4 {
            color: #2c3e50;
            margin-bottom: 5px;
            font-size: 1rem;
        }

        .instruction-text p {
            color: #7f8c8d;
            font-size: 0.85rem;
            line-height: 1.4;
        }

        @media (max-width: 768px) {
            .game-container {
                padding: 20px;
                margin: 10px;
            }

            h1 {
                font-size: 2.2rem;
            }

            .game-stats {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }

            .mode-buttons, .game-controls {
                flex-direction: column;
                align-items: center;
            }

            .btn, .mode-btn {
                width: 100%;
                max-width: 200px;
            }

            .beat-buttons {
                gap: 15px;
            }

            .beat-btn {
                width: 60px;
                height: 60px;
                font-size: 1.2rem;
            }

            .bpm-display {
                font-size: 2.5rem;
            }

            .beat-indicator {
                width: 100px;
                height: 100px;
                font-size: 1.5rem;
            }

            .instruction-grid {
                grid-template-columns: 1fr;
            }

            .complete-content {
                padding: 30px 20px;
            }
        }

        @media (max-width: 480px) {
            .game-stats {
                grid-template-columns: 1fr;
            }

            .pattern-display {
                gap: 5px;
            }

            .pattern-beat {
                width: 30px;
                height: 30px;
                font-size: 0.8rem;
            }
        }