/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

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

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary {
    background-color: #4a6cf7;
    color: white;
}

.secondary {
    background-color: #e9ecef;
    color: #495057;
}

.success {
    background-color: #40c057;
    color: white;
}

.danger {
    background-color: #fa5252;
    color: white;
}

/* 头部样式 */
header {
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 28px;
    color: #212529;
    margin-bottom: 10px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

/* 主要内容区域 */
main {
    flex: 1;
}

section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 30px;
}

.hidden {
    display: none;
}

.active {
    display: block;
}

/* 欢迎页面 */
.welcome-content {
    text-align: center;
    padding: 40px 0;
}

.welcome-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #212529;
}

.welcome-content p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 答题页面 */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.progress-info {
    flex: 1;
}

#questionNumber {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 8px;
    display: block;
}

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

.progress {
    height: 100%;
    background-color: #4a6cf7;
    transition: width 0.3s ease;
}

.question-type {
    padding: 5px 15px;
    background-color: #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    color: #495057;
}

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

.question-header {
    display: flex;
    align-items: center;
    /*margin-bottom: 10px;*/
}

.marker-indicator {
    color: #fcc419;
    font-size: 20px;
    margin-right: 10px;
}

.question {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}

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

.option {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    background-color: #f8f9fa;
}

.option.selected {
    border-color: #4a6cf7;
    background-color: #eef2ff;
}

.option.correct {
    border-color: #40c057;
    background-color: #d3f9d8;
}

.option.wrong {
    border-color: #fa5252;
    background-color: #ffe3e3;
}

.option-label {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    margin-right: 15px;
}

.option.selected .option-label {
    background-color: #4a6cf7;
    color: white;
}

.option.correct .option-label {
    background-color: #40c057;
    color: white;
}

.option.wrong .option-label {
    background-color: #fa5252;
    color: white;
}

.option-text {
    flex: 1;
}

.explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #4a6cf7;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.submit-btn, .view-answer-btn, .next-btn, .mark-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.submit-btn:hover, .view-answer-btn:hover, .next-btn:hover, .mark-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.submit-btn {
    background-color: #40c057;
    color: white;
}

.view-answer-btn {
    background-color: #4a6cf7;
    color: white;
}

.next-btn {
    background-color: #4a6cf7;
    color: white;
}

.mark-btn {
    background-color: #fcc419;
    color: #212529;
}

.mark-btn.marked {
    background-color: #e9ecef;
    color: #495057;
}

.exam-footer {
    display: flex;
    justify-content: space-between;
}

/* 结果页面 */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #212529;
}

.score-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score {
    font-size: 48px;
    font-weight: 700;
    color: #4a6cf7;
}

.total {
    font-size: 24px;
    color: #adb5bd;
}

.percentage {
    font-size: 20px;
    color: #6c757d;
    margin-top: 10px;
}

.result-details {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.label {
    color: #6c757d;
}

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

/* 错题本页面 */
.wrong-questions-header {
    margin-bottom: 20px;
}

.wrong-questions-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #212529;
}

#wrongCount {
    color: #6c757d;
    font-size: 16px;
}

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

.wrong-question {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.wrong-question:last-child {
    margin-bottom: 0;
}

.wrong-question-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.wrong-question-number {
    font-size: 14px;
    color: #6c757d;
    margin-right: 5px;
}

.wrong-question-type {
    font-size: 14px;
    color: #6c757d;
}

.wrong-question-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    line-height: 1.5;
}

.wrong-question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.no-wrong-message, .no-marked-message {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-size: 16px;
}

.wrong-questions-footer {
    display: flex;
    justify-content: space-between;
}

/* 标记题目页面 */
.marked-questions-header {
    margin-bottom: 20px;
}

.marked-questions-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #212529;
}

#markedCount {
    color: #6c757d;
    font-size: 16px;
}

.marked-questions-list {
    margin-bottom: 30px;
}

.marked-question {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.marked-question:last-child {
    margin-bottom: 0;
}

.marked-question-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.marked-question-number {
    font-size: 14px;
    color: #6c757d;
    margin-right: 5px;
}

.marked-question-type {
    font-size: 14px;
    color: #6c757d;
}

.marked-question-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    line-height: 1.5;
}

.marked-question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.marked-questions-footer {
    display: flex;
    justify-content: space-between;
}

/* 练习模式和考试模式样式 */
.practice-mode .question-type {
    background-color: #d3f9d8;
    color: #2b8a3e;
}

.exam-mode .question-type {
    background-color: #ffe3e3;
    color: #c92a2a;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #6c757d;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-buttons {
        margin-top: 15px;
    }

    section {
        padding: 20px;
    }

    .exam-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .question-type {
        margin-top: 10px;
    }

    .exam-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn {
        flex: 1;
        text-align: center;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .submit-btn, .view-answer-btn, .next-btn, .mark-btn {
        width: 100%;
    }
}
