/* ============================================================
   SK SMART CLASSES
   SCERT QUIZ — BLUE MODERN UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;

    --secondary: #06b6d4;
    --accent: #7c3aed;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;

    --bg: #f5f8ff;
    --card: #ffffff;
    --soft: #f1f5ff;

    --text: #172033;
    --text-secondary: #526079;
    --muted: #8490a5;

    --border: #e4eaf4;

    --shadow-sm: 0 4px 14px rgba(30,64,175,.07);
    --shadow: 0 10px 30px rgba(30,64,175,.10);
    --shadow-lg: 0 20px 55px rgba(30,64,175,.15);
/* 
    --gradient: linear-gradient(135deg,#2563eb,#06b6d4);
    --gradient-dark: linear-gradient(135deg,#1d4ed8,#0891b2); */
    --gradient: linear-gradient(135deg,#0d7430,#07b06a);
    --gradient-dark: linear-gradient(135deg,#1d4ed8,#0891b2);

    --radius: 18px;
    --transition: .28s ease;
}

html[data-theme="dark"] {
    --bg: #08111f;
    --card: #101b2d;
    --soft: #152238;

    --text: #f1f5ff;
    --text-secondary: #b5c1d5;
    --muted: #8290a7;

    --border: #26364f;

    --shadow-sm: 0 5px 18px rgba(0,0,0,.25);
    --shadow: 0 12px 35px rgba(0,0,0,.32);
    --shadow-lg: 0 25px 60px rgba(0,0,0,.40);
}

/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Hind Siliguri","Inter",sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 5%,rgba(37,99,235,.10),transparent 28%),
        radial-gradient(circle at 90% 15%,rgba(6,182,212,.09),transparent 25%),
        var(--bg);
    transition: background .3s ease,color .3s ease;
}

button {
    font-family: inherit;
}

.hidden {
    display: none !important;
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */

.container {
    width: min(1450px,calc(100% - 32px));
    margin: 25px auto 50px;
}

/* ============================================================
   MAIN CARD
   ============================================================ */

.card {
    overflow: hidden;
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    animation: pageIn .45s ease;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
    position: relative;
    overflow: hidden;
    padding: 27px 30px;
    color: white;
    background:
        radial-gradient(circle at 90% 0%,rgba(255,255,255,.18),transparent 28%),
        var(--gradient);
}

.header::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -90px;
    top: -120px;
    border: 35px solid rgba(255,255,255,.06);
    border-radius: 50%;
}

.header::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    left: -55px;
    bottom: -75px;
    border: 20px solid rgba(255,255,255,.06);
    border-radius: 50%;
}

.header-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left > i {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    font-size: 24px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
}

.header h1,
.header h2,
.header h3 {
    margin: 0;
    color: white;
    font-family: "Baloo 2",sans-serif;
    line-height: 1.15;
}

.header h1 {
    font-size: clamp(1.45rem,3vw,2.1rem);
    font-weight: 800;
}

.header p {
    margin: 4px 0 0;
    color: rgba(255,255,255,.88);
}

/* ============================================================
   HEADER BUTTONS
   ============================================================ */

.header-actions {
    display: flex;
    gap: 8px;
}

.header-actions button,
#musicBtn,
#themeBtn {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 13px;
    color: white;
    background: rgba(255,255,255,.13);
    cursor: pointer;
    transition: var(--transition);
}

.header-actions button:hover,
#musicBtn:hover,
#themeBtn:hover {
    background: rgba(255,255,255,.25);
    transform: translateY(-3px);
}

/* ============================================================
   CHAPTER GRID
   ============================================================ */

#chapterGrid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 17px;
    padding: 30px;
}

.chapter-card {
    position: relative;
    min-height: 155px;
    padding: 20px;
    overflow: hidden;
    /* border: 4px solid var(--border); */
    border: 4px solid rgb(11, 216, 11);
    border-radius: 19px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.chapter-card::before {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    right: -40px;
    top: -40px;
    border-radius: 50%;
    background: rgba(37,99,235,.07);
}

.chapter-card:hover {
    transform: translateY(-7px);
    border-color: rgba(37,99,235,.35);
    box-shadow: var(--shadow);
}

.chapter-card i {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 13px;
    border-radius: 14px;
    color: white;
    font-size: 20px;
    background: var(--gradient);
    box-shadow: 0 7px 18px rgba(37,99,235,.20);
}

.chapter-card .label {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.chapter-card .badge {
    display: inline-block;
    margin-top: 9px;
    /* padding: 4px 10px; */
    text-align: center;
    padding: 4px;
    border-radius: 50%;
    color: var(--primary);
    background: rgba(37,99,235,.08);
    font-size: .72rem;
    font-weight: 700;
    width: 30px;
    height: 30px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
}

.chapter-card .click-hint {
    position: absolute;
    right: 14px;
    bottom: 12px;
    color: var(--muted);
    font-size: .5rem;
}


/* ============================================================
   BUTTON AREA
   ============================================================ */

.flex-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 30px 30px;
}

#resumeQuizBtn,
#clearBtn,
#backBtn,
#nextBtn {
    min-height: 46px;
    padding: 10px 21px;
    border-radius: 13px;
    font-size: .94rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

#resumeQuizBtn,
#nextBtn {
    color: white;
    background: var(--gradient);
    box-shadow: 0 7px 20px rgba(37,99,235,.20);
}

#resumeQuizBtn:hover,
#nextBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 27px rgba(37,99,235,.30);
}

#clearBtn {
    color: var(--danger);
    background: rgba(220,38,38,.07);
    border: 1px solid rgba(220,38,38,.13);
}

#clearBtn:hover {
    color: white;
    background: var(--danger);
}

#backBtn {
    color: var(--primary);
    background: rgba(37,99,235,.08);
    border: 1px solid rgba(37,99,235,.14);
}

#backBtn:hover {
    color: white;
    background: var(--gradient);
}

/* ============================================================
   RESUME
   ============================================================ */

#resumeBox {
    padding: 0 30px 30px;
}

.resume-alert {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(37,99,235,.14);
    border-radius: 17px;
    background: rgba(37,99,235,.055);
}

.resume-info {
    flex: 1;
}

.resume-info .chapter-name {
    font-size: 1.05rem;
    font-weight: 800;
}

.resume-actions {
    display: flex;
    gap: 8px;
}

/* ============================================================
   QUIZ META
   ============================================================ */

.quiz-meta {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 13px;
    padding: 22px 30px 13px;
}

.quiz-meta > div {
    min-height: 65px;
    padding: 11px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--soft);
}

.quiz-meta span:first-child {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
}

.quiz-meta span:last-child {
    margin-top: 2px;
    font-family: "Inter",sans-serif;
    font-size: 1rem;
    font-weight: 800;
}

/* ============================================================
   TIMER
   ============================================================ */

#timer {
    color: var(--primary);
}

#timer.warning {
    color: var(--warning);
}

#timer.danger {
    color: var(--danger);
    animation: pulse .7s infinite;
}

@keyframes pulse {
    50% {
        transform: scale(1.06);
    }
}

/* ============================================================
   PROGRESS
   ============================================================ */

.progress-track,
.timer-progress {
    position: relative;
    height: 9px;
    margin: 0 30px 12px;
    overflow: hidden;
    border-radius: 50px;
    background: #e8eef8;
}

#progressFill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient);
    transition: width .4s ease;
}

.timer-progress {
    height: 5px;
    margin-bottom: 25px;
}

/* ============================================================
   QUESTION — MORE SPACE
   ============================================================ */

#questionText {
    margin: .5rem 2rem ;
    padding: 10px 20px;
    /*min-height: 155px;
    */display: flex;
    align-items: center;
    border: 1px solid #dbe5f5;
    /*border-left: 6px solid forestgreen;
    */border-radius: 10px;
    color: var(--text);
    background:        linear-gradient(            135deg,            rgba(37,99,235,.045),            rgba(6,182,212,.035)        );
    font-family: "Hind Siliguri",sans-serif;
    font-size: clamp(1.25rem,3.2vw,1.55rem);
    font-weight: 700;
    line-height: 1.8;
    box-shadow: var(--shadow-sm);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
}

#questionImage {
    margin: 0 30px 22px;
    text-align: center;
}

#imgDisplay {
    max-width: 100%;
    max-height: 350px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

/* ============================================================
   OPTIONS
   ============================================================ */

.options-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px;
    padding: 0 30px;
}

.option-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 78px;
    padding: 14px 18px;
    overflow: hidden;

    border: 2px solid var(--border);
    border-radius: 17px;
    background: var(--card);
    box-shadow: var(--shadow-sm);

    cursor: pointer;
    transition: var(--transition);
}

.option-item:hover:not(.disabled) {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.option-letter {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;

    color: var(--primary);
    background: rgba(37,99,235,.09);

    font-family: "Inter",sans-serif;
    font-weight: 800;

    transition: var(--transition);
}

.option-item:hover:not(.disabled) .option-letter {
    color: white;
    background: var(--gradient);
}

.option-item.correct {
    border-color: var(--success);
    background: rgba(22,163,74,.08);
}

.option-item.correct .option-letter {
    color: white;
    background: var(--success);
}

.option-item.wrong {
    border-color: var(--danger);
    background: rgba(220,38,38,.07);
}

.option-item.wrong .option-letter {
    color: white;
    background: var(--danger);
}

.option-item.timeout {
    border-color: var(--warning);
    background: rgba(245,158,11,.08);
}

/* ============================================================
   EXPLANATION
   ============================================================ */

.explanation-box {
    margin: 22px 30px 0;
    padding: 21px 24px;

    border: 1px solid rgba(37,99,235,.13);
    border-left: 5px solid var(--secondary);
    border-radius: 17px;

    background: rgba(6,182,212,.055);

    line-height: 1.7;
    text-align: justify;
}

#source {
    margin-top: 8px;
    color: var(--muted);
    font-size: .82rem;
}

.timeout-explanation {
    border-left-color: var(--warning);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 25px 30px 0;
}

/* ============================================================
   RESULT
   ============================================================ */

#performanceMsg {
    margin: 28px 30px;
    padding: 23px;
    text-align: center;

    border: 1px solid rgba(37,99,235,.13);
    border-radius: 19px;

    background:
        linear-gradient(
            135deg,
            rgba(37,99,235,.07),
            rgba(6,182,212,.05)
        );

    font-size: 1.15rem;
    font-weight: 700;
}

/* ============================================================
   RESULT STATS
   ============================================================ */

.result-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 17px;
    padding: 0 30px;
}

.result-stat {
    position: relative;
    padding: 25px 18px;
    text-align: center;
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--soft);

    transition: var(--transition);
}

.result-stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.result-stat strong {
    display: block;

    font-family: "Baloo 2",sans-serif;
    font-size: 2.35rem;
    font-weight: 800;

    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-stat span {
    color: var(--muted);
    font-size: .88rem;
}

/* ============================================================
   TIME STATS
   ============================================================ */

.time-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 13px;
    padding: 22px 30px;
}

.time-stat-item {
    min-width: 160px;
    padding: 14px 20px;
    text-align: center;

    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--soft);
}

.time-stat-item strong {
    display: block;
    font-size: 1.1rem;
}

/* ============================================================
   ANSWER KEY — TABLE
   ============================================================ */

.answer-key-section {
    margin-top: 12px;
    padding: 0 30px;
}

.answer-key-section h3 {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 0 0 17px;

    font-family: "Baloo 2",sans-serif;
    font-size: 1.5rem;
}

/* Table wrapper */

.answer-key-grid {
    width: 100%;
    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

/* Generated table */

.answer-key-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .94rem;
}

/* Header */

.answer-key-table thead th {
    padding: 15px 16px;

    color: white;
    background: var(--gradient);

    text-align: left;
    font-family: "Inter","Hind Siliguri",sans-serif;
    font-size: .82rem;
    font-weight: 700;

    white-space: nowrap;
}

.answer-key-table thead th:first-child {
    width: 70px;
    text-align: center;
}

.answer-key-table thead th:nth-child(2) {
    width: 48%;
}

/* Rows */

.answer-key-table tbody tr {
    transition: var(--transition);
}

.answer-key-table tbody tr:hover {
    background: rgba(37,99,235,.035);
}

.answer-key-table tbody td {
    padding: 17px 16px;

    border-bottom: 1px solid var(--border);

    vertical-align: top;
    line-height: 1.65;
}

.answer-key-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Question number */

.answer-key-table .qnum {
    width: 34px;
    height: 34px;

    display: inline-grid;
    place-items: center;

    border-radius: 10px;

    color: white;
    background: var(--gradient);

    font-family: "Inter",sans-serif;
    font-size: .78rem;
    font-weight: 800;
}

/* Question */

.answer-key-table .question-text-sm {
    display: block;

    color: var(--text);
    font-size: 1rem;
    font-weight: 600;

    line-height: 1.7;
}

/* Answers */

.answer-key-table .user-answer,
.answer-key-table .correct-answer-text {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 9px;
    font-weight: 700;
}

.answer-key-table .correct-answer {
    color: var(--success);
    background: rgba(22,163,74,.09);
}

.answer-key-table .wrong-answer {
    color: var(--danger);
    background: rgba(220,38,38,.08);
}

.answer-key-table .timeout-answer {
    color: var(--warning);
    background: rgba(245,158,11,.10);
}

.answer-key-table .correct-answer-text {
    color: var(--success);
    background: rgba(22,163,74,.08);
}

.answer-key-table .status-icon {
    font-size: 1.05rem;
}

.answer-key-table .time-taken {
    color: var(--muted);
    font-size: .78rem;
}

/* ============================================================
   RESULT BUTTONS
   ============================================================ */

#resultScreen > button,
#whatsappShare {
    min-height: 47px;
    margin: 23px 5px 0;
    padding: 10px 21px;

    border-radius: 13px;

    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

#whatsappShare {
    color: white;
    background: linear-gradient(135deg,#16a34a,#22c55e);
}

#whatsappShare:hover {
    transform: translateY(-3px);
}

/* ============================================================
   MODAL
   ============================================================ */

.support-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    /* background: rgba(8,20,40,.68); */
    background: green;
    /* backdrop-filter: blur(10px); */
}

.support-overlay > div {
    width: min(500px,100%);
    max-height: 90vh;
    overflow-y: auto;

    border: 1px solid var(--border);
    border-radius: 24px;

    background: var(--card);
    box-shadow: var(--shadow-lg);

    animation: modalIn .3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--soft);
}

::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: linear-gradient(
        180deg,
        var(--primary),
        var(--secondary)
    );
}

/* ============================================================
   MOBILE
   ============================================================ */

@media(max-width:1000px) {

    #chapterGrid {
        grid-template-columns: repeat(3,1fr);
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:800px) {

    .container {
        width: calc(100% - 12px);
        margin: 7px auto 25px;
    }

    .card {
        border-radius: 20px;
    }

    .header {
        padding: 19px;
    }

    .header-left {
        gap: 10px;
    }

    .header-left > i {
        width: 44px;
        height: 44px;
        font-size: 19px;
        border-radius: 13px;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .header p {
        font-size: .78rem;
    }

    .header-actions button,
    #musicBtn,
    #themeBtn {
        width: 37px;
        height: 37px;
    }

    #chapterGrid {
        grid-template-columns: repeat(2,1fr);
        gap: 10px;
        padding: 16px;
    }

    .chapter-card {
        min-height: 135px;
        padding: 15px;
        border-radius: 16px;
    }

    .chapter-card i {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .chapter-card .label {
        font-size: .88rem;
    }

    .chapter-card .click-hint {
        display: none;
    }

    .flex-row {
        padding: 0 16px 20px;
    }

    #resumeBox {
        padding: 0 16px 20px;
    }

    .resume-alert {
        flex-direction: column;
        align-items: stretch;
    }

    .resume-actions {
        width: 100%;
    }

    .resume-actions button {
        flex: 1;
    }

    /* Meta */

    .quiz-meta {
        grid-template-columns: repeat(2,1fr);
        gap: 8px;
        padding: 15px 16px 10px;
    }

    .quiz-meta > div {
        min-height: 56px;
    }

    .progress-track,
    .timer-progress {
        margin-left: 16px;
        margin-right: 16px;
    }

    /* Question */

    #questionText {
        /* min-height: 190px; */
        margin: 0 16px 18px;
        padding: 8px auto;

        font-size: 1.12rem;
        line-height: 1.75;

        border-radius: 17px;
        text-align: justify;
    }

    #questionImage {
        margin-left: 16px;
        margin-right: 16px;
    }

    #imgDisplay {
        max-height: 250px;
    }

    /* Options */

    .options-grid {
        padding: 0 16px;
        gap: 10px;
    }

    .option-item {
        min-height: 68px;
        padding: 11px 13px;
    }

    .option-letter {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    /* Explanation */

    .explanation-box {
        margin-left: 16px;
        margin-right: 16px;
        padding: 17px;
    }

    /* Navigation */

    .nav-row {
        margin-left: 16px;
        margin-right: 16px;
    }

    .nav-row button {
        flex: 1;
    }

    /* Result */

    #performanceMsg {
        margin-left: 16px;
        margin-right: 16px;
    }

    .result-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 16px;
    }

    .time-stats {
        padding: 16px;
    }

    .answer-key-section {
        padding: 0 16px;
    }

    /*
       Horizontal scrolling is intentional on mobile.
       This keeps question text readable instead of
       squeezing three answer columns.
    */

    .answer-key-grid {
        border-radius: 14px;
    }

    .answer-key-table {
        min-width: 720px;
    }

    .answer-key-table tbody td {
        padding: 15px 13px;
    }

    #resultScreen > button,
    #whatsappShare {
        width: calc(100% - 32px);
        margin-left: 16px;
        margin-right: 16px;
    }
}

/* ============================================================
   VERY SMALL MOBILE
   ============================================================ */

@media(max-width:500px) {

    .header-top {
        align-items: flex-start;
    }

    .header-actions {
        gap: 4px;
    }

    .chapter-card {
        min-height: 125px;
        padding: 13px;
    }

    .quiz-meta {
        gap: 6px;
    }

    #questionText {
        /* min-height: 210px; */
    }

    .nav-row {
        flex-direction: column;
    }

    .nav-row button {
        width: 100%;
    }
     .chapter-card .click-hint {
        display: block;
        
    }
       #chapterGrid {
/* Simplified version */
grid-template-columns: 1fr;

    }

      .chapter-card i {
        width: 30px;
        height: 30px;
      }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {

    body {
        background: white !important;
        color: #111 !important;
    }

    #startScreen,
    #quizScreen,
    #whatsappShare,
    .header-actions,
    .flex-row {
        display: none !important;
    }

    #resultScreen {
        display: block !important;
    }
#header, #footer{
    display: none !important;
}
    .card {
        border: 0 !important;
        box-shadow: none !important;
    }

    .header {
        background: white !important;
        color: #111 !important;
        border-bottom: 2px solid #2563eb;
    }

    .header h1,
    .header h2,
    .header h3 {
        color: #2563eb !important;
    }

    .answer-key-table {
        min-width: 100%;
    }

    .answer-key-table thead th {
        color: white !important;
        background: #2563eb !important;
    }
}


/* ----------------------- */

/* ============================================================
   RESUME QUIZ ALERT
   Modern Blue + Cyan Glassmorphism
   ============================================================ */

.resume-alert {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;

    width: 100%;
    margin: 20px 0;
    padding: 18px 20px;

    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, 0.08),
            rgba(6, 182, 212, 0.06)
        ),
        var(--card);

        /* background-color: #06b6d4; */
    box-shadow:
        0 8px 25px rgba(37, 99, 235, 0.09),
        inset 0 1px 0 rgba(255,255,255,.55);

    overflow: hidden;

    animation: resumeSlideIn .45s ease both;
}


/* Decorative left gradient line */

.resume-alert::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;

    width: 5px;

    background: linear-gradient(
        180deg,
        #2563eb,
        #06b6d4
    );
}


/* Decorative glow */

.resume-alert::after {
    content: "";
    position: absolute;

    width: 130px;
    height: 130px;

    right: -65px;
    top: -65px;

    border-radius: 50%;

    background: rgba(37,99,235,.07);

    pointer-events: none;
}


/* ============================================================
   RESUME INFORMATION
   ============================================================ */

.resume-info {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
    flex: 1;
}


/* Main heading */

.resume-info > strong {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--text);

    font-family: "Baloo 2", "Hind Siliguri", sans-serif;
    font-size: 1.08rem;
    font-weight: 800;

    line-height: 1.35;
}


/* Information line */

.resume-info > span:not([style]) {
    display: block;

    color: var(--text-secondary);

    font-family: "Hind Siliguri", sans-serif;
    font-size: .88rem;
    font-weight: 500;

    line-height: 1.6;
}


/* Chapter name */

.resume-info .chapter-name {
    display: inline-block;

    max-width: 100%;

    color: #2563eb;

    font-weight: 800;
}


/* Progress line
   Overrides the inline style in your HTML */

.resume-info > span[style] {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-top: 5px;

    color: var(--text-muted) !important;

    font-size: .76rem !important;
    font-weight: 600;

    line-height: 1.4;
}


/* ============================================================
   RESUME ACTION BUTTONS
   ============================================================ */

.resume-actions {
    position: relative;
    z-index: 3;

    display: flex;
    align-items: center;
    gap: 9px;

    flex-shrink: 0;
}


/* Common button */

.resume-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-width: 100px;
    min-height: 40px;

    padding: 8px 14px;

    border: 0;
    border-radius: 11px;

    font-family: "Hind Siliguri", sans-serif;
    font-size: .82rem !important;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}


/* Continue */

.resume-actions .btn-success {
    color: #fff;

    background: linear-gradient(
        135deg,
        #2563eb,
        #06b6d4
    );

    box-shadow:
        0 6px 15px rgba(37,99,235,.22);
}


.resume-actions .btn-success:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 22px rgba(37,99,235,.30);
}


.resume-actions .btn-success:active {
    transform: translateY(0);
}


/* Continue icon */

.resume-actions .btn-success i {
    font-size: .78rem;
}


/* Dismiss */

.resume-actions .btn-secondary {
    color: var(--text-secondary);

    background: var(--soft);

    border: 1px solid var(--border);

    box-shadow: none;
}


.resume-actions .btn-secondary:hover {
    color: #fff;

    background: #64748b;

    border-color: #64748b;

    transform: translateY(-2px);

    box-shadow:
        0 7px 16px rgba(100,116,139,.18);
}


/* ============================================================
   PROGRESS VISUAL
   ============================================================ */

/* Optional progress percentage highlight */

.resume-info > span[style]::after {
    content: "";

    display: block;

    width: 55px;
    height: 5px;

    margin-left: 3px;

    border-radius: 50px;

    background: linear-gradient(
        90deg,
        #2563eb,
        #06b6d4
    );

    opacity: .75;
}


/* ============================================================
   ANIMATION
   ============================================================ */

@keyframes resumeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   DARK MODE
   ============================================================ */

html[data-theme="dark"] .resume-alert {
    border-color: rgba(96,165,250,.20);

    background:
        linear-gradient(
            135deg,
            rgba(37,99,235,.13),
            rgba(6,182,212,.08)
        ),
        var(--card);

    box-shadow:
        0 10px 30px rgba(0,0,0,.25),
        inset 0 1px 0 rgba(255,255,255,.03);
}

html[data-theme="dark"] .resume-info .chapter-name {
    color: #60a5fa;
}

html[data-theme="dark"] .resume-actions .btn-secondary {
    background: #18263b;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 700px) {

    .resume-alert {
        align-items: stretch;
        flex-direction: column;

        gap: 15px;

        padding: 17px 16px 16px 19px;
    }

    .resume-info > strong {
        font-size: 1rem;
    }

    .resume-info > span:not([style]) {
        font-size: .84rem;
    }

    .resume-actions {
        width: 100%;
    }

    .resume-actions .btn {
        flex: 1;
        min-width: 0;
    }
}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 420px) {

    .resume-alert {
        margin: 14px 0;
        padding: 15px 13px 14px 17px;

        border-radius: 15px;
    }

    .resume-info {
        gap: 3px;
    }

    .resume-info > strong {
        font-size: .95rem;
    }

    .resume-info > span:not([style]) {
        font-size: .79rem;
        line-height: 1.55;
    }

    .resume-info .chapter-name {
        font-size: .82rem;
    }

    .resume-actions {
        gap: 7px;
    }

    .resume-actions .btn {
        min-height: 39px;
        padding: 7px 9px;

        font-size: .78rem !important;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .resume-alert {
        animation: none;
    }

    .resume-actions .btn {
        transition: none;
    }
}


/* ...............appeal.............. */


/* =========================================================
   SUPPORT APPEAL MODAL
   Modern Blue + Cyan + Green Design
   ========================================================= */

.support-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(0, 180, 255, 0.15),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(0, 210, 150, 0.12),
            transparent 35%
        ),
        rgba(5, 15, 35, 0.78);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    animation: supportOverlayIn 0.3s ease;
}


/* =========================================================
   MODAL
   ========================================================= */

.support-modal {
    position: relative;

    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);

    overflow-y: auto;

    padding: 34px 30px 25px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(241, 248, 255, 0.98)
        );

    border: 1px solid rgba(0, 150, 255, 0.18);
    border-radius: 28px;

    box-shadow:
        0 30px 80px rgba(0, 40, 100, 0.30),
        0 10px 30px rgba(0, 150, 255, 0.12);

    animation: supportModalIn 0.45s cubic-bezier(.16, 1, .3, 1);

    font-family: inherit;
}


/* Top decorative line */

.support-modal::before {
    content: "";

    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;

    height: 4px;

    border-radius: 0 0 20px 20px;

    background: linear-gradient(
        90deg,
        #0878ff,
        #00c6ff,
        #00b894
    );
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.support-close {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 120, 255, 0.12);
    border-radius: 50%;

    background: rgba(240, 247, 255, 0.9);

    color: #64748b;

    font-size: 14px;

    cursor: pointer;

    transition: all 0.25s ease;
}

.support-close:hover {
    background: #0878ff;
    color: #fff;

    transform: rotate(90deg) scale(1.08);

    box-shadow: 0 6px 18px rgba(8, 120, 255, 0.3);
}


/* =========================================================
   ICON
   ========================================================= */

.support-icon-wrap {
    position: relative;

    width: 90px;
    height: 90px;

    margin: 8px auto 18px;
}


.support-icon {
    width: 82px;
    height: 82px;

    margin: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #0878ff 0%,
            #00aaff 50%,
            #00b894 100%
        );

    color: #fff;

    font-size: 34px;

    box-shadow:
        0 12px 30px rgba(8, 120, 255, 0.30),
        0 0 0 10px rgba(8, 120, 255, 0.06);

    animation: supportHeart 2s ease-in-out infinite;
}


.support-icon i {
    filter: drop-shadow(0 3px 5px rgba(0,0,0,.18));
}


/* Decorative stars */

.support-spark {
    position: absolute;

    color: #00aaff;

    font-size: 16px;

    animation: sparkFloat 2s ease-in-out infinite;
}

.spark-1 {
    top: 0;
    right: 3px;
}

.spark-2 {
    left: 0;
    top: 25px;

    color: #00b894;

    animation-delay: .4s;
}

.spark-3 {
    right: 8px;
    bottom: 2px;

    color: #0878ff;

    animation-delay: .8s;
}


/* =========================================================
   HEADING
   ========================================================= */

.support-heading {
    margin-bottom: 20px;
}


.support-badge {
    display: inline-flex;

    align-items: center;
    gap: 6px;

    padding: 6px 12px;

    margin-bottom: 9px;

    border-radius: 50px;

    background: linear-gradient(
        135deg,
        rgba(8, 120, 255, .10),
        rgba(0, 184, 148, .10)
    );

    border: 1px solid rgba(8, 120, 255, .12);

    color: #0878ff;

    font-size: 12px;
    font-weight: 700;
}


.support-heading h2 {
    margin: 0 0 8px;

    color: #102a43;

    font-size: 1.55rem;
    line-height: 1.3;
    font-weight: 800;

    letter-spacing: -.3px;
}


.support-heading p {
    margin: 0;

    color: #60758a;

    font-size: .92rem;
    line-height: 1.6;
}


.chapter-highlight {
    display: inline-block;

    color: #0878ff;
    font-weight: 800;

    background: rgba(8, 120, 255, .08);

    padding: 2px 7px;

    border-radius: 6px;
}


.hammer {
    display: inline-block;

    margin-left: 3px;

    animation: hammerBounce 1.5s ease-in-out infinite;
}


/* =========================================================
   INFORMATION CARD
   ========================================================= */

.support-info {
    display: flex;

    gap: 13px;

    text-align: left;

    padding: 16px;

    margin: 18px 0;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            rgba(8, 120, 255, .07),
            rgba(0, 184, 148, .07)
        );

    border: 1px solid rgba(8, 120, 255, .12);

    position: relative;
    overflow: hidden;
}


.support-info::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 4px;

    background: linear-gradient(
        180deg,
        #0878ff,
        #00b894
    );
}


.info-icon {
    flex: 0 0 40px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: linear-gradient(
        135deg,
        #0878ff,
        #00b894
    );

    color: #fff;

    font-size: 17px;

    box-shadow: 0 5px 15px rgba(8, 120, 255, .20);
}


.info-content {
    min-width: 0;
}


.info-content strong {
    display: block;

    margin-bottom: 5px;

    color: #0878ff;

    font-size: .9rem;
    font-weight: 800;
}


.info-content p {
    margin: 0;

    color: #60758a;

    font-size: .82rem;
    line-height: 1.65;
}


/* =========================================================
   SUPPORT POINTS
   ========================================================= */

.support-points {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin: 16px 0 20px;

    text-align: left;
}


.support-point {
    display: flex;

    align-items: center;

    gap: 9px;

    color: #526779;

    font-size: .78rem;
    font-weight: 600;
}


.support-point i {
    color: #00a77d;

    font-size: 14px;

    flex-shrink: 0;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.support-actions {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


/* Main Share Button */

.support-share-btn {
    width: 100%;

    min-height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 10px 16px;

    border: none;
    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #0878ff,
            #009fe3 55%,
            #00a77d
        );

    color: #fff;

    font-family: inherit;

    font-size: .9rem;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 8px 22px rgba(8, 120, 255, .24);

    transition: all .25s ease;
}


.support-share-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(8, 120, 255, .34);
}


.support-share-btn:active {
    transform: translateY(0);
}


.btn-icon {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: rgba(255,255,255,.18);
}


.btn-arrow {
    margin-left: auto;

    font-size: 13px;

    transition: transform .25s ease;
}


.support-share-btn:hover .btn-arrow {
    transform: translateX(4px);
}


/* Later Button */

.support-later-btn {
    width: 100%;

    min-height: 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    border: 1px solid #d8e3ee;
    border-radius: 14px;

    background: #f7fafc;

    color: #60758a;

    font-family: inherit;

    font-size: .84rem;
    font-weight: 700;

    cursor: pointer;

    transition: all .25s ease;
}


.support-later-btn:hover {
    background: #eef5fb;

    border-color: #b9d3e8;

    color: #0878ff;
}


/* =========================================================
   FOOTER
   ========================================================= */

.support-footer {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    margin-top: 17px;

    color: #8a9aaa;

    font-size: .68rem;

    line-height: 1.5;
}


.support-footer i {
    color: #00a77d;

    animation: footerHeart 1.5s ease-in-out infinite;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes supportOverlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


@keyframes supportModalIn {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


@keyframes supportHeart {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.07);
    }
}


@keyframes sparkFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: .7;
    }

    50% {
        transform: translateY(-7px) rotate(20deg);
        opacity: 1;
    }
}


@keyframes hammerBounce {
    0%, 100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-10deg) translateY(-2px);
    }
}


@keyframes footerHeart {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}


/* =========================================================
   DARK MODE
   ========================================================= */

[data-theme="dark"] .support-modal {
    background:
        linear-gradient(
            145deg,
            #101d32,
            #0d1728
        );

    border-color: rgba(80, 180, 255, .18);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, .55),
        0 10px 30px rgba(0, 140, 255, .10);
}


[data-theme="dark"] .support-heading h2 {
    color: #eef7ff;
}


[data-theme="dark"] .support-heading p,
[data-theme="dark"] .info-content p {
    color: #9db0c4;
}


[data-theme="dark"] .support-info {
    background:
        linear-gradient(
            135deg,
            rgba(8, 120, 255, .10),
            rgba(0, 184, 148, .08)
        );

    border-color: rgba(80, 180, 255, .14);
}


[data-theme="dark"] .support-point {
    color: #a9bacb;
}


[data-theme="dark"] .support-close {
    background: #17263a;

    border-color: #294057;

    color: #a9bacb;
}


[data-theme="dark"] .support-close:hover {
    background: #0878ff;
    color: #fff;
}


[data-theme="dark"] .support-later-btn {
    background: #152337;

    border-color: #294057;

    color: #a9bacb;
}


[data-theme="dark"] .support-later-btn:hover {
    background: #1b3048;
    color: #5bc0ff;
}


[data-theme="dark"] .support-footer {
    color: #71859a;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 600px) {

    .support-overlay {
        padding: 15px;
    }

    .support-modal {
        max-width: 100%;

        padding: 30px 21px 22px;

        border-radius: 23px;
    }

    .support-icon-wrap {
        transform: scale(.9);

        margin-top: 3px;
        margin-bottom: 12px;
    }

    .support-heading h2 {
        font-size: 1.35rem;
    }

    .support-heading p {
        font-size: .84rem;
    }

    .support-info {
        padding: 13px;
    }

    .info-content p {
        font-size: .78rem;
    }

    .support-point {
        font-size: .74rem;
    }

    .support-footer {
        font-size: .62rem;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .support-modal {
        padding: 27px 16px 19px;
    }

    .support-heading h2 {
        font-size: 1.2rem;
    }

    .support-icon-wrap {
        transform: scale(.82);
        margin-bottom: 7px;
    }

    .support-info {
        gap: 9px;
    }

    .info-icon {
        width: 34px;
        height: 34px;

        flex-basis: 34px;

        font-size: 14px;
    }

    .support-share-btn {
        min-height: 48px;

        font-size: .82rem;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .support-overlay,
    .support-modal,
    .support-icon,
    .support-spark,
    .hammer,
    .support-footer i {
        animation: none !important;
    }

    .support-share-btn,
    .support-close,
    .support-later-btn {
        transition: none !important;
    }
}

