/* 纯白简约风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    height: calc(100vh - 40px);
}

/* 桌面端左右布局 */
.desktop-layout {
    display: flex;
    gap: 20px;
    height: 100%;
}

/* 左侧主内容区域 */
.main-content {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 右侧题目导航区域（桌面端） */
.question-sidebar {
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 侧边栏内容区域 - 可滚动 */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 题目导航按钮 */
.question-nav-buttons {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.nav-button:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.nav-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 题目内容区域 */
.question-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.question-header {
    margin-bottom: 24px;
}

.question-number {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
}

.question-number .small {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    margin-left: 4px;
}

/* 题目类型标签 */
.question-type-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.question-type-tag.single {
    background: #e3f2fd;
    color: #1976d2;
}

.question-type-tag.multiple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.question-type-tag.judge {
    background: #e8f5e8;
    color: #388e3c;
}

.question-text {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 32px;
    color: #1a1a1a;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}

/* 解析区域 */
.explanation-box {
    margin-bottom: 24px;
    padding: 20px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
    border: 1px solid;
    background: #ffffff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.explanation-box.correct {
    border-color: #d4edda;
    background: #f8fff9;
}

.explanation-box.wrong {
    border-color: #f8d7da;
    background: #fff9f9;
}

.explanation-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.explanation-header.correct {
    color: #28a745;
}

.explanation-header.wrong {
    color: #dc3545;
}

.answer-details {
    margin: 20px 0;
}

/* 仅保留一条分割线 */
.answer-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

.user-answer, .correct-answer {
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.user-answer.wrong {
    color: #dc3545;
}

.correct-answer {
    color: #28a745;
}

.answer-text {
    font-weight: normal;
    margin-left: 5px;
}

.answer-list {
    display: inline-block;
    margin-left: 5px;
}

.answer-item {
    display: inline-block;
    margin-right: 10px;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}

.correct-answer .answer-item {
    background: #e8f5e9;
    color: #28a745;
}

.user-answer.wrong .answer-item {
    background: #ffebee;
    color: #dc3545;
}

.explanation-content {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.explanation-label {
    font-weight: 600;
    margin-right: 5px;
}

/* 选项区域 */
.options-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 32px;
}

/* 判断题的特殊样式 */
.judge-options {
    grid-template-columns: repeat(2, 1fr);
}

.option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option:hover:not(.disabled) {
    border-color: #007bff;
    background: #f0f7ff;
}

.option.selected {
    border-color: #007bff;
    background: #f0f7ff;
}

.option.selected .option-label {
    background: #007bff;
    color: #ffffff;
}

.option.answered-correct {
    border-color: #28a745;
    background: #f0fff4;
}

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

.option.disabled {
    cursor: default;
}

.option.disabled:hover {
    background: inherit;
    border-color: inherit;
}

.option-label {
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    margin-right: 16px;
    flex-shrink: 0;
    font-size: 14px;
    transition: all 0.2s ease;
}

.option.selected .option-label {
    background: #007bff;
    color: #ffffff;
}

.option.answered-correct .option-label {
    background: #28a745;
    color: #ffffff;
}

.option.answered-wrong .option-label {
    background: #dc3545;
    color: #ffffff;
}

.option-text {
    flex: 1;
    font-size: 16px;
    color: #333;
}

.answer-status {
    position: absolute;
    right: 20px;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.option.answered-correct .answer-status {
    color: #28a745;
    opacity: 1;
}

.option.answered-wrong .answer-status {
    color: #dc3545;
    opacity: 1;
}

/* 操作按钮区域 */
.action-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

/* 下一题按钮样式 */
.next-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.2);
}

.next-btn:hover:not(:disabled) {
    background: #0069d9;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.next-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 侧边栏题目导航 - 调整为参考大小 */
.navigation-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navigation-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}

.questions-range {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

/* 底部分页控制 */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.page-nav-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-nav-btn:hover:not(.disabled) {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.page-nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 题目网格 - 调整为5列5行，25个题目 */
.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    /* 固定5行，每行5个 */
    grid-template-rows: repeat(5, 1fr);
    min-height: 250px; /* 确保有足够的高度显示5行 */
}

.question-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    color: #666;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    transition: all 0.2s ease;
    min-height: 40px; /* 设置最小高度确保大小统一 */
}

.question-nav-btn:hover {
    background: #f5f5f5;
    border-color: #007bff;
    color: #007bff;
}

.question-nav-btn.current {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
    font-weight: 500;
}

.question-nav-btn.answered {
    background: #e8f5e9;
    color: #28a745;
    border-color: #c8e6c9;
}

.question-nav-btn.answered-wrong {
    background: #ffebee;
    color: #dc3545;
    border-color: #ffcdd2;
}

.navigation-footer {
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #999;
    text-align: center;
}

/* 底部题目导航（移动端专用） */
.mobile-navigation {
    display: none;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin-top: 20px;
}

/* 移动端分页控制 */
.mobile-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-questions-range {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 16px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 18px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 400;
}

.empty-state-description {
    font-size: 14px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .app-container {
        max-width: 100%;
        padding: 15px;
    }
    
    .question-sidebar {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .question-sidebar {
        width: 280px;
    }
    
    .question-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .app-container {
        height: auto;
        padding: 12px;
    }
    
    .desktop-layout {
        flex-direction: column;
    }
    
    .main-content, .question-sidebar {
        height: auto;
    }
    
    .question-sidebar {
        display: none;
        width: 100%;
    }
    
    .mobile-navigation {
        display: block;
    }
    
    .question-text {
        font-size: 16px;
        padding: 16px;
    }
    
    .option-text {
        font-size: 15px;
    }
    
    .question-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
}

@media (max-width: 480px) {
    .question-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
    
    .question-nav-btn {
        font-size: 12px;
        min-height: 35px;
    }
    
    .option {
        padding: 14px 16px;
    }
    
    .option-label {
        width: 28px;
        height: 28px;
        margin-right: 12px;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }
}