 :root {
            --primary: #4a6cf7;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-300: #d1d5db;
            --gray-700: #374151;
            --gray-900: #111827;
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: var(--gray-900);
            background-color: #f8f9fa;
            padding: 10px;
            height: 100vh;
            overflow: hidden;
        }
        
        .container {
            height: 100%;
            display: flex;
            flex-direction: column;
            background-color: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            overflow: hidden;
        }
        
        header {
            background: linear-gradient(120deg, var(--primary), #7c3aed);
            color: white;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 16px;
            font-weight: 700;
        }
        
        .logo i {
            font-size: 20px;
        }
        
        .settings-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .settings-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(30deg);
        }
        
    
        .param-item {
            background-color: white;
            padding: 6px 10px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            border: 1px solid var(--gray-200);
        }
        
        .content-area {
            padding: 12px;
            flex-grow: 1;
            overflow: auto;
            display: flex;
            flex-direction: column;
        }
        
        .debug-info {
            margin: 10px 0;
            padding: 10px;
            background-color: #e6f4ff;
            border-radius: 6px;
            border-left: 4px solid var(--primary);
            font-size: 12px;
            text-align: center;
        }
        
        .screen {
            display: none;
            flex-direction: column;
            height: 10%;
        }
        
        .mode-screen {
            display: flex;
        }
        
        .mode-title {
            text-align: center;
            margin-bottom: 15px;
            color: var(--gray-700);
            font-size: 16px;
            font-weight: 600;
        }
        
        .mode-cards {
            display: flex;
            flex-direction: column;
            gap: 35px;
            justify-content: center;
            flex-grow: 1;
        }
        
        .mode-card {
            background: white;
            border-radius: 12px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            box-shadow: 0 10px 10px rgb(16 185 129 / 32%);
            border: 2px solid transparent;
            transition: all 0.3s;
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .mode-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 15px rgba(74, 108, 247, 0.15);
            border-color: var(--primary);
        }
        
        .mode-icon {
            font-size: 28px;
            color: var(--primary);
            margin-bottom: 10px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: rgba(74, 108, 247, 0.1);
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .mode-name {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--gray-900);
        }
        
        .mode-desc {
            color: var(--gray-700);
            margin-bottom: 12px;
            font-size: 13px;
        }
        
        .mode-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: auto;
        }
        
        .mode-btn:hover {
            background: #3a5be0;
        }
        
        .test-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            flex-wrap: wrap;
            gap: 8px;
            flex-shrink: 0;
        }
        
        .back-btn {
            background: var(--gray-100);
            border: none;
            padding: 6px 12px;
            border-radius: 20px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            transition: all 0.3s;
        }
        
        .back-btn:hover {
            background: var(--gray-200);
        }
        
        .progress-container {
            background-color: var(--gray-100);
            border-radius: 6px;
            padding: 10px;
            flex-grow: 1;
            min-width: 0;
        }
        
        .progress-bar {
            height: 6px;
            background-color: var(--gray-200);
            border-radius: 3px;
            margin-top: 5px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background-color: var(--primary);
            width: 0%;
            border-radius: 3px;
            transition: width 0.5s ease;
        }
        
        .progress-text {
            font-size: 12px;
            text-align: center;
            margin-bottom: 3px;
            color: var(--gray-700);
        }
        
        .question-container {
            background-color: white;
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
            text-align: center;
            margin-bottom: 15px;
            border: 1px solid var(--gray-200);
            flex-shrink: 0;
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-direction: row-reverse;
        }
        
        .question-header {
            display: flex;
            justify-content: center;
            align-items: center;
            
            gap: 10px;
        }
        
        .question-text {
            font-size: 24px;
            font-weight: 700;
            color: var(--gray-900);
            margin-bottom: 8px;
        }
        
        .audio-icon {
            width: 40px;
            height: 40px;
            background-color: rgba(74, 108, 247, 0.1);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            font-size: 18px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .audio-icon.playing {
            animation: pulse 1s infinite;
            background-color: var(--primary);
            color: white;
        }
        
        .options-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
            margin-bottom: 15px;
            flex-shrink: 0;
        }
        
        .option {
            background-color: white;
            border: 2px solid var(--gray-200);
            border-radius: 10px;
            padding: 12px 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .option:hover {
            border-color: var(--primary);
            background-color: rgba(74, 108, 247, 0.05);
        }
        
        .option.selected {
            border-color: var(--primary);
            background-color: rgba(74, 108, 247, 0.05);
        }
        
        .option.correct {
            border-color: var(--success);
            background-color: rgba(16, 185, 129, 0.1);
        }
        
        .option.incorrect {
            border-color: var(--danger);
            background-color: rgba(239, 68, 68, 0.1);
        }
        
        .feedback {
            padding: 12px;
            border-radius: 10px;
            margin-bottom: 12px;
            display: none;
            flex-shrink: 0;
        }
        
        .feedback.correct {
            background-color: rgba(16, 185, 129, 0.1);
            border: 1px solid var(--success);
            color: var(--success);
        }
        
        .feedback.incorrect {
            background-color: rgba(239, 68, 68, 0.1);
            border: 1px solid var(--danger);
            color: var(--danger);
        }
        
        .feedback i {
            font-size: 18px;
            margin-right: 8px;
        }
        
        .feedback-text {
            font-size: 14px;
            font-weight: 600;
        }
        
        .feedback-incorrect .correct-answer {
            font-weight: 700;
            margin-left: 5px;
            color: var(--gray-900);
        }
        
        .action-container {
            display: flex;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .next-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 10px 24px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.3s;
        }
        
        .next-btn:hover {
            background: #3a5be0;
        }
        
        .results-header {
            text-align: center;
            margin-bottom: 20px;
            flex-shrink: 0;
        }
        
        .completed-banner {
            background: var(--success);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            display: inline-block;
            margin-bottom: 10px;
        }
        
        .stats-container {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
            margin-bottom: 20px;
            flex-shrink: 0;
        }
        
        .stat-card {
            background: white;
            border-radius: 12px;
            padding: 15px;
            text-align: center;
            width: calc(50% - 6px);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
            border: 1px solid var(--gray-200);
        }
        
        .stat-value {
            font-size: 28px;
            font-weight: 800;
            margin: 12px 0;
        }
        
        .stat-value.score {
            color: var(--primary);
        }
        
        .stat-value.correct {
            color: var(--success);
        }
        
        .stat-value.mistakes {
            color: var(--danger);
        }
        
        .stat-name {
            color: var(--gray-700);
            font-size: 13px;
        }
        
        .mistake-box {
            background: white;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 15px;
            border: 1px solid var(--gray-200);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
            flex-grow: 1;
            overflow: auto;
        }
        
        .mistake-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            position: sticky;
            top: 0;
            background: white;
            z-index: 10;
            padding-bottom: 5px;
        }
        
        .mistake-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--gray-900);
        }
        
        .mistake-count {
            background: var(--danger);
            color: white;
            border-radius: 16px;
            padding: 2px 8px;
            font-size: 12px;
            font-weight: 600;
            display: flex

        }
        
        .mistake-list {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }
        
        .mistake-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            border-bottom: 1px solid var(--gray-200);
        }
        
        .mistake-word {
            font-weight: 600;
            font-size: 14px;
        }
        
        .mistake-phonetic {
            color: var(--success);
            font-size: 13px;
            font-weight: 500;
            
        }
        
        .actions-container {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .results-btn {
            padding: 10px 20px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.3s;
            flex: 1;
            min-width: 100px;
            text-align: center;
        }
        
        .home-btn {
            background: var(--gray-100);
            color: var(--gray-900);
        }
        
        .home-btn:hover {
            background: var(--gray-200);
        }
        
        .restart-btn {
            background: var(--primary);
            color: white;
        }
        
        .restart-btn:hover {
            background: #3a5be0;
        }
        
        .retest-btn {
            background: var(--danger);
            color: white;
        }
        
        .retest-btn:hover {
            background: #dc2626;
        }
        
        .error-highlight {
            animation: errorPulse 1s ease;
        }
        
        /*.phonetic-highlight {
            color: var(--primary);
            font-weight: 700;
        } */
        
        .alert-container {
            position: fixed;
            top: 40%;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            max-width: 90%;
            width: 100%;
            padding: 0 10px;
            pointer-events: none;
            text-align: center;
            align-items: center;
        }
        
        .param-display {
            display: none;
        }
        
        .alert {
            padding: 10px 15px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            margin-bottom: 5px;
            opacity: 0;
            transform: translateY(-10px);
            animation: fadeIn 0.3s ease forwards;
        }
        
        .alert-warning {
            background-color: #fffbeb;
            color: #b45309;
            border-left: 4px solid #f59e0b;
        }
        
        @keyframes fadeIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(74, 108, 247, 0.4); }
            70% { box-shadow: 0 0 0 8px rgba(74, 108, 247, 0); }
            100% { box-shadow: 0 0 0 0 rgba(74, 108, 247, 0); }
        }
        
        @keyframes errorPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.1); }
            50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
        }
        
        .hidden {
            display: none;
        }
        
        /* 移动端优化 */
        @media (max-width: 480px) {
            body {
                padding: 5px;
            }
            
            .container {
                border-radius: 10px;
            }
            
            header {
                padding: 10px;
            }
            
            .logo {
                font-size: 14px;
            }
            
       
            
            .param-item {
                padding: 4px 8px;
                font-size: 11px;
            }
            
            .content-area {
                padding: 8px;
            }
            
            .mode-title {
                font-size: 15px;
                margin-bottom: 10px;
            }
            
            .mode-icon {
                width: 40px;
                height: 40px;
                font-size: 22px;
            }
            
            .mode-name {
                font-size: 15px;
            }
            
            .mode-desc {
                font-size: 12px;
                margin-bottom: 8px;
            }
            
            .mode-btn {
                padding: 6px 16px;
                font-size: 13px;
            }
            
            .question-text {
                font-size: 22px;
            }
            
            .option {
                padding: 10px;
                font-size: 15px;
            }
            
            .stat-card {
                width: 100%;
                padding: 12px;
              display: flex;
        flex-direction: row;
        justify-content: space-between;
            }
            
            .stat-value {
                font-size: 24px;
                margin: 8px 0;
            }
            
            .results-btn {
                padding: 8px 16px;
                font-size: 12px;
            }
            .mistake-item {
                font-size: 12px;
            }
        }