﻿/* ══════════════════════════════════════════════════════════════
   pod-nebula-dark.css — Nebula Theme for Pod Play Experience
   ══════════════════════════════════════════════════════════════
   PURPOSE: Overrides cockpit/indigo palette in pod-play.css and
            inline partial styles with the Nebula cyberpunk theme.
   
   LOAD ORDER: bootstrap → pod-play.css → THIS FILE
   Add to Play.cshtml <head>:
     <link href="~/css/pod-nebula-dark.css" rel="stylesheet">
   
   SPECIFICITY: Uses html[data-theme="dark"] to beat both
   pod-play.css [data-theme="dark"] rules AND inline <style>
   blocks in partials (_PodSlidePlay, _PodCheckpoint, etc.)
   
   SCOPE: Dark mode only — light mode is completely unaffected.
   ══════════════════════════════════════════════════════════════ */


/* ── 1. VARIABLE OVERRIDES ─────────────────────────────────
   Remap cockpit variables to Nebula palette.
   Any rule using var(--cockpit-*) will automatically update.
   ──────────────────────────────────────────────────────────── */
html[data-theme="dark"] {
    --cockpit-bg: #111111;
    --cockpit-surface: #141414;
    --cockpit-surface-hover: #1b1b1b;
    --cockpit-border: rgba(255, 255, 255, 0.06);
    --cockpit-text: #ffffff;
    --cockpit-text-muted: #a8a8a8;
    --cockpit-accent: #00e676;
    --cockpit-accent-glow: rgba(0, 230, 118, 0.3);
    --cockpit-success: #10b981;
    --cockpit-warning: #f59e0b;
    --cockpit-danger: #ef4444;
}


    /* ── 2. BODY & SCAFFOLDING ─────────────────────────────────── */
    html[data-theme="dark"] body {
        background: #111111;
        color: #ffffff;
    }


    /* ── 3. POD HEADER ─────────────────────────────────────────── */
    html[data-theme="dark"] .pod-header {
        background: #141414;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: none;
    }

    html[data-theme="dark"] .pod-title {
        color: #ffffff;
    }

        html[data-theme="dark"] .pod-title i {
            color: #00e676;
        }


    /* ── 4. PROGRESS BAR ───────────────────────────────────────── */
    html[data-theme="dark"] .progress {
        background: rgba(255, 255, 255, 0.04);
    }

    html[data-theme="dark"] .progress-bar {
        background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
    }


    /* ── 5. CONTENT CARD (main content wrapper) ────────────────── */
    html[data-theme="dark"] .content-card {
        background: rgba(255, 255, 255, 0.025);
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

        html[data-theme="dark"] .content-card h2,
        html[data-theme="dark"] .content-card h3,
        html[data-theme="dark"] .content-card h5,
        html[data-theme="dark"] .content-card h6,
        html[data-theme="dark"] .content-card strong {
            color: #ffffff !important;
        }

        html[data-theme="dark"] .content-card p,
        html[data-theme="dark"] .content-card span:not(.badge):not(.badge *),
        html[data-theme="dark"] .content-card label,
        html[data-theme="dark"] .content-card li {
            color: #cfcfcf !important;
        }

        html[data-theme="dark"] .content-card .text-muted {
            color: #a8a8a8 !important;
        }

        html[data-theme="dark"] .content-card .text-dark {
            color: #ffffff !important;
        }


    /* ── 6. BADGES — Nebula translucent style (small inline) ───── */
    html[data-theme="dark"] .badge.bg-primary {
        background: rgba(0, 230, 118, 0.15) !important;
        color: #00e676 !important;
    }

    html[data-theme="dark"] .badge.bg-success {
        background: rgba(0, 230, 118, 0.15) !important;
        color: #00e676 !important;
    }

    html[data-theme="dark"] .badge.bg-info {
        background: rgba(0, 224, 255, 0.15) !important;
        color: #00e0ff !important;
    }

    html[data-theme="dark"] .badge.bg-warning {
        background: rgba(255, 234, 0, 0.15) !important;
        color: #ffea00 !important;
    }

    html[data-theme="dark"] .badge.bg-secondary {
        background: rgba(255, 255, 255, 0.06) !important;
        color: #a8a8a8 !important;
    }

    /* ── 6b. LARGE STAT BADGES — Solid bg + white text ─────────── */
    /* Intro/waiting screen stat badges and any fs-5/fs-6 pill badges */
    html[data-theme="dark"] .waiting-screen .badge.bg-primary {
        background: linear-gradient(135deg, #00e676, #00c853) !important;
        color: #111111 !important;
    }

    html[data-theme="dark"] .waiting-screen .badge.bg-success {
        background: linear-gradient(135deg, #00e676, #00c853) !important;
        color: #111111 !important;
    }

    html[data-theme="dark"] .waiting-screen .badge.bg-info {
        background: linear-gradient(135deg, #00e0ff, #00b8d4) !important;
        color: #111111 !important;
    }

    html[data-theme="dark"] .waiting-screen .badge.bg-warning {
        background: linear-gradient(135deg, #ffea00, #ffc400) !important;
        color: #111111 !important;
    }

    /* Also fix completion screen score badge */
    html[data-theme="dark"] .checkpoint-complete .badge.bg-success,
    html[data-theme="dark"] .completion-screen .badge {
        background: linear-gradient(135deg, #00e676, #00c853) !important;
        color: #111111 !important;
    }


    /* ── 7. BUTTONS — Nebula green/ghost style ─────────────────── */
    html[data-theme="dark"] .btn-primary {
        background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
        border: none;
        color: #111111;
        font-weight: 600;
    }

        html[data-theme="dark"] .btn-primary:hover {
            box-shadow: 0 0 20px rgba(0, 230, 118, 0.25);
            background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
            color: #111111;
        }

        html[data-theme="dark"] .btn-primary.nav-btn {
            background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
            border-color: #00e676;
            color: #111111;
        }

            html[data-theme="dark"] .btn-primary.nav-btn:hover:not(:disabled) {
                box-shadow: 0 0 20px rgba(0, 230, 118, 0.25);
                background: #00c853;
            }

    html[data-theme="dark"] .btn-outline-primary {
        color: #00e676;
        border-color: rgba(0, 230, 118, 0.3);
        background: transparent;
    }

        html[data-theme="dark"] .btn-outline-primary:hover {
            background: rgba(0, 230, 118, 0.1);
            border-color: rgba(0, 230, 118, 0.5);
            color: #00e676;
            box-shadow: 0 0 16px rgba(0, 230, 118, 0.12);
        }

    html[data-theme="dark"] .btn-outline-secondary {
        color: #a8a8a8;
        border-color: rgba(255, 255, 255, 0.1);
        background: transparent;
    }

        html[data-theme="dark"] .btn-outline-secondary:hover {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.2);
            color: #ffffff;
        }

    html[data-theme="dark"] .btn-success {
        background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
        border: none;
        color: #111111;
    }

    html[data-theme="dark"] .content-card .btn-outline-secondary {
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #a8a8a8 !important;
    }

        html[data-theme="dark"] .content-card .btn-outline-secondary:hover {
            background: rgba(255, 255, 255, 0.04) !important;
            color: #ffffff !important;
        }

    html[data-theme="dark"] .content-card .activity-actions .btn-success {
        background: linear-gradient(135deg, #00e676 0%, #00c853 100%) !important;
        border-color: #00e676 !important;
        color: #111111 !important;
    }


    /* ── 8. NAV FOOTER ─────────────────────────────────────────── */
    html[data-theme="dark"] .pod-nav {
        background: #141414;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: none;
    }

    html[data-theme="dark"] .nav-btn {
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: #111111;
        color: #ffffff;
    }

        html[data-theme="dark"] .nav-btn:hover:not(:disabled) {
            background: #1b1b1b;
            border-color: rgba(0, 230, 118, 0.3);
        }

        html[data-theme="dark"] .nav-btn:disabled {
            opacity: 0.35;
        }


    /* ── 9. TEXT HELPERS ───────────────────────────────────────── */
    /* #4b5563 here was ~2.5:1 on the #0c1016 backdrop — failed WCAG AA and read
       as unreadable dim text wherever Bootstrap's .text-muted is used outside a
       .content-card. Match the readable muted tone used by the token and the
       .content-card override (~7.6:1). */
    html[data-theme="dark"] .text-muted {
        color: #a8a8a8 !important;
    }

    html[data-theme="dark"] .text-dark {
        color: #ffffff !important;
    }

    html[data-theme="dark"] .position-indicator {
        color: #a8a8a8;
    }


    /* ── 10. ALERTS — Nebula translucent ───────────────────────── */
    html[data-theme="dark"] .alert-success {
        background: rgba(0, 230, 118, 0.06);
        border-color: rgba(0, 230, 118, 0.2);
        color: #00e676;
    }

    html[data-theme="dark"] .alert-warning {
        background: rgba(255, 234, 0, 0.06);
        border-color: rgba(255, 234, 0, 0.2);
        color: #ffea00;
    }

    html[data-theme="dark"] .alert-danger {
        background: rgba(255, 82, 82, 0.06);
        border-color: rgba(255, 82, 82, 0.2);
        color: #ff5252;
    }

    html[data-theme="dark"] .alert-info {
        background: rgba(0, 224, 255, 0.06);
        border-color: rgba(0, 224, 255, 0.2);
        color: #00e0ff;
    }


    /* ── 11. SLIDE PARTIAL (_PodSlidePlay) ─────────────────────── */
    html[data-theme="dark"] .slide-container {
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }

    html[data-theme="dark"] .slide-header {
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    html[data-theme="dark"] .slide-title {
        color: #ffffff;
    }

    html[data-theme="dark"] .content-point {
        border-bottom-color: rgba(255, 255, 255, 0.04);
        color: #cfcfcf;
    }

        html[data-theme="dark"] .content-point i.text-primary {
            color: #00e676 !important;
        }

    html[data-theme="dark"] .content-card .content-point {
        border-bottom-color: rgba(255, 255, 255, 0.04) !important;
    }


    /* ── 12. CHECKPOINT (server-generated — BuildActivityHtml in PodsController.Play.cs) ── */
    html[data-theme="dark"] .checkpoint-title {
        color: #ffffff !important;
    }

    html[data-theme="dark"] .assessment-title {
        color: #ffffff !important;
    }

    html[data-theme="dark"] .checkpoint-subtitle,
    html[data-theme="dark"] .assessment-subtitle {
        color: #a8a8a8 !important;
    }

    html[data-theme="dark"] .icon-circle {
        box-shadow: 0 4px 15px rgba(0, 230, 118, 0.2);
    }

    html[data-theme="dark"] .card.border-warning {
        border-color: rgba(255, 234, 0, 0.3) !important;
        background: rgba(255, 255, 255, 0.025);
    }

        html[data-theme="dark"] .card.border-warning .card-header.bg-warning {
            background: rgba(255, 234, 0, 0.12) !important;
            color: #ffea00 !important;
            border-bottom-color: rgba(255, 255, 255, 0.06);
        }

        html[data-theme="dark"] .card.border-warning .card-body {
            background: transparent;
            color: #cfcfcf;
        }

        html[data-theme="dark"] .card.border-warning .card-footer {
            background: transparent;
            border-top-color: rgba(255, 255, 255, 0.06);
        }

    html[data-theme="dark"] .form-check-label {
        color: #cfcfcf;
    }


    /* ── 13. MATCHING ACTIVITY (BuildMatchingActivityHtml) ─────── */
    html[data-theme="dark"] .activity-header h3 {
        color: #ffffff !important;
    }

    html[data-theme="dark"] .matching-column {
        background: #111111 !important;
    }

    html[data-theme="dark"] .column-header {
        color: #a8a8a8 !important;
        border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    }

    html[data-theme="dark"] .matching-item {
        background: rgba(255, 255, 255, 0.025) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #cfcfcf !important;
    }

        html[data-theme="dark"] .matching-item:hover {
            border-color: rgba(0, 230, 118, 0.4) !important;
            background: rgba(0, 230, 118, 0.06) !important;
        }

        html[data-theme="dark"] .matching-item .item-text {
            color: #cfcfcf !important;
        }

    html[data-theme="dark"] .match-indicator {
        background: rgba(255, 255, 255, 0.04) !important;
        color: #565656 !important;
    }

    html[data-theme="dark"] .matching-area .col-md-2 i {
        color: #565656 !important;
    }

    html[data-theme="dark"] .matching-item.selected {
        border-color: rgba(0, 230, 118, 0.6) !important;
        background: rgba(0, 230, 118, 0.1) !important;
        box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2) !important;
    }

    html[data-theme="dark"] .matching-item.matched-correct {
        border-color: #00e676 !important;
        background: rgba(0, 230, 118, 0.08) !important;
    }

    html[data-theme="dark"] .matching-item.matched-incorrect {
        border-color: rgba(255, 82, 82, 0.5) !important;
        background: rgba(255, 82, 82, 0.08) !important;
    }

    html[data-theme="dark"] .matching-submit-btn,
    html[data-theme="dark"] .matching-column .btn-success {
        background: linear-gradient(135deg, #00e676 0%, #00c853 100%) !important;
        border-color: #00e676 !important;
        color: #111111 !important;
    }

    html[data-theme="dark"] .connection-lines line {
        stroke: #00e676;
    }


    /* ── 14. MULTISELECT ACTIVITY (BuildMultiselectActivityHtml) ── */
    html[data-theme="dark"] .multiselect-option {
        background: rgba(255, 255, 255, 0.025) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #cfcfcf !important;
    }

        html[data-theme="dark"] .multiselect-option:hover {
            border-color: rgba(0, 224, 255, 0.4) !important;
            background: rgba(0, 224, 255, 0.06) !important;
        }

        html[data-theme="dark"] .multiselect-option > div > span:first-child {
            background: rgba(255, 255, 255, 0.06) !important;
            color: #a8a8a8 !important;
        }

        html[data-theme="dark"] .multiselect-option > div > span:nth-child(2) {
            color: #cfcfcf !important;
        }

        html[data-theme="dark"] .multiselect-option > div > span:last-child {
            color: #565656 !important;
        }

        html[data-theme="dark"] .multiselect-option.selected {
            border-color: rgba(0, 224, 255, 0.6) !important;
            background: rgba(0, 224, 255, 0.08) !important;
            box-shadow: 0 0 0 3px rgba(0, 224, 255, 0.15) !important;
        }

        /* Checkbox indicator in multiselect */
        html[data-theme="dark"] .multiselect-option .option-indicator .checked {
            background: #00e0ff !important;
            color: #111111 !important;
        }

        html[data-theme="dark"] .multiselect-option .option-indicator .unchecked {
            background: rgba(255, 255, 255, 0.06) !important;
            color: #565656 !important;
        }


    /* ── 14b. TWO-PART ACTIVITY (BuildTwoPartMCActivityHtml) ─────
       Same inline-white option card as multiselect, so it needs the same
       overrides. selectTwoPartOption paints selection INLINE (no class), and
       these !important rules beat inline styles — so selection is read from
       aria-checked, and the post-submit verdict from the tp-* classes the
       reveal adds. Both sit AFTER :hover so they win the equal-specificity tie. */
    html[data-theme="dark"] .two-part-option {
        background: rgba(255, 255, 255, 0.025) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #cfcfcf !important;
    }

        html[data-theme="dark"] .two-part-option:hover {
            border-color: rgba(0, 224, 255, 0.4) !important;
            background: rgba(0, 224, 255, 0.06) !important;
        }

        /* Letter circle (A/B/C/D). */
        html[data-theme="dark"] .two-part-option > div > span:first-child {
            background: rgba(255, 255, 255, 0.06) !important;
            color: #a8a8a8 !important;
        }

        html[data-theme="dark"] .two-part-option .option-text {
            color: #cfcfcf !important;
        }

        /* Radio indicator. */
        html[data-theme="dark"] .two-part-option > div > span:last-child {
            color: #565656 !important;
        }

        html[data-theme="dark"] .two-part-option[aria-checked="true"] {
            border-color: rgba(0, 224, 255, 0.6) !important;
            background: rgba(0, 224, 255, 0.08) !important;
            box-shadow: 0 0 0 3px rgba(0, 224, 255, 0.15) !important;
        }

        html[data-theme="dark"] .two-part-option[aria-checked="true"] .checked {
            color: #00e0ff !important;
        }

        html[data-theme="dark"] .two-part-option.tp-correct {
            border-color: #10b981 !important;
            background: rgba(16, 185, 129, 0.18) !important;
        }

        html[data-theme="dark"] .two-part-option.tp-wrong {
            border-color: #ef4444 !important;
            background: rgba(239, 68, 68, 0.18) !important;
        }

        html[data-theme="dark"] .two-part-option.tp-missed {
            border-color: #f59e0b !important;
            background: rgba(245, 158, 11, 0.16) !important;
        }


    /* ── 15. SORTING ACTIVITY (BuildSortingActivityHtml) ───────── */
    html[data-theme="dark"] .sorting-instructions {
        background: #111111 !important;
        border-color: rgba(255, 255, 255, 0.06);
    }

    html[data-theme="dark"] .sorting-item {
        background: rgba(255, 255, 255, 0.025) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #cfcfcf !important;
    }

        html[data-theme="dark"] .sorting-item:hover {
            border-color: rgba(0, 230, 118, 0.4) !important;
            background: rgba(0, 230, 118, 0.06) !important;
        }

        html[data-theme="dark"] .sorting-item .sort-handle {
            background: rgba(255, 255, 255, 0.04) !important;
            color: #565656 !important;
        }

        html[data-theme="dark"] .sorting-item.correct-position {
            border-color: rgba(0, 230, 118, 0.5) !important;
            background: rgba(0, 230, 118, 0.06) !important;
        }


    /* ── 16. EXIT ASSESSMENT (BuildExitAssessmentHtml) ─────────── */
    html[data-theme="dark"] .icon-circle.warning {
        box-shadow: 0 4px 15px rgba(255, 234, 0, 0.2);
    }

    html[data-theme="dark"] .mastery-info .badge {
        background: rgba(255, 234, 0, 0.12) !important;
        color: #ffea00 !important;
        border: 1px solid rgba(255, 234, 0, 0.2);
    }


    /* ── 17. VOCAB SECTION ─────────────────────────────────────── */
    html[data-theme="dark"] .vocab-section {
        background: linear-gradient(135deg, rgba(0, 230, 118, 0.06), rgba(0, 224, 255, 0.04)) !important;
        border-left-color: #00e676 !important;
    }

        html[data-theme="dark"] .vocab-section h6.text-primary {
            color: #00e676 !important;
        }

    html[data-theme="dark"] .vocab-card {
        background: rgba(255, 255, 255, 0.025) !important;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

        html[data-theme="dark"] .vocab-card strong.text-dark {
            color: #00e0ff !important;
        }


    /* ── 18. REMEDIATION & MNEMONIC ────────────────────────────── */
    html[data-theme="dark"] .remediation-box {
        background: rgba(255, 234, 0, 0.06);
        border-left-color: #ffea00;
        color: #ffea00;
    }

    html[data-theme="dark"] .mnemonic-box {
        background: rgba(0, 224, 255, 0.06);
        color: #00e0ff;
    }


    /* ── 19. FEEDBACK OVERLAY & CARDS ──────────────────────────── */
    html[data-theme="dark"] .locked-overlay {
        background: rgba(17, 17, 17, 0.85);
    }

    html[data-theme="dark"] .locked-message {
        background: #141414;
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

        html[data-theme="dark"] .locked-message h4 {
            color: #ffffff;
        }

        html[data-theme="dark"] .locked-message p {
            color: #a8a8a8 !important;
        }

    html[data-theme="dark"] .feedback-overlay {
        background: rgba(17, 17, 17, 0.9);
    }

    html[data-theme="dark"] .feedback-card {
        background: #141414;
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }


    /* ── 20. ENGAGE OPTIONS ────────────────────────────────────── */
    html[data-theme="dark"] .engage-option {
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #cfcfcf !important;
        background: rgba(255, 255, 255, 0.025) !important;
    }

        html[data-theme="dark"] .engage-option:hover:not(:disabled) {
            border-color: rgba(0, 230, 118, 0.4) !important;
            background: rgba(0, 230, 118, 0.06) !important;
        }


    /* ── 21. EDPUZZLE VIDEO PLAYER ─────────────────────────────── */
    html[data-theme="dark"] .ep-custom-controls {
        background: #111111;
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-top: none;
    }

    html[data-theme="dark"] .ep-play-btn:hover {
        background: rgba(0, 230, 118, 0.15);
        color: #ffffff;
    }

    html[data-theme="dark"] .ep-big-play-btn {
        background: rgba(0, 230, 118, 0.85);
    }

    html[data-theme="dark"] .ep-big-play-overlay:hover .ep-big-play-btn {
        background: rgba(0, 230, 118, 0.95);
    }

    html[data-theme="dark"] .ep-volume-slider::-webkit-slider-thumb {
        background: #00e676;
        border-color: #111111;
    }

    html[data-theme="dark"] .ep-volume-slider::-moz-range-thumb {
        background: #00e676;
        border-color: #111111;
    }

    html[data-theme="dark"] .ep-ctrl-btn.ep-ctrl-active {
        color: #00e676;
        background: rgba(0, 230, 118, 0.12);
    }

    html[data-theme="dark"] .ep-title {
        color: #ffffff;
    }


    /* ── 22. EDPUZZLE QUESTION PANEL ───────────────────────────── */
    html[data-theme="dark"] .ep-question-panel {
        background: linear-gradient(135deg, #141414 0%, #111111 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    html[data-theme="dark"] .ep-question-number {
        color: #ffffff;
    }

    html[data-theme="dark"] .ep-option {
        background: rgba(255, 255, 255, 0.025);
        border-color: rgba(255, 255, 255, 0.08);
    }

        html[data-theme="dark"] .ep-option:hover {
            background: rgba(0, 230, 118, 0.06);
            border-color: rgba(0, 230, 118, 0.3);
        }

        html[data-theme="dark"] .ep-option.selected {
            background: rgba(0, 230, 118, 0.1);
            border-color: rgba(0, 230, 118, 0.5);
            box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.15);
        }

        html[data-theme="dark"] .ep-option.correct {
            background: rgba(0, 230, 118, 0.08);
            border-color: #00e676;
        }

        html[data-theme="dark"] .ep-option.incorrect {
            background: rgba(255, 82, 82, 0.08);
            border-color: #ff5252;
        }

    html[data-theme="dark"] .ep-option-text {
        color: #cfcfcf;
    }

    html[data-theme="dark"] .ep-option.selected .ep-option-checkbox {
        color: #00e676;
    }

    html[data-theme="dark"] .ep-feedback.success {
        background: rgba(0, 230, 118, 0.08);
        border-color: #00e676;
        color: #00e676;
    }

    html[data-theme="dark"] .ep-feedback.error {
        background: rgba(255, 82, 82, 0.08);
        border-color: #ff5252;
        color: #ff5252;
    }

    html[data-theme="dark"] .ep-actions {
        border-top-color: rgba(255, 255, 255, 0.06);
    }

    html[data-theme="dark"] .ep-completed strong {
        color: #00e676;
    }


    /* ── 23. EDPUZZLE MATCHING ─────────────────────────────────── */
    html[data-theme="dark"] .ep-matching-col-header {
        color: #a8a8a8;
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    html[data-theme="dark"] .ep-match-item {
        background: rgba(255, 255, 255, 0.025);
        border-color: rgba(255, 255, 255, 0.08);
        color: #cfcfcf;
    }

        html[data-theme="dark"] .ep-match-item:hover {
            background: rgba(0, 230, 118, 0.06);
            border-color: rgba(0, 230, 118, 0.3);
        }

        html[data-theme="dark"] .ep-match-item.selected {
            background: rgba(0, 230, 118, 0.1);
            border-color: #00e676;
            box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
        }

        html[data-theme="dark"] .ep-match-item.matched-correct {
            background: rgba(0, 230, 118, 0.08);
            border-color: #00e676;
        }

        html[data-theme="dark"] .ep-match-item.matched-incorrect {
            background: rgba(255, 234, 0, 0.06);
            border-color: #ffea00;
        }


    /* ── 24. IXL IMAGE ACTIVITY ────────────────────────────────── */
    html[data-theme="dark"] .ixl-title {
        color: #ffffff;
    }

    html[data-theme="dark"] .ixl-image-wrapper {
        background: #111111;
    }

    html[data-theme="dark"] .ixl-questions-panel {
        background: linear-gradient(135deg, #141414 0%, #111111 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    html[data-theme="dark"] .ixl-panel-subtitle {
        color: #a8a8a8;
    }

    html[data-theme="dark"] .ixl-context-box {
        background: rgba(255, 255, 255, 0.025);
        border-color: rgba(255, 255, 255, 0.06);
    }

    html[data-theme="dark"] .ixl-context-header {
        color: #ffffff;
    }

        html[data-theme="dark"] .ixl-context-header i {
            color: #00e0ff;
        }

    html[data-theme="dark"] .ixl-context-text {
        color: #cfcfcf;
    }

    html[data-theme="dark"] .ixl-question-text {
        color: #ffffff;
    }

    html[data-theme="dark"] .ixl-option {
        background: rgba(255, 255, 255, 0.025);
        border-color: rgba(255, 255, 255, 0.08);
    }

        html[data-theme="dark"] .ixl-option:hover {
            background: rgba(0, 230, 118, 0.06);
            border-color: rgba(0, 230, 118, 0.3);
        }

        html[data-theme="dark"] .ixl-option.selected {
            background: rgba(0, 230, 118, 0.1);
            border-color: #00e676;
        }

        html[data-theme="dark"] .ixl-option.correct {
            background: rgba(0, 230, 118, 0.08);
            border-color: #00e676;
        }

        html[data-theme="dark"] .ixl-option.incorrect {
            background: rgba(255, 82, 82, 0.08);
            border-color: #ff5252;
        }

    html[data-theme="dark"] .ixl-option-text {
        color: #cfcfcf;
    }

    html[data-theme="dark"] .ixl-option.selected .ixl-option-checkbox {
        color: #00e676;
    }

    html[data-theme="dark"] .ixl-feedback.success {
        background: rgba(0, 230, 118, 0.08);
        border-color: #00e676;
        color: #00e676;
    }

    html[data-theme="dark"] .ixl-feedback.error {
        background: rgba(255, 82, 82, 0.08);
        border-color: #ff5252;
        color: #ff5252;
    }

    html[data-theme="dark"] .ixl-actions {
        border-top-color: rgba(255, 255, 255, 0.06);
    }

    html[data-theme="dark"] .ixl-hint {
        color: #a8a8a8;
    }

    html[data-theme="dark"] .ixl-match-header {
        color: #a8a8a8;
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    html[data-theme="dark"] .ixl-match-item {
        background: rgba(255, 255, 255, 0.025);
        border-color: rgba(255, 255, 255, 0.08);
        color: #cfcfcf;
    }

        html[data-theme="dark"] .ixl-match-item:hover {
            background: rgba(0, 230, 118, 0.06);
            border-color: rgba(0, 230, 118, 0.3);
        }

        html[data-theme="dark"] .ixl-match-item.selected {
            background: rgba(0, 230, 118, 0.1);
            border-color: #00e676;
            box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
        }

        html[data-theme="dark"] .ixl-match-item.matched-correct {
            background: rgba(0, 230, 118, 0.08);
            border-color: #00e676;
        }

        html[data-theme="dark"] .ixl-match-item.matched-incorrect {
            background: rgba(255, 234, 0, 0.06);
            border-color: #ffea00;
        }


    /* ── 25. VIDEO/IMAGE QUESTION CARDS ────────────────────────── */
    html[data-theme="dark"] .video-question-card,
    html[data-theme="dark"] .image-question-card {
        background: rgba(255, 255, 255, 0.025) !important;
        border-left-color: #00e0ff !important;
        color: #cfcfcf !important;
    }

        html[data-theme="dark"] .video-question-card .form-check,
        html[data-theme="dark"] .image-question-card .form-check {
            background: rgba(255, 255, 255, 0.025) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
        }

            html[data-theme="dark"] .video-question-card .form-check:hover,
            html[data-theme="dark"] .image-question-card .form-check:hover {
                background: rgba(0, 224, 255, 0.06) !important;
                border-color: rgba(0, 224, 255, 0.3) !important;
            }


    /* ── 26. CONTEXT PASSAGE ───────────────────────────────────── */
    html[data-theme="dark"] .context-passage {
        background: rgba(0, 230, 118, 0.04) !important;
        border-left-color: #00e676 !important;
    }

        html[data-theme="dark"] .context-passage h6.text-success {
            color: #00e676 !important;
        }


    /* ── 27. CARD BODY TEXT ────────────────────────────────────── */
    html[data-theme="dark"] .card-body,
    html[data-theme="dark"] .card-body p {
        color: #cfcfcf !important;
    }


    /* ── 28. MODE BADGES ───────────────────────────────────────── */
    html[data-theme="dark"] .mode-live {
        background: rgba(255, 82, 82, 0.1);
        color: #ff5252;
        border: 1px solid rgba(255, 82, 82, 0.25);
    }

    html[data-theme="dark"] .mode-self-paced {
        background: rgba(0, 230, 118, 0.1);
        color: #00e676;
        border: 1px solid rgba(0, 230, 118, 0.25);
    }


    /* ── 29. BREADCRUMB PULSE (override indigo glow → green glow) ─ */
    html[data-theme="dark"] .bc-dot {
        border-color: rgba(255, 255, 255, 0.1);
    }

/* Keep content-type semantic colors on breadcrumb — only override the default glow */
@keyframes bcPulseNebula {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.35);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(0, 230, 118, 0.10);
    }
}

/* Apply Nebula pulse only when no specific content type overrides it */


/* ── 30. STREAK WIDGET ─────────────────────────────────────── */
html[data-theme="dark"] .streak-widget {
    background: linear-gradient(135deg, #78350f, #92400e);
    border-color: #ffea00;
    color: #fef3c7;
}

    html[data-theme="dark"] .streak-widget.streak-milestone {
        border-color: #ff5252;
        background: linear-gradient(135deg, #7f1d1d, #991b1b);
        color: #fecaca;
        box-shadow: 0 0 12px rgba(255, 82, 82, 0.25);
    }


/* ── 31. SOUND TOGGLE ──────────────────────────────────────── */
html[data-theme="dark"] .sound-toggle {
    border-color: rgba(255, 255, 255, 0.08);
    background: #141414;
    color: #a8a8a8;
}

    html[data-theme="dark"] .sound-toggle:hover {
        border-color: #00e0ff;
        color: #00e0ff;
        background: rgba(0, 224, 255, 0.08);
    }

    html[data-theme="dark"] .sound-toggle.sound-on {
        border-color: #00e0ff;
        color: #00e0ff;
        background: rgba(0, 224, 255, 0.1);
    }

    html[data-theme="dark"] .sound-toggle.sound-muted {
        border-color: rgba(255, 255, 255, 0.06);
        color: #565656;
        background: #111111;
    }


/* ── 32. MASTERY GATE ──────────────────────────────────────── */
html[data-theme="dark"] .mastery-gate-alert {
    background: linear-gradient(135deg, rgba(255, 234, 0, 0.08), rgba(255, 234, 0, 0.04));
    border-color: rgba(255, 234, 0, 0.25);
    color: #ffea00;
}

    html[data-theme="dark"] .mastery-gate-alert strong {
        color: #ffea00;
    }

html[data-theme="dark"] .mastery-gate-screen h1 {
    color: #ffffff !important;
}

html[data-theme="dark"] .mastery-gate-screen .lead {
    color: #a8a8a8 !important;
}


/* ── 33. COMPLETION SCREEN ─────────────────────────────────── */
html[data-theme="dark"] .completion-screen h1 {
    color: #ffffff !important;
}

html[data-theme="dark"] .completion-screen .lead {
    color: #a8a8a8 !important;
}

html[data-theme="dark"] .completion-screen .btn-outline-primary {
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.3);
}

    html[data-theme="dark"] .completion-screen .btn-outline-primary:hover {
        background: rgba(0, 230, 118, 0.1);
        color: #00e676;
        border-color: rgba(0, 230, 118, 0.5);
    }


/* ── 34. NAME ENTRY SCREEN ─────────────────────────────────── */
html[data-theme="dark"] #nameEntryScreen > div {
    background: #111111 !important;
}

    html[data-theme="dark"] #nameEntryScreen > div > div {
        background: #141414 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

html[data-theme="dark"] #nameEntryScreen h2 {
    color: #ffffff !important;
}

html[data-theme="dark"] #nameEntryScreen p {
    color: #a8a8a8 !important;
}

html[data-theme="dark"] #nameEntryScreen input[type="text"] {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

    html[data-theme="dark"] #nameEntryScreen input[type="text"]:focus {
        border-color: rgba(0, 230, 118, 0.4) !important;
        box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.1) !important;
    }

    html[data-theme="dark"] #nameEntryScreen input[type="text"]::placeholder {
        color: #565656;
    }

html[data-theme="dark"] #nameEntryScreen label {
    color: #a8a8a8 !important;
}


/* ── 35. WAITING SCREEN ────────────────────────────────────── */
html[data-theme="dark"] .waiting-screen h1 {
    color: #ffffff !important;
}

html[data-theme="dark"] .waiting-screen .lead {
    color: #a8a8a8 !important;
}

html[data-theme="dark"] .waiting-icon {
    color: #00e676;
}


/* ── 36. GUIDED NOTES / RECALL ─────────────────────────────── */
html[data-theme="dark"] .btn-guided-recall {
    background: linear-gradient(135deg, #00e676, #00c853);
    color: #111111;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

    html[data-theme="dark"] .btn-guided-recall:hover {
        background: linear-gradient(135deg, #00c853, #00e676);
        box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
        color: #111111;
    }

html[data-theme="dark"] .guided-recall-header {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.06), rgba(0, 224, 255, 0.06));
    border-color: rgba(0, 230, 118, 0.15);
}

html[data-theme="dark"] .guided-progress-bar {
    background: rgba(0, 230, 118, 0.1);
}

html[data-theme="dark"] .guided-progress-fill {
    background: linear-gradient(90deg, #00e676, #00e0ff);
}


/* ── 37. SCORE TRACKER ─────────────────────────────────────── */
html[data-theme="dark"] #scoreTracker {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.08), rgba(0, 230, 118, 0.04)) !important;
    border-color: rgba(0, 230, 118, 0.3) !important;
}

    html[data-theme="dark"] #scoreTracker #scoreText {
        color: #00e676 !important;
    }

    html[data-theme="dark"] #scoreTracker #scorePercent {
        color: #00e676 !important;
    }

    html[data-theme="dark"] #scoreTracker #scoreIcon {
        color: #00e676 !important;
    }


/* ── 38. QUESTION TIMER ────────────────────────────────────── */
/* Opaque surface: the bar is sticky and scrolls over the question. */
html[data-theme="dark"] .question-timer-widget {
    border-color: rgba(0, 230, 118, 0.35);
    background: #141414;
    color: #00e676;
}

html[data-theme="dark"] .question-timer-widget .timer-track {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .question-timer-widget .timer-fill {
    background: #00e676;
}

html[data-theme="dark"] .question-timer-widget.timer-warning {
    border-color: rgba(255, 234, 0, 0.45);
    color: #ffea00;
}

html[data-theme="dark"] .question-timer-widget.timer-warning .timer-fill {
    background: #ffea00;
}

html[data-theme="dark"] .question-timer-widget.timer-danger {
    border-color: rgba(255, 82, 82, 0.5);
    color: #ff5252;
}

html[data-theme="dark"] .question-timer-widget.timer-danger .timer-fill {
    background: #ff5252;
}


/* ── 39. TOOLTIP ───────────────────────────────────────────── */
html[data-theme="dark"] .next-question-tooltip {
    background: linear-gradient(135deg, rgba(255, 234, 0, 0.12), rgba(255, 234, 0, 0.06));
    color: #ffea00;
    border-color: rgba(255, 234, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 234, 0, 0.1);
}


/* ── 40. EP MARKER (progress bar markers) ──────────────────── */
html[data-theme="dark"] .ep-marker {
    border-color: rgba(255, 255, 255, 0.1);
}


/* ── 41. FOCUS MODE ────────────────────────────────────────── */
html[data-theme="dark"] .focus-mode-modal {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.06);
}


/* ── 42. SCROLLBARS ────────────────────────────────────────── */
html[data-theme="dark"] ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: transparent;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

    html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 230, 118, 0.2);
    }


/* ── 43. TEXT SELECTION ────────────────────────────────────── */
html[data-theme="dark"] ::selection {
    background: rgba(0, 230, 118, 0.25);
    color: #ffffff;
}


/* ── 44. FORMS (inputs in dark mode) ───────────────────────── */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

    html[data-theme="dark"] .form-control:focus,
    html[data-theme="dark"] .form-select:focus {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(0, 230, 118, 0.4);
        box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.1);
        color: #ffffff;
    }

    /* Placeholder text. The block above sets .form-control color:#fff but
       leaves ::placeholder at the browser default (dark gray) — invisible on
       the near-black field. Covers the code/SQL/Excel/short-answer editors
       ("Write your python code here…") and every other player input. */
    html[data-theme="dark"] .form-control::placeholder,
    html[data-theme="dark"] textarea::placeholder,
    html[data-theme="dark"] input::placeholder {
        color: rgba(255, 255, 255, 0.4);
        opacity: 1; /* Firefox lowers placeholder opacity by default */
    }


/* ── 45. MODALS ────────────────────────────────────────────── */
html[data-theme="dark"] .modal-content {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.06);
}


/* ── 46. INLINE STYLE OVERRIDES (background: white etc.) ──── */
html[data-theme="dark"] .content-card div[style*="background: #f9fafb"],
html[data-theme="dark"] .content-card div[style*="background: #f8f9fa"] {
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .content-card div[style*="background: #f0fdf4"] {
    background: rgba(0, 230, 118, 0.06) !important;
}

html[data-theme="dark"] .content-card .form-check {
    background: rgba(255, 255, 255, 0.025) !important;
}


/* ── 47. INTERVENTION BANNER (Play.cshtml inline) ──────────── */
html[data-theme="dark"] .intervention-banner {
    background: linear-gradient(135deg, rgba(255, 45, 120, 0.08), rgba(255, 45, 120, 0.04));
    border-color: rgba(255, 45, 120, 0.25);
}

html[data-theme="dark"] .intervention-banner-title {
    color: #ff2d78;
}

html[data-theme="dark"] .intervention-banner-tag.grade {
    background: rgba(255, 82, 82, 0.12);
    color: #ff5252;
}

html[data-theme="dark"] .intervention-banner-tag.due {
    background: rgba(255, 234, 0, 0.12);
    color: #ffea00;
}

html[data-theme="dark"] .intervention-banner-tag.reason {
    background: rgba(255, 45, 120, 0.08);
    color: #ff2d78;
}


/* ── 48. CHECKPOINT TOAST (Play.cshtml inline) ─────────────── */
html[data-theme="dark"] .checkpoint-toast.toast-success {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.25);
}

html[data-theme="dark"] .checkpoint-toast.toast-warning {
    background: rgba(255, 234, 0, 0.1);
    color: #ffea00;
    border-color: rgba(255, 234, 0, 0.25);
}


/* ══════════════════════════════════════════════════════════════
   49. NEBULA AMBIENT BACKGROUND — Stars + Gradient Orbs
   ══════════════════════════════════════════════════════════════
   Play.cshtml is standalone (no sidebar), so left: 0.
   
   Add this HTML as FIRST child of <body>:
   
   <div class="nebula-bg" id="nebulaBg">
       <div class="nebula-orb nebula-orb-1"></div>
       <div class="nebula-orb nebula-orb-2"></div>
       <div class="nebula-orb nebula-orb-3"></div>
   </div>
   
   Then add before </body>:
   <script src="~/js/nebula-stars.js"></script>
   ══════════════════════════════════════════════════════════════ */

html[data-theme="dark"] .nebula-bg {
    position: fixed;
    top: 0;
    left: 0; /* No sidebar in Play.cshtml */
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

html[data-theme="light"] .nebula-bg {
    display: none;
}

html[data-theme="dark"] .nebula-star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
}

html[data-theme="dark"] .nebula-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

html[data-theme="dark"] .nebula-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.05) 0%, transparent 70%);
    top: -100px;
    left: -80px;
}

html[data-theme="dark"] .nebula-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 224, 255, 0.04) 0%, transparent 70%);
    bottom: -80px;
    right: -60px;
}

html[data-theme="dark"] .nebula-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 45, 120, 0.03) 0%, transparent 70%);
    top: 45%;
    left: 60%;
}

/* ── Z-index layering: content sits above nebula ── */
html[data-theme="dark"] .pod-wrapper {
    position: relative;
    z-index: 1;
}

html[data-theme="dark"] .pod-header {
    position: relative;
    z-index: 100;
}

html[data-theme="dark"] .pod-nav {
    position: relative;
    z-index: 100;
}

/* Semi-transparent header/nav to let stars peek through subtly */
html[data-theme="dark"] .pod-header {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

html[data-theme="dark"] .pod-nav {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Content card: slight transparency so orb glow bleeds through edges */
html[data-theme="dark"] .content-card {
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Exit Ticket "last step" pill — its light-mode ink is inline (#b45309, from
   PodsController.Play.cs BuildExitAssessmentHtml) and too dim on the dark card. */
html[data-theme="dark"] .exit-last-step-pill {
    color: #fbbf24 !important;
}
