/* ============================================
   题库公共样式 - question-bank-list.css
   适用于：单选题库、判断题库、编程题库
============================================ */

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section 基础样式（具体颜色由各页面覆盖） */
.hero-section {
    width: 100%;
    margin: 0 0 2rem 0;
    padding: 3rem 0;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
}

.hero-section .title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 题库切换卡片样式 */
.quiz-switch-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 0 !important;
}

.quiz-switch-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #363636;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    margin-top: 0 !important;
}

.quiz-switch-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quiz-switch-btn {
    flex: 1;
    text-align: center;
    transition: all 0.2s;
}

.quiz-switch-btn:hover {
    transform: translateY(-2px);
}

/* 单选题库按钮 - 醒目蓝色 */
.btn-singlechoice {
    background-color: #3298dc !important;
    color: white !important;
    border-color: #3298dc !important;
}

.btn-singlechoice:hover {
    background-color: #2780b5 !important;
    color: white !important;
}

/* 判断题库按钮 - 醒目绿色 */
.btn-truefalse {
    background-color: #48c774 !important;
    color: white !important;
    border-color: #48c774 !important;
}

.btn-truefalse:hover {
    background-color: #3bb36b !important;
    color: white !important;
}

/* 编程题库按钮 - 醒目红色 */
.btn-programming {
    background-color: #ff3860 !important;
    color: white !important;
    border-color: #ff3860 !important;
}

.btn-programming:hover {
    background-color: #e61a4d !important;
    color: white !important;
}

/* 题目解析中代码的样式 */
.message-body code {
    background-color: #fff0cc !important;
    color: #8b2500 !important;
    font-weight: 600 !important;
    padding: 0.2em 0.4em !important;
    border-radius: 4px !important;
    font-size: 0.9em !important;
}

/* 筛选区域样式 */
.filter-bar {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #363636;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group .tags {
    max-height: none;
    overflow-y: visible;
    flex-wrap: wrap;
}

.filter-group .tag {
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.filter-group .tag:hover {
    transform: translateY(-2px);
    background-color: #3273dc;
    color: white;
}

.filter-group .tag.active {
    background-color: #ff3860;
    color: white;
}

/* 内容区域 */
.content-area {
    margin-top: 0;
}

/* 左侧主内容区 - 自然滚动 */
.main-content {
    overflow-y: visible;
    height: auto;
    padding: 0;
}

/* 题目列表容器 */
.questions-list {
    padding: 0;
}

/* 题目卡片基础样式（具体左边框颜色由各页面覆盖） */
.question-box {
    margin-bottom: 1.5rem;
}

/* 知识点、参考代码和解析默认隐藏 */
.knowledge-container {
    display: none;
}

.knowledge-container.show {
    display: block;
}

.reference-code-container {
    display: none;
}

.reference-code-container.show {
    display: block;
}

.analysis-container {
    display: none;
}

.analysis-container.show {
    display: block;
}

/* 难度标签 */
.difficulty-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.difficulty-1 {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.difficulty-2 {
    background-color: #fff3e0;
    color: #f57c00;
}

.difficulty-3 {
    background-color: #ffebee;
    color: #c62828;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: #f5f5f5;
    border-radius: 0.75rem;
    color: #7a7a7a;
}

/* 禁用的复选框样式 */
label.checkbox.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

label.checkbox.disabled:hover {
    cursor: not-allowed;
}

.disabled-hint {
    font-size: 0.75rem;
    color: #f14668;
    margin-left: 0.5rem;
}

/* 复选框组样式 */
.checkbox-group {
    margin-bottom: 0.75rem;
}

.checkbox-group:last-child {
    margin-bottom: 0;
}

/* 右侧边栏样式 - 浮动固定，不被导航条遮住 */
.sidebar-section {
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 1rem;
    position: sticky;
    top: 80px;
    height: auto;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* 题目导航标签样式 */
.question-nav-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.question-nav-tag {
    cursor: pointer;
    min-width: 2.5em;
    justify-content: center;
    transition: all 0.2s;
}

/* 正确选项高亮样式 - 只作用于选项 */
[id^="option-"].has-background-success-light {
    background-color: #e8f5e9;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin: -0.5rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .option {
        font-size: 0.9rem;
    }

    .filter-group .tags {
        max-height: 120px;
        overflow-y: auto;
    }

    /* 移动端取消粘性定位 */
    .sidebar-section {
        position: static;
        margin-top: 1rem;
    }

    .quiz-switch-buttons {
        flex-direction: column;
    }
}