/* ===== exam/exam ===== */
  
    @media (max-width: 991.98px) {
        body {
            overflow-x: hidden;
            position: relative;
        }
        .exam-timer-bar { 
            background: rgba(30, 144, 255, 0.95); 
            position: -webkit-sticky !important; 
            position: sticky !important; 
            top: 0 !important; 
            z-index: 1020 !important; 
            width: 100% !important;
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }
        .exam-main {
            padding-bottom: 100px;
        }
    }

    @media (min-width: 992px) {
        .exam-main {
            overflow-x: hidden;
            padding-bottom: 100px;
        }
    }
    /* ============================================================
       Modals (Overlay Opacity Reduced)
       ============================================================ */
    .exam-modal-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.4); /* ওভারলে অপাসিটি ৪০% */
        z-index: 1060;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
        backdrop-filter: blur(2px); /* হালকা ব্লার ইফেক্ট */
    }
    
    .exam-modal-box {
        background: #ffffff;
        border-radius: 0px; 
        padding: 20px;
        width: 100%;
        max-width: 380px; 
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        color: #333;
    }
    
    .exam-modal-box h5 {
        color: #222;
    }
    
    .exam-modal-box hr {
        border-color: #e0e0e0;
        opacity: 1;
    }
    
    .exam-modal-box .border-bottom {
        border-bottom: 1px solid #e0e0e0 !important;
        font-size: 1rem;
    }
    
    .exam-modal-box .btn {
        border-radius: 4px;
        padding: 10px;
        font-size: 1rem;
    }
   
    .exam-timer-bar { 
        background: rgba(30, 144, 255, 0.8); 
        position: sticky; 
        top: 0; 
        z-index: 1020; 
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .exam-timer-box { min-width: 52px; }
    .exam-timer-num { line-height: 1.1; color: #ffffff; font-size: 1.1rem; }
    .exam-timer-label { color: #ffffff; opacity: .9; font-size: .72rem; }

    /* ---- Stats Group ---- */
    .exam-stats-group { gap: 6px; }
    .exam-stat-box {
        min-width: 46px;
        background: rgba(255,255,255,.14);
        padding: 3px 6px;
        border-radius: 6px;
    }
    .exam-stat-num { line-height: 1.1; color: #ffffff; font-size: 1rem; }
    .exam-stat-label { color: #ffffff; opacity: .9; font-size: .66rem; }

    /* ---- Answer review ---- */
    .review-tabs {
        display: flex; position: sticky; top: 0; z-index: 20;
        background: var(--surface-1); box-shadow: 0 1px 4px rgba(0,0,0,.15);
    }
    .review-tab {
        flex: 1; border: 0; background: transparent; padding: 12px 4px; color: var(--text-dark);
        border-bottom: 3px solid transparent; font-weight: 500;
    }
    .review-tab.active { color: var(--hero-blue-btn); border-bottom-color: var(--hero-blue-btn); }
    .review-tab small { opacity: .7; }
    body.exam-review { background: var(--light-bg); }

    /* ---- Question Card ---- */
    .exam-question-wrapper { padding-top: 12px; scroll-behavior: smooth; }
    .exam-question-card {
        background: var(--surface-1);
        transition: box-shadow .3s;
        scroll-margin-top: 60px;
        margin-left: 15px;
        margin-right: 15px;
    }
    .exam-question-card.exam-card-focused {
        box-shadow: 0 0 0 2px var(--hero-blue-btn);
    }
    .exam-question-card.exam-card-answered { border-left: 4px solid #2aa8d8; }
    .exam-question-card.exam-card-skipped  { border-left: 4px solid #ff9800; }
    .exam-question-text { line-height: 1.5; color: var(--text-dark); }
    .exam-question-img { max-width: 100%; height: auto; border-radius: 6px; }

    /* ---- Options ---- */
    .exam-option {
        display: flex;
        align-items: center;
        gap: 10px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 12px 14px;
        background: var(--surface-1);
        cursor: pointer;
        transition: background .15s, border-color .15s;
    }
    .exam-option:hover {
        background: var(--hover-bg);
        border-color: var(--border-color);
    }
    .exam-option .exam-radio {
        margin: 0;
        flex: 0 0 auto;
        cursor: pointer;
    }
    .exam-option-text { color: var(--text-dark); line-height: 1.4; }
    .exam-option-img { max-width: 100%; height: auto; border-radius: 4px; }

    .exam-option:has(.exam-radio:checked) {
        background: var(--surface-3);
        border-color: var(--hero-blue-btn);
    }
    .exam-option:has(.exam-radio:checked) .exam-option-text {
        color: #1b6ca8;
        font-weight: 500;
    }
    html[data-theme="dark"] .exam-option:has(.exam-radio:checked) {
        background: #16324a;
        border-color: #4db8ff;
    }
    html[data-theme="dark"] .exam-option:has(.exam-radio:checked) .exam-option-text {
        color: #7cc7ff;
    }

    /* ---- Fixed Bottom Bar ---- */
    .exam-bottom-bar {
        position: fixed;
        left: 18%;
        right: 0;
        bottom: 0;
        background: var(--surface-1);
        border-top: 1px solid var(--border-color);
        z-index: 1030;
    }
    @media (max-width: 1023.98px) { .exam-bottom-bar { left: 0; } }

    .exam-finish-btn {
        background: var(--hero-orange);
        color: #ffffff;
        border-radius: 6px;
        border: none;
        padding: 12px 0;
    }
    .exam-finish-btn:hover {
        background: var(--hero-orange-hover);
        color: #ffffff;
    }
    .exam-arrow-icon { line-height: 1; }

    /* ---- Floating Auto-scroll button ---- */
    .exam-fab {
        position: fixed;
        right: 16px;
        bottom: 88px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: none;
        background: #9e9e9e;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0,0,0,.2);
        z-index: 1040;
        transition: background .2s, transform .15s;
        cursor: pointer;
    }
    .exam-fab:hover { transform: scale(1.06); }
    .exam-fab .material-symbols-outlined { font-size: 1.6rem; line-height: 1; }
    .exam-fab-active { background: var(--hero-blue-btn); }

    .exam-empty-text { color: var(--text-light); }
    .exam-loading-icon { font-size: 2rem; line-height: 1; color: var(--text-light); }

    /* ============================================================
       Mobile
       ============================================================ */
    @media (max-width: 575.98px) {
        .exam-option { padding: 11px 12px; }
        .exam-finish-btn { padding: 11px 0; }
        .exam-stat-box { min-width: 40px; padding: 2px 5px; }
        .exam-stat-num { font-size: .9rem; }
        .exam-stat-label { font-size: .6rem; }
        .exam-fab { right: 12px; bottom: 82px; width: 48px; height: 48px; }
    }

    /* ============================================================
       Tablet / Desktop
       ============================================================ */
    @media (min-width: 576px) {
        .exam-finish-btn {
            display: flex !important;
        }
    }
    

/* ===== exam/exam: redesign ===== */
    /* timer + counters */
    .exam-main .exam-timer-bar {
        background: linear-gradient(135deg, rgba(18, 154, 232, .96), rgba(124, 58, 237, .96));
        border-radius: 0 0 22px 22px;
        box-shadow: 0 8px 20px rgba(43, 29, 224, .3);
    }
    .exam-main .exam-timer-box {
        min-width: 58px;
        padding: 4px 8px 5px;
        border-radius: 14px;
        background: rgba(255, 255, 255, .2);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    }
    .exam-main .exam-timer-num { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
    .exam-main .exam-timer-label { font-size: .68rem; font-weight: 600; }
    .exam-main .exam-stat-box {
        min-width: 48px;
        padding: 4px 8px;
        border-radius: 12px;
        background: rgba(255, 255, 255, .16);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
    }
    .exam-main .exam-stat-box:nth-child(1) .exam-stat-num { color: #86efac; }
    .exam-main .exam-stat-box:nth-child(2) .exam-stat-num { color: #fcd34d; }
    .exam-main .exam-stat-num { font-weight: 800; font-size: 1.05rem; }

    /* question card */
    .exam-main .exam-question-card {
        position: relative;
        overflow: hidden;
        margin-left: 12px;
        margin-right: 12px;
        border: 1px solid rgba(0, 0, 0, .05) !important;
        border-radius: 18px !important;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
    }
    .exam-main .exam-question-card.exam-card-answered { border-left: 4px solid #129ae8 !important; }
    .exam-main .exam-question-card.exam-card-skipped  { border-left: 4px solid #f59e0b !important; }
    .exam-main .exam-question-card.exam-card-focused { box-shadow: 0 0 0 3px rgba(18, 154, 232, .35), 0 8px 20px rgba(0, 0, 0, .12); }
    .exam-main .exam-question-text { font-size: 16px; line-height: 1.65; }
    .exam-main .exam-question-img { border-radius: 12px; }

    /* options */
    .exam-main .exam-option {
        gap: 12px;
        padding: 12px 14px;
        border: 1.5px solid var(--border-color);
        border-radius: 14px;
        transition: background .18s, border-color .18s, box-shadow .18s, transform .18s;
    }
    .exam-main .exam-option:hover { transform: translateY(-1px); border-color: #129ae8; box-shadow: 0 4px 12px rgba(18, 154, 232, .15); }
    .exam-main .exam-option .exam-radio { width: 1.2em; height: 1.2em; }
    .exam-main .exam-option .exam-radio:checked { background-color: #129ae8; border-color: #129ae8; }
    .exam-main .exam-option:has(.exam-radio:checked) {
        border-color: #129ae8;
        background: color-mix(in srgb, #129ae8 10%, var(--surface-1));
        box-shadow: 0 0 0 3px rgba(18, 154, 232, .18);
    }
    .exam-main .exam-option:has(.exam-radio:checked) .exam-option-text { color: var(--text-dark); font-weight: 700; }
    .exam-main .exam-option-img { border-radius: 10px; }

    /* bottom bar + buttons */
    .exam-main .exam-bottom-bar {
        border: 0;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -8px 22px rgba(0, 0, 0, .15);
    }
    .exam-main .exam-finish-btn {
        padding: 13px 0;
        border-radius: 999px;
        font-weight: 800;
        background: linear-gradient(135deg, #f5a623, #ea580c);
        box-shadow: 0 8px 18px rgba(234, 88, 12, .35);
        transition: transform .18s, box-shadow .18s;
    }
    .exam-main .exam-finish-btn:hover { background: linear-gradient(135deg, #e0951a, #d9480f); transform: translateY(-2px); box-shadow: 0 12px 22px rgba(234, 88, 12, .4); }
    .exam-main .exam-fab { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
    .exam-main .exam-fab-active { background: linear-gradient(135deg, #129ae8, #7c3aed); box-shadow: 0 8px 18px rgba(18, 154, 232, .4); }

    /* answer review tabs (after "উত্তরপত্র দেখুন") */
    .exam-main .review-tabs {
        gap: 4px;
        margin: 10px 8px;
        padding: 4px;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    }
    .exam-main .review-tab { border: 0; border-radius: 11px; padding: 9px 4px; font-weight: 600; color: var(--text-light); }
    .exam-main .review-tab.active { color: #fff; background: linear-gradient(135deg, #129ae8, #7c3aed); box-shadow: 0 6px 14px rgba(18, 154, 232, .3); }
    .exam-main .review-tab.active small { opacity: .9; }

    /* On large screens the app is a centered 1280px column with a 256px side menu, so the fixed bar and
       the floating button follow the content column instead of the whole window.
       (--app-gutter = space left and right of the column when the window is wider than 1280px) */
    @media (min-width: 1024px) {
        .exam-main .exam-bottom-bar {
            --app-gutter: max(0px, calc((100vw - 1280px) / 2));
            left: calc(var(--app-gutter) + 256px);
            right: var(--app-gutter);
        }
        .exam-main .exam-fab { right: calc(max(0px, (100vw - 1280px) / 2) + 16px); }
    }

/* ===== exam/leaderboard ===== */
        /* ============================================================
       Custom Load More Button (ছবির মতো)
       ============================================================ */
    .lb-custom-load-btn {
        background-color: #26a69a; /* ছবির মতো টিল রঙ */
        color: #ffffff;
        border: none;
        padding: 10px 24px;
        border-radius: 4px;
        font-weight: 500;
        font-size: 15px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: all 0.2s ease;
    }

    .lb-custom-load-btn:hover {
        background-color: #208b80;
        color: #ffffff;
    }

    .lb-custom-load-btn:active {
        transform: translateY(1px);
    }

    .lb-custom-load-btn .lb-btn-icon {
        font-size: 20px;
        line-height: 1;
    }
    .lb-main { overflow-x: hidden; }

    .lb-hero-card { background: var(--hero-purple-grad); }
    .lb-hero-icon { line-height: 1; color: #ffffff; }
    .lb-hero-title { color: #ffffff; }

    .lb-btn-solution { background: #1f7fa8; color: #ffffff; padding: 8px 22px; border-radius: 6px; border: none; }
    .lb-btn-solution:hover { background: #196a8d; color: #ffffff; }

    .lb-btn-exam { background: #2aa8d8; color: #ffffff; padding: 8px 22px; border-radius: 6px; border: none; }
    .lb-btn-exam:hover { background: #1e91bd; color: #ffffff; }

    /* ---- Section Head ("টপার") ---- */
    .lb-section-head { background: var(--hero-blue); padding: 8px 0; border-radius: 6px 6px 0px 0px; }

    /* ---- Top Card ---- */
    .lb-top-card { background: var(--surface-1); }

    .lb-rank-badge {
        width: 40px; height: 40px;
        display: flex; align-items: center; justify-content: center;
        border-radius: 6px; font-weight: 700; color: #ffffff; flex: 0 0 40px;
    }
    .lb-rank-1, .lb-rank-2, .lb-rank-3 { background: var(--hero-blue-btn); }

    .lb-rank-divider { width: 2px; height: 44px; background: var(--hero-blue-btn); }
    .lb-top-name { color: var(--text-dark); line-height: 1.3; }
    .lb-top-score { color: var(--text-light); line-height: 1.4; }

    /* ---- Section Title ---- */
    .lb-section-title { color: var(--text-dark); margin: 0; }

    /* ---- Summary Cards ---- */
    .lb-summary-card { background: var(--surface-1); }
    .lb-summary-pass { border-color: #7ed957 !important; }
    .lb-summary-fail { border-color: #ff6b6b !important; }
    .lb-pass-text { color: var(--color-pass); }
    .lb-fail-text { color: var(--color-fail); }

    /* ---- Merit List ---- */
    .lb-merit-card { background: var(--surface-1); overflow: hidden; }
    .lb-merit-head { border-color: var(--border-color) !important; color: var(--text-dark); }
    .lb-merit-row { border-color: var(--border-color) !important; color: var(--text-dark); }
    .lb-merit-row:last-child { border-bottom: none !important; }

    .lb-col-rank { width: 80px; flex: 0 0 80px; }
    .lb-col-score { width: 90px; flex: 0 0 90px; }

    .lb-empty-text { color: var(--text-light); }
    .lb-loading-icon { font-size: 2rem; line-height: 1; color: var(--text-light); }

    /* ============================================================
       মোবাইল ভিউ
       ============================================================ */
    @media (max-width: 575.98px) {
        .lb-btn-solution, .lb-btn-exam { padding: 7px 18px; }
        .lb-col-rank { width: 60px; flex: 0 0 60px; }
        .lb-col-score { width: 70px; flex: 0 0 70px; }
    }

    /* ============================================================
       ট্যাবলেট / ডেস্কটপ
       ============================================================ */    
    /* ============================================================
       Custom Modal CSS (Centered)
       ============================================================ */
    .custom-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5); /* অন্ধকার ব্যাকগ্রাউন্ড */
        z-index: 99999; /* সবার উপরে রাখার জন্য */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .custom-modal-box {
        background: #ffffff;
        width: 90%;
        max-width: 400px; /* ডেস্কটপে মডালের সর্বোচ্চ প্রস্থ */
        border-radius: 8px;
        padding: 24px;
        text-align: center;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        animation: modalFadeIn 0.3s ease-out;
    }

    .custom-modal-text {
        font-size: 16px;
        color: #333333;
        margin-bottom: 24px;
        line-height: 1.6;
        font-family: inherit;
    }

    .custom-modal-btn {
        background: transparent;
        border: none;
        color: #3b82f6; /* নীল রঙের OK বাটন */
        font-weight: bold;
        font-size: 16px;
        cursor: pointer;
        padding: 8px 16px;
        border-radius: 4px;
    }

    .custom-modal-btn:hover {
        background-color: #f3f4f6;
    }

    @keyframes modalFadeIn {
        from { opacity: 0; transform: scale(0.95); }
        to { opacity: 1; transform: scale(1); }
    }

/* ===== exam/solution ===== */
        #qc.bm-only .sol-mcq:not(.bookmarked) { display: none; }

        /* solution page */
        .sol-main { padding-bottom: 40px !important; }
        .sol-toggle { display: flex; justify-content: flex-end; margin: 4px 2px 8px; }
        .sol-toggle.d-none { display: none !important; }
        .sol-toggle-pill {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 6px 14px 6px 50px;
            border: 1px solid var(--border-color, #dee2e6);
            border-radius: 999px;
            background: var(--surface-1, #fff);
            box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
        }
        .sol-toggle-pill .form-check-input { margin-left: -38px; cursor: pointer; }
        .sol-toggle-pill .form-check-input:checked { background-color: #dc2626; border-color: #dc2626; }
        .sol-toggle-pill .form-check-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-dark);
            cursor: pointer;
        }
        .sol-toggle-pill .form-check-label .material-symbols-outlined { font-size: 18px; color: #dc2626; font-variation-settings: 'FILL' 1; }
        #sol-state { font-weight: 600; }

/* ===== exam/leaderboard: redesign ===== */
    .lb-main .lb-hero-card {
        position: relative;
        overflow: hidden;
        border-radius: 20px !important;
        box-shadow: 0 10px 24px rgba(43, 29, 224, .3);
    }
    .lb-main .lb-hero-card::before,
    .lb-main .lb-hero-card::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, .1);
        pointer-events: none;
    }
    .lb-main .lb-hero-card::before { width: 150px; height: 150px; right: -40px; top: -60px; }
    .lb-main .lb-hero-card::after  { width: 100px; height: 100px; left: -30px; bottom: -50px; }
    .lb-main .lb-hero-card .card-body { position: relative; z-index: 1; }
    .lb-main .lb-hero-icon {
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        font-size: 26px;
        background: rgba(255, 255, 255, .2);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
        font-variation-settings: 'FILL' 1;
    }
    .lb-main .lb-hero-title { font-size: 1.25rem; font-weight: 700; }

    .lb-main .lb-btn-solution,
    .lb-main .lb-btn-exam {
        border-radius: 999px;
        padding: 9px 24px;
        font-weight: 700;
        transition: transform .18s, box-shadow .18s;
    }
    .lb-main .lb-btn-solution {
        background: rgba(255, 255, 255, .2);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
    }
    .lb-main .lb-btn-solution:hover { background: rgba(255, 255, 255, .3); color: #fff; transform: translateY(-2px); }
    .lb-main .lb-btn-exam {
        background: #fff;
        color: #2b1de0;
        box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
    }
    .lb-main .lb-btn-exam:hover { background: #fff; color: #2b1de0; transform: translateY(-2px); box-shadow: 0 10px 18px rgba(0, 0, 0, .25); }

    /* section heads */
    .lb-main .lb-section-head {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 0;
        border-radius: 14px;
        background: linear-gradient(135deg, #129ae8, #7c3aed);
        box-shadow: 0 6px 14px rgba(18, 154, 232, .3);
    }
    .lb-main .lb-section-head::before {
        content: "emoji_events";
        font-family: 'Material Symbols Outlined';
        font-size: 22px;
        line-height: 1;
        font-weight: normal;
        font-variation-settings: 'FILL' 1;
    }
    .lb-main .lb-section-title {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        font-weight: 700 !important;
    }
    .lb-main .lb-section-title::before {
        content: "";
        width: 5px;
        height: 22px;
        border-radius: 4px;
        background: linear-gradient(180deg, #129ae8, #7c3aed);
    }

    /* top 3 */
    .lb-main .lb-top-card {
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, .05) !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .1) !important;
    }
    .lb-main .lb-top-card::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 4px;
        background: linear-gradient(180deg, var(--medal, #129ae8), var(--medal-2, #7c3aed));
    }
    .lb-main .lb-top-card:has(.lb-rank-1) { --medal: #f59e0b; --medal-2: #fcd34d; }
    .lb-main .lb-top-card:has(.lb-rank-2) { --medal: #64748b; --medal-2: #cbd5e1; }
    .lb-main .lb-top-card:has(.lb-rank-3) { --medal: #c2410c; --medal-2: #fb923c; }
    .lb-main .lb-rank-badge {
        width: 44px; height: 44px; flex: 0 0 44px;
        border-radius: 50%;
        font-size: 1.1rem;
        box-shadow: 0 6px 14px color-mix(in srgb, var(--medal, #129ae8) 40%, transparent);
    }
    .lb-main .lb-rank-1 { background: linear-gradient(135deg, #f59e0b, #fcd34d); }
    .lb-main .lb-rank-2 { background: linear-gradient(135deg, #64748b, #cbd5e1); }
    .lb-main .lb-rank-3 { background: linear-gradient(135deg, #c2410c, #fb923c); }
    .lb-main .lb-rank-divider { width: 1px; background: var(--border-color); }
    .lb-main .lb-top-name { font-weight: 700 !important; }

    /* summary */
    .lb-main .lb-summary-card {
        position: relative;
        overflow: hidden;
        border-width: 1px !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    }
    .lb-main .lb-summary-pass { background: color-mix(in srgb, #16a34a 10%, var(--surface-1)); border-color: color-mix(in srgb, #16a34a 35%, transparent) !important; }
    .lb-main .lb-summary-fail { background: color-mix(in srgb, #dc2626 10%, var(--surface-1)); border-color: color-mix(in srgb, #dc2626 35%, transparent) !important; }
    .lb-main .lb-summary-label { font-size: 1rem; font-weight: 700 !important; }

    /* my position */
    .lb-main #lb-my-position-card {
        border-radius: 16px !important;
        background: linear-gradient(135deg, #fff7d6, #ffe9a8) !important;
        border: 1px solid #ffe08a !important;
        box-shadow: 0 4px 12px rgba(245, 158, 11, .2) !important;
    }

    /* merit list */
    .lb-main .lb-merit-card {
        border: 1px solid rgba(0, 0, 0, .05) !important;
        border-radius: 18px !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .1) !important;
    }
    .lb-main .lb-merit-head {
        background: linear-gradient(135deg, #129ae8, #7c3aed);
        color: #fff;
        border-color: transparent !important;
        font-size: 14px;
    }
    .lb-main .lb-merit-row { padding-top: .8rem !important; padding-bottom: .8rem !important; }
    .lb-main .lb-merit-row:nth-child(even) { background: color-mix(in srgb, var(--text-dark) 3%, transparent); }
    .lb-main .lb-merit-row .lb-col-rank { font-weight: 700; color: var(--hero-blue-btn); }
    .lb-main .lb-merit-row .lb-col-score { font-weight: 700; }
    .lb-main .lb-merit-row:nth-child(1) .lb-col-rank { color: #f59e0b; }
    .lb-main .lb-merit-row:nth-child(2) .lb-col-rank { color: #64748b; }
    .lb-main .lb-merit-row:nth-child(3) .lb-col-rank { color: #c2410c; }

    .lb-main .lb-custom-load-btn {
        background: linear-gradient(135deg, #129ae8, #7c3aed);
        border-radius: 999px;
        padding: 10px 26px;
        font-weight: 600;
        box-shadow: 0 6px 14px rgba(18, 154, 232, .3);
    }
    .lb-main .lb-custom-load-btn:hover { background: linear-gradient(135deg, #0f8bd1, #6d28d9); transform: translateY(-2px); }

    /* popup */
    .custom-modal-box { border-radius: 20px !important; }
    .custom-modal-btn { border-radius: 999px !important; }

/* ===== leaderboard: topper podium ===== */
    .lb-main #lb-topers-section .lb-section-head { margin-bottom: 0 !important; border-radius: 18px 18px 0 0; }
    .lb-main #lb-topers-list {
        position: relative;
        overflow: hidden;
        padding: 26px 10px 0;
        border-radius: 0 0 18px 18px;
        background: linear-gradient(180deg, color-mix(in srgb, #7c3aed 14%, var(--surface-1)) 0%, var(--surface-1) 100%);
        border: 1px solid rgba(0, 0, 0, .05);
        border-top: 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
    }
    .lb-main #lb-topers-list::before {
        content: "";
        position: absolute;
        width: 220px; height: 220px;
        left: 50%; top: -90px;
        transform: translateX(-50%);
        border-radius: 50%;
        background: radial-gradient(circle, rgba(245, 158, 11, .28), rgba(245, 158, 11, 0) 70%);
        pointer-events: none;
    }
    .lb-podium {
        position: relative;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        gap: 8px;
    }
    .lb-podium-slot {
        --medal: #64748b;
        --medal-2: #cbd5e1;
        flex: 1 1 0;
        max-width: 150px;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .lb-podium-1 { --medal: #f59e0b; --medal-2: #fcd34d; }
    .lb-podium-3 { --medal: #c2410c; --medal-2: #fb923c; }
    .lb-podium-crown {
        font-size: 30px;
        line-height: 1;
        color: #f59e0b;
        margin-bottom: -4px;
        font-variation-settings: 'FILL' 1;
        filter: drop-shadow(0 3px 4px rgba(245, 158, 11, .5));
        animation: lb-crown-bob 2.4s ease-in-out infinite;
    }
    @keyframes lb-crown-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
    .lb-podium-avatar {
        position: relative;
        width: 62px;
        height: 62px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        font-size: 1.5rem;
        font-weight: 700;
        color: #fff;
        background: linear-gradient(135deg, var(--medal), var(--medal-2));
        border: 3px solid var(--surface-1);
        box-shadow: 0 0 0 3px var(--medal), 0 10px 20px color-mix(in srgb, var(--medal) 40%, transparent);
    }
    .lb-podium-1 .lb-podium-avatar { width: 76px; height: 76px; font-size: 1.9rem; }
    .lb-podium-rank {
        position: absolute;
        right: -6px; bottom: -6px;
        width: 26px; height: 26px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        font-size: 13px;
        font-weight: 700;
        color: #fff;
        background: var(--medal);
        border: 2px solid var(--surface-1);
    }
    .lb-podium-name {
        width: 100%;
        margin-top: 10px;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.3;
        color: var(--text-dark);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .lb-podium-score { margin-top: 4px; font-size: 15px; font-weight: 800; color: var(--medal); }
    .lb-podium-pct { font-size: 11px; color: var(--text-light); margin-bottom: 8px; }
    .lb-podium-step {
        width: 100%;
        border-radius: 12px 12px 0 0;
        background: linear-gradient(180deg, var(--medal), color-mix(in srgb, var(--medal) 45%, transparent));
        box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35);
    }
    .lb-podium-1 .lb-podium-step { height: 62px; }
    .lb-podium-2 .lb-podium-step { height: 42px; }
    .lb-podium-3 .lb-podium-step { height: 28px; }
    @media (prefers-reduced-motion: reduce) { .lb-podium-crown { animation: none; } }

/* ===== exam/exam: confirm + result dialogs (hand-built overlays) ===== */
    .exam-modal-overlay { background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); }
    .exam-modal-overlay .exam-modal-box {
        max-width: 400px;
        max-height: 92vh;
        overflow-y: auto;
        padding: 0 20px 20px;
        border-radius: 22px;
        color: var(--text-dark);
        background: var(--surface-1, #fff);
        box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
        animation: exam-dialog-in .28s cubic-bezier(.34, 1.56, .64, 1);
    }
    @keyframes exam-dialog-in { from { opacity: 0; transform: scale(.88) translateY(18px); } to { opacity: 1; transform: none; } }
    @media (prefers-reduced-motion: reduce) { .exam-modal-overlay .exam-modal-box { animation: none; } }

    /* title band */
    .exam-modal-overlay .exam-modal-box > h5:first-child {
        margin: 0 -20px 16px !important;
        padding: 16px;
        font-size: 1.1rem;
        color: #fff;
        background: linear-gradient(135deg, #129ae8, #7c3aed);
    }
    .exam-modal-overlay .exam-modal-box > hr { display: none; }
    .exam-modal-box #result-pass-fail-text {
        margin: -4px 0 12px !important;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 14px !important;
        line-height: 1.5;
        background: color-mix(in srgb, var(--text-dark) 5%, transparent);
    }

    /* summary rows */
    .exam-modal-overlay .exam-modal-box > .d-flex.border-bottom {
        align-items: center;
        padding: 9px 2px !important;
        font-size: 15px;
        border-bottom: 1px solid var(--border-color, #e0e0e0) !important;
    }
    .exam-modal-overlay .exam-modal-box > .d-flex.border-bottom .fw-bold {
        min-width: 44px;
        padding: 2px 12px;
        text-align: center;
        border-radius: 999px;
        background: color-mix(in srgb, #129ae8 12%, transparent);
        color: #129ae8;
    }
    #res-correct, #confirm-answered { color: #059669 !important; background: color-mix(in srgb, #059669 12%, transparent) !important; }
    #res-wrong, #res-negative { color: #dc2626 !important; background: color-mix(in srgb, #dc2626 12%, transparent) !important; }
    #res-skipped, #confirm-skipped { color: #d97706 !important; background: color-mix(in srgb, #f59e0b 16%, transparent) !important; }
    #res-score, #res-pct { color: #7c3aed !important; background: color-mix(in srgb, #7c3aed 12%, transparent) !important; }

    /* buttons */
    .exam-modal-overlay .exam-btn {
        padding: 11px;
        border: 0;
        border-radius: 999px;
        font-size: 1rem;
        transition: transform .18s, box-shadow .18s;
    }
    .exam-modal-overlay .exam-btn:hover { transform: translateY(-2px); }
    .exam-btn-primary { color: #fff; background: linear-gradient(135deg, #129ae8, #7c3aed); box-shadow: 0 6px 14px rgba(18, 154, 232, .3); }
    .exam-btn-orange  { color: #fff; background: linear-gradient(135deg, #f5a623, #ea580c); box-shadow: 0 6px 14px rgba(234, 88, 12, .3); }
    .exam-btn-danger  { color: #fff; background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 6px 14px rgba(220, 38, 38, .25); }
    .exam-btn-light   { color: var(--text-dark); background: color-mix(in srgb, var(--text-dark) 8%, var(--surface-1, #fff)); }
    .exam-btn-primary:hover, .exam-btn-orange:hover, .exam-btn-danger:hover { color: #fff; }
    .exam-btn-light:hover { color: var(--text-dark); }
