* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 开始页面样式 */
.start-view {
    width: 100%;
    max-width: 800px;
}

.start-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.start-card h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.exam-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.exam-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.exam-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.exam-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.exam-item p {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.exam-date {
    color: #999;
    font-size: 0.8rem;
}

/* 答题页面样式 */
.quiz-view {
    width: 100%;
    max-width: 800px;
}

.quiz-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.back-button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #667eea;
    font-weight: bold;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.quiz-progress {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quiz-progress p {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #667eea;
}

.question-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.question-number {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1rem;
}

.question-category {
    background: #f0f2ff;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.question-content {
    margin-bottom: 30px;
}

.question-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

.options {
    margin-bottom: 30px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-item.selected {
    border-color: #667eea;
    background: #f0f2ff;
}

.option-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
}

.option-item.selected .option-label {
    background: #667eea;
    color: white;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 结果页面样式 */
.result-view {
    width: 100%;
    max-width: 900px;
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.result-header h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.score-display {
    margin-bottom: 15px;
}

.score-number {
    font-size: 4rem;
    font-weight: bold;
    color: #667eea;
}

.score-total {
    font-size: 2rem;
    color: #999;
}

.result-header p {
    font-size: 1.2rem;
    color: #666;
}

.result-details {
    margin-bottom: 30px;
}

.result-details h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4rem;
}

.result-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #e0e0e0;
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.correct {
    color: #67c23a;
    font-weight: bold;
}

.incorrect {
    color: #f56c6c;
    font-weight: bold;
}

.question-text {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #333;
}

.answer-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.user-answer, .correct-answer {
    padding: 10px;
    border-radius: 8px;
}

.user-answer {
    background: #fef0f0;
    border: 1px solid #f56c6c;
}

.correct-answer {
    background: #f0f9ff;
    border: 1px solid #67c23a;
}

.answer-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.user-answer .answer-label {
    color: #f56c6c;
}

.correct-answer .answer-label {
    color: #67c23a;
}

.answer-text {
    font-weight: bold;
}

.explanation {
    background: linear-gradient(135deg, #f0f2ff 0%, #e8ecff 100%);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.explanation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #667eea;
}

.explanation-label {
    font-weight: bold;
    color: #667eea;
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.explanation-label::before {
    content: '💡';
    margin-right: 8px;
    font-size: 1.1rem;
}

.explanation p {
    line-height: 1.6;
    color: #333;
    font-size: 0.95rem;
    margin: 0;
}

/* 为正确和错误的答案项添加不同的左侧边框颜色 */
.result-item.correct-answer {
    border-left-color: #67c23a;
}

.result-item.incorrect-answer {
    border-left-color: #f56c6c;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .start-card, .question-card, .result-card {
        padding: 20px;
    }
    
    .exam-list {
        grid-template-columns: 1fr;
    }
    
    .answer-comparison {
        grid-template-columns: 1fr;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .score-total {
        font-size: 1.5rem;
    }
}