/* ==========================================================================
   ExamStuff Board Exam Portal (Class 10 & 12) Styles
   Adheres to ExamStuff visual branding: #0F6E56, #1D9E75, #EF9F27, #085041
   ========================================================================== */

:root {
    --board-primary: #0F6E56;
    --board-primary-hover: #085041;
    --board-secondary: #1D9E75;
    --board-accent: #EF9F27;
    --board-accent-hover: #d88915;
    --board-bg: #f8fafc;
    --board-bg-soft: #f8faf9;
    --board-card-bg: #ffffff;
    --board-card-border: #e2e8f0;
    --board-border: #e2e8f0;
    --board-text-dark: #1e293b;
    --board-text-muted: #64748b;
}

.dark-theme,
.dark-mode,
:root.dark-theme,
:root.dark-mode {
    --board-primary: #34d399;
    --board-primary-hover: #6ee7b7;
    --board-secondary: #10b981;
    --board-accent: #f59e0b;
    --board-accent-hover: #fbbf24;
    --board-bg: #0f172a;
    --board-bg-soft: #0f172a;
    --board-card-bg: #1e293b;
    --board-card-border: #334155;
    --board-border: #334155;
    --board-text-dark: #f1f5f9;
    --board-text-muted: #94a3b8;
}

/* Hero Section */
.board-hero {
    background: linear-gradient(135deg, rgba(15, 110, 86, 0.08) 0%, rgba(29, 158, 117, 0.12) 100%);
    border-bottom: 1px solid rgba(15, 110, 86, 0.15);
    padding: 48px 0 36px;
    text-align: center;
    position: relative;
}

.board-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 110, 86, 0.12);
    color: var(--board-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.board-hero h1 {
    font-size: 2.3rem;
    color: var(--board-primary);
    margin: 0 0 14px;
    font-weight: 800;
    line-height: 1.25;
}

.board-hero p {
    font-size: 1.15rem;
    color: var(--board-text-muted);
    max-width: 760px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Quick Class Switcher Tabs */
.board-class-tabs {
    display: inline-flex;
    background: #fff;
    padding: 6px;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--board-card-border);
    gap: 6px;
    margin-top: 8px;
}

.board-tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--board-text-dark);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.board-tab-btn:hover {
    color: var(--board-primary);
}

.board-tab-btn.active {
    background: var(--board-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 110, 86, 0.35);
}

.board-tab-badge {
    background: var(--board-accent);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Breadcrumbs */
.board-breadcrumbs,
.board-breadcrumb {
    padding: 14px 0;
    background: #fff;
    border-bottom: 1px solid var(--board-card-border);
    font-size: 0.9rem;
    color: var(--board-text-muted);
}

.board-breadcrumbs a,
.board-breadcrumb a {
    color: var(--board-primary);
    text-decoration: none;
    font-weight: 600;
}

.board-breadcrumbs a:hover,
.board-breadcrumb a:hover {
    text-decoration: underline;
}

.board-breadcrumbs span.sep,
.board-breadcrumb span.sep {
    margin: 0 8px;
    color: #94a3b8;
}

/* Features Highlights Strip */
.board-features-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.board-feature-card {
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--board-card-border);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.board-feature-card i {
    font-size: 1.8rem;
    color: var(--board-secondary);
}

.board-feature-card h4 {
    margin: 0 0 3px;
    font-size: 0.98rem;
    color: var(--board-text-dark);
}

.board-feature-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--board-text-muted);
}

/* Subjects Section & Cards */
.board-section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 36px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.board-section-title h2 {
    font-size: 1.65rem;
    color: var(--board-primary);
    margin: 0;
    font-weight: 800;
}

.board-section-title p {
    margin: 4px 0 0;
    color: var(--board-text-muted);
    font-size: 0.95rem;
}

.board-subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.board-subject-card {
    background: #fff;
    border: 1px solid var(--board-card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.board-subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(15, 110, 86, 0.1);
    border-color: var(--board-secondary);
}

.subject-header-band {
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(15, 110, 86, 0.08) 0%, rgba(29, 158, 117, 0.14) 100%);
    border-bottom: 1px solid var(--board-card-border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.subject-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--board-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.subject-title-area h3 {
    margin: 0;
    font-size: 1.18rem;
    color: var(--board-text-dark);
    font-weight: 700;
}

.subject-title-area span {
    font-size: 0.8rem;
    color: var(--board-text-muted);
}

.subject-card-body {
    padding: 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.subject-highlights-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.subject-highlights-list li {
    padding: 7px 0 7px 24px;
    font-size: 0.88rem;
    color: var(--board-text-dark);
    position: relative;
    line-height: 1.5;
    border-bottom: 1px dashed #e2e8f0;
}

.subject-highlights-list li i {
    position: absolute;
    left: 0;
    top: 9px;
    color: var(--board-secondary);
    font-size: 0.85rem;
}

.subject-card-actions {
    display: flex;
    gap: 10px;
}

.btn-subject-primary {
    flex: 1;
    text-align: center;
    background: var(--board-primary);
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.2s ease;
}

.btn-subject-primary:hover {
    background: var(--board-primary-hover);
}

.btn-subject-outline {
    text-align: center;
    background: #fff;
    border: 1px solid var(--board-secondary);
    color: var(--board-secondary);
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.btn-subject-outline:hover {
    background: rgba(29, 158, 117, 0.08);
}

/* Header Back & Action Buttons */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--board-card-border, #cbd5e1);
    color: var(--board-heading, #1e293b);
    padding: 7px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-outline:hover {
    border-color: var(--board-primary);
    color: var(--board-primary);
    background: rgba(15, 110, 86, 0.06);
}

.dark-theme .btn-outline,
.dark-mode .btn-outline,
body.dark-theme .btn-outline,
body.dark-mode .btn-outline {
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .btn-outline:hover,
.dark-mode .btn-outline:hover,
body.dark-theme .btn-outline:hover,
body.dark-mode .btn-outline:hover {
    border-color: #34d399;
    color: #34d399;
    background: rgba(15, 110, 86, 0.16);
}

/* Theory Chapter Article / Notes Styles */
.chapter-container {
    max-width: 920px;
    margin: 30px auto;
    padding: 0 16px;
}

.chapter-header,
.chapter-hero {
    background: #fff;
    border: 1px solid var(--board-card-border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.badge-chapter {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.chapter-badge-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.chapter-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-class { background: #e0f2fe; color: #0369a1; }
.badge-subject { background: #dcfce7; color: #15803d; }
.badge-cbse { background: #fef3c7; color: #b45309; }

.chapter-header h1 {
    font-size: 2rem;
    color: var(--board-primary);
    margin: 0 0 10px;
    font-weight: 800;
}

.chapter-header p.chapter-subtitle {
    font-size: 1.05rem;
    color: var(--board-text-muted);
    margin: 0;
}

/* Language Switcher on Notes */
.chapter-lang-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.btn-lang-pill {
    padding: 5px 14px;
    border-radius: 15px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-lang-pill.active {
    background: var(--board-primary);
    color: #fff;
    border-color: var(--board-primary);
}

/* Theory Sections & Content Cards */
.theory-card,
.revision-notes-section {
    background: var(--board-card-bg, #fff);
    border: 1px solid var(--board-card-border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.subject-hero {
    background: #fff;
    border: 1px solid var(--board-card-border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.subject-hero h1 {
    font-size: 2rem;
    color: var(--board-primary);
    margin: 10px 0;
    font-weight: 800;
}

.subject-hero p {
    font-size: 1.05rem;
    color: var(--board-text-muted);
    margin: 0;
}

.hero-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
    text-transform: uppercase;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.notes-header h2 {
    font-size: 1.35rem;
    color: var(--board-primary);
    margin: 0;
}

.badge-tag {
    background: #dcfce7;
    color: #15803d;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
}

.theory-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
    margin: 15px 0;
}

.theory-card table th {
    background: var(--board-bg);
    color: var(--board-primary);
    border-bottom: 2px solid var(--board-border);
    padding: 10px;
    font-weight: 700;
}

.theory-card table td {
    color: var(--board-text-dark);
    border-bottom: 1px solid var(--board-border);
    padding: 10px;
}

.theory-card h2, .theory-card h3 {
    color: var(--board-primary);
    margin-top: 0;
    font-weight: 800;
}

.theory-card h2 {
    font-size: 1.45rem;
    border-bottom: 2px solid rgba(15, 110, 86, 0.15);
    padding-bottom: 10px;
    margin-bottom: 18px;
}

.theory-card p, .theory-card li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--board-text-dark);
}

.highlight-box {
    background: #f0fdf4;
    border-left: 4px solid var(--board-secondary);
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
}

.highlight-box.formula-box {
    background: #f8fafc;
    border-left: 4px solid var(--board-accent);
}

.highlight-box h4 {
    margin: 0 0 6px;
    color: var(--board-primary);
    font-size: 0.98rem;
}

.highlight-box.formula-box h4 {
    color: var(--board-accent);
}

/* Interactive Board MCQ Widget */
.mcq-section-title {
    margin: 40px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mcq-section-title h2 {
    font-size: 1.6rem;
    color: var(--board-primary);
    margin: 0;
}

.mcq-score-strip {
    background: var(--board-primary);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.88rem;
}

.mcq-card {
    background: #fff;
    border: 1px solid var(--board-card-border);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
}

.mcq-card.answered-correct {
    border-color: #22c55e;
    background: #f0fdf4;
}

.mcq-card.answered-wrong {
    border-color: #ef4444;
    background: #fef2f2;
}

.mcq-question-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: var(--board-text-muted);
    font-weight: 600;
}

.mcq-question-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--board-text-dark);
    margin: 0 0 16px;
    line-height: 1.5;
}

.mcq-options,
.mcq-options-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
}

.mcq-option-btn {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-size: 0.95rem !important;
    color: var(--board-text-dark) !important;
    cursor: pointer !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.mcq-option-btn:hover:not(:disabled) {
    background: rgba(15, 110, 86, 0.04) !important;
    border-color: var(--board-secondary) !important;
}

.mcq-option-btn .opt-badge {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    color: var(--board-text-dark) !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
}

/* Responsive Table & Exam Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 10px;
    border: 1px solid var(--board-card-border, #cbd5e1);
}

.exam-table,
.theory-card table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
    background: #fff;
}

.exam-table th,
.theory-card th {
    background: #f8fafc;
    color: var(--board-primary);
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.exam-table td,
.theory-card td {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--board-text-dark);
    vertical-align: middle;
}

.exam-table tbody tr:hover,
.theory-card tbody tr:hover {
    background: rgba(15, 110, 86, 0.02);
}

.exam-table tbody tr:last-child td,
.theory-card tbody tr:last-child td {
    border-bottom: none;
}

.mcq-option-btn.selected-correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
    font-weight: 700;
}

.mcq-option-btn.selected-correct .opt-badge {
    background: #22c55e;
    color: #fff;
}

.mcq-option-btn.selected-wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

.mcq-option-btn.selected-wrong .opt-badge {
    background: #ef4444;
    color: #fff;
}

.mcq-explanation-box {
    margin-top: 14px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    color: var(--board-text-dark);
    line-height: 1.55;
    display: none;
}

.mcq-explanation-box.active {
    display: block;
}

/* ==========================================================================
   Comprehensive Dark Mode Overrides for Boards Portal
   Supports both .dark-theme and .dark-mode across all containers
   ========================================================================== */

.dark-theme body,
.dark-mode body,
body.dark-theme,
body.dark-mode {
    background-color: #0b1120 !important;
    color: #e2e8f0 !important;
}

.dark-theme .board-hero,
.dark-mode .board-hero,
body.dark-theme .board-hero,
body.dark-mode .board-hero {
    background: linear-gradient(135deg, rgba(15, 110, 86, 0.25) 0%, rgba(29, 158, 117, 0.15) 100%) !important;
    border-bottom: 1px solid #334155 !important;
}

.dark-theme .board-class-tabs,
.dark-mode .board-class-tabs,
body.dark-theme .board-class-tabs,
body.dark-mode .board-class-tabs,
.dark-theme .board-breadcrumbs,
.dark-mode .board-breadcrumbs,
body.dark-theme .board-breadcrumbs,
body.dark-mode .board-breadcrumbs,
.dark-theme .board-feature-card,
.dark-mode .board-feature-card,
body.dark-theme .board-feature-card,
body.dark-mode .board-feature-card,
.dark-theme .board-subject-card,
.dark-mode .board-subject-card,
body.dark-theme .board-subject-card,
body.dark-mode .board-subject-card,
.dark-theme .chapter-header,
.dark-mode .chapter-header,
body.dark-theme .chapter-header,
body.dark-mode .chapter-header,
.dark-theme .chapter-hero,
.dark-mode .chapter-hero,
body.dark-theme .chapter-hero,
body.dark-mode .chapter-hero,
.dark-theme .theory-card,
.dark-mode .theory-card,
body.dark-theme .theory-card,
body.dark-mode .theory-card,
.dark-theme .subject-hero,
.dark-mode .subject-hero,
body.dark-theme .subject-hero,
body.dark-mode .subject-hero,
.dark-theme .revision-notes-section,
.dark-mode .revision-notes-section,
body.dark-theme .revision-notes-section,
body.dark-mode .revision-notes-section,
.dark-theme .mcq-card,
.dark-mode .mcq-card,
body.dark-theme .mcq-card,
body.dark-mode .mcq-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-theme .board-hero h1,
.dark-mode .board-hero h1,
body.dark-theme .board-hero h1,
body.dark-mode .board-hero h1,
.dark-theme .board-section-title h2,
.dark-mode .board-section-title h2,
body.dark-theme .board-section-title h2,
body.dark-mode .board-section-title h2,
.dark-theme .chapter-header h1,
.dark-mode .chapter-header h1,
body.dark-theme .chapter-header h1,
body.dark-mode .chapter-header h1,
.dark-theme .theory-card h2,
.dark-mode .theory-card h2,
body.dark-theme .theory-card h2,
body.dark-mode .theory-card h2,
.dark-theme .theory-card h3,
.dark-mode .theory-card h3,
body.dark-theme .theory-card h3,
body.dark-mode .theory-card h3,
.dark-theme .theory-card h4,
.dark-mode .theory-card h4,
body.dark-theme .theory-card h4,
body.dark-mode .theory-card h4,
.dark-theme .mcq-section-title h2,
.dark-mode .mcq-section-title h2,
body.dark-theme .mcq-section-title h2,
body.dark-mode .mcq-section-title h2 {
    color: #34d399 !important;
    border-bottom-color: #334155 !important;
}

.dark-theme .board-hero p,
.dark-mode .board-hero p,
body.dark-theme .board-hero p,
body.dark-mode .board-hero p,
.dark-theme .board-section-title p,
.dark-mode .board-section-title p,
body.dark-theme .board-section-title p,
body.dark-mode .board-section-title p,
.dark-theme .board-breadcrumbs,
.dark-mode .board-breadcrumbs,
body.dark-theme .board-breadcrumbs,
body.dark-mode .board-breadcrumbs,
.dark-theme .board-breadcrumbs span,
.dark-mode .board-breadcrumbs span,
body.dark-theme .board-breadcrumbs span,
body.dark-mode .board-breadcrumbs span,
.dark-theme .chapter-header p.chapter-subtitle,
.dark-mode .chapter-header p.chapter-subtitle,
body.dark-theme .chapter-header p.chapter-subtitle,
body.dark-mode .chapter-header p.chapter-subtitle,
.dark-theme .theory-card p,
.dark-mode .theory-card p,
body.dark-theme .theory-card p,
body.dark-mode .theory-card p,
.dark-theme .theory-card li,
.dark-mode .theory-card li,
body.dark-theme .theory-card li,
body.dark-mode .theory-card li,
.dark-theme .theory-card span,
.dark-mode .theory-card span,
body.dark-theme .theory-card span,
body.dark-mode .theory-card span,
.dark-theme .mcq-question-text,
.dark-mode .mcq-question-text,
body.dark-theme .mcq-question-text,
body.dark-mode .mcq-question-text {
    color: #cbd5e1 !important;
}

.dark-theme .board-breadcrumbs a,
.dark-mode .board-breadcrumbs a,
body.dark-theme .board-breadcrumbs a,
body.dark-mode .board-breadcrumbs a,
.dark-theme .board-breadcrumb a,
.dark-mode .board-breadcrumb a,
body.dark-theme .board-breadcrumb a,
body.dark-mode .board-breadcrumb a {
    color: #34d399 !important;
}

.dark-theme .theory-card strong,
.dark-mode .theory-card strong,
body.dark-theme .theory-card strong,
body.dark-mode .theory-card strong,
.dark-theme .theory-card b,
.dark-mode .theory-card b,
body.dark-theme .theory-card b,
body.dark-mode .theory-card b {
    color: #f1f5f9 !important;
}

/* Dark mode for MCQ options and buttons */
.dark-theme .mcq-option-btn,
.dark-mode .mcq-option-btn,
body.dark-theme .mcq-option-btn,
body.dark-mode .mcq-option-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-theme .mcq-option-btn .opt-badge,
.dark-mode .mcq-option-btn .opt-badge,
body.dark-theme .mcq-option-btn .opt-badge,
body.dark-mode .mcq-option-btn .opt-badge {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-theme .mcq-explanation-box,
.dark-mode .mcq-explanation-box,
body.dark-theme .mcq-explanation-box,
body.dark-mode .mcq-explanation-box {
    background: #0f172a !important;
    color: #cbd5e1 !important;
    border-left-color: #34d399 !important;
}

/* Dark mode for Exam Tables */
.dark-theme .exam-table,
.dark-mode .exam-table,
body.dark-theme .exam-table,
body.dark-mode .exam-table {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

.dark-theme .exam-table th,
.dark-mode .exam-table th,
body.dark-theme .exam-table th,
body.dark-mode .exam-table th {
    background: #0f172a !important;
    border-bottom-color: #334155 !important;
    color: #34d399 !important;
}

.dark-theme .exam-table td,
.dark-mode .exam-table td,
body.dark-theme .exam-table td,
body.dark-mode .exam-table td {
    border-bottom-color: #334155 !important;
    color: #cbd5e1 !important;
}

/* Theory Card Tables in Dark Mode */
.dark-theme .theory-card table,
.dark-mode .theory-card table,
body.dark-theme .theory-card table,
body.dark-mode .theory-card table {
    border-color: #334155 !important;
}

.dark-theme .theory-card table th,
.dark-mode .theory-card table th,
body.dark-theme .theory-card table th,
body.dark-mode .theory-card table th,
.dark-theme .theory-card thead tr,
.dark-mode .theory-card thead tr,
body.dark-theme .theory-card thead tr,
body.dark-mode .theory-card thead tr,
.dark-theme .theory-card tr[style*="background"],
.dark-mode .theory-card tr[style*="background"],
body.dark-theme .theory-card tr[style*="background"],
body.dark-mode .theory-card tr[style*="background"] {
    background: #0f172a !important;
    color: #34d399 !important;
    border-bottom: 2px solid #334155 !important;
}

.dark-theme .theory-card table td,
.dark-mode .theory-card table td,
body.dark-theme .theory-card table td,
body.dark-mode .theory-card table td {
    color: #cbd5e1 !important;
    border-bottom: 1px solid #334155 !important;
}

.dark-theme .theory-card table td strong,
.dark-mode .theory-card table td strong,
body.dark-theme .theory-card table td strong,
body.dark-mode .theory-card table td strong {
    color: #f1f5f9 !important;
}

.dark-theme .theory-card table tr:hover,
.dark-mode .theory-card table tr:hover,
body.dark-theme .theory-card table tr:hover,
body.dark-mode .theory-card table tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Highlight & Formula Boxes in Dark Mode */
.dark-theme .highlight-box,
.dark-mode .highlight-box,
body.dark-theme .highlight-box,
body.dark-mode .highlight-box {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-left: 4px solid #10b981 !important;
    color: #e2e8f0 !important;
}

.dark-theme .highlight-box strong,
.dark-mode .highlight-box strong,
body.dark-theme .highlight-box strong,
body.dark-mode .highlight-box strong {
    color: #34d399 !important;
}

.dark-theme .highlight-box.formula-box,
.dark-mode .highlight-box.formula-box,
body.dark-theme .highlight-box.formula-box,
body.dark-mode .highlight-box.formula-box,
.dark-theme .formula-box,
.dark-mode .formula-box,
body.dark-theme .formula-box,
body.dark-mode .formula-box {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-left: 4px solid #f59e0b !important;
    color: #e2e8f0 !important;
}

.dark-theme .formula-box strong,
.dark-mode .formula-box strong,
body.dark-theme .formula-box strong,
body.dark-mode .formula-box strong {
    color: #fbbf24 !important;
}

/* Comparison Grid Cards in Dark Mode */
.dark-theme .comparison-grid > div,
.dark-mode .comparison-grid > div,
body.dark-theme .comparison-grid > div,
body.dark-mode .comparison-grid > div {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

.dark-theme .comparison-grid h4,
.dark-mode .comparison-grid h4,
body.dark-theme .comparison-grid h4,
body.dark-mode .comparison-grid h4 {
    color: #34d399 !important;
}

/* Language Switcher in Dark Mode */
.dark-theme .chapter-lang-toggle span,
.dark-mode .chapter-lang-toggle span,
body.dark-theme .chapter-lang-toggle span,
body.dark-mode .chapter-lang-toggle span {
    color: #94a3b8 !important;
}

.dark-theme .btn-lang-pill,
.dark-mode .btn-lang-pill,
body.dark-theme .btn-lang-pill,
body.dark-mode .btn-lang-pill {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #94a3b8 !important;
}

.dark-theme .btn-lang-pill.active,
.dark-mode .btn-lang-pill.active,
body.dark-theme .btn-lang-pill.active,
body.dark-mode .btn-lang-pill.active {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* Subject Hub Cards */
.dark-theme .subject-title-area h3,
.dark-mode .subject-title-area h3,
body.dark-theme .subject-title-area h3,
body.dark-mode .subject-title-area h3,
.dark-theme .subject-highlights-list li,
.dark-mode .subject-highlights-list li,
body.dark-theme .subject-highlights-list li,
body.dark-mode .subject-highlights-list li,
.dark-theme .board-feature-card h4,
.dark-mode .board-feature-card h4,
body.dark-theme .board-feature-card h4,
body.dark-mode .board-feature-card h4,
.dark-theme .board-tab-btn,
.dark-mode .board-tab-btn,
body.dark-theme .board-tab-btn,
body.dark-mode .board-tab-btn {
    color: #f1f5f9 !important;
}

.dark-theme .subject-title-area span,
.dark-mode .subject-title-area span,
body.dark-theme .subject-title-area span,
body.dark-mode .subject-title-area span {
    color: #94a3b8 !important;
}

.dark-theme .subject-highlights-list li,
.dark-mode .subject-highlights-list li,
body.dark-theme .subject-highlights-list li,
body.dark-mode .subject-highlights-list li {
    border-bottom-color: #334155 !important;
}

.dark-theme .subject-header-band,
.dark-mode .subject-header-band,
body.dark-theme .subject-header-band,
body.dark-mode .subject-header-band {
    background: rgba(15, 110, 86, 0.2) !important;
    border-bottom-color: #334155 !important;
}

/* MCQ Options & Explanations in Dark Mode */
.dark-theme .mcq-question-meta,
.dark-mode .mcq-question-meta,
body.dark-theme .mcq-question-meta,
body.dark-mode .mcq-question-meta {
    color: #94a3b8 !important;
}

.dark-theme .mcq-option-btn,
.dark-mode .mcq-option-btn,
body.dark-theme .mcq-option-btn,
body.dark-mode .mcq-option-btn {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-theme .mcq-option-btn:hover,
.dark-mode .mcq-option-btn:hover,
body.dark-theme .mcq-option-btn:hover,
body.dark-mode .mcq-option-btn:hover {
    background: #1e293b !important;
    border-color: #34d399 !important;
}

.dark-theme .mcq-option-btn .opt-badge,
.dark-mode .mcq-option-btn .opt-badge,
body.dark-theme .mcq-option-btn .opt-badge,
body.dark-mode .mcq-option-btn .opt-badge {
    background: #1e293b !important;
    color: #94a3b8 !important;
}

.dark-theme .mcq-option-btn.opt-correct,
.dark-mode .mcq-option-btn.opt-correct,
body.dark-theme .mcq-option-btn.opt-correct,
body.dark-mode .mcq-option-btn.opt-correct {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
}

.dark-theme .mcq-option-btn.opt-correct .opt-badge,
.dark-mode .mcq-option-btn.opt-correct .opt-badge,
body.dark-theme .mcq-option-btn.opt-correct .opt-badge,
body.dark-mode .mcq-option-btn.opt-correct .opt-badge {
    background: #10b981 !important;
    color: #ffffff !important;
}

.dark-theme .mcq-option-btn.opt-wrong,
.dark-mode .mcq-option-btn.opt-wrong,
body.dark-theme .mcq-option-btn.opt-wrong,
body.dark-mode .mcq-option-btn.opt-wrong {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

.dark-theme .mcq-option-btn.opt-wrong .opt-badge,
.dark-mode .mcq-option-btn.opt-wrong .opt-badge,
body.dark-theme .mcq-option-btn.opt-wrong .opt-badge,
body.dark-mode .mcq-option-btn.opt-wrong .opt-badge {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.dark-theme .mcq-explanation-box,
.dark-mode .mcq-explanation-box,
body.dark-theme .mcq-explanation-box,
body.dark-mode .mcq-explanation-box {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-left: 4px solid #10b981 !important;
    color: #cbd5e1 !important;
}

.dark-theme .mcq-explanation-box strong,
.dark-mode .mcq-explanation-box strong,
body.dark-theme .mcq-explanation-box strong,
body.dark-mode .mcq-explanation-box strong {
    color: #34d399 !important;
}

.dark-theme .mcq-explanation-box em,
.dark-mode .mcq-explanation-box em,
body.dark-theme .mcq-explanation-box em,
body.dark-mode .mcq-explanation-box em {
    color: #94a3b8 !important;
}

/* Navigation Buttons in Dark Mode */
.dark-theme .btn-subject-outline,
.dark-mode .btn-subject-outline,
body.dark-theme .btn-subject-outline,
body.dark-mode .btn-subject-outline {
    background: transparent !important;
    border: 1.5px solid #34d399 !important;
    color: #34d399 !important;
}

.dark-theme .btn-subject-outline:hover,
.dark-mode .btn-subject-outline:hover,
body.dark-theme .btn-subject-outline:hover,
body.dark-mode .btn-subject-outline:hover {
    background: rgba(52, 211, 153, 0.15) !important;
    color: #6ee7b7 !important;
}

.dark-theme .btn-subject-primary,
.dark-mode .btn-subject-primary,
body.dark-theme .btn-subject-primary,
body.dark-mode .btn-subject-primary {
    background: #059669 !important;
    color: #ffffff !important;
}

.dark-theme .btn-subject-primary:hover,
.dark-mode .btn-subject-primary:hover,
body.dark-theme .btn-subject-primary:hover,
body.dark-mode .btn-subject-primary:hover {
    background: #047857 !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .board-hero h1 { font-size: 1.8rem; }
    .board-hero p { font-size: 1rem; }
    .board-class-tabs { width: 100%; justify-content: center; }
    .board-tab-btn { padding: 8px 14px; font-size: 0.85rem; }
    .chapter-header { padding: 18px; }
    .chapter-header h1 { font-size: 1.5rem; }
    .theory-card { padding: 18px; }
    .mcq-card { padding: 16px; }
}
