/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --danger-color: #ff595e;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-light: #e9ecef;
    --gray: #6c757d;
    --gray-dark: #343a40;
    
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.8rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-menu button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-menu button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-menu button.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-settings {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

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

/* 设置面板 */
.settings-panel {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: var(--box-shadow);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-panel h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.settings-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.settings-group input[type="number"] {
    width: 60px;
    padding: 5px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
}

.btn-reset {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

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

/* 主内容区 */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
}

/* 首页样式 */
.home-page .page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-subtext {
    font-size: 0.9rem;
    color: var(--gray);
}

.accuracy-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.accuracy-fill {
    height: 100%;
    background: linear-gradient(to right, #4cc9f0, #4361ee);
    border-radius: 3px;
    transition: width 1s ease;
}

/* 主题选择 */
.topics-section {
    margin-bottom: 40px;
}

.topics-section h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.topic-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.topic-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.topic-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.topic-info {
    flex: 1;
}

.topic-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: white;
}

.topic-info p {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
    margin-bottom: 10px;
}

.topic-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 1s ease;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.topic-arrow {
    color: white;
    font-size: 1.2rem;
}

/* 快速开始 */
.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.action-btn {
    background: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 30px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: var(--box-shadow);
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.action-btn i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.action-btn span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark-color);
}

.action-btn small {
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
}

/* 练习模式样式 */
.practice-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.practice-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.practice-info {
    display: flex;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    font-weight: bold;
    color: var(--gray);
}

.info-value {
    font-weight: bold;
    color: var(--primary-color);
}

.practice-controls {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    box-shadow: var(--box-shadow);
}

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

.control-label {
    font-weight: bold;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

select {
    padding: 8px 15px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

select:hover {
    border-color: var(--primary-color);
}

.control-switches {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.switch input {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--gray-light);
    border-radius: 12px;
    transition: var(--transition);
}

.slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

input:checked + .slider {
    background: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* 题目区域 */
.question-area {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.question-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-light);
}

.question-meta {
    display: flex;
    gap: 20px;
}

.question-number {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.question-difficulty {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.difficulty-1 {
    background: #d4edda;
    color: #155724;
}

.difficulty-2 {
    background: #fff3cd;
    color: #856404;
}

.difficulty-3 {
    background: #f8d7da;
    color: #721c24;
}

.difficulty-4 {
    background: #cce5ff;
    color: #004085;
}

.difficulty-5 {
    background: #e2e3e5;
    color: #383d41;
}

.question-type {
    padding: 3px 10px;
    background: var(--gray-light);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.question-content {
    margin-bottom: 30px;
}

.question-text {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: #f8f9fa;
}

.question-text.chinese {
    border-left: 4px solid var(--primary-color);
}

.question-text.english {
    border-left: 4px solid var(--secondary-color);
}

.question-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 选项区域 */
.options-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 30px 0;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateX(5px);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.option-item.correct {
    border-color: #28a745;
    background: #d4edda;
}

.option-item.wrong {
    border-color: #dc3545;
    background: #f8d7da;
}

.option-letter {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--gray-dark);
    flex-shrink: 0;
}

.option-item.selected .option-letter {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.option-item.correct .option-letter {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.option-item.wrong .option-letter {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.option-content {
    flex: 1;
}

.option-text {
    line-height: 1.5;
}

.option-text.chinese {
    color: var(--gray);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.option-text.english {
    font-weight: 500;
}

.option-feedback {
    font-size: 1.2rem;
}

.correct-icon {
    color: #28a745;
}

.wrong-icon {
    color: #dc3545;
}

/* 答案解析 */
.explanation-area {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
}

.explanation-header {
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.explanation-content {
    line-height: 1.6;
}

.explanation-text {
    margin-bottom: 15px;
}

.explanation-text.chinese {
    color: var(--gray-dark);
}

.explanation-result {
    padding: 15px;
    border-radius: var(--border-radius);
    font-weight: bold;
    margin-top: 15px;
}

.result-correct {
    color: #155724;
    background: #d4edda;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-wrong {
    color: #721c24;
    background: #f8d7da;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 导航按钮 */
.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.nav-btn {
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.prev-btn {
    background: #6c757d;
    color: white;
}

.prev-btn:hover {
    background: #5a6268;
    transform: translateX(-3px);
}

.next-btn {
    background: var(--primary-color);
    color: white;
}

.next-btn:hover {
    background: var(--primary-dark);
    transform: translateX(3px);
}

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

.nav-middle {
    display: flex;
    gap: 15px;
}

.mark-btn {
    background: #ffc107;
    color: #856404;
}

.mark-btn:hover {
    background: #e0a800;
    transform: translateY(-3px);
}

.mark-btn.marked {
    background: #fd7e14;
    color: white;
}

.wrong-btn {
    background: #dc3545;
    color: white;
}

.wrong-btn:hover {
    background: #c82333;
    transform: translateY(-3px);
}

/* 进度指示器 */
.progress-indicator {
    margin-top: 20px;
}

.progress-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-light);
    cursor: pointer;
    transition: var(--transition);
}

.progress-dot:hover {
    transform: scale(1.3);
}

.progress-dot.current {
    background: var(--primary-color);
    transform: scale(1.3);
}

.progress-dot.answered {
    background: #17a2b8;
}

.progress-dot.correct {
    background: #28a745;
}

.progress-dot.wrong {
    background: #dc3545;
}

/* 无题目提示 */
.no-questions {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.no-questions-icon {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.no-questions h3 {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.btn-home {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-home:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* 考试模式样式 */
.exam-setup {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.exam-setup h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-description {
    color: var(--gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.setup-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.setup-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.setup-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.setup-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.setup-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.setup-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.number-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.number-selector button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.number-selector button:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.number-selector span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 50px;
}

.time-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.exam-settings {
    margin-bottom: 30px;
}

.exam-settings h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.exam-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-start-exam {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.btn-start-exam:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 考试进行中 */
.exam-in-progress {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.exam-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exam-timer {
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-timer.warning {
    color: #ffc107;
    animation: pulse 1s infinite;
}

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

.exam-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 300px;
    margin: 0 20px;
}

.exam-progress .progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

.exam-progress .progress-fill {
    height: 100%;
    background: white;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.btn-submit-exam {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 8px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-submit-exam:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.exam-question-area {
    padding: 30px;
}

.exam-question-content {
    margin-bottom: 30px;
}

.exam-question-text {
    margin-bottom: 30px;
}

.question-chinese {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.question-english {
    font-size: 1.2rem;
    font-weight: 500;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.exam-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.exam-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.exam-option:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateX(5px);
}

.exam-option.selected {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.option-letter {
    width: 35px;
    height: 35px;
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--gray-dark);
    flex-shrink: 0;
}

.exam-option.selected .option-letter {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

.exam-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.exam-navigation button {
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.exam-navigation button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.exam-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.exam-quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    flex: 1;
    margin: 0 20px;
}

.nav-dot {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-dot:hover {
    transform: scale(1.1);
}

.nav-dot.current {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.nav-dot.answered {
    background: #4cc9f0;
    color: white;
}

/* 考试结果 */
.exam-result {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
}

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

.result-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.exam-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.result-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.score-card {
    text-align: center;
}

.score-number {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.score-label {
    font-size: 1.2rem;
    color: var(--gray);
    margin-top: 10px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

.detail-item {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-weight: bold;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.result-btn {
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-btn {
    background: #17a2b8;
    color: white;
}

.review-btn:hover {
    background: #138496;
    transform: translateY(-3px);
}

.restart-btn {
    background: var(--primary-color);
    color: white;
}

.restart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.home-btn {
    background: #6c757d;
    color: white;
}

.home-btn:hover {
    background: #5a6268;
    transform: translateY(-3px);
}

/* 错题本样式 */
.wrong-questions-page {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.wrong-header {
    margin-bottom: 30px;
}

.wrong-header h2 {
    font-size: 2rem;
    color: var(--danger-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wrong-subtitle {
    color: var(--gray);
    margin-bottom: 20px;
}

.wrong-stats {
    display: flex;
    gap: 30px;
}

.wrong-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--danger-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 5px;
}

.wrong-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.wrong-actions {
    display: flex;
    gap: 10px;
}

.wrong-action-btn {
    padding: 10px 20px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.wrong-action-btn:hover {
    background: #e63946;
    transform: translateY(-2px);
}

.wrong-filters {
    display: flex;
    gap: 15px;
}

.wrong-filters select {
    padding: 8px 15px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
}

.wrong-list {
    margin-bottom: 30px;
}

.wrong-item {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.wrong-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wrong-item-header {
    background: #fff3cd;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ffeaa7;
}

.wrong-topic {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topic-badge {
    padding: 5px 12px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

.wrong-date {
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.wrong-actions {
    display: flex;
    gap: 10px;
}

.action-btn.small {
    padding: 5px 12px;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.action-btn.small:hover {
    transform: translateY(-2px);
}

.action-btn.small.delete {
    background: #dc3545;
    color: white;
}

.wrong-item-content {
    padding: 20px;
}

.wrong-question {
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.wrong-answer-info {
    display: flex;
    gap: 30px;
}

.your-answer, .correct-answer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.label {
    font-weight: bold;
    color: var(--gray);
}

.answer {
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 4px;
}

.wrong-answer {
    background: #f8d7da;
    color: #721c24;
}

.correct-answer {
    background: #d4edda;
    color: #155724;
}

.wrong-stats {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

.wrong-stat {
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.pagination button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-weight: bold;
    color: var(--gray);
}

/* 无错题提示 */
.no-wrong-questions {
    text-align: center;
    padding: 60px 20px;
}

.no-wrong-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.no-wrong-questions h3 {
    font-size: 1.5rem;
    color: #28a745;
    margin-bottom: 10px;
}

.no-wrong-questions p {
    color: var(--gray);
    margin-bottom: 20px;
}

.btn-practice {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-practice:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* 底部样式 */
.footer {
    background: linear-gradient(to right, var(--dark-color), #343a40);
    color: white;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
    opacity: 0.8;
    position: relative;
    padding-left: 20px;
}

.footer-section ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .nav-menu button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .practice-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-switches {
        margin-left: 0;
        flex-wrap: wrap;
    }
    
    .question-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-middle {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .setup-options {
        grid-template-columns: 1fr;
    }
    
    .exam-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .exam-progress {
        width: 100%;
        max-width: none;
    }
    
    .wrong-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .wrong-actions {
        justify-content: center;
    }
    
    .wrong-filters {
        justify-content: center;
    }
    
    .result-actions {
        flex-direction: column;
    }
}