/* 高中学业考试刷题宝 - 样式文件 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', '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: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.2em;
    color: #5a67d8;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* 主菜单样式 */
.main-menu {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.menu-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #5a67d8;
}

.menu-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.menu-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.menu-desc {
    font-size: 0.9em;
    color: #666;
}

/* 科目页面样式 */
.subject-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.back-btn {
    background: #e2e8f0;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    margin-right: 20px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #cbd5e0;
}

.page-header h2 {
    color: #5a67d8;
    font-size: 1.8em;
}

/* 模式选择样式 */
.mode-selection {
    margin-bottom: 40px;
}

.mode-selection h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.mode-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.mode-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.mode-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.mode-desc {
    font-size: 0.85em;
    opacity: 0.9;
}

/* 统计样式 */
.stats-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #5a67d8;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* 练习页面样式 */
.practice-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 0 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: bold;
    color: #5a67d8;
}

.question-container {
    background: #f7fafc;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
}

.question-type {
    display: inline-block;
    background: #5a67d8;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.question-content {
    font-size: 1.2em;
    line-height: 1.6;
    color: #333;
    margin-bottom: 25px;
}

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

.option {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    border-color: #5a67d8;
    background: #f0f4ff;
}

.option.selected {
    border-color: #5a67d8;
    background: #e6eeff;
}

.option.correct {
    border-color: #48bb78;
    background: #f0fff4;
}

.option.wrong {
    border-color: #f56565;
    background: #fff5f5;
}

.option-letter {
    width: 30px;
    height: 30px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.option.selected .option-letter {
    background: #5a67d8;
    color: white;
}

.option.correct .option-letter {
    background: #48bb78;
    color: white;
}

.option.wrong .option-letter {
    background: #f56565;
    color: white;
}

.answer-section {
    margin-top: 25px;
    padding: 20px;
    border-radius: 10px;
}

.answer-result {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.answer-result.correct {
    color: #48bb78;
}

.answer-result.wrong {
    color: #f56565;
}

.answer-explanation {
    background: white;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: #e2e8f0;
    color: #333;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* 考试页面样式 */
.exam-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.exam-timer {
    font-size: 1.3em;
    font-weight: bold;
    color: #e53e3e;
}

.exam-progress {
    font-size: 1.1em;
    color: #5a67d8;
}

.exam-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* 结果页面样式 */
.result-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-header h2 {
    color: #5a67d8;
    font-size: 2em;
    margin-bottom: 30px;
}

.result-stats {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

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

.score-number {
    font-size: 5em;
    font-weight: bold;
    color: #5a67d8;
}

.score-label {
    font-size: 2em;
    color: #666;
    margin-left: 10px;
}

.result-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: bold;
    color: #333;
}

.detail-value.correct {
    color: #48bb78;
}

.detail-value.wrong {
    color: #f56565;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .mode-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header {
        flex-direction: column;
        text-align: center;
    }
    
    .back-btn {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #5a67d8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
