/* 智学习 - 法学智能学习平台样式文件 */

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

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面头部 */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main {
    padding: 40px 0;
}

/* 筛选器区域 */
.filter-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.filter-container {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: bold;
    color: #666;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* 知识点统计面板 */
.subject-stats {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
}

#stats-text {
    font-weight: bold;
}

/* 进度统计 */
.progress-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.progress-item {
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    min-width: 150px;
}

.progress-item .label {
    font-weight: bold;
    color: #666;
}

/* 题目卡片 */
.question-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

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

#question-text {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.question-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* 题目统计信息样式 */
.question-stats {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #f0f4f8;
    color: #4a5568;
    margin-bottom: 15px;
    display: inline-block;
    font-weight: 500;
}

.question-stats-mastered {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.question-stats-high-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.question-stats-needs-practice {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.question-stats-normal {
    background-color: #f0f4f8;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.difficulty {
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #e3f2fd;
    color: #1976d2;
}

.subject {
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #fff3e0;
    color: #f57c00;
}

/* 选项容器 */
.options-container {
    margin-bottom: 20px;
}

.option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.option.selected {
    background-color: #e3f2fd;
    border: 2px solid #1976d2;
}

.option.correct {
    background-color: #e8f5e9;
    border: 2px solid #4caf50;
}

.option.incorrect {
    background-color: #ffebee;
    border: 2px solid #f44336;
}

.option-letter {
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
    margin-right: 10px;
}

.option-text {
    flex: 1;
    font-size: 1.1rem;
}

/* 题目操作按钮 */
.question-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

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

/* 功能按钮 */
.function-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#explanation-text {
    margin-top: 15px;
    line-height: 1.8;
    color: #555;
}

/* 页面底部 */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* 题目列表样式 */
.question-list {
    max-height: 400px;
    overflow-y: auto;
}

.question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.question-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.question-item.answered {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.question-item.answered.incorrect {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.question-item.unanswered {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
}

.question-number {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2c3e50;
    min-width: 50px;
    text-align: center;
}

.question-preview {
    flex: 1;
    margin-left: 15px;
    font-size: 0.9rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.question-status {
    margin-left: 15px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.question-status.answered {
    background-color: #e8f5e9;
    color: #4caf50;
}

.question-status.unanswered {
    background-color: #fff3e0;
    color: #ff9800;
}

/* 状态标识说明样式 */
.status-explanation {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.status-explanation h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.status-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 120px;
}

.status-badge {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid;
}

.status-badge.mastered {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status-badge.needs-practice {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.status-badge.high-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.status-badge.normal {
    background-color: #f0f4f8;
    color: #4a5568;
    border-color: #e2e8f0;
}

.status-desc {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .progress-info {
        flex-direction: column;
        align-items: center;
    }

    .question-card {
        padding: 20px;
    }

    #question-text {
        font-size: 1.2rem;
    }

    .question-actions {
        flex-direction: column;
    }

    .function-buttons {
        flex-direction: column;
        align-items: center;
    }

    .question-preview {
        display: none;
    }

    .question-number {
        min-width: 40px;
    }

    .status-items {
        flex-direction: column;
        gap: 15px;
    }

    .status-item {
        min-width: auto;
    }
}