/* ============================================================
   题库与做题系统 - 前端样式 (v2.6 - 优化视觉表现)
   ============================================================ */

/* ---------- CSS 变量（亮色主题） ---------- */
:root {
    --eqb-bg:         #ffffff;
    --eqb-bg-soft:    #f7fafb;
    --eqb-bg-hover:   #f0f7fa;
    --eqb-bg-highlight: #e3f2f7;
    --eqb-text:       #1a202c;
    --eqb-text-soft:  #4a5568;
    --eqb-text-muted: #718096;
    --eqb-border:     #e2e8ed;
    --eqb-border-soft:#dce8ec;
    --eqb-primary:    #2c7a8c;
    --eqb-primary-dark:#1a5c6b;
    --eqb-primary-light:#d4e8ef;
    --eqb-accent:     #1565c0;
    --eqb-success:    #2e7d32;
    --eqb-success-bg: #e8f5e9;
    --eqb-danger:     #c62828;
    --eqb-danger-bg:  #ffebee;
    --eqb-warning:    #e65100;
    --eqb-warning-bg: #fff3e0;
    --eqb-shadow:     rgba(0,0,0,0.04);
    --eqb-shadow-hover: rgba(0,0,0,0.08);
    --eqb-batch-bg:   linear-gradient(135deg, #2c7a8c 0%, #1a5c6b 100%);
    --eqb-option-bg:  #ffffff;
    --eqb-answer-bg:  #f8fbfc;
    --eqb-chapter-bg: #ffffff;
}

/* ---------- 通用容器 ---------- */
.eqb-bank {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 2rem);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
    color: var(--eqb-text);
    box-sizing: border-box;
}

/* 桌面端限制最大阅读宽度 */
@media (min-width: 1024px) {
    .eqb-bank { max-width: 1200px; }
}

/* ---------- 筛选栏 ---------- */
.eqb-filters {
    background: var(--eqb-bg-soft);
    border: 1px solid var(--eqb-border-soft);
    border-radius: 12px;
    padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 1.5rem;
}

.eqb-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.eqb-filter-row select,
.eqb-filter-row input[type="text"] {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--eqb-border-soft);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--eqb-bg);
    color: var(--eqb-text);
    min-width: 100px;
    flex: 1;
}

.eqb-filter-row input[type="text"] {
    min-width: 160px;
}

/* ---------- 按钮 ---------- */
.eqb-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    background: var(--eqb-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.eqb-btn:hover {
    background: var(--eqb-primary-dark);
    transform: translateY(-1px);
}

.eqb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.eqb-btn.secondary {
    background: var(--eqb-bg-hover);
    color: var(--eqb-primary);
}

.eqb-btn.secondary:hover {
    background: var(--eqb-primary-light);
}

.eqb-reset-btn {
    text-decoration: none;
}

/* ---------- 批量提交栏 ---------- */
.eqb-batch-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--eqb-batch-bg);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(44,122,140,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.eqb-batch-info { font-size: 0.9rem; flex: 1; }
.eqb-batch-info span { font-weight: 700; font-size: 1.05rem; }

.eqb-btn-batch {
    background: #fff;
    color: var(--eqb-primary);
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.eqb-btn-batch:hover {
    background: var(--eqb-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.eqb-batch-bar .secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.eqb-batch-bar .secondary:hover { background: rgba(255,255,255,0.25); }

/* ---------- 批量提交结果 ---------- */
.eqb-batch-result {
    background: var(--eqb-bg);
    border: 2px solid var(--eqb-primary);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: eqbSlideIn 0.4s ease;
}

.eqb-result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--eqb-border);
}

.eqb-result-icon   { font-size: 1.4rem; }
.eqb-result-title  { font-size: 1.1rem; font-weight: 700; color: var(--eqb-text); }

.eqb-result-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.eqb-stat { font-size: 0.85rem; color: var(--eqb-text-soft); }
.eqb-stat strong { font-size: 1.2rem; margin-right: 0.15rem; }

.eqb-stat-total strong    { color: var(--eqb-primary); }
.eqb-stat-correct strong  { color: var(--eqb-success); }
.eqb-stat-wrong strong    { color: var(--eqb-danger); }
.eqb-stat-unanswered strong { color: var(--eqb-warning); }
.eqb-stat-score strong    { color: var(--eqb-primary); }

/* ---------- 导出工具栏 ---------- */
.eqb-export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--eqb-bg-hover);
    border: 1px solid var(--eqb-primary-light);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.eqb-export-bar-left,
.eqb-export-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.eqb-select-all-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--eqb-text);
    font-weight: 500;
    user-select: none;
}

.eqb-select-all-label input[type="checkbox"] {
    margin: 0;
    accent-color: var(--eqb-primary);
    width: 16px; height: 16px;
}

.eqb-export-count { font-size: 0.8rem; color: var(--eqb-text-soft); }
.eqb-export-count strong { color: var(--eqb-primary); font-size: 0.95rem; }

.eqb-btn-export {
    background: var(--eqb-accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
}
.eqb-btn-export:hover { background: #0d47a1; }
.eqb-btn-export:disabled { opacity: 0.5; cursor: not-allowed; }

.eqb-btn-export-answer {
    background: var(--eqb-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
}
.eqb-btn-export-answer:hover { background: var(--eqb-primary-dark); }
.eqb-btn-export-answer:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 题目卡片 ---------- */
.eqb-question {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    background: var(--eqb-bg);
    border: 1px solid var(--eqb-border);
    border-radius: 12px;
    padding: clamp(0.8rem, 2vw, 1.5rem);
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px var(--eqb-shadow);
    transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.eqb-question:hover {
    box-shadow: 0 3px 12px var(--eqb-shadow-hover);
}

.eqb-question.eqb-judged-correct   { border-left: 4px solid var(--eqb-success); }
.eqb-question.eqb-judged-wrong     { border-left: 4px solid var(--eqb-danger); }
.eqb-question.eqb-judged-unanswered { border-left: 4px solid var(--eqb-warning); }

.eqb-question.checkbox-selected {
    border-color: var(--eqb-primary);
    background: var(--eqb-bg-highlight);
}

/* 复选框 */
.eqb-question-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-top: 3px;
    cursor: pointer;
    flex-shrink: 0;
}

.eqb-question-checkbox input[type="checkbox"] {
    margin: 0;
    accent-color: var(--eqb-primary);
    width: 18px; height: 18px;
    cursor: pointer;
}

.eqb-question-body { flex: 1; min-width: 0; }

/* 题目头部 */
.eqb-question-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.eqb-qnum {
    font-weight: 700;
    font-size: 1rem;
    color: var(--eqb-primary);
    flex-shrink: 0;
}

.eqb-qnum-full {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--eqb-text-soft);
    background: var(--eqb-bg-hover);
    padding: 2px 10px;
    border-radius: 10px;
    margin-right: 0.3rem;
}

.eqb-qtype-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.eqb-type-single_choice { background: #e3f2fd; color: #1565c0; }
.eqb-type-analysis      { background: #fff3e0; color: #e65100; }
.eqb-type-short_answer  { background: #e8f5e9; color: #2e7d32; }
.eqb-type-essay         { background: #fce4ec; color: #c62828; }
.eqb-type-fill_blank    { background: #f3e5f5; color: #6a1b9a; }

.eqb-subject-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    background: var(--eqb-bg-soft);
    color: var(--eqb-text-soft);
    white-space: nowrap;
}

/* 结果徽章 */
.eqb-result-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: auto;
}

.eqb-badge-correct    { background: var(--eqb-success-bg); color: var(--eqb-success); }
.eqb-badge-wrong      { background: var(--eqb-danger-bg);  color: var(--eqb-danger); }
.eqb-badge-unanswered { background: var(--eqb-warning-bg); color: var(--eqb-warning); }

/* 题干 */
.eqb-question-stem { margin-bottom: 0.8rem; }

.eqb-stem-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--eqb-text);
    line-height: 1.6;
    margin: 0 0 0.4rem 0;
}

.eqb-stem-body {
    font-size: 0.9rem;
    color: var(--eqb-text-soft);
    line-height: 1.7;
}

/* ============================================================
   单选选项 —— 完全重写，自定义圆形单选按钮 + 完美居中
   ============================================================ */
.eqb-options {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.eqb-option {
    display: flex;
    align-items: center;        /* 关键：垂直居中所有子元素 */
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--eqb-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    background: var(--eqb-option-bg);
    line-height: 1.5;
    user-select: none;
}

.eqb-option:hover {
    background: var(--eqb-bg-hover);
    border-color: var(--eqb-primary);
}

.eqb-option.selected {
    background: var(--eqb-bg-highlight);
    border-color: var(--eqb-primary);
}

.eqb-option.correct {
    background: var(--eqb-success-bg);
    border-color: #4caf50;
}

.eqb-option.wrong {
    background: var(--eqb-danger-bg);
    border-color: #f44336;
}

/* ---- 选项前的点状框已隐藏（v2.6.1），保留选择功能 ---- */
.eqb-option input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    margin: -1px;
    padding: 0;
    border: 0;
}

.eqb-option-key {
    font-weight: 700;
    color: var(--eqb-primary);
    min-width: 1.2em;
    flex-shrink: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.eqb-option-text { 
    flex: 1; 
    line-height: 1.5;
}

/* 答案区域 */
.eqb-answer-area {
    background: var(--eqb-answer-bg);
    border: 1px solid var(--eqb-primary-light);
    border-left: 4px solid var(--eqb-primary);
    border-radius: 0 10px 10px 0;
    padding: 0.8rem 1rem;
    margin-top: 0.8rem;
    animation: eqbSlideIn 0.3s ease;
}

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

.eqb-answer-label {
    font-size: 0.8rem;
    color: var(--eqb-primary);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.eqb-correct-key   { color: var(--eqb-success); font-size: 1.05rem; }
.eqb-answer-text   { font-size: 0.88rem; color: var(--eqb-text-soft); line-height: 1.8; }
.eqb-answer-text strong,.eqb-answer-text b { font-weight: 700; color: var(--eqb-text); }
.eqb-answer-text em,.eqb-answer-text i     { font-style: italic; }
.eqb-answer-text u { text-decoration: underline; text-underline-offset: 2px; }
.eqb-answer-text a { color: var(--eqb-primary); text-decoration: underline; text-underline-offset: 2px; }
.eqb-answer-text a:hover { color: var(--eqb-primary-dark); }
.eqb-answer-text span[style*="color"] { font-weight: 500; }

/* 搜索提示 */
.eqb-search-hint {
    margin: 0.6rem 0 0;
    font-size: 0.8rem;
    color: var(--eqb-text-soft);
}
.eqb-search-hint strong { color: var(--eqb-primary); }

/* 分题 */
.eqb-sub-questions { display: grid; gap: 0.8rem; }
.eqb-sub-q {
    border-left: 3px solid var(--eqb-border-soft);
    padding-left: 0.8rem;
}
.eqb-sub-q-stem { font-weight: 500; margin-bottom: 0.4rem; color: var(--eqb-text); }

/* 底部按钮 */
.eqb-question-footer {
    display: flex;
    flex-wrap: wrap;
}

/* ---- 做题统计指示器 ---- */
.eqb-attempt-history {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    font-size: 14px;
    opacity: 0.85;
}
.eqb-attempt-history .eqb-attempt-empty { opacity: 0.3; }
.eqb-attempt-label {
    font-size: 11px;
    color: var(--eqb-text-muted);
    margin-left: 4px;
}

/* ---- 收藏按钮样式 ---- */
.eqb-bookmark-btn { cursor: pointer; }
.eqb-bookmark-btn.active {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #e65100;
}
.eqb-bookmark-btn.active:hover {
    background: #ffe0b2;
}

/* 分页（已废弃） */
.eqb-pagination { display: none; }
.eqb-page       { display: none; }

.eqb-empty {
    text-align: center;
    padding: 3rem;
    color: var(--eqb-text-muted);
    font-size: 0.95rem;
}

/* ---------- 章节复选框树 ---------- */
.eqb-chapter-tree {
    position: relative;
    min-width: 160px;
    max-width: 280px;
    flex: 1.5;
}
/* 桌面端：章节树独占一行，彻底解决文字挤压问题 */
@media (min-width: 1024px) {
    .eqb-chapter-tree {
        flex-basis: 100%;
        max-width: 100%;
        min-width: unset;
        flex: unset;
        order: 99;
    }
    /* 桌面端：筛选控件均匀分布 */
    .eqb-filter-row > select,
    .eqb-filter-row > input[type="text"] {
        flex: 1 1 0;
        min-width: 100px;
    }
    .eqb-filter-row > input[type="text"] {
        flex: 2 1 0;
    }
    .eqb-chapter-tree-list {
        max-height: 500px;
        padding: 10px 14px;
        font-size: 0.88rem;
    }
}


.eqb-chapter-tree-search {
    width: 100%;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--eqb-border-soft);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--eqb-bg-hover);
    color: var(--eqb-primary);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 6px;
    box-sizing: border-box;
}

.eqb-chapter-tree-search::placeholder { color: #8faab5; }
.eqb-chapter-tree-search:focus { border-color: var(--eqb-primary); background: var(--eqb-bg); }

.eqb-chapter-tree-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--eqb-border-soft);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--eqb-chapter-bg);
}
@media (min-width: 1024px) {
    .eqb-chapter-tree-list { max-height: 420px; }
}

.eqb-chapter-parent-group   { margin-bottom: 3px; }
.eqb-chapter-parent-row     { display: flex; align-items: center; gap: 4px; }

.eqb-chapter-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 11px;
    color: #8faab5;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
    user-select: none;
}

.eqb-chapter-expand-btn:hover       { color: var(--eqb-primary); }
.eqb-chapter-expand-btn.expanded    { transform: rotate(90deg); color: var(--eqb-primary); }
.eqb-chapter-expand-spacer          { display: inline-block; width: 20px; flex-shrink: 0; }

.eqb-chapter-parent-label {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--eqb-text);
    cursor: pointer;
    transition: background 0.15s;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}
.eqb-chapter-parent-label:hover { background: var(--eqb-bg-hover); }
.eqb-chapter-parent-label input[type="checkbox"] { margin: 0; accent-color: var(--eqb-primary); flex-shrink: 0; }

.eqb-chapter-children {
    margin-left: 24px;
    padding-left: 8px;
    border-left: 2px solid var(--eqb-border);
}

.eqb-chapter-child-label {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--eqb-text-soft);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.eqb-chapter-child-label:hover { background: var(--eqb-bg-hover); }
.eqb-chapter-child-label input[type="checkbox"] { margin: 0; accent-color: var(--eqb-primary); flex-shrink: 0; }

.eqb-chapter-tree-empty { text-align: center; color: #999; font-size: 0.8rem; padding: 12px 0; margin: 0; }

/* ---------- 瀑布流加载 ---------- */
.eqb-load-more-sentinel { text-align: center; padding: 2rem 0; }

.eqb-loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--eqb-primary);
    font-size: 0.9rem;
    padding: 1rem 0;
}

.eqb-spinner-icon { animation: eqbSpin 0.8s linear infinite; font-size: 1.2rem; }

@keyframes eqbSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.eqb-load-hint { color: var(--eqb-text-muted); font-size: 0.8rem; }

/* ============================================================
   暗夜模式
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --eqb-bg:         #1a1d23;
        --eqb-bg-soft:    #22262e;
        --eqb-bg-hover:   #2a2f38;
        --eqb-bg-highlight:#2c3a4a;
        --eqb-text:       #e2e6ec;
        --eqb-text-soft:  #b0b8c4;
        --eqb-text-muted: #7d8590;
        --eqb-border:     #353a44;
        --eqb-border-soft:#2e333b;
        --eqb-primary:    #4db8c9;
        --eqb-primary-dark:#3a9aaa;
        --eqb-primary-light:#253540;
        --eqb-accent:     #5c9ce6;
        --eqb-shadow:     rgba(0,0,0,0.2);
        --eqb-shadow-hover: rgba(0,0,0,0.35);
        --eqb-option-bg:  #22262e;
        --eqb-answer-bg:  #22262e;
        --eqb-chapter-bg: #1a1d23;
        --eqb-batch-bg:   linear-gradient(135deg, #2c5a6b 0%, #1a3e4b 100%);
    }

    /* 暗色下主题色反调整 */
    .eqb-type-single_choice { background: #1a2e40; color: #5c9ce6; }
    .eqb-type-analysis      { background: #3d2e1a; color: #e6a050; }
    .eqb-type-short_answer  { background: #1a3022; color: #5cba6c; }
    .eqb-type-essay         { background: #3d1a22; color: #e6606c; }
    .eqb-type-fill_blank    { background: #2a1a35; color: #c080d8; }

    .eqb-batch-bar { box-shadow: 0 4px 15px rgba(0,0,0,0.4); }

    .eqb-option.correct { background: #1a3022; border-color: #3a7a44; }
    .eqb-option.wrong   { background: #3d1a1a; border-color: #a83838; }

    .eqb-answer-area { background: #22262e; }

    .eqb-filter-row select,
    .eqb-filter-row input[type="text"],
    .eqb-chapter-tree-search {
        background: #22262e;
        color: var(--eqb-text);
        border-color: var(--eqb-border);
    }

    .eqb-chapter-tree-list { background: #1a1d23; }

    .eqb-batch-result { background: #1a1d23; }

    .eqb-btn-batch         { background: #e2e6ec; color: #1a5c6b; }
    .eqb-btn-batch:hover   { background: #c8d0d8; }

    /* 暗色模式下自定义单选按钮背景 */
    .eqb-option input[type="radio"] {
        background: #2a2f38;
        border-color: #4a5060;
    }
    .eqb-option:hover input[type="radio"] {
        border-color: var(--eqb-primary);
    }
    .eqb-option input[type="radio"]:checked {
        background: var(--eqb-primary);
        border-color: var(--eqb-primary);
        box-shadow: inset 0 0 0 3px #2a2f38;
    }
    .eqb-option.correct input[type="radio"]:checked {
        background: #4caf50;
        border-color: #4caf50;
        box-shadow: inset 0 0 0 3px #2a2f38;
    }
    .eqb-option.wrong input[type="radio"]:checked {
        background: #f44336;
        border-color: #f44336;
        box-shadow: inset 0 0 0 3px #2a2f38;
    }

    .eqb-select-all-label input[type="checkbox"],
    .eqb-question-checkbox input[type="checkbox"] {
        accent-color: var(--eqb-primary);
    }

    .eqb-search-hint strong { color: var(--eqb-primary); }

    .eqb-bookmark-btn.active { background: #3d2e1a; color: #ffcc80; border-color: #ffcc80; }
    .eqb-bookmark-btn.active:hover { background: #4d3e2a; }
}

/* ============================================================
   响应式布局
   ============================================================ */

/* 平板 (768px - 1023px) */
@media (max-width: 1023px) {
    .eqb-bank { padding: 0 1rem; }
    .eqb-filter-row { gap: 0.4rem; }
    .eqb-chapter-tree { max-width: 200px; }
    .eqb-option { font-size: 0.87rem; padding: 0.5rem 0.7rem; }
    .eqb-stem-title { font-size: 0.95rem; }
}

/* 手机 (< 768px) */
@media (max-width: 767px) {
    .eqb-bank { padding: 0 0.5rem; }

    .eqb-filter-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .eqb-filter-row select,
    .eqb-filter-row input[type="text"] {
        width: 100%;
        min-width: unset;
        flex: unset;
    }

    .eqb-chapter-tree {
        max-width: 100%;
        width: 100%;
        min-width: unset;
    }

    .eqb-chapter-tree-list { max-height: 180px; }

    .eqb-question {
        padding: 0.8rem 0.9rem;
        border-radius: 10px;
        margin-bottom: 0.7rem;
    }

    .eqb-question-header { gap: 0.3rem; }
    .eqb-qnum { font-size: 0.9rem; }
    .eqb-qtype-badge { font-size: 0.65rem; padding: 0.1rem 0.4rem; }
    .eqb-subject-badge { font-size: 0.65rem; padding: 0.1rem 0.4rem; }
    .eqb-stem-title { font-size: 0.9rem; }
    .eqb-stem-body { font-size: 0.85rem; }
    .eqb-option { font-size: 0.85rem; padding: 0.5rem 0.6rem; border-radius: 8px; }

    .eqb-batch-bar {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem 1rem;
        gap: 0.6rem;
    }

    .eqb-batch-info { font-size: 0.8rem; }

    .eqb-result-stats {
        justify-content: center;
        gap: 0.6rem 1rem;
    }

    .eqb-stat { font-size: 0.78rem; }
    .eqb-stat strong { font-size: 1rem; }

    .eqb-export-bar {
        flex-direction: column;
        text-align: center;
        gap: 0.6rem;
        padding: 0.7rem 0.9rem;
    }

    .eqb-export-bar-left,
    .eqb-export-bar-right {
        justify-content: center;
        width: 100%;
    }

    .eqb-btn-export,
    .eqb-btn-export-answer {
        flex: 1;
        justify-content: center;
        font-size: 0.78rem;
    }

    .eqb-answer-area { padding: 0.6rem 0.8rem; }
    .eqb-question-footer { flex-wrap: wrap; }
    .eqb-question-footer .eqb-btn { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
}

/* 小屏手机 (< 400px) */
@media (max-width: 399px) {
    .eqb-export-bar-left,
    .eqb-export-bar-right {
        flex-direction: column;
        align-items: center;
    }
    .eqb-btn-export,
    .eqb-btn-export-answer {
        width: 100%;
    }
    .eqb-question-checkbox { min-width: 18px; }
    .eqb-question-checkbox input[type="checkbox"] { width: 16px; height: 16px; }
    .eqb-option input[type="radio"] { width: 16px; height: 16px; }
}
