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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    text-align: center;
}

/* 题型选择页面样式 */
.question-type-selector {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.type-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.type-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 30px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.type-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.type-btn h3 {
    margin-bottom: 10px;
    font-size: 1.4em;
}

.type-btn p {
    font-size: 0.9em;
    opacity: 0.9;
    line-height: 1.4;
}

.type-btn.random-test {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.type-btn.random-test:hover {
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.3);
}

/* 题目类型文本样式 */
.question-type-text {
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 3px;
}

.question-type-text.type-single {
    color: #5a67d8;
    background: rgba(90, 103, 216, 0.1);
}

.question-type-text.type-multiple {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
}

.question-type-text.type-judge {
    color: #3182ce;
    background: rgba(49, 130, 206, 0.1);
}

.question-type-text.type-unknown {
    color: #718096;
    background: rgba(113, 128, 150, 0.1);
}

/* 小尺寸题目类型标签（用于结果详情） */
.question-type-badge-small {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 500;
    margin: 0 5px;
}

.question-type-badge-small.type-single {
    color: #5a67d8;
    background: rgba(90, 103, 216, 0.15);
}

.question-type-badge-small.type-multiple {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.15);
}

.question-type-badge-small.type-judge {
    color: #3182ce;
    background: rgba(49, 130, 206, 0.15);
}

.question-type-badge-small.type-unknown {
    color: #718096;
    background: rgba(113, 128, 150, 0.15);
}


/* 题目页面样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.back-btn:hover {
    background: #2980b9;
}

#page-title {
    font-size: 1.8em;
    margin: 0;
    flex: 1;
    text-align: center;
}

.header h1 {
    font-size: 1.8em;
    margin: 0;
    flex: 1;
    text-align: center;
}

.question-stats {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    min-height: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.question-item h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    line-height: 1.5;
}

.question-content {
    margin-bottom: 25px;
    font-size: 1.1em;
    line-height: 1.6;
}

.options {
    margin: 20px 0;
}

.option {
    background: #f8f9fa;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
    transition: all 0.3s;
    cursor: pointer;
}

.option:hover {
    background: #e9ecef;
}

.option.correct, .option.correct-answer {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.option.wrong, .option.wrong-answer {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.judge-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

.judge-btn {
    padding: 15px 30px;
    border: 2px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: default;
    transition: all 0.3s;
}

.judge-btn.correct, .judge-btn.correct-answer {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.judge-btn.wrong, .judge-btn.wrong-answer {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.answer-section {
    margin-top: 25px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    display: none;
}

.answer-section.show {
    display: block;
}

.answer-section h4 {
    color: #155724;
    margin-bottom: 10px;
}

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

.navigation button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.navigation button:hover:not(:disabled) {
    background: #2980b9;
}

.navigation button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#show-answer-btn {
    background: #e67e22;
}

#show-answer-btn:hover {
    background: #d35400;
}

.loading {
    text-align: center;
    font-size: 1.2em;
    color: #7f8c8d;
    padding: 50px 0;
}

.error {
    text-align: center;
    color: #e74c3c;
    padding: 50px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        text-align: left;
    }
    
    .question-stats {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .question-container {
        padding: 20px;
    }
    
    .navigation {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .navigation button {
        flex: 1;
        min-height: 48px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        padding: 12px 8px;
        white-space: nowrap;
    }
    
    /* 上一题和下一题按钮 */
    #prev-btn, #next-btn {
        max-width: 80px;
        font-size: 14px;
    }
    
    /* 显示/隐藏答案按钮 */
    #show-answer-btn {
        max-width: none;
        flex: 2;
        margin: 0 8px;
    }
    
    .judge-options {
        flex-direction: column;
        align-items: center;
    }
    
    .judge-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* 随机测试页面样式 */
.test-progress {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

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

.test-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.test-navigation button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.test-navigation button:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.test-navigation button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.test-navigation button.primary {
    background: #e74c3c;
}

.test-navigation button.primary:hover {
    background: #c0392b;
}

/* 在导航区域中的提交答案按钮特殊样式 */
.test-navigation .submit-answer-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    font-weight: 600;
    border: 2px solid transparent;
}

.test-navigation .submit-answer-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.test-navigation .submit-answer-btn.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1;
    transform: translateY(0);
}

.test-navigation .submit-answer-btn:not(.show) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0;
    transform: translateY(10px);
}

.choice-options, .judge-options {
    margin: 25px 0;
}

.choice-option, .judge-option {
    display: flex;
    align-items: center;
    margin: 12px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s;
}

.choice-option:hover, .judge-option:hover {
    background: #e9ecef;
    border-left-color: #3498db;
}

.choice-option input, .judge-option input {
    margin-right: 12px;
    transform: scale(1.2);
    cursor: pointer;
}

.choice-option span, .judge-option span {
    flex: 1;
    font-size: 1.05em;
    cursor: pointer;
}

.judge-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.judge-option {
    flex: 0 0 auto;
    justify-content: center;
    min-width: 120px;
}

/* 答题结果样式 */
.answer-result {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.1em;
    font-weight: 500;
}

.answer-result.correct-result {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.answer-result.incorrect-result {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.answer-result.status-info {
    background: #e7f3ff;
    border: 2px solid #007bff;
    color: #004085;
}

.answer-result .analysis {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.3);
    text-align: left;
    font-size: 0.95em;
    line-height: 1.5;
}

.answer-result .auto-next-info {
    margin-top: 10px;
    font-size: 0.9em;
    opacity: 0.8;
    font-style: italic;
}

/* 正确答案信息显示样式 */
.correct-answers-info {
    margin-top: 15px;
    padding: 12px 16px;
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 8px;
    color: #155724;
    font-size: 14px;
    line-height: 1.5;
}

.correct-answers-info strong {
    color: #0f5132;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

/* 自动下一题信息样式 */
.auto-next-info {
    margin-top: 10px;
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

/* 解析信息样式 */
.analysis {
    margin-top: 15px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
}

.analysis strong {
    color: #007bff;
    font-weight: 600;
}

/* 确认按钮容器 */
.confirm-button-container {
    text-align: center;
    margin: 20px 0;
}

.confirm-answer-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    display: none; /* 初始隐藏 */
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
}

.confirm-answer-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.confirm-answer-btn:active {
    transform: scale(0.98);
}

.multiple-choice-tip {
    text-align: center;
    margin: 15px 0;
    color: #6c757d;
    font-style: italic;
}

.btn-icon {
    font-size: 14px;
}

.status-icon {
    margin-right: 5px;
}

.status-hint {
    color: #28a745;
    font-weight: 500;
}

/* 多选题专用样式 */
.multiple-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-checkbox {
    color: #007bff;
    font-size: 18px;
    font-weight: bold;
    min-width: 20px;
}

.multiple-choice-actions {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.submit-answer-btn {
    /* 这些样式现在主要用于独立显示的提交按钮 */
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.3);
    display: none;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 15px auto;
    min-width: 180px;
    opacity: 0;
    transform: translateY(10px);
}

/* 通用的显示状态，适用于所有位置的提交按钮 */
.submit-answer-btn.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1;
    transform: translateY(0);
}

.submit-answer-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(40, 167, 69, 0.4);
}

.submit-answer-btn:active {
    transform: scale(0.98);
}

.selection-hint {
    color: #6c757d;
    font-style: italic;
    margin-top: 10px;
}


/* 移动端优化 */
@media (max-width: 768px) {
    .multiple-choice-actions {
        margin: 20px 0;
        padding: 15px;
    }
    
    .submit-answer-btn {
        font-size: 16px;
        padding: 14px 28px;
        min-width: 160px;
    }
    
    .option-checkbox {
        font-size: 16px;
    }
}

.choice-option.correct-answer {
    background: #d4edda !important;
    border-left-color: #28a745 !important;
    color: #155724;
}

.choice-option.wrong-answer {
    background: #f8d7da !important;
    border-left-color: #dc3545 !important;
    color: #721c24;
}

.choice-option.user-answer {
    border: 2px solid #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.judge-option.correct-answer {
    background: #d4edda !important;
    border: 2px solid #28a745 !important;
    color: #155724;
}

.judge-option.wrong-answer {
    background: #f8d7da !important;
    border: 2px solid #dc3545 !important;
    color: #721c24;
}

.judge-option.user-answer {
    border: 2px solid #007bff !important;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* 结果弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
}

.result-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    font-weight: bold;
}

.stat-value.pass {
    color: #27ae60;
}

.stat-value.fail {
    color: #e74c3c;
}

.result-details {
    max-height: 300px;
    overflow-y: auto;
}

.result-list {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.result-item {
    display: grid;
    grid-template-columns: 80px 100px 1fr 60px;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
    font-size: 0.9em;
}

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

.result-item.correct {
    background: #d4edda;
}

.result-item.incorrect {
    background: #f8d7da;
}

.result-item.unanswered {
    background: #fff3cd;
}

.question-number {
    font-weight: bold;
}

.question-type {
    color: #6c757d;
    font-size: 0.8em;
}

.question-content {
    color: #495057;
}

.question-status {
    text-align: center;
    font-weight: bold;
    font-size: 0.8em;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.modal-actions button.primary {
    background: #3498db;
    color: white;
}

.modal-actions button.primary:hover {
    background: #2980b9;
}

.modal-actions button.secondary {
    background: #95a5a6;
    color: white;
}

.modal-actions button.secondary:hover {
    background: #7f8c8d;
}

/* 手机端优化 */
/* 增加触摸友好的按钮尺寸 */
@media (max-width: 768px) {
    /* 基础容器优化 */
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    /* 字体大小优化 */
    body {
        font-size: 16px; /* 防止iOS缩放 */
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* 题型选择页面手机端优化 */
    .type-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .type-btn {
        padding: 25px 20px;
        min-height: 100px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    .type-btn h3 {
        font-size: 1.3em;
        margin-bottom: 8px;
    }
    
    .type-btn p {
        font-size: 0.95em;
        line-height: 1.3;
    }
    
    /* 题目类型文本手机端优化 */
    .question-type-text {
        font-size: 0.85em;
        margin-left: 6px;
        padding: 2px 5px;
    }
    
    /* 题目内容手机端优化 */
    .question-content {
        font-size: 1.1em;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    /* 选项按钮优化 - 更大的触摸区域 */
    .choice-option, .judge-option {
        padding: 18px 15px;
        margin: 15px 0;
        min-height: 60px;
        font-size: 1.1em;
        border-radius: 12px;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .choice-option:active, .judge-option:active {
        transform: scale(0.98);
        background: #007bff !important;
        color: white !important;
    }
    
    /* 单选框和复选框优化 */
    .choice-option input, .judge-option input {
        transform: scale(1.5);
        margin-right: 15px;
    }
    
    /* 导航按钮优化 */
    .test-navigation button, .navigation button {
        min-height: 50px;
        font-size: 18px;
        padding: 15px 25px;
        border-radius: 12px;
        font-weight: 600;
    }
    
    /* 进度条区域优化 */
    .test-progress {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .progress-info {
        font-size: 1.1em;
        font-weight: 600;
    }
    
    .progress-bar {
        height: 12px;
        border-radius: 6px;
    }
    
    /* 头部区域优化 */
    .header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.4em;
        margin: 0;
        flex: 1;
        text-align: center;
    }
    
    .back-btn {
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 6px;
        min-height: 40px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* 答案区域优化 */
    .answer-section {
        margin-top: 20px;
        padding: 15px;
        border-radius: 12px;
    }
    
    .answer-result {
        padding: 18px 15px;
        font-size: 1.2em;
        border-radius: 12px;
        margin-bottom: 18px;
    }
    
    /* 模态框手机端优化 */
    .modal {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 20px 15px;
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    .modal-actions button {
        min-height: 50px;
        font-size: 18px;
        padding: 15px 25px;
        border-radius: 12px;
        font-weight: 600;
    }
    
    /* 统计信息优化 */
    .stat-item {
        padding: 12px 0;
        font-size: 1.15em;
        border-bottom: 1px solid #dee2e6;
    }
    
    .stat-item:last-child {
        border-bottom: none;
    }
    
    /* 滚动优化 */
    .result-details {
        max-height: 250px;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 防止双击缩放 */
    * {
        touch-action: manipulation;
    }
    
    /* 输入框焦点优化 */
    input:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }
    
    /* 额外的手机端优化 */
    .test-navigation {
        gap: 10px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 15px;
        border-top: 1px solid #dee2e6;
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .test-navigation button {
        flex: 1 !important;
        min-height: 48px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        padding: 12px 8px !important;
        white-space: nowrap !important;
        max-width: none !important;
    }
    
    /* 移动端导航区域中的提交答案按钮 */
    .test-navigation .submit-answer-btn {
        flex: 1 !important;
        margin: 0 5px !important;
        max-width: none !important;
        min-height: 48px !important;
        font-size: 15px !important;
        padding: 12px 8px !important;
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
        box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3) !important;
        border: none !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }
    
    .test-navigation .submit-answer-btn:hover {
        background: linear-gradient(135deg, #218838 0%, #1ea080 100%) !important;
        box-shadow: 0 3px 8px rgba(40, 167, 69, 0.4) !important;
    }
    
    /* 随机测试导航按钮特殊设置 */
    #prev-btn, #next-btn {
        max-width: 85px !important;
        font-size: 14px !important;
        flex: 0 0 85px !important;
    }
    
    #submit-btn {
        flex: 1 !important;
        margin: 0 10px !important;
        max-width: none !important;
    }
    
    /* 移动端按钮触摸反馈 */
    .navigation button:active, .test-navigation button:active {
        transform: scale(0.98) !important;
        opacity: 0.8 !important;
    }
    
    .navigation button:disabled:active, .test-navigation button:disabled:active {
        transform: none !important;
        opacity: 0.5 !important;
    }
    
    /* 移动端按钮颜色优化 */
    #prev-btn:disabled, #next-btn:disabled {
        background: #e9ecef !important;
        color: #6c757d !important;
    }
    
    #show-answer-btn {
        background: #e67e22 !important;
    }
    
    #show-answer-btn:active {
        background: #d35400 !important;
    }
    
    #submit-btn.primary {
        background: #e74c3c !important;
    }
    
    #submit-btn.primary:active {
        background: #c0392b !important;
    }
    
    .navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 15px;
        border-top: 1px solid #dee2e6;
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .navigation button {
        flex: 1 !important;
        min-height: 48px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        padding: 12px 8px !important;
        white-space: nowrap !important;
        max-width: none !important;
    }
    
    /* 移动端导航按钮特殊设置 */
    #prev-btn, #next-btn {
        max-width: 85px !important;
        font-size: 14px !important;
        flex: 0 0 85px !important;
    }
    
    #show-answer-btn {
        flex: 1 !important;
        margin: 0 10px !important;
        max-width: none !important;
    }
    
    /* 为题目容器添加底部间距，避免被固定按钮遮挡 */
    .question-container {
        padding-bottom: 100px;
        min-height: calc(100vh - 200px);
    }
    
    /* 确保页面有最小高度 */
    body {
        min-height: 100vh;
    }
    
    .container {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    /* 让题目容器占据剩余空间 */
    .question-container {
        flex: 1;
    }
    
    /* 优化长文本显示 */
    .question-content {
        word-break: break-word;
        hyphens: auto;
    }
    
    .choice-option span, .judge-option span {
        word-break: break-word;
        line-height: 1.4;
    }
    
    /* 优化进度条 */
    .progress-info span {
        color: #2c3e50;
        font-weight: 700;
    }
    
    /* 改善可见性 */
    .answer-result {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* 优化模态框在手机端的显示 */
    .modal {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .modal-content h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    /* 改善统计信息的可读性 */
    .stat-value.pass {
        font-size: 1.3em;
    }
    
    .stat-value.fail {
        font-size: 1.3em;
    }

    /* 移动端正确答案信息优化 */
    .correct-answers-info {
        margin-top: 12px;
        padding: 10px 12px;
        font-size: 13px;
        line-height: 1.4;
    }
    
    .analysis {
        margin-top: 12px;
        padding: 10px 12px;
        font-size: 13px;
        line-height: 1.4;
    }
    
    .auto-next-info {
        margin-top: 8px;
        font-size: 13px;
    }
}

/* 桌面端重置导航样式 */
@media (min-width: 769px) {
    .navigation, .test-navigation {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 20px 0 !important;
        padding: 0 !important;
        border-top: none !important;
        box-shadow: none !important;
    }
    
    .container {
        min-height: auto !important;
        display: block !important;
    }
    
    .question-container {
        padding-bottom: 10px !important;
        min-height: auto !important;
        flex: none !important;
    }
    
    body {
        min-height: auto !important;
    }
}

/* 错题练习相关样式 */
.type-btn.wrong-questions {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.type-btn.wrong-questions:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.type-btn.type-test {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
}

.type-btn.type-test:hover {
    background: linear-gradient(135deg, #1976D2 0%, #0288D1 100%);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.wrong-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9em;
    text-align: center;
}

.previous-wrong-answer {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
}

.previous-wrong-answer .option.wrong {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
}

.wrong-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wrong-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
}

.wrong-actions button.danger {
    background: #dc3545;
    color: white;
}

.wrong-actions button.danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.wrong-actions button.secondary {
    background: #6c757d;
    color: white;
}

.wrong-actions button.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 手机端错题练习优化 */
@media (max-width: 768px) {
    .wrong-actions {
        position: fixed;
        bottom: 80px;
        left: 10px;
        right: 10px;
        margin: 0;
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        z-index: 99;
        border-radius: 12px;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    }
    
    .wrong-actions button {
        min-height: 44px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .wrong-info {
        padding: 12px;
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    .previous-wrong-answer {
        padding: 12px;
        margin-top: 15px;
    }
    
    .previous-wrong-answer .option.wrong {
        padding: 10px;
        margin: 8px 0;
        font-size: 1em;
    }
}

/* 题型测试相关样式 */
.timer-display {
    background: #2c3e50;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1em;
    letter-spacing: 1px;
}

.timer-display.warning {
    background: #e74c3c;
    animation: pulse 1s infinite;
}

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

/* 测试进度样式增强 */
.test-progress .progress-info {
    color: #2c3e50;
    font-weight: 600;
}

/* 选中状态样式 */
.option.selected {
    background: #e3f2fd !important;
    border-left-color: #2196F3 !important;
    color: #1976D2 !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.judge-btn.selected {
    background: #e3f2fd !important;
    border-color: #2196F3 !important;
    color: #1976D2 !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

/* 禁用状态样式 */
.option.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.judge-btn.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* 测试结果样式 */
.score-display {
    text-align: center;
    margin: 30px 0;
}

.score-number {
    font-size: 4em;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.score-grade {
    font-size: 1.5em;
    margin-top: 10px;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.score-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.score-details p {
    margin: 8px 0;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.result-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.result-actions button:first-child {
    background: #3498db;
    color: white;
}

.result-actions button:first-child:hover {
    background: #2980b9;
}

.result-actions button:last-child {
    background: #95a5a6;
    color: white;
}

.result-actions button:last-child:hover {
    background: #7f8c8d;
}

/* 测试回顾样式 */
.test-summary {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 30px;
}

.summary-score {
    text-align: center;
    min-width: 150px;
}

.summary-score .score-number {
    font-size: 3em;
    color: #2c3e50;
    font-weight: bold;
}

.summary-score .score-grade {
    font-size: 1.2em;
    margin-top: 8px;
    padding: 6px 16px;
    border-radius: 15px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.detail-item .label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.detail-item .value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.detail-item .value.correct {
    color: #28a745;
}

.detail-item .value.wrong {
    color: #e74c3c;
}

/* 回顾导航按钮 */
.review-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.nav-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* 题目回顾列表 */
.question-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.question-review-item {
    border-left: 4px solid #e9ecef;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.question-review-item.correct {
    border-left-color: #28a745;
    background: #f8fff9;
}

.question-review-item.wrong {
    border-left-color: #dc3545;
    background: #fff8f8;
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.question-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2em;
    display: flex;
    align-items: center;
}

.result-indicator {
    font-size: 1.5em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 50%;
    color: white;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-indicator.correct {
    background: #28a745;
}

.result-indicator.wrong {
    background: #dc3545;
}

.options.review .option {
    cursor: default;
    margin: 8px 0;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #e9ecef;
}

.options.review .option.user-selected {
    background: #e3f2fd;
    border-left-color: #2196F3;
    color: #1976D2;
    font-weight: 500;
}

.options.review .option.correct-answer {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
    font-weight: 500;
}

.judge-options.review {
    margin: 15px 0;
}

.judge-options.review .judge-btn {
    cursor: default;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
}

.judge-options.review .judge-btn.user-selected {
    background: #e3f2fd;
    border-color: #2196F3;
    color: #1976D2;
    font-weight: 500;
}

.judge-options.review .judge-btn.correct-answer {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: 500;
}

.user-answer {
    margin: 15px 0;
    padding: 10px 15px;
    background: #fff;
    border-left: 3px solid #007bff;
    font-size: 0.95em;
}

.no-questions {
    text-align: center;
    color: #6c757d;
    font-size: 1.1em;
    padding: 50px 0;
}

/* 手机端测试样式优化 */
@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .timer-display {
        font-size: 1em;
        padding: 6px 12px;
        order: 3;
        flex: 1 0 100%;
        text-align: center;
        margin-top: 10px;
    }
    
    .summary-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .summary-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .review-navigation {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    
    .nav-btn {
        flex: 1;
        min-width: 80px;
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .question-review-item {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .result-indicator {
        align-self: flex-end;
        margin-top: -10px;
    }
    
    .score-display {
        margin: 20px 0;
    }
    
    .score-number {
        font-size: 3em;
    }
    
    .score-grade {
        font-size: 1.2em;
        padding: 6px 16px;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .result-actions button {
        min-height: 48px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .confirm-answer-btn {
        min-height: 50px !important;
        font-size: 18px !important;
        padding: 15px 30px !important;
        border-radius: 8px !important;
    }
    
    .answer-result {
        padding: 18px 15px;
        font-size: 1.1em;
        border-radius: 12px;
        margin: 18px 0;
    }
    
    .answer-result .analysis {
        margin-top: 12px;
        padding-top: 12px;
        font-size: 1em;
    }
}