body{
    font-family: 'Anek Gujarati', sans-serif;
    background: #eef2f7;
    margin: 0;
    padding: 0;
}

/* Force Gujarati Font On Questions */
.question-box,
.question-box * {
    font-family: 'Anek Gujarati', sans-serif;
}

.container {
    max-width: 950px;
    margin: 0 auto;
    padding: 20px 20px 90px 20px; /* bottom space for sticky submit */
}

/* ================= HEADER (Sticky Top) ================= */

.test-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #f4f6f9;
    padding: 15px 20px;

    border-bottom: 3px solid #1e3a5f;
}

.test-header h2 {
    color: #1e3a5f;
    font-size: 26px;
    letter-spacing: 1px;
    margin: 0;
}

/* ================= TIMER ================= */

.top-timer-bar {
    background: linear-gradient(135deg, #ff7a18, #ff3d00);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

/* ================= QUESTION AREA ================= */

#quiz {
    padding-top: 20px;
    padding-bottom: 100px; /* space for sticky submit */
}

/* QUESTION CARD */
.question-box {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.question-box:hover {
    transform: translateY(-3px);
}

.question-box h4 {
    margin-bottom: 15px;
    font-size: 17px;
    color: #1e3a5f;
}

/* ================= OPTIONS ================= */

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 25px;
}

.option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f4f6fb;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
    border: 2px solid transparent;
}

.option:hover {
    background: #e3ebf7;
}

.option input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #1e3a5f;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    top: -3px;              /* ✅ Alignment Fix */
    flex-shrink: 0;        /* ✅ Prevent resize */
}

.option input[type="radio"]:checked {
    background-color: #1e3a5f;
}

.option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
}

/* ================= SUBMIT (Sticky Bottom) ================= */

.submit-box {
    position: sticky;
    bottom: 0;
    width: 100%;
    background: #ffffff;
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #ddd;
    z-index: 999;
}

button {
    background: linear-gradient(135deg, #1e3a5f, #274b7a);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #274b7a, #1e3a5f);
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .options-grid {
        grid-template-columns: 1fr;
    }

    .test-header {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    button {
        width: 100%;
    }

    .top-timer-bar {
        font-size: 13px;
    }
}

/* =========================
   PROFESSIONAL RESULT MODAL
========================= */

#resultModal {
    backdrop-filter: blur(4px);
}

#resultModal > div {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 14px;
    width: 380px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    animation: modalFadeIn 0.3s ease;
}

#resultModal h2 {
    margin-bottom: 18px;
    font-size: 22px;
    color: #1e3a5f;
    letter-spacing: 0.5px;
}

#resultModal p {
    margin: 8px 0;
    font-size: 15px;
    color: #333;
}

#resultModal strong {
    color: #1e3a5f;
}

/* Grade Highlight */
#resultModal p:last-of-type {
    margin-top: 15px;
    font-weight: 600;
    font-size: 16px;
}

/* Result Button */
#resultModal button {
    margin-top: 20px;
    padding: 10px 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e3a5f, #274b7a);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Smooth Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   PROFESSIONAL RESULT MODAL
============================ */

.result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.result-card {
    background: #ffffff;
    width: 380px;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    text-align: center;
    position: relative;
    animation: slideUp 0.4s ease;
}

/* Header */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-header h2 {
    margin: 0;
    color: #1e3a5f;
}

.result-header span {
    cursor: pointer;
    font-size: 18px;
}

/* Circle */
.progress-circle {
    position: relative;
    margin: 20px auto;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle circle {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
}

.progress-circle .bg {
    stroke: #e6eaf2;
}

.progress-circle .progress {
    stroke: #1e3a5f;
    stroke-dasharray: 410;
    transition: stroke-dashoffset 1s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Status Colors */
.result-card.pass .progress { stroke: #28a745; }
.result-card.average .progress { stroke: #ff9800; }
.result-card.fail .progress { stroke: #e53935; }

/* Details */
.result-details p {
    margin: 6px 0;
    font-size: 15px;
}

/* Button */
.result-card button {
    margin-top: 18px;
    background: linear-gradient(135deg, #ff7a18, #ff3d00);
    padding: 10px 25px;
    border-radius: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ==============================
   CUSTOM CONFIRM MODAL
============================== */

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.25s ease;
}

.confirm-box {
    background: #ffffff;
    width: 400px;
    max-width: 90%;
    padding: 30px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

.confirm-box h3 {
    margin-bottom: 15px;
    color: #1e3a5f;
}

.confirm-box p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.confirm-btn {
    background: linear-gradient(135deg, #ff7a18, #ff3d00);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.confirm-btn:hover {
    transform: translateY(-2px);
}

.cancel-btn {
    background: linear-gradient(135deg, #1e3a5f, #274b7a);
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.cancel-btn:hover {
    background: translateY(-2px);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
