/* ================================================
   SALAM GAMES — Kid-Friendly Stylesheet v3.1
   BIG text, BIG buttons, FUN animations
   Mobile-first, fullscreen games
   ================================================ */

/* ---- CSS Variables ---- */
:root {
    /* Colors — bright & fun */
    --primary: #0ea5e9;
    --primary-light: #38bdf8;
    --primary-dark: #0284c7;
    --secondary: #10b981;
    --secondary-light: #34d399;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;
    --bg: #e0f2fe;
    --bg-dot: #bae6fd;
    --card: #ffffff;
    --card-glass: rgba(255,255,255,0.92);
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --success: #22c55e;
    --error: #ef4444;
    --rose: #f43f5e;
    --warning: #f59e0b;
    --purple: #a855f7;
    --pink: #ec4899;
    --indigo: #6366f1;

    /* Fun shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.14);
    --shadow-kid: 0 6px 0 rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px rgba(14,165,233,0.3);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Radii — extra round for fun */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Layout */
    --nav-height: 60px;
    --bottom-nav-height: 64px;
    --max-width: 1200px;
    --game-max-width: 520px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Bigger base = bigger everything for kids */
    font-size: 18px;
}

@media (max-width: 480px) {
    html { font-size: 17px; }
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(var(--bg-dot) 18%, transparent 18%),
        radial-gradient(var(--bg-dot) 18%, transparent 18%);
    background-position: 0 0, 20px 20px;
    background-size: 40px 40px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ---- Utility Classes ---- */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.game-container { width: 100%; max-width: var(--game-max-width); margin: 0 auto; padding: var(--space-sm); }
.text-center { text-align: center; }

/* ---- Loading Screen — Fun & Vibrant ---- */
.loading-screen {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a237e 0%, #4a148c 50%, #880e4f 100%);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-screen .mosque { font-size: 5rem; animation: float 2s ease-in-out infinite; }
.loading-screen .title {
    color: white; font-size: 2.2rem; font-weight: 900;
    margin-top: var(--space-md);
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.loading-screen .dots { display: flex; gap: 10px; margin-top: var(--space-lg); }
.loading-screen .dot {
    width: 14px; height: 14px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    animation: loading-dot 1.2s ease-in-out infinite;
}
.loading-screen .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-screen .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* ---- Stars Canvas ---- */
#stars-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ---- Top Navigation ---- */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-height); z-index: 100;
    background: var(--card-glass);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 3px solid rgba(14,165,233,0.15);
}
.top-nav .nav-inner {
    max-width: var(--max-width); margin: 0 auto; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--space-md);
}
.top-nav .logo {
    display: flex; align-items: center; gap: var(--space-sm);
    font-weight: 900; font-size: 1.2rem; color: var(--primary);
}
.top-nav .logo-icon { font-size: 1.5rem; }
.top-nav .nav-links { display: flex; align-items: center; gap: var(--space-lg); }
.top-nav .nav-links a {
    font-weight: 700; font-size: 0.8rem; color: var(--text-light);
    transition: color var(--transition-fast);
}
.top-nav .nav-links a:hover, .top-nav .nav-links a.active { color: var(--primary); }

@media (max-width: 768px) {
    .top-nav .nav-links a:not(.profile-link) { display: none; }
}

/* Profile badge */
.profile-badge {
    display: flex; align-items: center; gap: var(--space-sm);
    cursor: pointer; padding: 4px 12px 4px 4px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: var(--radius-full);
    border: 2px solid rgba(14,165,233,0.2);
    transition: all var(--transition-bounce);
}
.profile-badge:hover { border-color: var(--primary-light); transform: scale(1.05); }
.profile-avatar {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; background: white; border-radius: 50%;
    border: 2px solid var(--primary-light);
}
.profile-info { display: none; }
@media (min-width: 640px) {
    .profile-info { display: block; }
    .profile-name { font-weight: 800; font-size: 0.75rem; color: var(--text); }
    .profile-points { font-weight: 700; font-size: 0.65rem; color: var(--accent); }
}

/* ---- Bottom Navigation ---- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height); z-index: 100;
    background: var(--card-glass);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 3px solid rgba(14,165,233,0.15);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 769px) { .bottom-nav { display: none; } }
.bottom-nav .nav-inner {
    display: flex; align-items: center; justify-content: space-around;
    height: 100%; max-width: 500px; margin: 0 auto;
}
.bottom-nav .nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 0.6rem; font-weight: 700; color: var(--text-light);
    padding: 4px 12px; -webkit-tap-highlight-color: transparent;
    transition: all var(--transition-bounce);
}
.bottom-nav .nav-item .icon { font-size: 1.4rem; line-height: 1; }
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item:active { transform: scale(0.9); }

/* ==============================
   🎮 GAME MODE — FULLSCREEN
   Hide nav/footer when game-screen is active
   ============================== */
body.game-active .top-nav,
body.game-active .bottom-nav,
body.game-active .site-footer {
    display: none !important;
}
body.game-active .content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ---- Content Area ---- */
.content {
    position: relative; z-index: 1;
    padding-top: var(--nav-height);
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-md));
    min-height: 100vh; min-height: 100dvh;
}
@media (min-width: 769px) { .content { padding-bottom: var(--space-xl); } }

/* ---- Cards ---- */
.card {
    background: var(--card);
    border-radius: var(--radius-2xl);
    border: 3px solid rgba(14,165,233,0.12);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.card-padded { padding: var(--space-lg); }

/* ---- Game Cards (Homepage Grid) ---- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-md);
}
@media (min-width: 768px) { .game-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); } }
@media (min-width: 1024px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }

.game-card {
    background: var(--card);
    border-radius: var(--radius-2xl);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    border: 3px solid rgba(14,165,233,0.12);
    box-shadow: var(--shadow-kid);
    transition: all var(--transition-bounce);
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    gap: var(--space-sm);
    position: relative;
    overflow: hidden;
}
.game-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-normal);
}
.game-card:hover::before { opacity: 1; }
.game-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 0 rgba(0,0,0,0.1);
}
.game-card:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}
.game-card .emoji { font-size: 3rem; line-height: 1; transition: transform var(--transition-bounce); }
.game-card:hover .emoji { transform: scale(1.15) rotate(-5deg); }
.game-card .title { font-weight: 900; font-size: 0.95rem; color: var(--text); }
.game-card .desc { font-weight: 600; font-size: 0.72rem; color: var(--text-lighter); line-height: 1.3; }
.game-card .badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.65rem; font-weight: 800;
    padding: 3px 10px; border-radius: var(--radius-full);
    background: rgba(14,165,233,0.1); color: var(--primary);
}

/* Game card color accents */
.game-card[data-color="emerald"] { border-color: rgba(16,185,129,0.35); }
.game-card[data-color="sky"] { border-color: rgba(14,165,233,0.35); }
.game-card[data-color="amber"] { border-color: rgba(245,158,11,0.35); }
.game-card[data-color="rose"] { border-color: rgba(244,63,94,0.35); }
.game-card[data-color="indigo"] { border-color: rgba(99,102,241,0.35); }
.game-card[data-color="teal"] { border-color: rgba(20,184,166,0.35); }
.game-card[data-color="purple"] { border-color: rgba(168,85,247,0.35); }
.game-card[data-color="orange"] { border-color: rgba(249,115,22,0.35); }

/* ---- BUTTONS — BIG & BOUNCY ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--space-sm);
    font-weight: 900;
    font-size: 1.1rem;
    padding: 16px 28px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-kid);
    border-bottom: 5px solid transparent;
    transition: all var(--transition-bounce);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn:hover::after { left: 100%; }
.btn:active {
    transform: translateY(4px) scale(0.97) !important;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1) !important;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }

.btn-primary { background: var(--primary); color: white; border-bottom-color: var(--primary-dark); }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: var(--secondary); color: white; border-bottom-color: var(--secondary-dark); }
.btn-secondary:hover { background: var(--secondary-light); }
.btn-accent { background: var(--accent); color: white; border-bottom-color: var(--accent-dark); }
.btn-gray { background: #e5e7eb; color: var(--text-light); border-bottom-color: #d1d5db; }
.btn-success { background: var(--success); color: white; border-bottom-color: #16a34a; }
.btn-danger { background: var(--error); color: white; border-bottom-color: #dc2626; }
.btn-purple { background: var(--purple); color: white; border-bottom-color: #9333ea; }

.btn-full { width: 100%; }
.btn-lg { font-size: 1.3rem; padding: 20px 36px; border-radius: var(--radius-2xl); }
.btn-sm { font-size: 0.9rem; padding: 12px 20px; }

/* ---- GAME HEADER — Compact & Fun ---- */
.game-header {
    background: var(--primary);
    padding: 12px var(--space-md);
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    color: white;
}
.game-header .stats {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 800; font-size: 1rem;
}
.game-header .close-btn {
    color: rgba(255,255,255,0.8); font-size: 1.5rem; padding: 4px;
    transition: transform var(--transition-bounce);
}
.game-header .close-btn:hover { color: white; transform: scale(1.2); }
.game-progress {
    height: 8px; background: rgba(255,255,255,0.3);
    border-radius: var(--radius-full); margin-top: var(--space-sm); overflow: hidden;
}
.game-progress .bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 8px rgba(251,191,36,0.5);
}

/* ---- Game Screens ---- */
.screen { display: flex; flex-direction: column; }
.screen.hidden { display: none !important; }

/* ---- QUESTION CARD — Big & Readable ---- */
.question-card {
    background: linear-gradient(135deg, rgba(14,165,233,0.06), rgba(16,185,129,0.06));
    border: 3px solid rgba(14,165,233,0.18);
    border-radius: var(--radius-2xl);
    padding: var(--space-lg);
    text-align: center;
    animation: slide-up 0.4s ease-out;
}
.question-emoji {
    font-size: 4rem;
    margin-bottom: var(--space-sm);
    animation: pop-in 0.5s var(--transition-bounce);
}
.question-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.5;
}

/* ---- OPTIONS — Big Tap Targets ---- */
.options-list {
    display: flex; flex-direction: column;
    gap: 10px; margin-top: var(--space-md);
}
.option-btn {
    width: 100%; text-align: left;
    padding: 16px 20px;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: var(--radius-xl);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text);
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.option-btn:hover {
    border-color: var(--primary-light);
    background: rgba(14,165,233,0.06);
    transform: translateX(4px);
}
.option-btn:active { transform: scale(0.97); }
.option-btn.correct {
    border-color: var(--success);
    background: rgba(34,197,94,0.12);
    color: #15803d;
    animation: correct-pop 0.4s ease-out;
    box-shadow: 0 0 16px rgba(34,197,94,0.3);
}
.option-btn.wrong {
    border-color: var(--error);
    background: rgba(239,68,68,0.12);
    color: #b91c1c;
    animation: shake 0.4s ease-in-out;
}
.option-btn.disabled { pointer-events: none; opacity: 0.65; }

/* ---- FEEDBACK BOX — Clear & Visible ---- */
.feedback-box {
    border-radius: var(--radius-xl);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-md);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: bounce-in 0.3s ease-out;
}
.feedback-box.correct {
    background: rgba(34,197,94,0.12);
    border: 3px solid rgba(34,197,94,0.35);
    color: #15803d;
}
.feedback-box.wrong {
    background: rgba(239,68,68,0.12);
    border: 3px solid rgba(239,68,68,0.35);
    color: #b91c1c;
}

/* ---- RESULTS CARD — Celebration! ---- */
.results-card { text-align: center; padding: var(--space-xl); }
.results-emoji { font-size: 5rem; animation: float 2s ease-in-out infinite; }
.results-title { font-size: 2rem; font-weight: 900; margin-top: var(--space-sm); }
.results-score {
    font-size: 3.5rem; font-weight: 900; color: var(--accent);
    margin: var(--space-sm) 0;
    text-shadow: 0 2px 8px rgba(245,158,11,0.3);
    animation: pulse 1.5s ease-in-out infinite;
}
.results-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm); margin: var(--space-lg) 0;
}
.results-stat {
    background: linear-gradient(135deg, rgba(14,165,233,0.06), rgba(16,185,129,0.06));
    border: 2px solid rgba(14,165,233,0.15);
    border-radius: var(--radius-xl); padding: var(--space-md); text-align: center;
}
.results-stat .value { font-size: 1.5rem; font-weight: 900; color: var(--primary); }
.results-stat .label { font-size: 0.72rem; font-weight: 700; color: var(--text-lighter); margin-top: 2px; }

/* ---- Stats Bar (Homepage) ---- */
.stats-bar {
    display: flex; justify-content: space-around;
    padding: var(--space-md);
    background: var(--card-glass);
    border-radius: var(--radius-2xl);
    border: 2px solid rgba(14,165,233,0.12);
    margin: 0 var(--space-md);
    box-shadow: var(--shadow-sm);
}
.stats-item { text-align: center; }
.stats-value { font-size: 1.3rem; font-weight: 900; color: var(--primary); }
.stats-label { font-size: 0.65rem; font-weight: 700; color: var(--text-lighter); }

/* ---- Toast ---- */
.toast {
    position: absolute;
    bottom: 16px;
    left: 50%; transform: translateX(-50%) translateY(100px);
    z-index: 200; background: var(--card);
    border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg);
    padding: 10px 16px;
    display: flex; align-items: center; gap: 10px;
    opacity: 0; transition: all var(--transition-normal);
    pointer-events: none; max-width: 85%; width: max-content;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast .toast-icon { font-size: 2.2rem; }
.toast .toast-text { font-weight: 800; font-size: 0.9rem; }
.toast .toast-sub { font-weight: 600; font-size: 0.75rem; color: var(--text-lighter); }
.toast-success { border-left: 5px solid var(--success); }
.toast-warning { border-left: 5px solid var(--warning); }
.toast-error { border-left: 5px solid var(--error); }
.toast-achievement { border-left: 5px solid var(--accent); }

/* ---- Streak Badge ---- */
.streak-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white; padding: 6px 14px; border-radius: var(--radius-full);
    font-weight: 900; font-size: 0.8rem;
    box-shadow: 0 3px 10px rgba(245,158,11,0.4);
    animation: pulse 2s ease-in-out infinite;
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-md); opacity: 0; visibility: hidden;
    transition: all var(--transition-normal);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--card); border-radius: var(--radius-2xl);
    width: 100%; max-width: 420px; max-height: 85vh;
    overflow-y: auto; padding: var(--space-xl);
    transform: scale(0.85) translateY(20px);
    transition: all var(--transition-bounce);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-title { font-size: 1.5rem; font-weight: 900; text-align: center; margin-bottom: var(--space-lg); }

/* ---- Forms ---- */
.form-group { margin-bottom: var(--space-md); }
.form-label { display: block; font-weight: 800; font-size: 0.9rem; color: var(--text-light); margin-bottom: var(--space-xs); }
.form-input {
    width: 100%; padding: 14px 18px;
    border: 3px solid #e2e8f0; border-radius: var(--radius-xl);
    font-size: 1rem; font-weight: 700;
    transition: all var(--transition-fast);
}
.form-input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
}

/* ---- Footer ---- */
.site-footer { padding: var(--space-xl) var(--space-md); text-align: center; }
@media (max-width: 768px) { .site-footer { display: none; } }
.footer-links { display: flex; justify-content: center; gap: var(--space-lg); margin-bottom: var(--space-md); }
.footer-links a { font-weight: 700; font-size: 0.85rem; color: var(--text-light); }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 0.72rem; color: var(--text-lighter); font-weight: 600; }

/* ---- Confetti ---- */
.confetti-container { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 300; }
.confetti { position: absolute; font-size: 28px; pointer-events: none; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---- Category Pills ---- */
.category-pills { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }
.pill {
    padding: 8px 16px; border-radius: var(--radius-full);
    font-size: 0.8rem; font-weight: 800;
    border: 2px solid transparent;
    transition: all var(--transition-bounce); cursor: pointer;
}
.pill.active { transform: scale(1.08); box-shadow: var(--shadow-sm); }

/* ---- Achievement Banner ---- */
.achievement-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 3px solid #fbbf24; border-radius: var(--radius-2xl);
    padding: var(--space-md) var(--space-lg);
    display: flex; align-items: center; gap: var(--space-md);
    margin: var(--space-md) 0; animation: bounce-in 0.5s ease-out;
}
.achievement-icon { font-size: 2.5rem; }
.achievement-title { font-weight: 900; font-size: 0.95rem; color: #92400e; }
.achievement-desc { font-weight: 600; font-size: 0.78rem; color: #b45309; }

/* ---- Offline ---- */
.offline-bar {
    position: fixed; top: var(--nav-height); left: 0; right: 0; z-index: 99;
    background: var(--warning); color: white; text-align: center;
    padding: 6px; font-weight: 800; font-size: 0.78rem; display: none;
}
body.offline .offline-bar { display: block; }

/* ==============================
   ✨ FUN ANIMATIONS
   ============================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.08); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
@keyframes pop-in {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    60% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes correct-pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.04); }
    100% { transform: scale(1); }
}
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}
@keyframes rainbow-border {
    0% { border-color: var(--primary); }
    25% { border-color: var(--secondary); }
    50% { border-color: var(--accent); }
    75% { border-color: var(--rose); }
    100% { border-color: var(--primary); }
}
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(14,165,233,0.3); }
    50% { box-shadow: 0 0 20px rgba(14,165,233,0.5); }
}

.animate-float { animation: float 2.5s ease-in-out infinite; }
.animate-bounce-in { animation: bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.animate-slide-up { animation: slide-up 0.4s ease-out forwards; }
.animate-shake { animation: shake 0.4s ease-in-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-wiggle { animation: wiggle 1s ease-in-out infinite; }
.animate-pop-in { animation: pop-in 0.5s ease-out forwards; }
.animate-glow { animation: glow-pulse 2s ease-in-out infinite; }

/* Staggered entrance for options */
.options-list .option-btn:nth-child(1) { animation: slide-up 0.3s ease-out 0.05s both; }
.options-list .option-btn:nth-child(2) { animation: slide-up 0.3s ease-out 0.1s both; }
.options-list .option-btn:nth-child(3) { animation: slide-up 0.3s ease-out 0.15s both; }
.options-list .option-btn:nth-child(4) { animation: slide-up 0.3s ease-out 0.2s both; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(14,165,233,0.3); border-radius: 3px; }

/* ---- Reduce Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
@media print {
    .top-nav, .bottom-nav, .loading-screen, #stars-canvas { display: none !important; }
    .content { padding: 0; }
}
