/* ========================================
   Phase 2 - Shared Styles
   Unit Quizzes, Flashcards, Glossary,
   Charts, Case Studies
   ======================================== */

/* Quiz Gradient */
.quiz-gradient { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.flash-gradient { background: linear-gradient(135deg, #06b6d4, #10b981); }
.glossary-gradient { background: linear-gradient(135deg, #f59e0b, #f97316); }
.charts-gradient { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.cases-gradient { background: linear-gradient(135deg, #10b981, #06b6d4); }

/* ===================== Overall Progress ===================== */
.overall-bar-wrap {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 36px;
}
.overall-bar-info { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--gray); font-size: 0.9rem; }
.overall-bar { height: 10px; background: rgba(255,255,255,0.06); border-radius: 5px; overflow: hidden; }
.overall-bar-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #06b6d4); border-radius: 5px; transition: width 0.8s ease; }
.overall-stats-row { display: flex; justify-content: space-around; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.ov-stat { text-align: center; }
.ov-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--white); }
.ov-label { font-size: 0.78rem; color: var(--gray); }

/* ===================== Phase Section / Unit Quiz Grid ===================== */
.phase-section { margin-bottom: 32px; }
.phase-header { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--phase-color); }
.phase-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.phase-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.uq-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.uq-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--phase-color); opacity: 0.6; transition: opacity 0.3s; }
.uq-card:hover { transform: translateY(-4px); border-color: var(--phase-color); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.uq-card:hover::before { opacity: 1; }
.uq-card.passed { border-color: rgba(16, 185, 129, 0.4); }
.uq-card.passed::before { background: #10b981; opacity: 1; }
.uq-card.failed { border-color: rgba(239, 68, 68, 0.3); }
.uq-card.failed::before { background: #ef4444; opacity: 1; }

.uq-icon { font-size: 2rem; color: var(--primary-light); margin-bottom: 8px; opacity: 0.7; }
.uq-num { font-size: 0.75rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.uq-title { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 10px; line-height: 1.5; min-height: 46px; }
.uq-status { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.uq-card.passed .uq-status { color: #10b981; }
.uq-card.failed .uq-status { color: #ef4444; }
.uq-bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.uq-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.uq-action { font-size: 0.8rem; color: var(--primary-light); font-weight: 600; }

/* ===================== Quiz Area ===================== */
.quiz-area-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.quiz-area-title { font-size: 1.3rem; font-weight: 700; color: var(--white); }
.quiz-area-title span { color: var(--primary-light); margin-left: 6px; }
.btn-sm { font-size: 0.85rem !important; padding: 6px 16px !important; }

.quiz-progress-strip { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.quiz-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; background: rgba(255,255,255,0.06); color: var(--gray); cursor: pointer; transition: all 0.3s; border: 2px solid transparent; }
.quiz-dot.active { background: var(--primary); color: white; border-color: var(--primary-light); box-shadow: 0 0 12px rgba(99,102,241,0.4); }
.quiz-dot.answered { background: rgba(99,102,241,0.2); color: var(--primary-light); border-color: rgba(99,102,241,0.3); }
.quiz-timer { color: var(--gray); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }

.quiz-question-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}
.question-number { font-size: 0.85rem; color: var(--primary-light); font-weight: 600; margin-bottom: 12px; }
.question-text { font-size: 1.15rem; font-weight: 700; color: var(--white); line-height: 1.8; margin-bottom: 24px; }

.quiz-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--light-gray);
    font-size: 0.95rem;
}
.quiz-option:hover { border-color: var(--primary); background: rgba(99,102,241,0.08); }
.quiz-option.correct { border-color: #10b981; background: rgba(16,185,129,0.1); color: #10b981; }
.quiz-option.wrong { border-color: #ef4444; background: rgba(239,68,68,0.08); color: #ef4444; }
.opt-letter { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.quiz-option.correct .opt-letter { background: #10b981; color: white; }
.quiz-option.wrong .opt-letter { background: #ef4444; color: white; }
.opt-text { flex: 1; }
.opt-icon { margin-right: auto; font-size: 1.2rem; }

.question-explanation {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(99, 102, 241, 0.08);
    border-right: 3px solid var(--primary);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--light-gray);
    font-size: 0.92rem;
    line-height: 1.8;
    animation: fadeIn 0.4s;
}
.question-explanation i { color: #f59e0b; font-size: 1.2rem; margin-top: 4px; }

.quiz-nav-btns { display: flex; justify-content: space-between; margin-bottom: 24px; }

/* Results */
.quiz-unit-results { text-align: center; padding: 40px 20px; animation: fadeIn 0.5s; }
.quiz-unit-results h2 { font-size: 1.6rem; margin: 16px 0; color: var(--white); }
.quiz-unit-results p { color: var(--gray); max-width: 500px; margin: 0 auto 24px; line-height: 1.7; }

.result-score-circle { position: relative; display: inline-block; margin: 16px 0 24px; }
.score-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-pct { font-size: 2rem; font-weight: 900; color: var(--white); }
.score-detail { font-size: 0.85rem; color: var(--gray); }
.score-time { font-size: 0.75rem; color: var(--primary-light); }

.breakdown-list { text-align: right; max-width: 600px; margin: 0 auto 24px; }
.breakdown-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 6px; font-size: 0.88rem; color: var(--light-gray); }
.bd-correct { background: rgba(16,185,129,0.06); }
.bd-wrong { background: rgba(239,68,68,0.06); }
.bd-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.bd-text { flex: 1; }
.bd-icon { font-size: 1rem; }
.bd-correct .bd-icon { color: #10b981; }
.bd-wrong .bd-icon { color: #ef4444; }

.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===================== Flashcards ===================== */
.flashcard-controls { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.fc-filter {
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    font-family: inherit;
}
.fc-filter.active, .fc-filter:hover { background: var(--primary); color: white; border-color: var(--primary); }

.flashcard-area { perspective: 1000px; max-width: 600px; margin: 0 auto 24px; }
.flashcard {
    width: 100%;
    min-height: 320px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.flashcard-front {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.1));
    border: 1px solid rgba(99,102,241,0.2);
}
.flashcard-back {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(6,182,212,0.1));
    border: 1px solid rgba(16,185,129,0.2);
    transform: rotateY(180deg);
}
.fc-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--gray); margin-bottom: 16px; }
.fc-term { font-size: 1.5rem; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.fc-hint { font-size: 0.85rem; color: var(--gray); }
.fc-definition { font-size: 1.1rem; color: var(--light-gray); line-height: 1.8; margin-bottom: 12px; }
.fc-unit-tag { font-size: 0.75rem; padding: 3px 12px; border-radius: 50px; background: rgba(255,255,255,0.06); color: var(--gray); }
.fc-flip-hint { position: absolute; bottom: 12px; font-size: 0.75rem; color: rgba(255,255,255,0.2); }

.flashcard-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 16px; }
.fc-nav-btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: var(--gray); cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.fc-nav-btn:hover { background: var(--primary); color: white; }
.fc-counter { font-size: 0.95rem; color: var(--gray); min-width: 80px; text-align: center; }

.fc-progress-dots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.fc-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.08); cursor: pointer; transition: all 0.3s; }
.fc-dot.active { background: var(--primary); transform: scale(1.3); }
.fc-dot.known { background: #10b981; }

.fc-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fc-action-btn { padding: 8px 20px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--gray); cursor: pointer; transition: all 0.3s; font-size: 0.85rem; font-family: inherit; }
.fc-action-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.fc-action-btn.know { border-color: rgba(16,185,129,0.3); }
.fc-action-btn.know:hover { border-color: #10b981; color: #10b981; background: rgba(16,185,129,0.08); }
.fc-action-btn.dontknow { border-color: rgba(239,68,68,0.3); }
.fc-action-btn.dontknow:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.08); }

.fc-stats { display: flex; justify-content: center; gap: 24px; margin-top: 20px; }
.fc-stat { text-align: center; }
.fc-stat-num { display: block; font-size: 1.3rem; font-weight: 800; color: var(--white); }
.fc-stat-label { font-size: 0.75rem; color: var(--gray); }

/* ===================== Glossary ===================== */
.glossary-search { display: flex; gap: 12px; margin-bottom: 24px; }
.glossary-search input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(30,41,59,0.5);
    color: var(--white);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}
.glossary-search input:focus { border-color: var(--primary); }
.glossary-search input::placeholder { color: var(--gray); }

.glossary-alpha { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; justify-content: center; }
.alpha-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--gray); cursor: pointer; font-size: 0.8rem; font-weight: 700; transition: all 0.3s; display: flex; align-items: center; justify-content: center; font-family: inherit; }
.alpha-btn.active, .alpha-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.alpha-btn.has-items { border-color: var(--primary-light); color: var(--primary-light); }

.glossary-list { display: flex; flex-direction: column; gap: 12px; }
.glossary-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s;
}
.glossary-item:hover { border-color: rgba(99,102,241,0.3); }
.glossary-item.expanded { border-color: rgba(99,102,241,0.3); }
.gi-header { display: flex; align-items: center; gap: 16px; }
.gi-term-ar { font-size: 1.1rem; font-weight: 700; color: var(--white); flex: 1; }
.gi-term-en { font-size: 0.9rem; color: var(--primary-light); direction: ltr; }
.gi-unit { font-size: 0.72rem; padding: 2px 10px; border-radius: 50px; background: rgba(99,102,241,0.1); color: var(--primary-light); white-space: nowrap; }
.gi-toggle { color: var(--gray); transition: transform 0.3s; }
.glossary-item.expanded .gi-toggle { transform: rotate(180deg); }
.gi-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.glossary-item.expanded .gi-body { max-height: 500px; }
.gi-definition { padding-top: 16px; color: var(--light-gray); line-height: 1.8; font-size: 0.95rem; }
.gi-example { margin-top: 10px; padding: 10px 14px; background: rgba(99,102,241,0.06); border-radius: var(--radius); font-size: 0.88rem; color: var(--gray); }
.gi-example strong { color: var(--primary-light); }

.glossary-count { text-align: center; color: var(--gray); font-size: 0.85rem; margin-bottom: 16px; }

/* ===================== Charts Page ===================== */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 24px; margin-bottom: 32px; }
.chart-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.chart-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.chart-card p { font-size: 0.85rem; color: var(--gray); margin-bottom: 16px; }
.chart-wrap { position: relative; height: 350px; }

.insight-box {
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-top: 16px;
}
.insight-box h4 { font-size: 0.95rem; color: var(--primary-light); margin-bottom: 8px; }
.insight-box p { font-size: 0.88rem; color: var(--light-gray); line-height: 1.7; }

/* ===================== Case Studies ===================== */
.case-tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; justify-content: center; }
.case-tab {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--gray);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: inherit;
}
.case-tab.active, .case-tab:hover { background: var(--primary); color: white; border-color: var(--primary); }

.case-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    transition: all 0.3s;
}
.case-card:hover { border-color: rgba(99,102,241,0.2); }
.case-header-bar { padding: 20px 24px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; }
.case-logo { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: white; flex-shrink: 0; }
.case-info { flex: 1; }
.case-info h3 { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.case-info span { font-size: 0.8rem; color: var(--gray); }
.case-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.case-tag { font-size: 0.72rem; padding: 2px 10px; border-radius: 50px; background: rgba(99,102,241,0.1); color: var(--primary-light); }
.case-expand-icon { color: var(--gray); transition: transform 0.3s; }
.case-card.expanded .case-expand-icon { transform: rotate(180deg); }

.case-body { max-height: 0; overflow: hidden; transition: max-height 0.5s ease; }
.case-card.expanded .case-body { max-height: 2000px; }
.case-body-inner { padding: 24px; }

.case-section { margin-bottom: 20px; }
.case-section h4 { font-size: 1rem; font-weight: 700; color: var(--primary-light); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.case-section p, .case-section li { font-size: 0.92rem; color: var(--light-gray); line-height: 1.8; }
.case-section ul { padding-right: 20px; }
.case-section li { margin-bottom: 4px; }

.case-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.case-metric {
    text-align: center;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(99,102,241,0.06);
}
.case-metric .cm-value { display: block; font-size: 1.5rem; font-weight: 900; color: var(--primary-light); }
.case-metric .cm-label { font-size: 0.75rem; color: var(--gray); }

.case-lessons {
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 12px;
}
.case-lessons h5 { color: #10b981; font-size: 0.95rem; margin-bottom: 8px; }
.case-lessons li { color: var(--light-gray); font-size: 0.88rem; margin-bottom: 4px; }

/* ===================== Animations ===================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
    .phase-cards { grid-template-columns: 1fr; }
    .quiz-question-card { padding: 20px; }
    .question-text { font-size: 1rem; }
    .charts-grid { grid-template-columns: 1fr; }
    .flashcard { min-height: 260px; }
    .fc-term { font-size: 1.2rem; }
    .overall-stats-row { gap: 8px; }
    .ov-num { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .quiz-dot { width: 30px; height: 30px; font-size: 0.7rem; }
    .flashcard-controls { gap: 8px; }
    .glossary-search { flex-direction: column; }
    .case-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   Light Theme — Phase 2 Pages
   ======================================== */
body.light-theme .quiz-overall-progress {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .unit-quiz-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .unit-quiz-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

body.light-theme .unit-quiz-card h3 {
    color: #0f172a;
}

body.light-theme .quiz-dot {
    background: rgba(241, 245, 249, 0.8);
    color: #475569;
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .quiz-q-text {
    color: #0f172a;
}

body.light-theme .quiz-opt-btn {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(99, 102, 241, 0.1);
    color: #334155;
}

body.light-theme .quiz-opt-btn:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.04);
}

body.light-theme .quiz-explanation {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.12);
    color: #334155;
}

/* Flashcards */
body.light-theme .flashcard-face {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.1);
    color: #0f172a;
}

body.light-theme .flashcard-back {
    background: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, rgba(6,182,212,0.03) 100%);
}

body.light-theme .fc-term {
    color: #0f172a;
}

body.light-theme .fc-definition {
    color: #334155;
}

body.light-theme .fc-hint {
    color: #64748b;
}

body.light-theme .fc-stats {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .flashcard-controls button,
body.light-theme .fc-filter-btn {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(99, 102, 241, 0.1);
    color: #475569;
}

body.light-theme .flashcard-controls button.active,
body.light-theme .fc-filter-btn.active {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.3);
}

/* Glossary */
body.light-theme .glossary-search input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.15);
    color: #0f172a;
}

body.light-theme .glossary-item {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .glossary-item h3 {
    color: #0f172a;
}

body.light-theme .glossary-item p {
    color: #475569;
}

body.light-theme .glossary-alpha button {
    color: #64748b;
}

body.light-theme .glossary-alpha button.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

/* Case Studies */
body.light-theme .case-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .case-card h3 {
    color: #0f172a;
}

body.light-theme .case-card p {
    color: #475569;
}

body.light-theme .case-tab {
    background: rgba(241, 245, 249, 0.8);
    color: #475569;
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .case-tab.active {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.3);
}

body.light-theme .case-metric {
    background: rgba(241, 245, 249, 0.8);
}

body.light-theme .case-metric .metric-value {
    color: #6366f1;
}

/* Charts page */
body.light-theme .chart-container {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .chart-container h3 {
    color: #0f172a;
}

/* Overall stats */
body.light-theme .overall-stats-row .ov-stat {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .ov-num {
    color: #6366f1;
}
