/* 1. Global Reset & Overflow Lock */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
    position: relative;
}

/* FIX: Kill white gap between Nav and Hero */
#nav-placeholder {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 3. Mobile Menu - The "Safe" Version */
#mobileMenu {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: #4b5563;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    pointer-events: none; 
}

/* 5. Helpers */
.logo-wrapper {
    display: flex;
    align-items: center;
    padding-right: 60px;
    position: relative;
}

/* 6. Desktop-Only Hover */
@media (hover: hover) {
    .quiz-opt:hover { transform: translateX(5px); }
}

/* KILL SCROLLING */
body.menu-active {
    overflow: hidden !important;
    touch-action: none !important;
    position: fixed;
    width: 100%;
}

body.menu-active #mobileMenu {
    touch-action: auto !important;
    pointer-events: auto !important;
}

body.menu-active nav {
    pointer-events: auto !important;
}

/* Lock scrolling when quiz is open */
body.quiz-active {
    overflow: hidden !important;
    height: 100vh;
    overscroll-behavior: none; 
}

.relative.flex.flex-col.overflow-x-hidden {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
}

/* --- 9. QUIZ SPINNER & SUCCESS STATES --- */
.quiz-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f97316;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

#quizSuccessMessage i {
    display: block;
    animation: scaleUp 0.5s ease-out forwards;
}

@keyframes scaleUp {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* FIX: Force hidden ONLY inside quiz to protect Desktop Navbar Tabs */
#quizModal .hidden {
    display: none !important;
}