    body {
        font-family: sans-serif;
        background-color: #f4f7f8;
        margin: 65px 0 0 0;
        padding: 0;
    }
    h1, h2, h3, h4, h5, h6{
        color: var(--primary-clr);
        font-family: "Montserrat",
        sans-serif;
        font-weight: bold;
    }

    #quiz-container {
        max-width: 800px;
        margin: 50px auto;
        background: #fff;
        border-radius: 10px;
        padding: 15px 40px 30px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    }

    /* ---------- Question Text ---------- */
    #question-text {
        font-size: 1.3rem;
        font-weight: 400;
        margin-bottom: 5px;
        color: #333;
    }

    /* ---------- Choices Form ---------- */
    /* #choices-form label {
        margin-bottom: 12px;    
    } */

    #choices-form input[type="radio"],
    #choices-form input[type="checkbox"] {
        margin-right: 10px;
        transform: scale(1.2);
        cursor: pointer;
    }

    #choices-form label {
        cursor: pointer;
        font-size: 1.1rem;
        color: #444;
    }

    /* Highlight selected option */
    #choices-form input:checked + label {
        font-weight: 600;
        color: #0b5394;
    }


    /* ---------- Buttons ---------- */
    #quiz-container button {
        padding: 10px 20px;
        margin: 10px 5px 0 0;
        border: none;
        border-radius: 6px;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    #prev-btn {
        background-color: #f0f0f0;
        color: #333;
    }

    #prev-btn:hover {
        background-color: #e0e0e0;
    }

    #next-btn {
        background-color: #1e3a8a;
        color: #fff;
    }

    #next-btn:hover {
        background-color: #093763;
    }

    #preview-btn {
        background-color: #f97316;
        color: #222;
    }

    #preview-btn:hover {
        background-color: #f3761c;
    }

    #submit-btn {
        background-color: #28a745;
        color: #fff;
    }

    #submit-btn:hover {
        background-color: #218838;
    }

    /* ---------- Responsive ---------- */
    @media (max-width: 600px) {
        #quiz-container {
            padding: 20px;
        }

        #question-text {
            font-size: 1rem;
        }

        #choices-form label {
            font-size: 1rem;
        }

        #quiz-container button {
            font-size: 0.9rem;
            padding: 8px 16px;
        }
    }
    #progress-wrapper {
        margin-bottom: 20px;
    }

    #progress-text {
        font-size: 0.9rem;
        margin-bottom: 5px;
        color: #555;
    }

    #progress-bar {
        width: 100%;
        height: 10px;
        background: #e0e0e0;
        border-radius: 6px;
        overflow: hidden;
    }

    #progress-fill {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, #0b5394, #1e88e5);
        transition: width 0.4s ease;
    }
    .result-banner {
        margin-top: 30px;
        padding: 25px;
        border-radius: 12px;
        text-align: center;
        background: #f8fafc;
        box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    }

    .result-banner h2 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .result-banner .percentage {
        font-size: 1.8rem;
        font-weight: bold;
    }

    .result-banner .pass {
        color: #16a34a;
    }

    .result-banner .fail {
        color: #dc2626;
    }

    .review-btn {
        margin-top: 15px;
        padding: 10px 20px;
        font-size: 1rem;
        background: #1e3a8a;
        color: #fff;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }

    .quiz-controls {
        display: none;
        /*transition: opacity 0.2s ease;*/
    }
    /*.quiz-controls.visible {
        opacity: 1;
    }*/

    #flag-btn {
        background-color: #fef3c7;
        color: #92400e;
        font-weight: 600;
    }

    #flag-btn.flagged {
        background-color: #f59e0b;
        color: #fff;
    }


    /* ---------- Preview Overlay ---------- */
    #preview-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 999;
    }

    /* ---------- Animated Explanation Panel ---------- */
    #explanation {
        width: 92%;
        max-height: 85vh;
        max-width: 600px;
        margin: 0 auto;
        background: #ffffff;
        border-radius: 10px;
        padding: 20px 24px;
        box-shadow: 0 -8px 25px rgba(0,0,0,0.2);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transform: translateY(100%);
        opacity: 0;
        transition: transform 0.35s ease, opacity 0.35s ease;
    }
    .preview-header{
        padding: 12px 16px;
        display: grid;
        gap: 0 2rem;
        grid-template-columns: 4fr 1fr;
        align-items: center;
        justify-content: space-between;
    }
    .preview-body{
        padding: 16px;
        overflow-y: auto;
        flex: 1;
        line-height: 1.45;
        -webkit-overflow-scrolling: touch;
    }


    /* Active animation state */
    #preview-overlay.active #explanation {
        transform: translateY(0);
        opacity: 1;
    }

    /* Close button */
    .close-preview-btn {
        margin-top: 15px;
        padding: 10px 16px;
        background: #1e3a8a;
        color: #fff;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    .close-btn{
        background: none;
        border: none;
        font-size: 2rem;
        font-weight: bold;
        cursor: pointer;
        color: #1e3a8a;
    }

    /* ================= QUIZ CONTROLS ================= */

    .quiz-controls {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* ---- Utility toolbar ---- */
    .quiz-toolbar {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* ---- Navigation row ---- */
    .quiz-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    /* ---- Primary action group ---- */
    .quiz-primary {
        display: flex;
        gap: 10px;
    }

    /* ================= BUTTON STYLES ================= */

    .quiz-controls button {
        padding: 12px 18px;
        font-size: 0.95rem;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all 0.2s ease;
    }

    /* Neutral (Previous) */
    .btn-neutral {
        background: #f1f5f9;
        color: #334155;
    }

    .btn-neutral:hover {
        background: #e2e8f0;
    }

    /* Secondary (Flag / Preview) */
    .btn-secondary {
        background: #fff7ed;
        color: #9a3412;
        border: 1px solid #fed7aa;
    }

    .btn-secondary:hover {
        background: #ffedd5;
    }

    /* Primary (Next) */
    .btn-primary {
        background: #1e3a8a;
        color: #fff;
    }

    .btn-primary:hover {
        background: #1e40af;
    }

    /* Submit */
    .btn-submit {
        background: #16a34a;
        color: #fff;
    }

    .btn-submit:hover {
        background: #15803d;
    }

    /* Pause */
    .btn-warning {
        background: #fef3c7;
        color: #92400e;
    }

    .btn-warning:hover {
        background: #fde68a;
    }

    /* Flagged state */
    #flag-btn.flagged {
        background: #f59e0b;
        color: #fff;
    }

    /* ================= MOBILE ================= */

    @media (max-width: 640px) {
    /*  .quiz-navigation {
            flex-direction: column;
            align-items: stretch;
        }*/

        .quiz-primary {
            width: 100%;
        }

        .quiz-primary button {
            flex: 1;
        }

        .quiz-toolbar {
            justify-content: space-between;
        }
    }

    /* ================= NCLEX / USMLE QUIZ UI ================= */

    .nclex-ui {
        margin-top: 30px;
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    /* ---- Utility row ---- */
    .quiz-utility {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }

    /* Utility buttons */
    .btn-utility {
        background: #f8fafc;
        color: #1e293b;
        border: 1px solid #cbd5e1;
        padding: 8px 14px;
        font-size: 0.85rem;
        border-radius: 6px;
        font-weight: 500;
    }

    .btn-utility:hover {
        background: #f1f5f9;
    }

    .btn-utility.pause {
        color: #92400e;
        background: #fef3c7;
        border-color: #fde68a;
    }

    /* Flagged */
    #flag-btn.flagged {
        background: #f59e0b;
        color: #fff;
        border-color: #f59e0b;
    }

    /* ---- Navigation row ---- */
    .quiz-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Previous */
    .btn-nav {
        background: #e5e7eb;
        color: #111827;
        padding: 12px 18px;
        border-radius: 6px;
        font-weight: 600;
    }

    /* Primary Next */
    .btn-primary {
        background: #1e3a8a;
        color: #fff;
        padding: 14px 26px;
        border-radius: 6px;
        font-weight: 700;
    }

    .btn-primary:hover {
        background: #1e40af;
    }

    /* Submit */
    .btn-submit {
        background: #dc2626;
        color: #fff;
        padding: 14px 26px;
        border-radius: 6px;
        font-weight: 700;
    }

    .btn-submit:hover {
        background: #b91c1c;
    }

    /* ================= MOBILE ================= */

    @media (max-width: 640px) {
        /*.quiz-navigation {
            flex-direction: column;
            gap: 12px;
        }

    .quiz-navigation button {
            width: 100%;
        }*/

        .quiz-utility {
            justify-content: space-between;
        }
    }
    /* Sticky bottom bar */
    .sticky-nav {
        position: sticky;
        bottom: 0;
        background: #ffffff;
        padding: 16px;
        border-top: 1px solid #e5e7eb;
        z-index: 50;
    }

    .choice-item {
        display: block;
        padding: 6px 14px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
    }



    .choice-item.strike {
        text-decoration: line-through;
        color: #9ca3af;
    }

    .choice-item:hover {
        background: #f1f5f9;
    }

    /* Hover effect */
    .choice-item:hover {
        background-color: #f9fafb;
    }

    /* Hide default input (optional but cleaner UI) */
    .choice-item input {
        margin-right: 10px;
    }

    /* ✅ SELECTED STATE */
    .choice-item.selected {
        background-color: #dbeafe;
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    }

    /* Optional stronger look */
    .choice-item.selected:hover {
        background-color: #bfdbfe;
    }

    /* CORRECT (selected correctly) */
    .choice-item.correct {
        background-color: #dcfce7;
        border-color: #16a34a;
    }

    /* WRONG (selected but incorrect) */
    .choice-item.wrong {
        background-color: #fee2e2;
        border-color: #dc2626;
    }

    /* MISSED (correct but not selected) */
    .choice-item.missed {
        background-color: #fef9c3;
        border-color: #eab308;
    }


    .keyword {
        background: #fef3c7;
        padding: 2px 4px;
        border-radius: 4px;
        font-weight: 600;
    }


    .exam-label {
        font-weight: 600;
        color: #475569;
        text-transform: uppercase;
    }

    #exam-name {
        font-weight: 700;
        color: #1e3a8a;
    }

    /* ================= Question Map ================= */
    .question-map {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(30px, 0.5fr));
        gap: 4px;
    }

    .question-map button {
        padding: 3px 0;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
        background: #a6c8e7;
        font-weight: 200;
        cursor: pointer;
    }

    .question-map button.answered {
        background: #3fe047;
        border-color: #5af833;
        color: #fffffF;
    }

    .question-map button.flagged {
        background: #fef3c7;
        border-color: #f59e0b;
    }

    /* ================= Exam Header ================= */
    .exam-header {
        margin: 12px 0;
        padding: 8px 12px;
        background: #f8fafc;
        border-left: 4px solid #1e3a8a;
        border-radius: 6px;
        font-size: 0.95rem;
        display: flex;
        gap: 6px;
        align-items: center;
    }

    /* ================= Desktop Sticky ================= */
    @media (min-width: 992px) {
        #map-overlay {
            position: sticky;
            top: 90px;
            margin-top: 15px;
        }

        #map-panel {
            position: static;
            transform: none;
            box-shadow: none;
            width: 100%;
            background: transparent;
        }

        .open-map-btn {
            display: none;
        }
        #close-map-btn {
            display: none;
        }
    }

    /* ================= Mobile Slide-in ================= */
    @media (max-width: 991px) {
        .open-map-btn {
            display: inline-block;
            margin-bottom: 10px;
            padding: 8px 14px;
            background: #1e3a8a;
            color: #fff;
            border-radius: 6px;
            border: none;
            font-weight: 600;
        }

        #map-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.4);
            display: none;
            z-index: 999;
        }

        #map-overlay.active {
            display: block;
        }

        #map-panel {
            position: absolute;
            right: 0;
            top: 0;
            height: 100%;
            width: 80%;
            max-width: 320px;
            background: #fff;
            padding: 15px;
            transform: translateX(100%);
            transition: transform 0.3s ease;
        }

        #map-overlay.active #map-panel {
            transform: translateX(0);
        }

        .map-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        #close-map-btn {
            border: none;
            background: none;
            font-size: 1.2rem;
            cursor: pointer;
            color: #1e3a8a;
        }
    }
    answer-review {
        margin-top: 10px;
    }

    .answer-row {
        padding: 6px 10px;
        margin-bottom: 6px;
        border-radius: 6px;
        line-height: 1.4;
        font-size: 14px;
    }

    .answer-correct {
        background: #e6f9ee;
        color: #0f5132;
        border-left: 4px solid #198754;
    }

    .answer-wrong {
        background: #fdecea;
        color: #842029;
        border-left: 4px solid #dc3545;
    }

    .answer-missed {
        background: #fff3cd;
        color: #664d03;
        border-left: 4px solid #ffc107;
    }

    .answer-label {
        float: right;
        font-size: 12px;
        font-weight: 600;
    }



.floating-timer {
    position: fixed;
    top: 80px;      /* adjust if navbar height differs */
    right: 25px;
    z-index: 1000;
    text-align: center;
}

.timer-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: transparent;
    stroke: #e5e7eb;
}

.progress-ring-circle {
    fill: transparent;
    stroke: #16a34a;
    stroke-linecap: round;
    transition: 
        stroke 0.3s ease,
        stroke-dashoffset 1s linear,
        box-shadow 0.3s ease;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 14px;
}
