/* ==========================================================================
   SECTIONS — Section-Specific Styles
   Practice Hub · Academic Command Center
========================================================================== */

/* ─────────────────────────────────────────────
   RESOURCE LIBRARY
───────────────────────────────────────────── */
.resource-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.resource-card { 
    display: flex; flex-direction: column; gap: 0.75rem; 
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem;
    position: relative; overflow: hidden;
}
.resource-card.is-uploading { pointer-events: none; opacity: 0.8; }
.upload-overlay { position: absolute; inset: 0; background: rgba(10, 10, 15, 0.7); display: flex; align-items: center; justify-content: center; z-index: 10; font-family: var(--font-display); font-weight: 600; color: var(--indigo-light); gap: 0.5rem; backdrop-filter: blur(2px); }
.resource-card:hover { 
    border-color: rgba(255,255,255,0.15); 
    box-shadow: 0 8px 32px rgba(0,0,0,0.5); 
    transform: translateY(-2px);
}
.rc-header { display: flex; justify-content: space-between; align-items: flex-start; }
.rc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; flex: 1; padding-right: 1rem; line-height: 1.3;}
.rc-type-icon { font-size: 1.5rem; color: var(--text-tertiary); background: var(--bg-card-2); padding: 0.5rem; border-radius: var(--radius-sm); }
.rc-type-icon.pdf { color: var(--ruby); } .rc-type-icon.image { color: var(--emerald); } .rc-type-icon.video { color: var(--label-red); } .rc-type-icon.link { color: var(--indigo-light); }
.rc-preview { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius-sm); overflow: hidden; margin: 0.5rem 0; position: relative;}
.rc-preview img { width: 100%; height: 100%; object-fit: cover; }
.resource-image-preview { width: 100%; max-height: 180px; border-radius: 0.5rem; overflow: hidden; margin: 0.5rem 0; background: rgba(0,0,0,0.2); }
.resource-image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-desc { font-size: 0.85rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border-subtle); align-items: center;}
.rc-date { font-size: 0.75rem; color: var(--text-tertiary); margin-left: auto; }

/* ─────────────────────────────────────────────
   SYLLABUS TRACKER
───────────────────────────────────────────── */
.subject-accordion { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); overflow: hidden; transition: 0.2s; }
.subject-accordion:hover { border-color: rgba(255,255,255,0.12); }
.sa-header { padding: 1.25rem; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.sa-title-area { display: flex; align-items: center; gap: 1rem; flex: 1;}
.sa-progress-ring { width: 44px; height: 44px; position: relative; flex-shrink: 0;}
.sa-progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-bg { fill: none; stroke: var(--bg-card-2); stroke-width: 4; }
.donut-fill { fill: none; stroke-width: 4; stroke-dasharray: 100; stroke-dashoffset: 20; stroke-linecap: round; transition: 0.5s; }
.sa-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; font-family: var(--font-mono);}
.sa-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.sa-stats { font-size: 0.75rem; color: var(--text-secondary); }
.sa-chevron { transition: 0.3s; font-size: 1.2rem; color: var(--text-tertiary); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;}
.subject-accordion.expanded .sa-chevron { transform: rotate(180deg); color: var(--text-primary); }

.sa-content { display: none; padding: 0.5rem 1rem 1.5rem 1.5rem; border-top: 1px solid var(--border-subtle); background: rgba(0,0,0,0.15); }
.subject-accordion.expanded .sa-content { display: block; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.chapter-block { margin-bottom: 1.5rem; margin-top: 1rem;}
.cb-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.cb-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem;}
.cb-progress-bar { height: 4px; background: var(--bg-card-2); border-radius: 2px; overflow: hidden; margin-bottom: 1rem; }
.cb-progress-fill { height: 100%; background: var(--text-secondary); width: 0%; transition: width 0.3s; }

.topic-list { display: flex; flex-direction: column; gap: 0.5rem; }
.topic-item { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; transition: 0.2s;}
.topic-item:hover { border-color: rgba(255,255,255,0.1); }
.topic-main-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.status-toggle { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--text-tertiary); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-top: 2px; transition: 0.2s;}
.status-toggle.in-progress { border-color: var(--amber); background: rgba(245,158,11,0.2); animation: pulse 2s infinite; }
.status-toggle.done { border-color: var(--emerald); background: var(--emerald); color: var(--bg-base); }
.status-toggle.done::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.8rem; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); } 70% { box-shadow: 0 0 0 6px rgba(245,158,11,0); } 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } }

.topic-info { flex: 1; }
.topic-name { font-size: 0.95rem; font-weight: 500; line-height: 1.3; transition: 0.2s;}
.topic-item.done .topic-name { text-decoration: line-through; color: var(--text-tertiary); }
.topic-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 0.5rem; border-top: 1px dashed var(--border-subtle); margin-top: 0.25rem;}
.topic-add-btn { width: 100%; background: transparent; border: 1px dashed var(--text-tertiary); color: var(--text-secondary); padding: 0.75rem; border-radius: var(--radius-md); font-size: 0.85rem; margin-top: 0.5rem; transition: 0.2s;}
.topic-add-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); background: rgba(255,255,255,0.03); }

/* ─────────────────────────────────────────────
   NOTES VIEWER
───────────────────────────────────────────── */
/* Top chapter dropdown on mobile */
.notes-chapter-select { margin-bottom: 1.5rem; }
.ncs-btn { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; transition: 0.2s; }
.ncs-btn:hover { border-color: var(--border-focus); }
.ncs-btn i { color: var(--indigo-light); }

.notes-feed { display: flex; flex-direction: column; gap: 1.5rem; }

/* Note Topic Cards based on type */
.note-card { 
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.6), rgba(20, 20, 25, 0.8)); 
    border-radius: var(--radius-lg); 
    padding: 1.5rem; position: relative; 
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.note-card:hover { 
    border-color: rgba(255,255,255,0.2); 
    box-shadow: 0 12px 40px rgba(0,0,0,0.5); 
    transform: translateY(-2px);
}
.note-card::before { content: ''; position: absolute; left: 0; top: 1.5rem; bottom: 1.5rem; width: 4px; border-radius: 0 4px 4px 0; }

.nc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.nc-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; flex: 1; padding-right: 1rem;}
.nc-type-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 4px; border: 1px solid; white-space: nowrap;}

/* Types */
.type-concept::before { background: var(--indigo-light); box-shadow: 0 0 10px var(--indigo-glow); }
.type-concept .nc-type-badge { color: var(--indigo-light); border-color: var(--indigo-light); background: var(--indigo-dim); }

.type-formula::before { background: var(--emerald); box-shadow: 0 0 10px var(--emerald-dim); }
.type-formula .nc-type-badge { color: var(--emerald); border-color: var(--emerald); background: var(--emerald-dim); }

.type-example::before { background: var(--subj-stats); box-shadow: 0 0 10px rgba(14,165,233,0.3); }
.type-example .nc-type-badge { color: var(--subj-stats); border-color: var(--subj-stats); background: rgba(14,165,233,0.15); }

.type-definition::before { background: var(--purple); box-shadow: 0 0 10px var(--purple-dim); }
.type-definition .nc-type-badge { color: var(--purple); border-color: var(--purple); background: var(--purple-dim); }

.type-list::before { background: var(--ruby); box-shadow: 0 0 10px var(--ruby-dim); }
.type-list .nc-type-badge { color: var(--ruby); border-color: var(--ruby); background: var(--ruby-dim); }

.type-comparison::before { background: var(--amber); box-shadow: 0 0 10px var(--amber-dim); }
.type-comparison .nc-type-badge { color: var(--amber); border-color: var(--amber); background: var(--amber-dim); }

.type-important { border-color: var(--amber); box-shadow: inset 0 0 20px var(--amber-dim); }
.type-important::before { background: var(--amber); }
.type-important .nc-type-badge { color: var(--amber); border-color: var(--amber); background: var(--amber-dim); }

/* Content Blocks */
.nc-content { font-size: 0.95rem; line-height: 1.6; color: var(--text-primary); margin-bottom: 1rem; }
.nc-formula-block { background: #0a0a0f; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 1.25rem; font-family: var(--font-mono); font-size: 1.1rem; color: var(--emerald); text-align: center; margin-bottom: 1rem; position: relative; overflow-x: auto;}
.nc-copy-btn { position: absolute; top: 0.5rem; right: 0.5rem; color: var(--text-tertiary); font-size: 1rem; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; transition: 0.2s;}
.nc-copy-btn:hover { color: var(--text-primary); }
.nc-example-block { background: var(--bg-card-2); border-left: 2px dashed var(--text-secondary); padding: 1rem; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 1rem; font-family: var(--font-mono); }
.nc-keypoints { margin-bottom: 1rem; }
.nc-keypoint { display: flex; gap: 0.5rem; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--text-secondary); }
.nc-keypoint i { color: var(--emerald); margin-top: 3px; }
.nc-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-subtle); padding-top: 1rem; flex-wrap: wrap; gap: 0.75rem;}

/* ─────────────────────────────────────────────
   PYQ BANK
───────────────────────────────────────────── */
.pyq-card { 
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); 
    padding: 1.5rem; margin-bottom: 1.25rem; 
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pyq-card:hover { border-color: rgba(255,255,255,0.12); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.pyq-header { display: flex; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem;}
.pyq-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pyq-badge { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; background: var(--bg-card-2); border: 1px solid var(--border); }
.pyq-marks { color: var(--emerald); border-color: var(--emerald); background: var(--emerald-dim); }
.pyq-year { color: var(--indigo-light); border-color: var(--indigo-light); background: var(--indigo-dim); }
.pyq-question { font-size: 1.05rem; font-weight: 500; line-height: 1.5; margin-bottom: 1.25rem; }
.pyq-answer-wrap { overflow: hidden; max-height: 0; transition: max-height 0.4s ease, border 0.3s; background: var(--bg-surface); border-radius: var(--radius-md); border: 1px solid transparent; }
.pyq-answer-wrap.show { max-height: 500px; border-color: var(--border-subtle); padding: 1.25rem; margin-bottom: 1.25rem; }
.pyq-answer-content { font-size: 0.9rem; color: var(--text-secondary); }
.pyq-actions { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-subtle); padding-top: 1rem; }
.btn-toggle-ans { color: var(--indigo-light); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.btn-toggle-ans:hover { color: white; }
.pyq-status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.pyq-status-dot.correct { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.pyq-status-dot.wrong { background: var(--ruby); box-shadow: 0 0 8px var(--ruby); }
.pyq-status-dot.none { background: var(--text-tertiary); }

/* ATTEMPT MODE (Full Screen Absolute Overlay) */
.attempt-mode-overlay {
    position: fixed; inset: 0; background: var(--bg-base); z-index: 2000;
    display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: 0.3s;
}
.attempt-mode-overlay.active { opacity: 1; pointer-events: all; }
.amo-header { padding: 1rem 1.25rem; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); }
.amo-body { flex: 1; display: flex; flex-direction: column; padding: 2rem 1.5rem; overflow-y: auto; margin-top: auto; margin-bottom: auto; }
.amo-question { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.4; text-align: center; margin-bottom: 2rem; }
.amo-footer { padding: 1rem 1.25rem; display: flex; gap: 1rem; border-top: 1px solid var(--border); padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
.amo-btn-correct { flex: 1; background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16,185,129,0.5); border-radius: var(--radius-md); font-size: 1.1rem; font-weight: 700; height: 60px;}
.amo-btn-wrong { flex: 1; background: var(--ruby-dim); color: var(--ruby); border: 1px solid rgba(239,68,68,0.5); border-radius: var(--radius-md); font-size: 1.1rem; font-weight: 700; height: 60px;}

/* ─────────────────────────────────────────────
   MOCK TEST BUILDER
───────────────────────────────────────────── */
.mock-setup-card { background: var(--bg-card); border: 1px solid var(--border-focus); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-glow); }
.subject-multi-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }

/* Topics Grid for Mock Selector - Redesigned to be elegant pills */
.mock-topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--text-tertiary) transparent;
}
.mock-topics-grid::-webkit-scrollbar { width: 4px; }
.mock-topic-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.45rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-weight: 500;
    white-space: nowrap;
}
.mock-topic-chip:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    background: var(--bg-card-2);
}
.mock-topic-chip.selected {
    background: var(--indigo-dim);
    border-color: var(--indigo-light);
    color: var(--indigo-light);
    box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.15);
}

/* Test Taking UI (Full screen) */
.test-taking-ui {
    position: fixed; inset: 0; background: var(--bg-base); z-index: 3000;
    display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: 0.3s;
}
.test-taking-ui.active { opacity: 1; pointer-events: all; }
.ttu-header { padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.ttu-timer { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--emerald); }
.ttu-timer.warning { color: var(--ruby); animation: timerPulse 1s infinite; }
@keyframes timerPulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.ttu-counter { color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; }
.ttu-body { flex: 1; padding: 1.5rem 1.25rem; overflow-y: auto; display: flex; flex-direction: column; }
.ttu-q-text { font-size: 1.25rem; line-height: 1.5; margin-bottom: 1.5rem; }
.ttu-answer-area { flex: 1; display: flex; flex-direction: column; }
.ttu-textarea { flex: 1; background: var(--bg-card-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; color: var(--text-primary); font-size: 16px; min-height: 150px; }
.ttu-footer { padding: 1rem 1.25rem; display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-bottom: calc(1rem + env(safe-area-inset-bottom)); gap: 1rem;}
.ttu-nav-btn { flex: 1; background: var(--bg-card-2); border: 1px solid var(--border); border-radius: var(--radius-md); font-weight: 600; font-size: 1rem; height: 56px; display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: 0.2s;}
.ttu-nav-btn:hover:not(:disabled) { border-color: var(--border-focus); background: rgba(255,255,255,0.05); }
.ttu-nav-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Mock MCQ Options */
.mock-option {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 1.25rem; font-size: 1.05rem; text-align: left; display: flex; align-items: center; gap: 1rem;
    transition: 0.2s; cursor: pointer; color: var(--text-primary);
}
.mock-option:hover { border-color: rgba(255,255,255,0.2); background: var(--bg-card-2); }
.mock-option.selected { background: var(--indigo-dim); border-color: var(--indigo-light); color: var(--indigo-light); }
.mock-option-label { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--text-tertiary); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; transition: 0.2s;}
.mock-option.selected .mock-option-label { background: var(--indigo-light); border-color: var(--indigo-light); color: var(--bg-base); }
.mock-option.correct { background: var(--emerald-dim); border-color: var(--emerald); color: var(--emerald); }
.mock-option.correct .mock-option-label { background: var(--emerald); border-color: var(--emerald); color: var(--bg-base); }
.mock-option.wrong { background: var(--ruby-dim); border-color: var(--ruby); color: var(--ruby); }
.mock-option.wrong .mock-option-label { background: var(--ruby); border-color: var(--ruby); color: var(--bg-base); }

/* ─────────────────────────────────────────────
   PROGRESS TRACKER (SVG CHARTS)
───────────────────────────────────────────── */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.donut-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.donut-svg-wrap { width: 80px; height: 80px; position: relative; margin-bottom: 0.75rem; }
.donut-svg-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-svg-wrap .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 1rem;}
.donut-card.stats .donut-fill { stroke: var(--subj-stats); }
.donut-card.acct .donut-fill { stroke: var(--subj-acct); }
.donut-card.mgmt .donut-fill { stroke: var(--subj-mgmt); }
.donut-card.econ .donut-fill { stroke: var(--subj-econ); }
.donut-lbl { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); line-height: 1.2;}

/* Heatmap */
.heatmap-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; overflow-x: auto; }
.heatmap-title { font-family: var(--font-display); font-size: 1rem; margin-bottom: 1rem; }
.heatmap-grid { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 4px; min-width: max-content; padding-bottom: 0.5rem;}
.hm-cell { width: 12px; height: 12px; border-radius: 2px; background: var(--bg-card-2); }
.hm-cell.lvl-1 { background: rgba(99, 102, 241, 0.3); }
.hm-cell.lvl-2 { background: rgba(99, 102, 241, 0.6); }
.hm-cell.lvl-3 { background: rgba(99, 102, 241, 1); }

/* Bar Chart */
.bar-chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; overflow-x: auto;}
.bar-chart-wrap { display: flex; align-items: flex-end; gap: 8px; height: 150px; min-width: max-content; padding-top: 20px;}
.bc-col { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 30px; }
.bc-bar { width: 100%; background: var(--indigo-dim); border-radius: 4px 4px 0 0; position: relative; border: 1px solid var(--indigo-light); border-bottom: none;}
.bc-val { position: absolute; top: -20px; width: 100%; text-align: center; font-size: 0.65rem; color: var(--text-secondary); font-family: var(--font-mono);}
.bc-lbl { font-size: 0.6rem; color: var(--text-tertiary); }

/* ─────────────────────────────────────────────
   QUICK QUIZ
───────────────────────────────────────────── */
.quiz-lib-card { background: var(--bg-card); border-left: 4px solid var(--indigo); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;}
.qlc-info h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.25rem;}
.qlc-meta { font-size: 0.8rem; color: var(--text-secondary); }

/* Quiz UI Full Screen */
.quiz-ui {
    position: fixed; inset: 0; background: var(--bg-base); z-index: 3000;
    display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: 0.3s;
}
.quiz-ui.active { opacity: 1; pointer-events: all; }
.qu-progress-bar { height: 4px; background: var(--bg-card-2); width: 100%; position: absolute; top: 0; left: 0; }
.qu-progress-fill { height: 100%; background: var(--emerald); width: 0%; transition: 0.3s;}
.qu-header { padding: 1.5rem 1.25rem 1rem; text-align: center; border-bottom: 1px solid var(--border-subtle);}
.qu-counter { font-size: 0.85rem; color: var(--text-tertiary); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;}
.qu-body { flex: 1; overflow-y: auto; padding: 2rem 1.25rem; display: flex; flex-direction: column; align-items: center; }
.qu-question { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; text-align: center; margin-bottom: 2.5rem; width: 100%; max-width: 600px;}
.qu-options { display: flex; flex-direction: column; gap: 1rem; width: 100%; max-width: 600px; }
.qu-option {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.25rem; font-size: 1.05rem; text-align: left; display: flex; align-items: center; gap: 1rem;
    transition: 0.2s; cursor: pointer; position: relative;
}
.qu-option:hover { border-color: rgba(255,255,255,0.2); background: var(--bg-card-2); box-shadow: 0 4px 12px rgba(0,0,0,0.2); transform: translateY(-1px);}
.qu-option:active { transform: scale(0.98); }
.qu-option-label { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--text-tertiary); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; flex-shrink: 0; transition: 0.2s;}
.qu-option.selected { background: var(--indigo-dim); border-color: var(--indigo-light); box-shadow: 0 0 15px rgba(99,102,241,0.2); }
.qu-option.selected .qu-option-label { background: var(--indigo-light); border-color: var(--indigo-light); color: var(--bg-base); }
.qu-option.correct { background: var(--emerald-dim); border-color: var(--emerald); }
.qu-option.correct .qu-option-label { background: var(--emerald); border-color: var(--emerald); color: var(--bg-base); }
.qu-option.wrong { background: var(--ruby-dim); border-color: var(--ruby); }
.qu-option.wrong .qu-option-label { background: var(--ruby); border-color: var(--ruby); color: var(--bg-base); }
.qu-explanation { margin-top: 2rem; background: var(--bg-card-2); border-radius: var(--radius-lg); border-left: 4px solid var(--indigo-light); padding: 1.25rem; font-size: 0.95rem; color: var(--text-primary); width: 100%; max-width: 600px; display: none; line-height: 1.6;}
.qu-explanation.show { display: block; animation: slideUpFade 0.4s ease; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.qu-footer { padding: 1rem 1.25rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; justify-content: center;}

/* ─────────────────────────────────────────────
   FLASHCARDS
───────────────────────────────────────────── */
.flashcard-deck-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.flashcard-deck-card:hover { border-color: rgba(255,255,255,0.12); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.fdc-info h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.25rem; }
.fdc-meta { font-size: 0.8rem; color: var(--text-secondary); display: flex; gap: 0.75rem; flex-wrap: wrap; }
.fdc-due-badge { color: var(--status-due); font-weight: 700; }

.flashcard-study-overlay {
  position: fixed; inset: 0; background: var(--bg-base); z-index: 3000;
  display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: 0.3s;
}
.flashcard-study-overlay.active { opacity: 1; pointer-events: all; }

.flashcard-container {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem;
  perspective: 1000px;
}
.flashcard {
  width: 100%; max-width: 500px; min-height: 280px; position: relative;
  transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.flashcard-front { z-index: 2; }
.flashcard-front .fc-label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-tertiary); letter-spacing: 1px; margin-bottom: 1rem; }
.flashcard-front .fc-text { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.4; }
.flashcard-back { transform: rotateY(180deg); }
.flashcard-back .fc-text { font-size: 1.1rem; line-height: 1.6; white-space: pre-wrap; }
.flashcard-hint { margin-top: 1rem; font-size: 0.85rem; color: var(--text-tertiary); font-style: italic; }

.fc-rating-bar {
  padding: 1rem 1.25rem; display: flex; gap: 1rem; border-top: 1px solid var(--border);
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}
.fc-rate-btn {
  flex: 1; border-radius: var(--radius-md); font-weight: 700; font-size: 1rem; height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.fc-rate-btn.hard { background: var(--ruby-dim); color: var(--ruby); border: 1px solid rgba(239,68,68,0.4); }
.fc-rate-btn.okay { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.4); }
.fc-rate-btn.easy { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16,185,129,0.4); }

/* ─────────────────────────────────────────────
   REVISION
───────────────────────────────────────────── */
.revision-summary {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center;
}
.revision-count { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--indigo-light); }
.revision-breakdown { font-size: 0.85rem; color: var(--text-secondary); }

.revision-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 1rem;
  transition: border-color 0.2s;
}
.revision-card:hover { border-color: rgba(255,255,255,0.12); }
.rev-type-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); display: flex;
  align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.rev-type-icon.pyq { background: var(--indigo-dim); color: var(--indigo-light); }
.rev-type-icon.flashcard { background: var(--purple-dim); color: var(--purple); }
.rev-info { flex: 1; }
.rev-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rev-due-badge { font-size: 0.75rem; font-weight: 700; }
.rev-due-badge.overdue { color: var(--ruby); }
.rev-due-badge.today { color: var(--status-due); }

/* ─────────────────────────────────────────────
   SETTINGS
───────────────────────────────────────────── */
.settings-group { margin-bottom: 1.5rem; }
.settings-group-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); margin-bottom: 0.75rem; font-weight: 700; }
.settings-item {
  display: flex; justify-content: space-between; align-items: center; padding: 1rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
}
.settings-item-label { font-weight: 600; font-size: 0.95rem; }
.settings-item-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* ─────────────────────────────────────────────
   SEARCH HIGHLIGHT
───────────────────────────────────────────── */
.search-highlight {
  animation: searchPulse 2s ease-out;
}
@keyframes searchPulse {
  0% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ─────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--text-tertiary);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state p { margin-bottom: 0.5rem; }
.empty-state .hint { font-size: 0.85rem; color: var(--text-tertiary); }

/* ==========================================================================
   RESPONSIVE — Section Breakpoints
========================================================================== */

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
    .resource-grid { grid-template-columns: 1fr 1fr; }
    .chart-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
    .resource-grid { grid-template-columns: repeat(3, 1fr); }
    .notes-chapter-select { display: none; } /* Replaced by desktop sidebar tree if implemented */
}
