/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BrainBuzz Quiz â€” Main Stylesheet
   Dark gradient + glassmorphism + neon accents
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ CSS Variables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 20px;

    --accent-primary: #6c63ff;
    --accent-secondary: #00d4ff;
    --accent-gradient: linear-gradient(135deg, #6c63ff, #00d4ff);
    --accent-glow: 0 0 20px rgba(108, 99, 255, .35);

    --success: #00e676;
    --success-glow: 0 0 24px rgba(0, 230, 118, .4);
    --error: #ff5252;
    --error-glow: 0 0 24px rgba(255, 82, 82, .4);
    --warning: #ffab40;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: .3s cubic-bezier(.4, 0, .2, 1);
}

/* ─── Reset & Base ───────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, .08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, .06) 0%, transparent 50%);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.main-content {
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-primary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ─── Glass Card ────────────────────────────────── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}

/* ─── Navbar ────────────────────────────────────── */
.glass-nav {
    background: rgba(10, 10, 26, .75) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition);
    padding: .75rem 0;
}

.brand-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand img {
    width: auto;
    max-width: 250px;
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: .5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: .95rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, .06);
}

.navbar-nav .nav-link i {
    margin-right: 4px;
    font-size: .9em;
}

/* ─── Hero Section (Home) ────────────────────────── */
.hero-section {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 99, 255, .15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: heroPulse 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, .1) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: heroPulse 10s ease-in-out infinite reverse;
}

@keyframes heroPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: .6;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.hero-card {
    max-width: 640px;
    padding: 3rem 2.5rem;
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: floatX 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin-bottom: .75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* ─── Buttons ────────────────────────────────────── */
.btn-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: #fff;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--accent-glow);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, .15) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform .6s ease;
}

.btn-glow:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 36px rgba(108, 99, 255, .5);
    color: #fff;
}

.btn-glow:hover::after {
    transform: translateX(100%);
}

.btn-glow:active {
    transform: translateY(0) scale(.98);
}

.btn-outline-glass {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-outline-glass:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .15);
}

/* ─── Quiz Page ──────────────────────────────────── */
.quiz-section {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
}

.quiz-container {
    width: 100%;
    max-width: 720px;
}

/* Progress Bar */
.quiz-progress {
    margin-bottom: 1.5rem;
}

.quiz-progress .progress {
    height: 6px;
    background: rgba(255, 255, 255, .06);
    border-radius: 50px;
    overflow: hidden;
}

.quiz-progress .progress-bar {
    background: var(--accent-gradient);
    border-radius: 50px;
    transition: width .5s ease;
}

.quiz-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: .5rem;
}

/* Question Card */
.question-card {
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1.5rem;
}

/* Skip / Next buttons inside header */
.quiz-controls-header {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
}

.btn-skip-header {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .18);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all .2s ease;
    white-space: nowrap;
    font-family: var(--font-body);
}

.btn-skip-header:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-next-header {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all .2s ease;
    white-space: nowrap;
    font-family: var(--font-body);
    box-shadow: 0 4px 12px rgba(108, 99, 255, .35);
}

.btn-next-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(108, 99, 255, .5);
}

.question-number {
    font-family: var(--font-heading);
    font-size: .9rem;
    font-weight: 600;
    color: var(--accent-secondary);
    background: rgba(0, 212, 255, .1);
    padding: 4px 14px;
    border-radius: var(--radius-xl);
}

.question-text {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Timer Ring */
.timer-ring-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.timer-ring {
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, .06);
    stroke-width: 4;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--accent-secondary);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset .3s linear, stroke .3s ease;
}

.timer-ring-progress.warning {
    stroke: var(--warning);
}

.timer-ring-progress.danger {
    stroke: var(--error);
}

.timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition);
}

.option-btn:hover:not(.disabled) {
    border-color: var(--accent-primary);
    background: rgba(108, 99, 255, .08);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(108, 99, 255, .15);
}

.option-btn .option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
    transition: all var(--transition);
    position: relative;
    z-index: 1;
}

.option-btn .option-text {
    position: relative;
    z-index: 1;
}

/* Option states */
.option-btn.selected {
    border-color: var(--accent-primary);
    background: rgba(108, 99, 255, .12);
}

.option-btn.selected .option-label {
    background: var(--accent-primary);
    color: #fff;
}

.option-btn.correct {
    border-color: var(--success) !important;
    background: rgba(0, 230, 118, .1) !important;
    animation: correctPulse .6s ease;
}

.option-btn.correct .option-label {
    background: var(--success) !important;
    color: #fff;
}

.option-btn.wrong {
    border-color: var(--error) !important;
    background: rgba(255, 82, 82, .1) !important;
    animation: wrongShake .5s ease;
}

.option-btn.wrong .option-label {
    background: var(--error) !important;
    color: #fff;
}

.option-btn.disabled {
    pointer-events: none;
    opacity: .7;
}

@keyframes correctPulse {
    0% {
        box-shadow: none;
    }

    50% {
        box-shadow: var(--success-glow);
    }

    100% {
        box-shadow: 0 0 12px rgba(0, 230, 118, .15);
    }
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-6px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(6px);
    }
}

/* Quiz Controls */
.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 12px;
}

/* â”€â”€â”€ Video Overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.video-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all .4s ease;
}

.video-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-overlay video {
    max-width: 90%;
    max-height: 70vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 60px rgba(108, 99, 255, .3);
}

/* â”€â”€â”€ Confetti Canvas â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
}

/* â”€â”€â”€ Result Page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.result-section {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.result-card {
    text-align: center;
    max-width: 520px;
    padding: 3rem 2.5rem;
}

.result-icon {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    animation: floatX 4s ease-in-out infinite;
}

.result-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-bottom: .5rem;
}

.score-ring-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 2rem auto;
}

.score-ring {
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, .06);
    stroke-width: 8;
}

.score-ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease, stroke 1s ease;
}

.score-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.result-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-stat {
    text-align: center;
}

.result-stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.result-stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* â”€â”€â”€ Page Section (About, Contact, etc.) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-section {
    padding: 3rem 1rem;
    min-height: calc(100vh - 72px);
}

.page-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
}

.page-heading {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-body {
    color: var(--text-secondary);
    line-height: 1.8;
}

.page-body h2,
.page-body h3 {
    color: var(--text-primary);
    margin: 1.8rem 0 .8rem;
}

.page-body h2 {
    font-size: 1.4rem;
}

.page-body h3 {
    font-size: 1.15rem;
}

.page-body p {
    margin-bottom: 1rem;
}

.page-body ul,
.page-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.page-body li {
    margin-bottom: .4rem;
}

.page-body a {
    color: var(--accent-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-body a:hover {
    color: var(--accent-primary);
}

.page-body strong {
    color: var(--text-primary);
}

/* â”€â”€â”€ Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.site-footer {
    background: rgba(0, 0, 0, .3);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 1.5rem;
    margin-top: 1rem;
}

.footer-heading {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-text {
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: .5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: .9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent-secondary);
}

.footer-hr {
    border-color: var(--glass-border);
    margin: 2rem 0 1rem;
}

.footer-copy {
    text-align: center;
    font-size: .8rem;
    color: var(--text-muted);
}

/* â”€â”€â”€ Animations â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.animate-fadeIn {
    animation: fadeIn .6s ease forwards;
}

.animate-slideUp {
    animation: slideUp .6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Question transition */
.question-enter {
    animation: questionEnter .4s ease forwards;
}

@keyframes questionEnter {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* â”€â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        padding: 2rem 1.5rem;
    }

    .question-card {
        padding: 1.5rem 1.25rem;
    }

    .page-card {
        padding: 2rem 1.5rem;
    }

    .result-card {
        padding: 2rem 1.5rem;
    }

    .result-stats {
        gap: 1.2rem;
    }

    .quiz-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .option-btn {
        padding: 12px 14px;
        gap: 10px;
        font-size: .95rem;
    }

    .option-btn .option-label {
        width: 32px;
        height: 32px;
        font-size: .8rem;
    }
}

/* â”€â”€â”€ Utility â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hidden {
    display: none !important;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-success {
    box-shadow: var(--success-glow);
}

.glow-error {
    box-shadow: var(--error-glow);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   HOME PAGE â€” Redesign
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Compact Hero â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.home-hero {
    padding: 2rem 0 1rem;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 10% 50%, rgba(108, 99, 255, .12) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 30%, rgba(0, 212, 255, .08) 0%, transparent 50%);
    pointer-events: none;
}

.home-hero-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.home-hero-icon {
    font-size: 2.5rem;
    animation: floatX 4s ease-in-out infinite;
    flex-shrink: 0;
}

.home-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.2;
}

.home-hero-sub {
    color: var(--text-secondary);
    font-size: .9rem;
    margin: .3rem 0 0;
}

/* â”€â”€â”€ Category Tabs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.category-tabs-section {
    padding: 1rem 0 0;
    position: sticky;
    top: 65px;
    z-index: 90;
    background: rgba(10, 10, 26, .95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.category-tabs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .75rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .4rem 1rem;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, .1);
    background: transparent;
    color: var(--text-secondary);
    font-size: .88rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all .25s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.cat-tab:hover {
    border-color: var(--tab-color, #6c63ff);
    color: var(--tab-color, #6c63ff);
    background: color-mix(in srgb, var(--tab-color, #6c63ff) 10%, transparent);
}

.cat-tab.active {
    border-color: var(--tab-color, #6c63ff);
    background: color-mix(in srgb, var(--tab-color, #6c63ff) 18%, transparent);
    color: var(--tab-color, #6c63ff);
    font-weight: 600;
}

.cat-tab-icon {
    font-size: 1rem;
}

.cat-tab-name {}

/* â”€â”€â”€ Questions Feed â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.questions-feed-section {
    padding: 1.5rem 0 0;
}

.feed-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    color: var(--text-secondary);
    gap: .5rem;
}

.btn-glow-sm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: .35rem 1rem;
    border-radius: 50px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
    box-shadow: 0 2px 12px rgba(108, 99, 255, .35);
}

.btn-glow-sm:hover {
    opacity: .9;
    transform: translateY(-1px);
    color: #fff;
}

/* Question Cards Grid */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

/* Individual Question Card */
.q-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.q-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
    border-color: rgba(255, 255, 255, .15);
}

/* Category badge */
.q-card-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--cat-color, #6c63ff);
    background: color-mix(in srgb, var(--cat-color, #6c63ff) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--cat-color, #6c63ff) 30%, transparent);
    padding: .25rem .7rem;
    border-radius: 50px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Question title */
.q-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Options preview */
.q-card-options {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.q-card-opt {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: var(--text-secondary);
}

.opt-label {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .7rem;
    flex-shrink: 0;
    color: var(--text-muted);
}

.opt-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Card footer */
.q-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid var(--glass-border);
}

/*
 * Homepage card — 728x90 ad banner, scaled down to fit in 42px height
 * Scale = 42 / 90 ≈ 0.467 → full ad visible, nothing cropped
 */
.q-ad-banner-728x90 {
    flex: 1;
    min-width: 0;
    height: 42px;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.q-ad-banner-728x90 iframe {
    width: 728px !important;
    height: 90px !important;
    transform: scale(0.467);
    transform-origin: center center;
    border: 0 !important;
    display: block !important;
    flex-shrink: 0;
}

.q-ad-banner-728x90 img,
.q-ad-banner-728x90 svg {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

.q-ad-banner-728x90 .ad-placeholder-728x90 {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}


.q-card-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .4rem 1.1rem;
    border-radius: 50px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
}

.q-card-play-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    color: #fff;
}

.q-card-play-btn i {
    font-size: 1rem;
}

.q-card-meta {
    font-size: .75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pagination */
.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
}

.page-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: .85rem;
    transition: all .2s ease;
}

.page-btn:hover,
.page-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}

/* Empty state */
.empty-state {
    max-width: 400px;
    margin: 2rem auto;
}

/* â”€â”€â”€ Quiz Category Banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.quiz-cat-banner {
    background: rgba(255, 255, 255, .03);
    border-bottom: 1px solid var(--glass-border);
    padding: .75rem 0;
}

.quiz-cat-banner-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quiz-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.quiz-cat-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

.quiz-cat-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quiz-cat-back {
    margin-left: auto;
    font-size: .85rem;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: .35rem .85rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    transition: all .25s ease;
}

.quiz-cat-back:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, .2);
}

/* Quiz loader */
.quiz-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.loader-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(108, 99, 255, .2);
    border-top-color: #6c63ff;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ENHANCED ANSWER ANIMATIONS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Correct Answer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.option-btn.correct {
    background: rgba(0, 230, 118, .12) !important;
    border-color: #00e676 !important;
    color: #00e676 !important;
    animation: correctPulse .6s ease forwards;
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
        box-shadow: none;
    }

    30% {
        transform: scale(1.04);
        box-shadow: 0 0 0 6px rgba(0, 230, 118, .25);
    }

    60% {
        transform: scale(.98);
        box-shadow: 0 0 0 12px rgba(0, 230, 118, .1);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 230, 118, .3);
    }
}

/* â”€â”€â”€ Wrong Answer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.option-btn.wrong {
    background: rgba(255, 82, 82, .12) !important;
    border-color: #ff5252 !important;
    color: #ff5252 !important;
    animation: wrongShake .5s ease forwards;
}

@keyframes wrongShake {
    0% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-8px) rotate(-1deg);
    }

    30% {
        transform: translateX(8px) rotate(1deg);
    }

    45% {
        transform: translateX(-6px) rotate(-.5deg);
    }

    60% {
        transform: translateX(6px) rotate(.5deg);
    }

    75% {
        transform: translateX(-3px);
    }

    90% {
        transform: translateX(3px);
    }

    100% {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(255, 82, 82, .25);
    }
}

/* â”€â”€â”€ Answer Overlay (big feedback) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.answer-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}

.answer-overlay.show {
    opacity: 1;
}

.answer-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.answer-icon {
    font-size: 6rem;
    line-height: 1;
    filter: drop-shadow(0 0 30px currentColor);
}

.answer-icon.correct-icon {
    color: #00e676;
    animation: iconBounce .5s cubic-bezier(.17, .67, .35, 1.3);
}

.answer-icon.wrong-icon {
    color: #ff5252;
    animation: iconPop .4s ease;
}

@keyframes iconBounce {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.3) rotate(5deg);
        opacity: 1;
    }

    80% {
        transform: scale(.9);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

@keyframes iconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

.answer-message {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .5);
}

/* Screen flash for correct */
@keyframes flashGreen {

    0%,
    100% {
        background: transparent;
    }

    30% {
        background: rgba(0, 230, 118, .06);
    }
}

@keyframes flashRed {

    0%,
    100% {
        background: transparent;
    }

    30% {
        background: rgba(255, 82, 82, .06);
    }
}

.flash-correct {
    animation: flashGreen .5s ease;
}

.flash-wrong {
    animation: flashRed .5s ease;
}

/* â”€â”€â”€ Responsive for new sections â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
    .questions-grid {
        grid-template-columns: 1fr;
    }

    .home-hero-inner {
        flex-direction: row;
        gap: .75rem;
    }

    .category-tabs-section {
        top: 56px;
    }

    .quiz-cat-banner-inner {
        gap: .75rem;
    }

    /* Ensure category tabs scroll seamlessly on mobile */
    .category-tabs {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        gap: 0.4rem;
    }

    .cat-tab {
        padding: 0.35rem 0.85rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .home-hero-title {
        font-size: 1.3rem;
    }

    .q-card {
        padding: 1rem;
    }

    .opt-text {
        max-width: 140px;
    }
}

/* ---------------------------------------------------
   INTERACTIVE HOMEPAGE QUIZ — scroll-based
   --------------------------------------------------- */

/* --- Feed Meta Bar -------------------------------- */
.feed-meta-bar {
    padding: .6rem 0;
    background: rgba(10, 10, 26, .7);
    border-bottom: 1px solid var(--glass-border);
}

.feed-meta-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.feed-cat-badge {
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.feed-progress {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 200px;
}

.feed-progress-track {
    flex: 1;
    height: 7px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50px;
    overflow: hidden;
}

.feed-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c63ff, #00d4ff);
    border-radius: 50px;
    transition: width .55s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.feed-progress-text {
    font-size: .78rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

/* --- Card Head ------------------------------------ */
.q-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 0.4rem;
}

.q-head-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

/* 300x250 Ad Container in Card Header (Compact 72x60px) */
.q-ad-banner-300x250 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 60px;
    aspect-ratio: 300 / 250;
    overflow: hidden;
    border-radius: 5px;
    position: relative;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all .3s ease;
    flex-shrink: 0;
}

.q-ad-banner-300x250 img,
.q-ad-banner-300x250 svg,
.q-ad-banner-300x250 a,
.q-ad-banner-300x250>div {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 4px;
}

.q-ad-banner-300x250 iframe {
    width: 300px !important;
    height: 250px !important;
    transform: scale(0.24);
    transform-origin: center center;
    border: 0 !important;
    display: block !important;
}

.ad-placeholder-300x250 {
    width: 100%;
    height: 100%;
    background: #0070f3;
    color: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

/* --- Skip Button ---------------------------------- */
.q-skip-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .8rem;
    padding: .2rem 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, color .2s;
    font-family: var(--font-body);
    cursor: default;
}

.q-card--active .q-skip-btn {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.q-skip-btn:hover {
    color: var(--text-secondary);
}

.q-card--solved .q-skip-btn {
    display: none !important;
}

/* --- Card Footer: Ad Banner Full Width --- */
.q-card-footer {
    margin-top: 1.5rem;
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

/* ─── Quiz Footer Ad Banner — Compact Scaled Box ─── */

/* Desktop wrapper: compact container, transparent */
.q-ad-banner-desktop {
    width: 100%;
    height: 42px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile wrapper: same but 36px tall */
.q-ad-banner-mobile {
    width: 100%;
    height: 36px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*
 * Scale the iframe so the full 728x90 ad fits inside the 42px container.
 * Scale = 42 / 90 ≈ 0.467
 * The iframe is set to its natural 728x90 size,
 * then shrunk uniformly — all text/content stays visible, nothing cropped.
 */
.q-ad-banner-desktop iframe {
    width: 728px !important;
    height: 90px !important;
    transform: scale(0.467);
    transform-origin: center center;
    border: 0 !important;
    display: block !important;
    flex-shrink: 0;
}

/* Mobile: 320x50 scaled to fit 36px height → scale = 36/50 = 0.72 */
.q-ad-banner-mobile iframe {
    width: 320px !important;
    height: 50px !important;
    transform: scale(0.72);
    transform-origin: center center;
    border: 0 !important;
    display: block !important;
    flex-shrink: 0;
}

.q-ad-banner-desktop img,
.q-ad-banner-mobile img,
.q-ad-banner-desktop svg,
.q-ad-banner-mobile svg {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Placeholder — dark theme, dashed border */
.ad-placeholder-728x90 {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ad-placeholder-mobile {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}




/* --- Counter -------------------------------------- */
.q-counter {
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    margin-top: 6px;
}

/* --- Timer Ring ----------------------------------- */
.q-timer-ring {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(.75);
    transition: opacity .35s ease, transform .35s ease;
}

.q-card--active .q-timer-ring {
    opacity: 1;
    transform: scale(1);
}

.q-timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, .08);
    stroke-width: 3.5;
}

.q-timer-arc {
    fill: none;
    stroke: #00e676;
    stroke-width: 3.5;
    stroke-linecap: round;
    transition: stroke .5s ease;
}

.q-timer-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    color: #fff;
    pointer-events: none;
}

/* --- Options 2x2 Grid ----------------------------- */
.q-opts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
}

.opt-btn {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .65rem;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: var(--text-secondary);
    font-size: .82rem;
    text-align: left;
    width: 100%;
    line-height: 1.35;
    transition: all .2s ease;
    cursor: default;
    pointer-events: none;
    font-family: var(--font-body);
}

.q-card--active .opt-btn {
    cursor: pointer;
    pointer-events: auto;
}

.q-card--active .opt-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(108, 99, 255, .18);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, .2);
}

.opt-lbl {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .09);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .7rem;
    flex-shrink: 0;
    color: #fff;
    transition: background .2s;
}

.opt-txt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Correct answer */
.opt-btn.opt--correct {
    border-color: #00e676 !important;
    background: rgba(0, 230, 118, .15) !important;
    color: #00e676 !important;
    pointer-events: none;
    animation: pulseCorrect .55s ease;
}

.opt-btn.opt--correct .opt-lbl {
    background: #00e676;
    color: #000;
}

/* Wrong answer */
.opt-btn.opt--wrong {
    border-color: #ff5252 !important;
    background: rgba(255, 82, 82, .15) !important;
    color: #ff5252 !important;
    pointer-events: none;
    animation: shakeOpt .45s ease;
}

.opt-btn.opt--wrong .opt-lbl {
    background: #ff5252;
    color: #fff;
}

@keyframes pulseCorrect {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 230, 118, .55);
    }

    60% {
        box-shadow: 0 0 0 12px rgba(0, 230, 118, 0);
    }

    100% {
        box-shadow: none;
    }
}

@keyframes shakeOpt {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}



/* --- Mobile: 320x50 ad, full width --- */
@media (max-width: 768px) {
    .q-card-head {
        gap: .25rem;
    }

    .q-counter {
        font-size: .65rem;
    }

    .q-skip-btn {
        font-size: .72rem;
        padding: .15rem .5rem;
    }

    .q-ad-banner-300x250 {
        width: 66px;
        height: 55px;
    }

    /* Mobile: show mobile banner, hide desktop banner */
    .q-ad-banner-desktop {
        display: none !important;
    }

    .q-ad-banner-mobile {
        display: block !important;
        width: 100% !important;
        height: 50px !important;
    }

    .q-ad-banner-mobile iframe {
        width: 100% !important;
        height: 50px !important;
        border: 0 !important;
        display: block !important;
    }

    .ad-placeholder-mobile {
        height: 50px;
        font-size: 0.75rem;
    }

    /* Smaller skip/next in header on very small screens */
    .btn-skip-header,
    .btn-next-header {
        padding: 4px 10px;
        font-size: .72rem;
    }
}

/* --- Active Card ---------------------------------- */
.q-card--active {
    border-color: rgba(108, 99, 255, .6) !important;
    box-shadow:
        0 0 0 1px rgba(108, 99, 255, .35),
        0 10px 36px rgba(108, 99, 255, .18),
        0 0 50px rgba(108, 99, 255, .07) !important;
}

/* --- Solved Card ---------------------------------- */
.q-card--solved {
    border-color: rgba(0, 230, 118, .25) !important;
    opacity: .85;
}

.q-card--solved .q-skip-btn {
    display: none;
}

.q-card--solved .q-timer-ring {
    opacity: 0 !important;
    transform: scale(.75) !important;
}

.q-card--solved .opt-btn:not(.opt--correct):not(.opt--wrong) {
    opacity: .5;
}

/* Card flash animations */
.q-card--correct-flash {
    animation: cardFlashGreen .6s ease;
}

.q-card--wrong-flash {
    animation: cardFlashRed .5s ease;
}

@keyframes cardFlashGreen {

    0%,
    100% {
        background: var(--bg-card);
    }

    40% {
        background: rgba(0, 230, 118, .07);
    }
}

@keyframes cardFlashRed {

    0%,
    100% {
        background: var(--bg-card);
    }

    40% {
        background: rgba(255, 82, 82, .07);
    }
}

/* --- Winner Overlay ------------------------------- */
.winner-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 5, 18, .88);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    display: none;
}

.winner-overlay.show {
    display: flex;
    animation: fadeIn .4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.winner-popup {
    position: relative;
    background: linear-gradient(135deg, rgba(22, 22, 50, .97), rgba(10, 10, 26, .99));
    border: 1px solid rgba(108, 99, 255, .45);
    border-radius: 24px;
    padding: 3rem 2.5rem 2.5rem;
    text-align: center;
    max-width: 440px;
    width: 90vw;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, .65),
        0 0 80px rgba(108, 99, 255, .18);
    animation: popupBounce .65s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes popupBounce {
    from {
        opacity: 0;
        transform: translateY(60px) scale(.88);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.winner-trophy {
    font-size: 5rem;
    display: block;
    margin-bottom: 1rem;
    animation: floatX 4s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(255, 171, 0, .45));
}

.winner-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #a5a2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 .4rem;
}

.winner-sub {
    color: var(--text-secondary);
    font-size: .95rem;
    margin-bottom: 1.5rem;
}

.winner-score-box {
    display: inline-flex;
    align-items: baseline;
    gap: .2rem;
    margin-bottom: .3rem;
}

.winner-score-num {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: #00e676;
    line-height: 1;
    text-shadow: 0 0 30px rgba(0, 230, 118, .45);
}

.winner-score-denom {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.winner-score-label {
    color: var(--text-muted);
    font-size: .82rem;
    margin: 0 0 2rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.winner-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: linear-gradient(45deg, #6c63ff, #00d4ff);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(108, 99, 255, .45);
}

.winner-play-btn:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 14px 32px rgba(108, 99, 255, .65);
    color: #fff;
}

/* --- Confetti ------------------------------------- */
.confetti-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: 24px;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(520px) rotate(720deg);
        opacity: 0;
    }
}

/* --- Responsive ----------------------------------- */
@media (max-width: 768px) {
    .q-opts-grid {
        grid-template-columns: 1fr;
    }

    .feed-meta-inner {
        gap: .75rem;
    }

    .winner-popup {
        padding: 2rem 1.5rem;
    }

    .winner-title {
        font-size: 1.6rem;
    }

    .winner-score-num {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .opt-btn {
        font-size: .78rem;
        padding: .45rem .55rem;
    }

    .winner-trophy {
        font-size: 3.5rem;
    }

    .winner-play-btn {
        font-size: 1rem;
        padding: .85rem 2rem;
    }
}

/* ---------------------------------------------------
   RESPONSIVE ALIGNMENT FIXES — Full overrides
   --------------------------------------------------- */

/* Fix questions grid — proper 3 / 2 / 1 col breakpoints */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix opt-txt — allow wrapping, no cut-off */
.opt-txt {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.35 !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Fix opt-btn — allow height to grow with content and prevent horizontal overflow */
.opt-btn {
    align-items: flex-start !important;
    height: auto !important;
    min-height: 44px;
    white-space: normal !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Fix opt-lbl alignment when text wraps */
.opt-lbl {
    margin-top: 1px;
    flex-shrink: 0 !important;
    align-self: flex-start !important;
}

/* Fix q-opts-grid — consistent gap */
.q-opts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix q-card-head alignment */
.q-card-head {
    align-items: center !important;
    width: 100%;
    max-width: 100%;
}

/* Fix q-card — consistent height and containment */
.q-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    height: 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Fix feed meta bar responsive */
.feed-meta-bar .container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Fix hero inner spacing */
.home-hero-inner {
    flex-wrap: wrap;
    gap: .75rem;
}

/* Fix category tabs padding */
.category-tabs {
    padding-bottom: .75rem;
}

/* -- 2-column layout (laptops / tablets) -- */
@media (max-width: 1350px) {
    .questions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.1rem;
    }
}

/* -- 1-column layout (tablets & phones) -- */
@media (max-width: 850px) {
    .questions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .q-opts-grid {
        grid-template-columns: 1fr 1fr;
        gap: .4rem;
    }

    .opt-btn {
        font-size: .78rem;
        padding: .45rem .55rem;
        min-height: 40px;
    }

    .opt-lbl {
        width: 20px;
        height: 20px;
        font-size: .65rem;
        border-radius: 5px;
    }

    .q-card {
        padding: 1rem;
    }

    .q-card-title {
        font-size: .92rem;
    }

    .q-counter {
        font-size: .65rem;
    }

    .feed-meta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .feed-progress {
        width: 100%;
        min-width: unset;
    }
}

/* -- Small mobile screens -- */
@media (max-width: 480px) {
    .q-opts-grid {
        grid-template-columns: 1fr 1fr;
        gap: .35rem;
    }

    .home-hero-title {
        font-size: 1.2rem;
    }

    .cat-tab {
        padding: .3rem .7rem;
        font-size: .8rem;
    }
}

/* -- Winner popup responsive -- */
@media (max-width: 480px) {
    .winner-popup {
        padding: 1.75rem 1.25rem;
        border-radius: 18px;
    }

    .winner-trophy {
        font-size: 3.5rem;
    }

    .winner-title {
        font-size: 1.5rem;
    }

    .winner-score-num {
        font-size: 3rem;
    }

    .winner-play-btn {
        padding: .85rem 1.75rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
}

/* ---------------------------------------------------
   PERFORMANCE OPTIMIZATIONS (MOBILE LAG FIX)
   --------------------------------------------------- */

/* Hardware acceleration for animating elements */
.q-card,
.q-timer-ring,
.q-card-head {
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Reduce heavy shadows and effects on mobile */
@media (max-width: 768px) {

    /* Simplify active card shadow */
    .q-card--active {
        box-shadow: 0 4px 12px rgba(108, 99, 255, .2) !important;
    }

    /* Disable hover shadows (mobile has no hover state anyway, avoids sticky hover lag) */
    .q-card:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--glass-border);
    }

    .q-card--active:hover {
        border-color: rgba(108, 99, 255, .6) !important;
        box-shadow: 0 4px 12px rgba(108, 99, 255, .2) !important;
    }

    /* Simplify button hover */
    .q-card--active .opt-btn:hover {
        transform: none;
        box-shadow: none;
    }

    /* Speed up transitions for snappier feel */
    .q-card {
        transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    }

    .q-timer-ring {
        transition: opacity .15s ease, transform .15s ease;
    }

    .q-timer-arc {
        transition: stroke .2s ease;
    }
}

/* Fix for consistent option grid alignment & uniform card structure */
.q-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.q-card-title {
    flex-grow: 0 !important;
    min-height: 2.8rem;
    margin-bottom: 0.75rem !important;
    display: flex;
    align-items: center;
}

.q-opts-grid {
    margin-top: 0 !important;
}

.q-card-footer {
    margin-top: auto !important;
    flex-direction: row !important;
    align-items: center !important;
}


/* Ensure grid items stretch to the same height across all screen sizes */
.questions-grid {
    align-items: stretch !important;
}

/* Increase question title size */
.q-card-title {
    font-size: 1.15rem !important;
}

/* Increase option text size */
.opt-btn {
    font-size: 1rem !important;
}

.opt-txt {
    font-size: 1rem !important;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .q-card-title {
        font-size: 1.05rem !important;
    }

    .opt-btn {
        font-size: 0.9rem !important;
    }

    .opt-txt {
        font-size: 0.9rem !important;
    }
}

/* Remove empty space above hero section */
.home-hero {
    padding-top: 0.5rem !important;
}

/* Reduce spaces per client request */
.home-hero-inner {
    flex-wrap: nowrap !important;
}

.home-hero {
    padding-bottom: 0.5rem !important;
}

.category-tabs-section {
    padding-top: 0.5rem !important;
}



/* User requested white options */
.opt-btn,
.opt-btn .opt-txt {
    color: #ffffff !important;
}


@keyframes floatX {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(15px);
    }
}

/* ─── Quiz Footer Ad — Responsive ─── */

/* Desktop: show desktop banner, hide mobile */
.q-ad-banner-mobile {
    display: none;
}

/* Mobile: swap banners */
@media (max-width: 768px) {
    .q-ad-banner-desktop {
        display: none !important;
    }
    .q-ad-banner-mobile {
        display: flex !important;
    }
    /* footer skip button smaller on mobile */
    .q-footer-skip-btn {
        font-size: .75rem;
    }
    .q-footer-next-btn {
        font-size: .75rem;
        padding: 4px 12px;
    }
}