/* ========================================
   AGRIGYAN MCQ ULTIMATE v5.0.1
   Complete Styles for Practice & Exam Mode
======================================== */

/* --- FONT STABILITY & FALLBACKS --- */
:root {
    --ag-font-primary: "Comic Neue", "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ag-font-mono: 'Courier New', Consolas, monospace;
}

/* Ensure fonts render immediately with fallback */
.agrigyan-mcq-card,
.agrigyan-quiz-details-container,
.agrigyan-result-modal,
.agrigyan-inst-modal,
.agrigyan-report-modal {
    font-family: var(--ag-font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- GLOBAL RESET --- */
.agrigyan-mcq-card *,
.agrigyan-quiz-details-container *,
.agrigyan-result-modal *,
.agrigyan-inst-modal *,
.agrigyan-report-modal * {
    box-sizing: border-box;
}

/* --- QUIZ DETAILS TABLE --- */
.agrigyan-quiz-details-container {
    width: 100%;
    box-sizing: border-box;
    margin: 2rem auto;
    max-width: 900px;
}

.agrigyan-quiz-details-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    font-family: "Comic Neue", "Comic Sans MS", cursive, sans-serif;
    background: #fff;
    border: 3px dashed #1e6e1b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.agrigyan-quiz-details-table thead td {
    background: linear-gradient(135deg, #b9b4d4 0%, #a39cbe 100%) !important;
    color: #1e6e1b;
    font-size: 1.15em;
    font-weight: 700;
    padding: 15px 20px;
    border-style: double;
    border-color: #1e6e1b;
    border-width: 0 0 4px 0;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.agrigyan-quiz-details-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.agrigyan-quiz-details-table tbody td {
    padding: 14px 20px;
    border-style: dashed;
    border-color: #e0e0e0;
    border-width: 0 0 1px 0;
    vertical-align: top;
    line-height: 1.6;
    color: #333;
    font-size: 0.98em;
}

.agrigyan-quiz-details-table tbody tr:last-child td {
    border-bottom: none;
}

.agrigyan-quiz-details-table tbody td:first-child {
    width: 45%;
    font-weight: 700;
    color: #556b2f;
    border-right: 2px dashed #d2d2d2;
}

/* --- EXAM MODE START AREA --- */
.agrigyan-quiz-start-area {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
    border-top: 3px dashed #1e6e1b;
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.agrigyan-btn-primary,
#agrigyan-submit-quiz {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 15px 36px;
    font-size: 1.15rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 5px 18px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    font-family: "Comic Neue", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agrigyan-btn-primary:hover,
#agrigyan-submit-quiz:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

.agrigyan-btn-primary:active,
#agrigyan-submit-quiz:active {
    transform: translateY(-1px);
}

.agrigyan-btn-secondary {
    background: #fff;
    color: #556b2f;
    border: 3px solid #8d8741;
    padding: 13px 32px;
    font-size: 1.15rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: "Comic Neue", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agrigyan-btn-secondary:hover {
    background: #f5f5f5;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(141, 135, 65, 0.3);
}

/* --- MCQ CARD --- */
.agrigyan-mcq-card {
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    background: #fdf6e3;
    border: 3px dashed #8d8741;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    margin: 2rem auto;
    overflow: visible;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    font-family: "Comic Neue", "Comic Sans MS", cursive, sans-serif;
    background-image: url("https://www.transparenttextures.com/patterns/cubes.png");
    position: relative;
    transition: all 0.3s ease;
}

.agrigyan-mcq-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.agrigyan-mcq-question {
    font-size: 1.35em;
    font-weight: bold;
    margin-bottom: 1.25rem;
    color: #556b2f;
    line-height: 1.5;
}

/* --- STATUS BADGE (EXAM MODE) --- */
.agrigyan-status-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 22px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #fff;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    z-index: 10;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agrigyan-status-badge.correct {
    display: block;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    animation: badgePop 0.4s ease;
}

.agrigyan-status-badge.wrong {
    display: block;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    animation: badgePop 0.4s ease;
}

.agrigyan-status-badge.skipped {
    display: block;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    animation: badgePop 0.4s ease;
}

@keyframes badgePop {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translateX(-50%) scale(1.1);
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* --- OPTIONS --- */
.agrigyan-mcq-options {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.agrigyan-mcq-option {
    padding: 1.15rem;
    border: 2px solid #d9d9d9;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
    color: #333;
    font-size: 1.02em;
    position: relative;
}

.agrigyan-mcq-option:hover:not(.locked) {
    background: #f5f5f5;
    border-color: #8d8741;
    transform: translateX(8px);
    box-shadow: -4px 0 0 #8d8741;
}

.agrigyan-mcq-option.correct {
    border-color: #4caf50 !important;
    background: #e8f5e9 !important;
    font-weight: 600;
    animation: correctPulse 0.6s ease;
}

.agrigyan-mcq-option.wrong {
    border-color: #f44336 !important;
    background: #ffebee !important;
    animation: shake 0.5s ease;
}

@keyframes correctPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(8px);
    }

    75% {
        transform: translateX(-8px);
    }
}

.agrigyan-mcq-card.exam-active .agrigyan-mcq-option.selected {
    border-color: #2196F3 !important;
    background: #E3F2FD !important;
    font-weight: bold;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.agrigyan-mcq-option.locked {
    cursor: not-allowed;
    opacity: 0.88;
}

.agrigyan-mcq-option.locked:not(.correct):not(.wrong):hover {
    background: #fff;
    border-color: #d9d9d9;
    transform: none;
    box-shadow: none;
}

/* --- MATCH LISTS & STATEMENTS --- */
.agrigyan-mcq-match-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    background: #f9f9f9;
    border-radius: 10px;
    border: 2px dashed #d9d9d9;
}

.agrigyan-mcq-match-list strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #556b2f;
    font-size: 1.05em;
}

.agrigyan-mcq-match-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agrigyan-mcq-match-list li {
    padding: 0.75rem;
    border-left: 4px solid #8d8741;
    margin-bottom: 0.65rem;
    background: #fff;
    border-radius: 4px;
    transition: all 0.2s;
}

.agrigyan-mcq-match-list li:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.agrigyan-mcq-statement-block {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 5px solid #8d8741;
}

.agrigyan-mcq-statement-block strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #556b2f;
    font-size: 1.05em;
}

.agrigyan-mcq-statement-block ul {
    list-style: disc;
    padding-left: 1.75rem;
    margin: 0;
}

.agrigyan-mcq-statement-block li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* --- BUTTONS --- */
.agrigyan-mcq-buttons {
    display: flex;
    justify-content: space-around;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.agrigyan-mcq-toggle,
.agrigyan-mcq-report {
    flex: 1;
    padding: 0.85rem;
    font-size: 1.02rem;
    text-align: center;
    border: 2px solid #8d8741;
    border-radius: 10px;
    background: #fff;
    color: #8d8741;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agrigyan-mcq-toggle:hover,
.agrigyan-mcq-report:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(141, 135, 65, 0.2);
}

.agrigyan-mcq-card.exam-active .agrigyan-mcq-buttons,
.agrigyan-mcq-card.exam-active .agrigyan-mcq-vote-bar,
.agrigyan-mcq-card.exam-active .agrigyan-mcq-answer {
    display: none !important;
}

/* --- ANSWER PANEL --- */
.agrigyan-mcq-answer {
    transition: max-height 0.4s ease-out;
    overflow: hidden;
}

.agrigyan-mcq-answer .agrigyan-mcq-answer-content {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    padding: 1.25rem;
    border-radius: 10px;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    color: #333;
    border-left: 5px solid #4caf50;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.1);
}

.agrigyan-mcq-answer .agrigyan-mcq-check {
    color: #4caf50;
    font-size: 1.8rem;
    font-weight: bold;
    min-width: 35px;
    text-shadow: 2px 2px 4px rgba(76, 175, 80, 0.2);
}

.agrigyan-mcq-answer .agrigyan-mcq-explanation {
    color: #555;
    font-size: 1rem;
    display: block;
    line-height: 1.8;
    width: 100%;
}

/* --- EXPLANATION: LISTS & POINTS FORMATTING --- */
.agrigyan-mcq-explanation ul,
.agrigyan-mcq-explanation ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.agrigyan-mcq-explanation ul {
    list-style-type: disc;
}

.agrigyan-mcq-explanation ol {
    list-style-type: decimal;
}

.agrigyan-mcq-explanation li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    padding-left: 0.25rem;
}

.agrigyan-mcq-explanation li::marker {
    color: #4caf50;
    font-weight: bold;
}

/* Nested lists */
.agrigyan-mcq-explanation ul ul,
.agrigyan-mcq-explanation ol ol,
.agrigyan-mcq-explanation ul ol,
.agrigyan-mcq-explanation ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs inside explanation */
.agrigyan-mcq-explanation p {
    margin: 0.5rem 0;
}

/* Bold and emphasis */
.agrigyan-mcq-explanation strong,
.agrigyan-mcq-explanation b {
    color: #2e7d32;
    font-weight: 700;
}

.agrigyan-mcq-explanation em,
.agrigyan-mcq-explanation i {
    font-style: italic;
    color: #556b2f;
}

/* --- KATEX MATH FORMULAS: NOTEBOOK-LIKE STYLING --- */
.agrigyan-mcq-explanation .katex {
    font-size: 1.15em;
    color: #1a237e;
}

.agrigyan-mcq-explanation .katex-display {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: #fff;
    border-left: 4px solid #1565c0;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.1);
}

.agrigyan-mcq-explanation .katex-display>.katex {
    font-size: 1.25em;
}

/* Inline math */
.agrigyan-mcq-explanation .katex:not(.katex-display .katex) {
    padding: 0.1em 0.3em;
    background: rgba(21, 101, 192, 0.08);
    border-radius: 4px;
}

/* Chemistry equations styling (mhchem) */
.agrigyan-mcq-explanation .mhchem {
    font-family: 'Times New Roman', Times, serif;
}

/* --- EXPLANATION: CODE/FORMULA BLOCKS --- */
.agrigyan-mcq-explanation pre,
.agrigyan-mcq-explanation code {
    font-family: 'Courier New', Consolas, monospace;
    background: #f5f5f5;
    border-radius: 4px;
}

.agrigyan-mcq-explanation code {
    padding: 0.15em 0.4em;
    font-size: 0.9em;
    color: #c62828;
}

.agrigyan-mcq-explanation pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 0.75rem 0;
    border-left: 4px solid #8d8741;
}

/* --- EXPLANATION: TABLE STYLING --- */
.agrigyan-mcq-explanation table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.95em;
}

.agrigyan-mcq-explanation th,
.agrigyan-mcq-explanation td {
    border: 1px solid #ddd;
    padding: 0.6rem 0.75rem;
    text-align: left;
}

.agrigyan-mcq-explanation th {
    background: #e8f5e9;
    font-weight: 700;
    color: #2e7d32;
}

.agrigyan-mcq-explanation tr:nth-child(even) {
    background: #f9f9f9;
}

/* --- EXPLANATION: BLOCKQUOTE STYLING --- */
.agrigyan-mcq-explanation blockquote {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: #fff8e1;
    border-left: 4px solid #ff9800;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #795548;
}

/* --- QUESTION ALSO GETS MATH SUPPORT --- */
.agrigyan-mcq-question .katex-display {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

/* --- MATCH BLOCK MATH SUPPORT --- */
.agrigyan-mcq-match-list .katex,
.agrigyan-mcq-statement-block .katex {
    font-size: 1.05em;
}

/* --- VOTE BAR --- */
.agrigyan-mcq-vote-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 0.75rem;
    margin-bottom: 1.25rem;
    border-top: 2px dashed #c0bba0;
    border-bottom: 2px dashed #c0bba0;
    background: rgba(255, 255, 255, 0.5);
}

.agrigyan-mcq-vote-label {
    font-size: 1.05em;
    color: #333;
    font-family: sans-serif;
    font-weight: 600;
}

.agrigyan-mcq-vote-buttons {
    display: flex;
    gap: 12px;
}

.agrigyan-mcq-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.7rem 1.35rem;
    font-size: 1.05rem;
    border: 2px solid #555;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a4a4a 0%, #3c3c3c 100%);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 90px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.agrigyan-mcq-vote:hover:not(.active) {
    background: linear-gradient(135deg, #5a5a5a 0%, #4c4c4c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.agrigyan-mcq-vote .agrigyan-mcq-vote-count {
    font-size: 0.9em;
    opacity: 0.9;
    margin-left: 3px;
}

.agrigyan-mcq-vote.active {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border-color: #4caf50;
    color: #fff;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.agrigyan-mcq-vote[data-vote-type="dislike"].active {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-color: #f44336;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

/* --- STICKY TIMER (EXAM MODE) --- */
#agrigyan-sticky-timer {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    z-index: 99999;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
}

#agrigyan-sticky-timer .timer-icon {
    font-size: 1.2em;
    animation: timerTick 1s infinite;
}

@keyframes timerTick {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

#agrigyan-sticky-timer.warning {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {

    0%,
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
        box-shadow: 0 8px 25px rgba(211, 47, 47, 0.6);
    }

    50% {
        opacity: 0.85;
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 12px 35px rgba(211, 47, 47, 0.8);
    }
}

/* --- SUBMIT QUIZ BUTTON (EXAM MODE) --- */
#agrigyan-submit-quiz {
    display: block;
    width: 90%;
    max-width: 380px;
    margin: 45px auto;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    font-size: 1.25rem;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

#agrigyan-submit-quiz:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.6);
}

/* --- QUIZ LOCKED STATE (BEFORE EXAM START) --- */
body.agrigyan-quiz-locked .agrigyan-mcq-card {
    filter: blur(10px);
    pointer-events: none;
    opacity: 0.4;
    user-select: none;
}

body.agrigyan-quiz-locked .agrigyan-quiz-details-container {
    filter: none;
    opacity: 1;
}

/* --- RESULT & INSTRUCTION MODALS --- */
.agrigyan-result-modal,
.agrigyan-inst-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.93);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.agrigyan-result-content,
.agrigyan-inst-content {
    background: white;
    width: 95%;
    max-width: 560px;
    border-radius: 18px;
    overflow: visible;
    text-align: center;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.7);
    position: relative;
    margin: auto;
    flex-shrink: 0;
    animation: slideUp 0.45s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(60px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- PRE-EXAM CONFIGURATION MODAL --- */
.ag-preexam-config {
    padding: 0 !important;
    text-align: left !important;
    overflow-y: auto;
    max-height: 90vh;
    -webkit-overflow-scrolling: touch;
}

.ag-preexam-config h2 {
    background: linear-gradient(135deg, #1e6e1b 0%, #2e7d32 100%);
    color: #fff;
    margin: 0;
    padding: 22px 28px;
    font-size: 1.4rem;
    border-radius: 18px 18px 0 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ag-preexam-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 20px 24px;
    background: #f1f8e9;
}

.ag-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.ag-info-card:hover {
    transform: translateY(-2px);
}

.ag-info-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.ag-info-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e6e1b;
    line-height: 1;
}

.ag-info-label {
    font-size: 0.78rem;
    color: #666;
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ag-preexam-settings {
    padding: 20px 24px;
    border-top: 2px dashed #d9d9d9;
}

.ag-preexam-settings h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    color: #333;
}

.ag-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.ag-setting-row:last-child {
    border-bottom: none;
}

.ag-setting-row label {
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.ag-setting-input {
    padding: 10px 14px;
    border: 2px solid #d9d9d9;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: #333;
    min-width: 180px;
    transition: border-color 0.2s;
}

.ag-setting-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

input[type="number"].ag-setting-input {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

select.ag-setting-input {
    cursor: pointer;
    appearance: auto;
}

.ag-preexam-instructions {
    padding: 20px 24px;
    border-top: 2px dashed #d9d9d9;
    background: #fffde7;
}

.ag-preexam-instructions h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #333;
}

.ag-preexam-instructions ul {
    margin: 0;
    padding: 0 0 0 1.2rem;
    list-style: none;
}

.ag-preexam-instructions li {
    padding: 6px 0;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
    position: relative;
}

.ag-preexam-config .agrigyan-btn-primary {
    display: block;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    padding: 16px;
    font-size: 1.2rem;
}

/* Mobile: stack info cards */
@media (max-width: 480px) {
    .ag-preexam-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ag-info-card {
        flex-direction: row;
        gap: 12px;
        padding: 12px 16px;
    }

    .ag-info-icon {
        margin-bottom: 0;
    }

    .ag-info-value {
        font-size: 1.4rem;
    }

    .ag-setting-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ag-setting-input {
        width: 100%;
        min-width: 100%;
    }

    input[type="number"].ag-setting-input {
        width: 100%;
        min-width: 100%;
    }
}

/* --- CLEAN RESULT PAGE (No Branding) --- */
.ag-clean-result {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.ag-result-header-clean {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    padding: 30px 20px 40px;
    text-align: center;
    position: relative;
}

.ag-result-header-clean.result-good {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}

.ag-result-header-clean.result-average {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.ag-result-header-clean.result-poor {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.ag-status-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.ag-result-title {
    color: #fff;
    font-size: 1.6rem;
    margin: 0 0 5px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ag-quiz-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* Score Circle - Clean Version */
.ag-score-circle-clean {
    background: #fff;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 20px auto -55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
    animation: scorePopIn 0.5s ease 0.2s both;
}

@keyframes scorePopIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.ag-score-inner {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.ag-score-val-clean {
    font-size: 2rem;
    font-weight: 800;
    color: #333;
    line-height: 1;
}

.ag-score-divider {
    font-size: 1.2rem;
    color: #999;
    margin: 0 2px;
}

.ag-score-total-clean {
    font-size: 1.2rem;
    color: #666;
    font-weight: 600;
}

.ag-score-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Stats Grid */
.ag-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 70px 15px 20px;
    background: #f9f9f9;
}

.ag-stat-item {
    text-align: center;
    padding: 15px 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ag-stat-val {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.ag-stat-item.correct .ag-stat-val {
    color: #4caf50;
}

.ag-stat-item.wrong .ag-stat-val {
    color: #f44336;
}

.ag-stat-item.skipped .ag-stat-val {
    color: #ff9800;
}

.ag-stat-item.neutral .ag-stat-val {
    color: #2196F3;
}

.ag-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
}

/* Result Info Section */
.ag-result-info {
    padding: 15px 20px 20px;
}

.ag-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.ag-info-row:last-child {
    border-bottom: none;
}

.ag-info-row span {
    color: #666;
    font-size: 0.95rem;
}

.ag-info-row strong {
    color: #333;
    font-size: 1rem;
}

/* Review Button */
.ag-review-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 16px;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.35);
}

.ag-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

/* --- INSTRUCTIONS MODAL --- */
.agrigyan-inst-content {
    padding: 40px;
}

.agrigyan-inst-content h2 {
    color: #1e6e1b;
    margin-bottom: 28px;
    font-size: 1.6rem;
}

.agrigyan-inst-list {
    text-align: left;
    margin: 28px 0;
    background: #f9f9f9;
    padding: 22px;
    border-left: 6px solid #4caf50;
    border-radius: 8px;
}

.agrigyan-inst-list ul {
    margin: 0;
    padding-left: 1.5rem;
}

.agrigyan-inst-list li {
    margin-bottom: 14px;
    line-height: 1.7;
    color: #444;
}

/* --- REPORT MODAL --- */
.agrigyan-report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.agrigyan-report-content {
    background: #fff;
    padding: 2.25rem;
    border-radius: 14px;
    width: 92%;
    max-width: 650px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

.agrigyan-report-content h3 {
    margin-top: 0;
    color: #556b2f;
    border-bottom: 3px solid #f0f0f0;
    padding-bottom: 0.85rem;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.agrigyan-report-content input[type="text"],
.agrigyan-report-content input[type="email"],
.agrigyan-report-content textarea {
    width: 100%;
    padding: 0.95rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 0.85rem;
    transition: border-color 0.2s;
}

.agrigyan-report-content input:focus,
.agrigyan-report-content textarea:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.agrigyan-report-content textarea {
    resize: vertical;
    min-height: 100px;
}

.agrigyan-report-reason-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.agrigyan-report-option {
    padding: 0.95rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9f9f9;
    color: #555;
    font-size: 0.98rem;
    font-weight: 600;
}

.agrigyan-report-option:hover {
    background: #e8f5e9;
    border-color: #4caf50;
    transform: translateY(-2px);
}

.agrigyan-report-option.selected {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border-color: #4caf50;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#agrigyan-submit-report,
#agrigyan-cancel-report {
    padding: 0.95rem 2rem;
    font-size: 1.05rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-right: 1.15rem;
    font-weight: bold;
}

#agrigyan-submit-report {
    background: linear-gradient(135deg, #556b2f 0%, #3d4f21 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(85, 107, 47, 0.3);
}

#agrigyan-submit-report:hover {
    background: linear-gradient(135deg, #3d4f21 0%, #2a3617 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(85, 107, 47, 0.4);
}

#agrigyan-cancel-report {
    background: #ddd;
    color: #333;
}

#agrigyan-cancel-report:hover {
    background: #bbb;
}

.agrigyan-mcq-report-message {
    padding: 0.95rem;
    border-radius: 8px;
    margin-bottom: 1.15rem;
    font-weight: bold;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.agrigyan-mcq-report-message.success {
    background-color: #e8f5e9;
    color: #4caf50;
    border: 2px solid #4caf50;
}

.agrigyan-mcq-report-message.error {
    background-color: #ffebee;
    color: #f44336;
    border: 2px solid #f44336;
}

.agrigyan-report-suggest-answer {
    margin-bottom: 1.15rem;
    border-top: 2px dashed #ddd;
    padding-top: 1.15rem;
}

.agrigyan-report-suggest-answer h4 {
    margin-top: 0;
    margin-bottom: 0.95rem;
    color: #556b2f;
}

.agrigyan-report-option-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.agrigyan-report-option-wrap input[type="radio"] {
    margin-right: 0.75rem;
    min-width: 22px;
    min-height: 22px;
    cursor: pointer;
}

.agrigyan-report-option-wrap label {
    flex-grow: 1;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid #eee;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.agrigyan-report-option-wrap label:hover {
    background: #f5f5f5;
}

.agrigyan-report-option-wrap input[type="radio"]:checked+label {
    background: #e0f2e0 !important;
    border-color: #4caf50 !important;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.35);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .agrigyan-mcq-question {
        font-size: 1.15em;
    }

    .agrigyan-mcq-buttons {
        flex-direction: column;
    }

    .agrigyan-mcq-match-block {
        grid-template-columns: 1fr;
    }

    .agrigyan-quiz-start-area {
        flex-direction: column;
    }

    #agrigyan-sticky-timer {
        font-size: 1.15rem;
        padding: 10px 22px;
        top: 15px;
    }

    .agrigyan-result-content,
    .agrigyan-inst-content {
        width: 98%;
        max-height: 95vh;
    }

    /* Result Page Mobile */
    .ag-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 60px 10px 15px;
    }

    .ag-stat-item {
        padding: 12px 6px;
    }

    .ag-stat-val {
        font-size: 1.2rem;
    }

    .ag-stat-label {
        font-size: 0.7rem;
    }

    .ag-score-circle-clean {
        width: 95px;
        height: 95px;
        margin: 15px auto -48px;
    }

    .ag-result-header-clean {
        padding: 25px 15px 35px;
    }

    .ag-result-title {
        font-size: 1.4rem;
    }

    .ag-result-info {
        padding: 12px 15px 15px;
    }

    .ag-info-row {
        padding: 10px 0;
    }

    .ag-review-btn {
        width: calc(100% - 30px);
        margin: 0 15px 15px;
        padding: 14px;
        font-size: 1rem;
    }

    /* Instructions Modal Mobile */
    .agrigyan-inst-content {
        padding: 25px 15px;
    }

    .agrigyan-inst-content h2 {
        font-size: 1.35rem;
        margin-bottom: 20px;
    }

    .agrigyan-inst-list {
        padding: 16px;
        margin: 20px 0;
    }

    .agrigyan-inst-list li {
        font-size: 0.92rem;
        margin-bottom: 12px;
        line-height: 1.6;
    }

    .agrigyan-inst-content .agrigyan-btn-primary {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .agrigyan-report-reason-options {
        grid-template-columns: 1fr;
    }

    .agrigyan-mcq-vote-bar {
        flex-direction: column;
        gap: 12px;
    }

    .agrigyan-mcq-vote-label {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .agrigyan-mcq-card {
        padding: 2rem 1rem 1rem 1rem;
    }

    .agrigyan-quiz-details-table tbody td {
        font-size: 0.9em;
        padding: 10px 15px;
    }

    /* Extra small screens */
    .ag-status-emoji {
        font-size: 2.5rem;
    }

    .ag-score-val-clean {
        font-size: 1.7rem;
    }

    .ag-score-total-clean {
        font-size: 1rem;
    }

    .ag-stats-grid {
        padding: 55px 8px 12px;
    }

    .agrigyan-inst-list ul {
        padding-left: 1rem;
    }
}

/* --- SMOOTH SCROLLBAR --- */
.agrigyan-result-content::-webkit-scrollbar,
.agrigyan-inst-content::-webkit-scrollbar,
.agrigyan-report-content::-webkit-scrollbar {
    width: 8px;
}

.agrigyan-result-content::-webkit-scrollbar-track,
.agrigyan-inst-content::-webkit-scrollbar-track,
.agrigyan-report-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.agrigyan-result-content::-webkit-scrollbar-thumb,
.agrigyan-inst-content::-webkit-scrollbar-thumb,
.agrigyan-report-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.agrigyan-result-content::-webkit-scrollbar-thumb:hover,
.agrigyan-inst-content::-webkit-scrollbar-thumb:hover,
.agrigyan-report-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========================================
   MODAL SMOOTH ANIMATION & CLOSE BUTTON
======================================== */

/* Smooth open animation for modals */
.ag-modal-animate {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ag-modal-animate.ag-modal-visible {
    opacity: 1;
}

.ag-content-animate {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.ag-modal-visible .ag-content-animate {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close (X) button */
.ag-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
}

.ag-modal-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #333;
    transform: rotate(90deg);
}

/* Exam Config heading — modern dark gradient instead of green */
.ag-exam-heading {
    color: #1a1a2e !important;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf4 100%) !important;
    padding: 20px 24px !important;
    margin: -24px -24px 20px -24px !important;
    border-radius: 16px 16px 0 0 !important;
    border-bottom: 2px solid #d0d8e8 !important;
    font-size: 1.35rem !important;
}

/* Ensure inst-content has relative position for close button */
.agrigyan-inst-content {
    position: relative;
}

/* ========================================
   LANGUAGE SELECTION POPUP
======================================== */
.ag-lang-popup-content {
    text-align: center;
    max-width: 480px !important;
    padding: 32px 24px !important;
}

.ag-lang-popup-content h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.ag-lang-popup-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 24px 0;
}

.ag-lang-popup-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ag-lang-popup-btn:hover {
    border-color: #4285f4;
    background: #f0f6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.15);
}

.ag-lang-popup-btn.active {
    border-color: #4285f4;
    background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.25);
    transform: translateY(-2px);
}

.ag-lang-popup-icon {
    font-size: 2rem;
    line-height: 1;
}

.ag-lang-popup-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
}

.ag-lang-popup-desc {
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
}

.ag-lang-popup-btn.active .ag-lang-popup-name {
    color: #1a73e8;
}

/* ========================================
   BILINGUAL VISIBILITY RULES
======================================== */

/* Default: show both languages (stacked) */
body.ag-show-both .ag-lang-hi,
body.ag-show-both .ag-lang-en {
    display: block !important;
}

/* Hindi only */
body.ag-show-hi .ag-lang-en {
    display: none !important;
}

body.ag-show-hi .ag-lang-hi {
    display: block !important;
}

/* English only */
body.ag-show-en .ag-lang-hi {
    display: none !important;
}

body.ag-show-en .ag-lang-en {
    display: block !important;
}

/* "Both" mode: Add visual separator between languages */
body.ag-show-both .agrigyan-mcq-question.ag-lang-en {
    border-top: 1px dashed #ccc;
    padding-top: 8px;
    margin-top: 4px;
    font-size: 1.15em;
    font-style: normal;
    font-weight: 600;
    color: #555;
}

/* "Both" mode: shrink Hindi question since English follows */
body.ag-show-both .agrigyan-mcq-question.ag-lang-hi {
    font-size: 1.15em;
    margin-bottom: 0;
}

/* Options in "Both" mode: show inline, slightly smaller */
body.ag-show-both .agrigyan-mcq-option .ag-lang-hi,
body.ag-show-both .agrigyan-mcq-option .ag-lang-en {
    display: inline !important;
}

body.ag-show-both .agrigyan-mcq-option .ag-lang-en {
    font-size: 1em;
    color: #555;
}

body.ag-show-both .agrigyan-mcq-option .ag-lang-en::before {
    content: " / ";
    color: #bbb;
    font-weight: normal;
}

/* Answer panel: bilingual in "Both" mode */
body.ag-show-both .agrigyan-mcq-answer .ag-lang-en {
    font-size: 1em;
    color: #555;
}

body.ag-show-both .agrigyan-mcq-answer .ag-lang-en::before {
    content: " / ";
    color: #999;
}

/* Explanation stacking in "Both" mode */
body.ag-show-both .agrigyan-mcq-explanation.ag-lang-en {
    display: block !important;
    border-top: 1px dashed #ddd;
    padding-top: 6px;
    margin-top: 6px;
    font-size: 1em;
    font-style: normal;
    color: #555;
}

/* Mobile: Both mode - same size */
@media (max-width: 768px) {
    body.ag-show-both .agrigyan-mcq-question.ag-lang-hi {
        font-size: 1.05em;
    }

    body.ag-show-both .agrigyan-mcq-question.ag-lang-en {
        font-size: 1.05em;
    }

    body.ag-show-both .agrigyan-mcq-option .ag-lang-en {
        font-size: 1em;
    }
}

/* Match/Statement blocks: bilingual spans show inline */
.agrigyan-mcq-match-block .ag-lang-hi,
.agrigyan-mcq-match-block .ag-lang-en,
.agrigyan-mcq-statement-block .ag-lang-hi,
.agrigyan-mcq-statement-block .ag-lang-en {
    display: inline !important;
}

/* "Both" mode: add separator between languages in match/statement items */
body.ag-show-both .agrigyan-mcq-match-block .ag-lang-en::before,
body.ag-show-both .agrigyan-mcq-statement-block .ag-lang-en::before {
    content: " / ";
    color: #999;
    font-weight: normal;
}

/* Single language: hide the other in match/statement blocks too */
body.ag-show-hi .agrigyan-mcq-match-block .ag-lang-en,
body.ag-show-hi .agrigyan-mcq-statement-block .ag-lang-en {
    display: none !important;
}

body.ag-show-en .agrigyan-mcq-match-block .ag-lang-hi,
body.ag-show-en .agrigyan-mcq-statement-block .ag-lang-hi {
    display: none !important;
}

/* Single-language cards: no toggle effects needed */
.agrigyan-mcq-card.lang-hi-only .ag-lang-hi,
.agrigyan-mcq-card.lang-en-only .ag-lang-en {
    display: block !important;
}

/* ========================================
   POPUPS - MOBILE RESPONSIVE
======================================== */
@media (max-width: 600px) {

    /* Base modal: full width on mobile */
    .agrigyan-inst-content {
        width: 98% !important;
        max-width: none !important;
        border-radius: 14px !important;
    }

    /* Close button: larger touch target on mobile */
    .ag-modal-close {
        width: 40px;
        height: 40px;
        top: 8px;
        right: 8px;
        font-size: 1.6rem;
    }

    /* Exam heading: fit within mobile width */
    .ag-exam-heading {
        margin: 0 !important;
        padding: 16px 48px 16px 16px !important;
        border-radius: 14px 14px 0 0 !important;
        font-size: 1.15rem !important;
    }

    /* Exam config h2 (default green heading) */
    .ag-preexam-config h2 {
        padding: 16px 48px 16px 16px;
        font-size: 1.15rem;
        border-radius: 14px 14px 0 0;
    }

    /* Language popup: tighter padding */
    .ag-lang-popup-content {
        padding: 24px 16px !important;
    }

    .ag-lang-popup-content h2 {
        font-size: 1.2rem;
        padding-right: 36px;
    }

    /* Language buttons: smaller on mobile */
    .ag-lang-popup-options {
        gap: 8px;
    }

    .ag-lang-popup-btn {
        padding: 14px 16px;
        min-width: 85px;
        border-radius: 12px;
    }

    .ag-lang-popup-icon {
        font-size: 1.5rem;
    }

    .ag-lang-popup-name {
        font-size: 0.95rem;
    }

    .ag-lang-popup-desc {
        font-size: 0.72rem;
    }

    /* Confirm button: full-width on mobile */
    .ag-lang-popup-content .agrigyan-btn-primary {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
    }

    /* Exam config button: smaller margin */
    .ag-preexam-config .agrigyan-btn-primary {
        width: calc(100% - 32px);
        margin: 0 16px 16px;
        padding: 14px;
        font-size: 1.05rem;
    }

    /* Settings padding tighter */
    .ag-preexam-settings,
    .ag-preexam-instructions {
        padding: 16px;
    }

    .ag-preexam-info-grid {
        padding: 14px 16px;
    }
}

/* Extra small screens (< 360px) */
@media (max-width: 360px) {
    .ag-lang-popup-options {
        flex-direction: column;
        align-items: stretch;
    }

    .ag-lang-popup-btn {
        flex-direction: row;
        gap: 12px;
        min-width: auto;
        padding: 12px 16px;
    }

    .ag-lang-popup-icon {
        font-size: 1.3rem;
    }

    .ag-info-value {
        font-size: 1.2rem;
    }
}