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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.page {
    display: none;
    padding: 30px;
}

.page.active {
    display: block;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

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

.subtitle {
    color: #666;
    font-size: 14px;
}

/* 信息卡片 */
.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.info-card p {
    margin: 10px 0;
    color: #555;
    line-height: 1.6;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 10px;
}

.btn-secondary:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.btn-nav {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px;
}

.btn-nav:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-submit {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px;
}

/* 开始区域 */
.start-section {
    text-align: center;
    margin: 30px 0;
}

/* 统计区域 */
.stats-section {
    margin-top: 30px;
}

.stats-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 考试头部 */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.exam-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.exam-timer {
    font-size: 16px;
    color: #e74c3c;
    font-weight: bold;
}

.exam-progress {
    font-size: 14px;
    color: #666;
}

/* 题目容器 */
.question-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
}

.question-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

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

.question-score {
    background: #f5576c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.question-source {
    background: #2ecc71;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
}

.question-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

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

.option-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-item.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option-item.correct {
    border-color: #2ecc71;
    background: #2ecc71;
    color: white;
}

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

.option-label {
    font-weight: bold;
    margin-right: 15px;
    min-width: 30px;
}

/* 填空题输入 */
.question-input input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-top: 10px;
}

.question-input input:focus {
    outline: none;
    border-color: #667eea;
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* 结果页面 */
.result-summary {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.score-circle {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.score {
    font-size: 72px;
    font-weight: bold;
    color: white;
}

.score-total {
    font-size: 24px;
    color: rgba(255,255,255,0.8);
}

.result-details {
    color: white;
    font-size: 18px;
    line-height: 2;
}

.result-actions {
    text-align: center;
    margin: 30px 0;
}

/* 错题区域 */
.wrong-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.wrong-section h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.wrong-item {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.wrong-question {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.wrong-answer {
    color: #e74c3c;
    margin: 5px 0;
}

.correct-answer {
    color: #2ecc71;
    margin: 5px 0;
}

.wrong-explanation {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    color: #666;
}

/* 反馈区域 */
.feedback {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.feedback.correct {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.feedback.wrong {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.feedback-content {
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .exam-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-buttons button {
        width: 100%;
        margin: 5px 0;
    }
}
