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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

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

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin: 0;
}

.back-home-btn {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.exam-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2em;
    color: #555;
}

/* 首页样式 */
.exam-types {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.exam-type {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.exam-type h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.5em;
}

.exam-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exam-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.exam-item a {
    display: block;
    text-decoration: none;
    color: #3498db;
    font-size: 1.1em;
    text-align: center;
}

.exam-item a:hover {
    color: #2980b9;
}

/* 考试页面样式 */
.question-container {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.question-header h3 {
    color: #2c3e50;
    font-size: 1.3em;
}

.question-score {
    background-color: #3498db;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

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

.question-content p {
    margin-bottom: 10px;
}

/* 下载区域样式 */
.download-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 8px;
    border-width:0px;
    border-left: 4px solid #4169e1;
    display: block;
}

.download-section strong {
    display: block;
    margin-bottom: 8px;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #4169e1;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.download-link:hover {
    background-color: #315cd0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.download-icon {
    font-size: 1.2em;
}

.download-link:active {
    transform: translateY(0);
}

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

.option-item {
    display: flex;
    align-items: flex-start;
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    background-color: #f0f4f8;
    transform: translateX(5px);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    margin-right: 15px;
    margin-top: 5px;
    transform: scale(1.2);
}

.option-content {
    flex: 1;
}

.option-content p {
    margin: 0;
}

.question-answer {
    background-color: #e8f5e8;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #4caf50;
}

.answer-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2e7d32;
}

.answer-content {
    margin-bottom: 15px;
}

.explain-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2e7d32;
}

.explain-content {
    white-space: pre-wrap;
}

/* 操作题解析样式 */
.operation-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.operation-step {
    background-color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #2196f3;
    width: 100%;
    min-height: auto;
}

.step-title {
    font-weight: bold;
    color: #1565c0;
    margin-bottom: 2px;
    font-size: 0.9em;
    white-space: normal;
    line-height: 1.2;
}

.step-content {
    color: #333;
    line-height: 1.3;
    margin-left: 5px;
    font-size: 0.85em;
    word-break: break-word;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
}

/* 导航按钮样式 */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* 题目导航样式 */
.question-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.question-nav-item {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.question-nav-item:hover {
    background-color: #3498db;
    color: #fff;
    transform: scale(1.1);
}

.question-nav-item.active {
    background-color: #3498db;
    color: #fff;
    font-weight: bold;
}

/* 结果页面样式 */
.result-summary {
    text-align: center;
    margin-bottom: 40px;
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-summary h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2em;
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin-bottom: 20px;
}

.score-label {
    font-size: 1.2em;
    color: #555;
    margin-right: 10px;
}

.score-value {
    font-size: 3em;
    font-weight: bold;
    color: #2ecc71;
    margin-right: 5px;
}

.score-out-of {
    font-size: 1.5em;
    color: #7f8c8d;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

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

.stat-label {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-value.correct {
    color: #2ecc71;
}

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

/* 题目结果样式 */
.question-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-result-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.result-question-number {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.result-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.result-status.correct {
    background-color: #2ecc71;
    color: #fff;
}

.result-status.incorrect {
    background-color: #e74c3c;
    color: #fff;
}

.result-status.unanswered {
    background-color: #f39c12;
    color: #fff;
}

.result-question-content {
    margin-bottom: 15px;
}

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

.options-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.options-list .option-item {
    padding: 8px 12px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 2px solid #e0e0e0;
}

.answer-comparison {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.answer-row {
    display: flex;
    margin-bottom: 10px;
}

.answer-label {
    width: 100px;
    font-weight: bold;
    color: #555;
}

.answer-value {
    flex: 1;
}

.answer-value.correct {
    color: #2ecc71;
}

.answer-value.incorrect {
    color: #e74c3c;
}

.explanation {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #2196f3;
    margin-top: 15px;
}

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

.explanation-title {
    font-weight: bold;
    color: #1565c0;
}

.expand-btn {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.3s ease;
}

.expand-btn:hover {
    background-color: #1976d2;
}

.explanation-content {
    white-space: pre-wrap;
    transition: all 0.3s ease;
}

/* 结果页面按钮 */
.result-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.back-btn {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .exam-types {
        flex-direction: column;
        align-items: center;
    }
    
    .exam-type {
        min-width: 100%;
    }
    
    .exam-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .answer-row {
        flex-direction: column;
        gap: 5px;
    }
}