/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/*html, body {*/
/*    width: 100vw;*/
/*    height: 100%;*/
 /*    overflow: auto; Lock to screen */
    /* overscroll-behavior-x: none; Stops the browser from swiping backwards */
/*}*/


html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100dvh !important; /* Dynamic viewport height handles mobile URL bars */
    overflow: hidden !important; /* Absolutely prevents the background/page from scrolling */
    position: fixed; /* Fixes the iOS Safari "rubber-band" bouncing effect */
}


/* Background & Body Flex Layout */
/* body {
    background: url('https://i.ibb.co/FkcSfrGS/bjp-bg.png') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
} */


body {
    background: url('https://i.ibb.co/FkcSfrGS/bjp-bg.png') no-repeat center center/cover;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh; /* Locks the page to exactly the height of the screen */
    overflow: hidden; /* Prevents the whole page from scrolling unexpectedly */
}



/* Static Header */
.app-header {
    width: 100%;
    height: 60px;
    background: #F26522;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
}

.bjp-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.header-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Header Actions & Dropdown */
.header-actions { position: relative; }

.btn-share {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #F26522;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share:hover {
    background: #446D01;
    transform: translateY(-1px);
    color: #fff;
}

.share-dropdown {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    width: 180px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    padding: 10px;
    z-index: 110;
    animation: fadeIn 0.2s ease;
}

.share-dropdown.show { display: block; }
.share-header { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; margin-bottom: 8px; padding-left: 4px; }
.share-options { display: flex; flex-direction: column; gap: 4px; }
.share-opt-btn { width: 100%; padding: 7px 10px; border: none; background: #f8fafc; border-radius: 6px; font-size: 0.8rem; font-weight: 500; color: #1e293b; text-align: left; cursor: pointer; display: flex; gap: 10px; }
.share-opt-btn:hover { background: #f1f5f9; }

/* Toast Notification Container */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 250px;
    max-width: 320px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.toast-error { background: #dc2626; border-left: 4px solid #7f1d1d; }
.toast.toast-success { background: #16a34a; border-left: 4px solid #14532d; }
.toast.toast-info { background: #2563eb; border-left: 4px solid #1e3a8a; }
.toast-close { background: transparent; border: none; color: rgba(255, 255, 255, 0.8); font-size: 1rem; cursor: pointer; }

@keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Centered Viewport Container */
/*.app-viewport {*/
/*    background-image: url('quiz-language.png'); */
    
    /* Ensures the image fills the screen perfectly without squeezing */
/*    background-size: cover !important; */
/*    background-position: center center !important; */
/*    background-repeat: no-repeat !important;*/
    
    /* Keep your other existing properties here (width, height, etc.) */
/*    width: 100%;*/
    /* min-height: 100vh; */
/*    flex: 1;*/
    /* flex-grow: 1; Automatically takes remaining space */
/*    position: relative;*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    padding: 16px;*/
/*    overflow-y: auto;*/
  /*  overflow-x: hidden; /* Prevents the invisible card from triggering a swipeable scrollbar */
/*}*/




.app-viewport {
    width: 100%;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Background settings */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    
    /* Allow scrolling inside the viewport without moving the background */
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
    
    /* Padding to clear your fixed footer */
    padding: 16px 16px 60px 16px; 
}





/* Compact Glass Card */
.quiz-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 440px;
    max-height: 100%;
    overflow-y: auto;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.3);
    position: relative;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.quiz-card::-webkit-scrollbar { width: 6px; }
.quiz-card::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.3); border-radius: 10px; }

.card-title { font-size: 1.15rem; font-weight: 700; color: #0f172a; margin-bottom: 2px; text-align: center; }
.card-subtitle { font-size: 0.75rem; color: #64748b; margin-bottom: 12px; text-align: center; }

/* Form Elements */
.form-group { margin-bottom: 10px; display: flex; flex-direction: column; }
.form-group label { font-size: 0.75rem; font-weight: 600; color: #334155; margin-bottom: 3px; }
.input-prefix-group { display: flex; align-items: center; width: 100%; }
.prefix-addon { background: #e2e8f0; border: 1.5px solid #cbd5e1; border-right: none; border-top-left-radius: 8px; border-bottom-left-radius: 8px; padding: 8px 10px; font-size: 0.85rem; font-weight: 600; color: #475569; }
.form-control { width: 100%; padding: 8px 10px; border: 1.5px solid #cbd5e1; border-radius: 8px; font-size: 0.85rem; color: #0f172a; outline: none; background: #f8fafc; }
.form-control.prefixed-input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-control:focus { border-color: #4f46e5; background: #ffffff; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }
.form-control.is-invalid { border-color: #ef4444; background: #fef2f2; }

.btn-submit {
    width: 100%;
    padding: 9px;
    margin-top: 6px;
    background: linear-gradient(135deg, #ff7e00, #e65100);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.3);
}

.btn-reset {
    background: #000;
    box-shadow: none;
}

/* Quiz UI Components */
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1.5px solid #f1f5f9; }
.question-tracker { font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; }
.header-widgets { display: flex; align-items: center; gap: 10px; }
.points-badge { background: #e0e7ff; color: #3730a3; padding: 3px 8px; border-radius: 12px; font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; gap: 4px; }

.timer-container { position: relative; width: 38px; height: 38px; }
.timer-svg { width: 38px; height: 38px; transform: rotate(-90deg); }
.timer-circle-bg { fill: none; stroke: #e2e8f0; stroke-width: 4; }
.timer-circle-progress { fill: none; stroke: #ff6a00; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 113.09; stroke-dashoffset: 0; }
.timer-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.75rem; font-weight: 700; color: #0f172a; }

.question-box { margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; border: 1px solid transparent; }
.question-box h2 { font-size: 0.95rem; font-weight: 600; color: #1e293b; line-height: 1.4; }
.question-box.correct-fade { background-color: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.4); }
.question-box.correct-fade h2 { color: #15803d; }
.question-box.wrong-fade { background-color: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); }
.question-box.wrong-fade h2 { color: #b91c1c; }

.options-container { display: flex; flex-direction: column; gap: 8px; }
.option-btn { width: 100%; padding: 8px 12px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 8px; text-align: left; font-size: 0.82rem; font-weight: 500; color: #334155; cursor: pointer; display: flex; align-items: center; }
.option-prefix { width: 22px; height: 22px; border-radius: 50%; background: #e2e8f0; color: #475569; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; margin-right: 8px; flex-shrink: 0; }
.option-btn.selected-correct { background: rgba(34, 197, 94, 0.15) !important; border-color: #22c55e !important; color: #15803d !important; }
.option-btn.selected-correct .option-prefix { background: #22c55e !important; color: #ffffff !important; }
.option-btn.selected-wrong { background: rgba(239, 68, 68, 0.15) !important; border-color: #ef4444 !important; color: #b91c1c !important; }
.option-btn.selected-wrong .option-prefix { background: #ef4444 !important; color: #ffffff !important; }
.option-btn.auto-highlight { background: rgba(34, 197, 94, 0.15) !important; border-color: #22c55e !important; color: #15803d !important; }
.option-btn.disabled { cursor: default; pointer-events: none; }

/* Animations */
.slide-out-left { transform: translateX(-100%); opacity: 0; }
.slide-in-right { animation: slideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Results Screen */
.results-card { text-align: center; padding: 8px 0; }
.results-card h2 { font-size: 1.3rem; color: #0f172a; margin-bottom: 4px; }
.results-card p.subtitle { font-size: 0.8rem; color: #64748b; margin-bottom: 14px; }
.score-display-box { background: #fffaf0; border: 2px dashed #e75201; border-radius: 10px; padding: 14px; margin-bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.grade-badge-circle { font-size: 24px; font-weight: 700; color: #d83b00; }
.grade-span { font-size: 24px; }
.grade-A { color: #16a34a; }
.grade-B { color: #2563eb; }
.grade-C { color: #d97706; }
.grade-Pass { color: #475569; }
.final-score-text { font-size: 1.05rem; font-weight: 700; color: #1e293b; }
.button-section { display: flex; justify-content: center; gap: 12px; }
.name { color: #F26522; }
.btn-restart { width: 100%; padding: 9px; background: #045f2a; color: #fff; border: none; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.btn-restart:hover {
    opacity: .9;
}

/* Fixed Footer Layout */
.app-footer {
    width: 100%;
    height: 38px;
    background: #1B7002;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.app-footer span {
    font-weight: 700;
    margin-left: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.form-btn {
    display: flex;
    justify-content: center;
    gap: 15px;
}


/* --- Welcome Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(28, 28, 28, 0.85); /* Dark blur overlay */
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    padding: 15px; /* Creates a nice white frame around the poster */
    border-radius: 12px;
    display: flex;
    flex-direction: column; /* Stacks the image and button vertically */
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 90vh;
}

.popup-poster-img {
    max-width: 100%;
    max-height: 70vh; /* Ensures it doesn't push the button off the screen */
    border-radius: 8px;
    object-fit: contain;
}

.btn-popup-close {
    margin-top: 15px;
    background-color: #1B7002; /* BJP Green */
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    max-width: 250px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-popup-close:hover {
    background-color: #124d01; /* Darker green for hover state */
    transform: translateY(-2px);
}

.btn-popup-close:active {
    transform: translateY(0); /* Satisfying click effect */
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-banner {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.modal-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #F26522; /* BJP Orange */
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
    background: #d4561b;
    transform: scale(1.05);
}


/* --- LANGUAGE SELECTION CARDS --- */
.language-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding-bottom: 20px;
}

.lang-card {
    background: #ffffff;
    border: 2px solid #F26522; /* BJP Saffron */
    border-radius: 12px;
    padding: 30px 20px;
    cursor: pointer;
    width: 140px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.lang-card:hover {
    background: #F26522;
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(242, 101, 34, 0.3);
}

.lang-card h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif;
}

.lang-card p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}


/* --- INSTRUCTIONS VIEW --- */
.instructions-list {
    text-align: left;
    font-size: 15px;
    line-height: 1.6;
    padding-left: 20px;
    /*margin-bottom: 20px;*/
    color: #333;
}

.instructions-list li {
    margin-bottom: 12px;
    font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif;
}



/* --- 1. DEFAULT BACKGROUND (For Desktop & Laptop Screens) --- */
.curtain-overlay {
    /* ... your existing flexbox and layout rules ... */
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden;
    background-color: transparent; 
    z-index: 10000 !important;
    
    /* Loads the wide horizontal image */
    background-image: url('desktop-inauguration-bg.jpg'); 
    background-size: cover !important; 
    background-position: center center !important; 
    background-repeat: no-repeat !important; 
}

/* --- 2. MOBILE & TABLET BACKGROUND (Screens smaller than 992px) --- */
@media screen and (max-width: 992px) {
    .curtain-overlay {
        /* Swaps to the tall vertical image automatically */
        background-image: url('mobile-inauguration-bg.jpg') !important; 
        
        /* Optional: adjust position for mobile if needed, like 'top center' */
        background-position: center center !important; 
    }
}







/* --- ADVANCED REALISTIC CLOTH EFFECT --- */
/* --- BASE CURTAIN SETUP FOR IMAGES --- */
/* --- BASE CURTAIN SETUP FOR IMAGES --- */
.curtain {
    position: absolute; 
    top: 0; 
    width: 50%; 
    height: 100%;
    
    /* THE FIX: 'cover' prevents any squeezing or stretching */
    background-size: cover !important; 
    background-repeat: no-repeat !important;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
    transition: transform 2s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 1;
}

.curtain-left { 
    left: 0; transform-origin: left; 
    background-image: url('curtain-left.png'); 
    background-position: right center !important; 
    /*border-right: 3px solid rgba(0,0,0,0.5); */
}

.curtain-right { 
    right: 0; transform-origin: right; 
    background-image: url('curtain-right.png'); 
    background-position: left center !important; 
    /*border-left: 3px solid rgba(0,0,0,0.5); */
}


/* --- MOBILE & TABLET SETUP (Add this below) --- */
@media screen and (max-width: 992px) {
    .curtain-left {
        background-image: url('curtain-mobile.png') !important;
        
        /* Forces the image to act like it is covering the whole screen */
        background-size: 200% 100% !important; 
        
        /* Shows ONLY the left half of the mobile image */
        background-position: left center !important; 
    }

    .curtain-right {
        background-image: url('curtain-mobile.png') !important;
        
        /* Forces the image to act like it is covering the whole screen */
        background-size: 200% 100% !important; 
        
        /* Shows ONLY the right half of the mobile image */
        background-position: right center !important; 
    }
}



/* --- ANIMATION TRIGGERS (Keep these exactly the same) --- */
.curtain-left.open { transform: translateX(-100%); }
.curtain-right.open { transform: translateX(100%); }

/* --- 3D TACTILE BUZZER BUTTON --- */
.opening-btn {
    position: relative;
    z-index: 2;
    padding: 25px 60px;
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    
    /* Clean, rich Saffron gradient for the top surface */
    background: linear-gradient(to bottom, #ffa343, #f27c00);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    
    /* Creates the 3D depth (dark orange base), drop shadow, and top edge highlight */
    box-shadow: 
        0 12px 0 #b35900, 
        0 20px 25px rgba(0, 0, 0, 0.5), 
        inset 0 3px 0 rgba(255, 255, 255, 0.4);
        
    /* Snappy mechanical transition */
    transition: all 0.1s ease;
}

/* The physical "Press" action */
.opening-btn:active {
    /* Pushes the button down exactly the height of the 3D base */
    transform: translateY(12px); 
    
    /* Shrinks the shadow to complete the illusion of being pressed into the floor */
    box-shadow: 
        0 0 0 #b35900, 
        0 8px 10px rgba(0, 0, 0, 0.5), 
        inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

/* The fade-out sequence when curtains open */
.opening-btn.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.8);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --- 1. TABLET RESPONSIVENESS (Screens smaller than 768px) --- */
@media screen and (max-width: 768px) {
    .opening-btn {
        padding: 18px 45px;          /* Thinner padding */
        font-size: 1.8rem;           /* Smaller font */
        box-shadow:                  /* Shallower 3D depth */
            0 8px 0 #b35900, 
            0 15px 20px rgba(0, 0, 0, 0.5), 
            inset 0 3px 0 rgba(255, 255, 255, 0.4);
    }

    .opening-btn:active {
        transform: translateY(8px);  /* Matches the new 8px shadow */
        box-shadow: 
            0 0 0 #b35900, 
            0 5px 10px rgba(0, 0, 0, 0.5), 
            inset 0 3px 0 rgba(255, 255, 255, 0.4);
    }

    .opening-btn.fade-out {
        transform: translateY(8px) scale(0.8);
    }
}

/* --- 2. MOBILE RESPONSIVENESS (Screens smaller than 480px) --- */
@media screen and (max-width: 480px) {
    .opening-btn {
        padding: 12px 30px;          /* Very tight padding for small phones */
        font-size: 1.2rem;           /* Mobile-friendly font size */
        border-radius: 40px;         /* Slightly rounder for the smaller height */
        letter-spacing: 1px;         
        box-shadow:                  /* Very shallow 3D depth */
            0 6px 0 #b35900, 
            0 10px 15px rgba(0, 0, 0, 0.5), 
            inset 0 2px 0 rgba(255, 255, 255, 0.4);
    }

    .opening-btn:active {
        transform: translateY(6px);  /* Matches the new 6px shadow */
        box-shadow: 
            0 0 0 #b35900, 
            0 4px 8px rgba(0, 0, 0, 0.5), 
            inset 0 2px 0 rgba(255, 255, 255, 0.4);
    }

    .opening-btn.fade-out {
        transform: translateY(6px) scale(0.8);
    }
}



/* Laptop & PC — display normally */
.left-content {
    display: block;
}

.right-content {
    display: block;
}

/* Tablet */
@media (max-width: 1024px) {
    .app-header {
        display: none;
    }
    .left-content {
        display: none;
    }
    .right-content {
        display: none;
    }
    .app-footer {
        display: none;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .left-content {
        display: none;
    }
    .right-content {
        display: none;
    }
}



/* --- 5-SECOND TRANSITION TIMER --- */
.transition-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    z-index: 50; /* Sits above the background, below the card */
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Starts the timer line at the top */
}

.transition-circle-bg {
    fill: rgba(0, 0, 0, 0.5); /* Semi-transparent dark circle */
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 6;
}

.transition-circle-progress {
    fill: none;
    stroke: #ff9933; /* Saffron progress line */
    stroke-width: 6;
    stroke-linecap: round;
    /* Circumference = 2 * PI * 45 */
    stroke-dasharray: 282.74; 
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.transition-text {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    z-index: 2;
    text-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

/* --- ENSURE EXACT MOBILE CENTERING --- */
@media screen and (max-width: 992px) {
    .quiz-card {
        margin: 0 !important; /* Strips any old margins to guarantee flexbox centering */
    }
}


/* --- FLOATING MUSIC CONTROL --- */
/* --- FLOATING MUSIC CONTROL --- */
.music-toggle-btn {
    position: fixed;
    bottom: 60px; 
    right: 20px;
    width: 45px;
    height: 45px;
    background: #F26522; 
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background 0.2s ease;
    
    /* THE FIX: Guaranteed to stay hidden until JS shows it, and impossible to block */
    display: none; 
    z-index: 100000 !important; 
    pointer-events: auto !important; 
}
/* ... keep the hover and SVG size CSS below this as they were ... */

.music-toggle-btn:hover {
    transform: scale(1.1);
    background: #d4561b; /* Darker saffron on hover */
}

.music-toggle-btn svg {
    width: 24px;
    height: 24px;
}

/* Adjust position slightly for mobile */
@media screen and (max-width: 992px) {
    .music-toggle-btn {
        bottom: 75px; 
        right: 15px;
        width: 40px;
        height: 40px;
    }
    .music-toggle-btn svg {
        width: 20px;
        height: 20px;
    }
}


/* --- PREVENT MOBILE BROWSER ZOOM ON INPUT FOCUS --- */
@media screen and (max-width: 992px) {
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea,
    .form-control {
        font-size: 16px !important; /* 16px is the magic number to stop auto-zoom */
    }
}