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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #90A4AE 0%, #607D8B 100%);
            min-height: 100vh;
            color: #fff;
            overflow-x: hidden;
            user-select: none;
        }

        .game-container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .game-header {
            text-align: center;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .game-header h1 {
            font-size: 2.5rem;
            font-weight: 300;
            margin-bottom: 10px;
            letter-spacing: 3px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .game-subtitle {
            font-size: 1rem;
            opacity: 0.8;
            letter-spacing: 1px;
        }

        .test-settings {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .settings-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 15px;
        }

        .setting-group {
            text-align: center;
        }

        .setting-group h4 {
            margin-bottom: 10px;
            font-weight: 300;
            opacity: 0.9;
        }

        .setting-buttons {
            display: flex;
            gap: 8px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .setting-btn {
            padding: 8px 16px;
            border: none;
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            border: 2px solid transparent;
        }

        .setting-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .setting-btn.active {
            background: rgba(255, 255, 255, 0.25);
            border-color: rgba(255, 255, 255, 0.5);
        }

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

        .stat-card {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 600;
            margin-bottom: 5px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .stat-label {
            font-size: 0.9rem;
            opacity: 0.8;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .typing-area {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            min-height: 300px;
            position: relative;
        }

        .text-display {
            font-family: 'Courier New', monospace;
            font-size: 1.2rem;
            line-height: 1.8;
            margin-bottom: 20px;
            padding: 20px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 15px;
            min-height: 150px;
            overflow-y: auto;
            user-select: text;
        }

        .text-display .char {
            position: relative;
        }

        .text-display .char.correct {
            background-color: rgba(76, 175, 80, 0.3);
            color: #4CAF50;
        }

        .text-display .char.incorrect {
            background-color: rgba(244, 67, 54, 0.3);
            color: #F44336;
        }

        .text-display .char.current {
            background-color: rgba(255, 215, 79, 0.5);
            animation: cursor-blink 1s infinite;
        }

        @keyframes cursor-blink {
            0%, 50% { opacity: 1; }
            51%, 100% { opacity: 0.3; }
        }

        .typing-input {
            width: 100%;
            padding: 15px;
            font-size: 1.1rem;
            font-family: 'Courier New', monospace;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 15px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            outline: none;
            backdrop-filter: blur(10px);
        }

        .typing-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .typing-input:focus {
            border-color: rgba(255, 255, 255, 0.6);
            background: rgba(255, 255, 255, 0.15);
        }

        .progress-container {
            margin: 20px 0;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #4CAF50, #81C784);
            border-radius: 4px;
            transition: width 0.3s ease;
            width: 0;
        }

        .progress-text {
            text-align: center;
            margin-top: 10px;
            opacity: 0.8;
            font-size: 0.9rem;
        }

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

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 25px;
            background: #546E7A;
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            box-shadow: 0 4px 15px rgba(84, 110, 122, 0.3);
            min-width: 120px;
        }

        .btn:hover {
            background: #455A64;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(84, 110, 122, 0.4);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .btn.start-btn {
            background: #4CAF50;
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        }

        .btn.start-btn:hover {
            background: #43A047;
        }

        .btn.secondary {
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
        }

        .btn.secondary:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .results-panel {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            display: none;
        }

        .results-panel.show {
            display: block;
        }

        .results-panel h3 {
            text-align: center;
            margin-bottom: 20px;
            font-weight: 300;
            font-size: 1.3rem;
        }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .result-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            text-align: center;
        }

        .result-value {
            font-size: 2.5rem;
            font-weight: 600;
            margin-bottom: 8px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .result-label {
            font-size: 0.9rem;
            opacity: 0.8;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .mistakes-display {
            margin-top: 20px;
            padding: 15px;
            background: rgba(244, 67, 54, 0.1);
            border-radius: 15px;
            border: 1px solid rgba(244, 67, 54, 0.3);
        }

        .mistakes-title {
            font-weight: 600;
            margin-bottom: 10px;
            color: #FFCDD2;
        }

        .mistake-item {
            display: flex;
            justify-content: space-between;
            padding: 5px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .mistake-item:last-child {
            border-bottom: none;
        }

        /* 弹窗样式 */
        .popup {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .popup.show {
            display: flex;
        }

        .popup-content {
            background: linear-gradient(135deg, #90A4AE 0%, #607D8B 100%);
            border-radius: 25px;
            padding: 40px;
            text-align: center;
            max-width: 600px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.2);
            max-height: 80vh;
            overflow-y: auto;
        }

        .popup-content h2 {
            font-size: 2rem;
            margin-bottom: 25px;
            font-weight: 300;
        }

        .popup-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 20px;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .game-container {
                padding: 15px;
                gap: 15px;
            }
            
            .game-header h1 {
                font-size: 2rem;
            }
            
            .settings-row {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .text-display {
                font-size: 1rem;
                padding: 15px;
            }
            
            .typing-input {
                font-size: 1rem;
            }
            
            .game-controls {
                flex-direction: column;
                align-items: center;
            }
            
            .btn {
                min-width: 200px;
            }
        }

        @media (max-width: 480px) {
            .game-stats {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .results-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .setting-buttons {
                justify-content: center;
            }
        }