/* ============================================================
   Spooky Arcade — hub.css  (premium redesign)
   Vanilla, mobile-first. Brand: spookycompetitions.com, bolder.
   ============================================================ */

:root {
  --purple: #9d00ff;
  --purple-lt: #c44dff;
  --gold:   #ffd700;
  --black:  #0a0010;
  --orange: #ff6b35;
  --ghost:  #f6f1ff;
  --green:  #39ff88;

  --line: rgba(157, 0, 255, .38);
  --line-soft: rgba(246, 241, 255, .10);
  --glass: rgba(24, 8, 42, .78);
  --glass-2: rgba(20, 6, 38, .82);

  --shadow-sm: 0 4px 14px rgba(0,0,0,.4);
  --shadow-md: 0 14px 40px rgba(0,0,0,.5);
  --shadow-glow: 0 0 0 1px rgba(157,0,255,.5), 0 18px 50px rgba(157,0,255,.45);

  --font-display: 'Creepster', system-ui, cursive;
  --font-ui: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1180px;
  --radius: 20px;
  --header-h: 66px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ghost);
  background: var(--black);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .2px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--purple); color: #fff; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0b0316; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--purple), #5a008f); border-radius: 99px; border: 2px solid #0b0316; }

/* ============================================================
   Atmosphere
   ============================================================ */
.bg-gradient, .bg-fog, .bg-grain, .bg-dust, .bg-bats {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.bg-gradient {
  background:
    radial-gradient(58% 48% at 16% 10%, rgba(157,0,255,.34), transparent 60%),
    radial-gradient(52% 44% at 86% 16%, rgba(255,107,53,.16), transparent 60%),
    radial-gradient(72% 60% at 50% 102%, rgba(157,0,255,.24), transparent 66%),
    radial-gradient(44% 38% at 80% 82%, rgba(255,215,0,.09), transparent 60%),
    linear-gradient(165deg, #16002b 0%, #0a0014 55%, #060009 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { background-position: 0% 0%, 100% 0%, 50% 100%, 80% 80%, 0 0; }
  100% { background-position: 30% 25%, 70% 35%, 40% 70%, 60% 60%, 0 0; }
}
.bg-fog {
  background:
    radial-gradient(40% 30% at 22% 32%, rgba(246,241,255,.05), transparent 70%),
    radial-gradient(50% 35% at 78% 62%, rgba(246,241,255,.04), transparent 70%);
  animation: fog 44s linear infinite alternate;
}
@keyframes fog { 0% { transform: translateX(-4%); } 100% { transform: translateX(4%) translateY(-2%); } }

/* Film grain for premium texture */
.bg-grain {
  opacity: .04; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-dust .spark {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--ghost); opacity: 0; box-shadow: 0 0 6px rgba(246,241,255,.8);
  animation: float-up linear infinite;
}
@keyframes float-up {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  15% { opacity: .8; } 85% { opacity: .5; }
  100% { transform: translateY(-110vh) scale(1); opacity: 0; }
}
.bg-bats .bat { position: absolute; width: 44px; height: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); animation: bat-fly linear infinite; }
.bg-bats .bat img { width: 100%; height: auto; display: block; transform-box: fill-box; transform-origin: center; animation: flap .45s ease-in-out infinite alternate; }
@keyframes flap { from { scale: 1 1; } to { scale: 1 .86; } }
@keyframes bat-fly { 0% { transform: translate(-12vw, 12vh); } 50% { transform: translate(55vw, 4vh); } 100% { transform: translate(118vw, 16vh); } }

.cobweb { position: fixed; width: 190px; height: 190px; z-index: 6; pointer-events: none; opacity: .85; filter: drop-shadow(0 0 3px rgba(157,0,255,.3)); }
.cobweb--tl { top: 0; left: 0; } .cobweb--tr { top: 0; right: 0; }
.bg-swoosh { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .5; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-ui); font-weight: 700; text-decoration: none; border: none;
  cursor: pointer; border-radius: 999px; padding: .72em 1.35em; font-size: .95rem;
  line-height: 1; overflow: hidden; white-space: nowrap;
  transition: transform .14s ease, box-shadow .25s ease, filter .25s ease;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn__arr { transition: transform .2s ease; }
.btn:hover .btn__arr { transform: translateX(4px); }
.btn__pumpkin { display: inline-block; transition: transform .25s ease; }
.btn:hover .btn__pumpkin { transform: rotate(-12deg) scale(1.12); }
/* sheen sweep */
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .55s ease; pointer-events: none;
}
.btn:hover::after { left: 130%; }

.btn--primary { background: linear-gradient(135deg, var(--purple), var(--purple-lt)); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 30px rgba(157,0,255,.5); }
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 14px 40px rgba(157,0,255,.7); transform: translateY(-2px); }
.btn--lg { font-size: 1.05rem; padding: .9em 1.7em; }

.btn--comps { background: linear-gradient(135deg, var(--gold), var(--orange)); color: #2a1500; font-weight: 800; box-shadow: 0 8px 24px rgba(255,107,53,.45), 0 0 0 1px rgba(255,215,0,.4); }
.btn--comps:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,107,53,.62); }

.btn--glass { background: var(--glass); color: var(--ghost); border: 1px solid var(--line); }
.btn--glass:hover { background: rgba(157,0,255,.22); box-shadow: 0 0 22px rgba(157,0,255,.4); transform: translateY(-2px); }

/* 18+ markers (sit next to every Spooky Competitions link) */
.age { display: inline-block; font-size: .74rem; font-weight: 900; line-height: 1; background: #12001f; color: var(--gold); border: 1.5px solid var(--gold); padding: 3px 7px; border-radius: 7px; margin-left: 7px; vertical-align: middle; letter-spacing: .5px; box-shadow: 0 0 10px rgba(255,215,0,.55); -webkit-text-fill-color: var(--gold); text-shadow: 0 0 6px rgba(255,215,0,.45); }
.age--lg { font-size: 1.05rem; padding: 5px 12px; border-radius: 10px; margin-left: 12px; box-shadow: 0 0 16px rgba(255,215,0,.7); }

/* 18+ age gate modal */
.modal__card--age { text-align: center; }
.age-badge { display: inline-grid; place-items: center; width: 66px; height: 66px; margin: 4px auto 8px; border-radius: 50%; font-family: var(--font-ui); font-weight: 900; font-size: 1.5rem; letter-spacing: .5px; color: #2a1500; background: linear-gradient(135deg, var(--gold), var(--orange)); box-shadow: 0 0 28px rgba(255,215,0,.7); }
.age-modal__text { opacity: .9; margin: 0 0 22px; line-height: 1.55; }
.age-modal__actions { display: flex; flex-direction: column; gap: 12px; }
.age-modal__actions .btn { width: 100%; justify-content: center; }
.age-modal__sub { font-size: .8rem; opacity: .62; margin: 16px 0 0; }

/* Ghost mark embedded in the Spooky Competitions buttons */
.btn__logo { height: 26px; width: auto; margin-right: 2px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }

/* ============================================================
   Header + nav
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 18px; background: rgba(8,0,14,.92);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; min-width: 0; text-decoration: none; }
.brand__logo { height: 52px; width: auto; filter: drop-shadow(0 0 12px rgba(157,0,255,.55)); }
.brand__logo--fallback { border-radius: 8px; }
/* Text wordmark is a FALLBACK only — shown if the logo image fails to load */
.brand__text { display: inline-flex; flex-direction: column; font-family: var(--font-display); font-size: 1.7rem; color: var(--ghost); line-height: .8; letter-spacing: 1.5px; text-shadow: 0 0 14px rgba(157,0,255,.7); }
.brand__text[hidden] { display: none; }
.brand__text span { color: var(--gold); font-size: .58em; letter-spacing: 4px; }
.nav { display: flex; align-items: center; gap: 10px; }
.nav__link { text-decoration: none; font-weight: 600; color: var(--ghost); opacity: .82; padding: 8px 10px; border-radius: 9px; transition: opacity .2s, color .2s, text-shadow .2s; }
.nav__link:hover { opacity: 1; color: #fff; text-shadow: 0 0 12px rgba(157,0,255,.9); }
.nav__icon { display: grid; place-items: center; background: rgba(157,0,255,.14); border: 1px solid var(--line); border-radius: 11px; width: 40px; height: 40px; cursor: pointer; color: var(--ghost); transition: transform .35s ease, box-shadow .25s; }
.nav__icon:hover { transform: rotate(90deg); box-shadow: 0 0 16px rgba(157,0,255,.6); }

/* ============================================================
   Marquee
   ============================================================ */
.marquee { position: sticky; top: var(--header-h); z-index: 40; overflow: hidden; background: linear-gradient(90deg, #ff6b35, #ff2d8e); border-bottom: 1px solid rgba(255,215,0,.3); white-space: nowrap; }
.marquee__track { display: inline-flex; padding: 8px 0; font-weight: 800; letter-spacing: .6px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); animation: marq 30s linear infinite; }
.marquee__track span { padding-right: 1.6rem; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   Layout
   ============================================================ */
main { position: relative; z-index: 2; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 64px 18px; }
.section__head { margin-bottom: 28px; }
.section__title { font-family: var(--font-display); font-size: clamp(2.1rem, 7vw, 3.4rem); margin: 0 0 6px; letter-spacing: 1px; line-height: 1; background: linear-gradient(180deg, #fff 10%, var(--ghost) 40%, var(--purple-lt) 130%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(157,0,255,.5)); }
.section__title--sm { font-size: clamp(1.5rem, 5vw, 2.2rem); }
.section__sub { margin: 0; opacity: .72; font-size: 1.02rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; isolation: isolate; }

/* Arcade photo background with a slow Ken-Burns drift */
.hero__bg { position: absolute; inset: 0; z-index: 0; background: url("assets/brand/hero-arcade.webp") center 30% / cover no-repeat; transform-origin: 50% 26%; animation: heroZoom 38s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.05); } }

/* Flickering neon wash near the sign */
.hero__neon { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(46% 34% at 50% 19%, rgba(255,70,200,.20), transparent 70%), radial-gradient(40% 30% at 50% 21%, rgba(90,255,200,.11), transparent 72%); animation: neonFlicker 7s infinite; }
@keyframes neonFlicker { 0%,100% { opacity: 1; } 70% { opacity: 1; } 72% { opacity: .68; } 74% { opacity: 1; } 88% { opacity: .85; } 90% { opacity: 1; } 91% { opacity: .55; } 92% { opacity: 1; } }

/* Rolling smoke (two drifting blurred layers) */
.hero__smoke { position: absolute; left: -12%; right: -12%; bottom: -8%; height: 62%; z-index: 1; pointer-events: none; opacity: .6; filter: blur(11px); will-change: transform;
  background: radial-gradient(38% 60% at 22% 82%, rgba(232,226,255,.18), transparent 70%), radial-gradient(44% 55% at 68% 88%, rgba(210,240,225,.13), transparent 72%), radial-gradient(34% 50% at 48% 96%, rgba(236,222,255,.15), transparent 70%);
  animation: smoke1 26s ease-in-out infinite alternate; }
.hero__smoke--2 { opacity: .42; filter: blur(15px); height: 55%;
  background: radial-gradient(40% 55% at 60% 86%, rgba(222,212,255,.14), transparent 70%), radial-gradient(46% 50% at 18% 92%, rgba(212,242,228,.1), transparent 72%);
  animation: smoke2 34s ease-in-out infinite alternate; }
@keyframes smoke1 { from { transform: translate3d(-5%,0,0); } to { transform: translate3d(6%,-3%,0); } }
@keyframes smoke2 { from { transform: translate3d(7%,0,0); } to { transform: translate3d(-7%,-4%,0); } }

/* Eerie vignette + bottom fade into the page */
.hero__vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(92% 82% at 50% 32%, transparent 52%, rgba(4,0,10,.5)), linear-gradient(180deg, rgba(4,0,10,.08) 0%, transparent 30%, transparent 56%, var(--black) 100%); }

.hero__inner { position: relative; z-index: 3; max-width: 780px; margin: 0 auto; width: 100%; padding: 0 22px 86px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.hero__copy { flex: 1 1 340px; }
.hero__eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); background: rgba(255,215,0,.08); border: 1px solid rgba(255,215,0,.3); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero__title { font-family: var(--font-display); font-size: clamp(3.6rem, 14vw, 8rem); line-height: .86; margin: 0 0 18px; letter-spacing: 2px; }
.hero__title span { display: block; background: linear-gradient(180deg, #fff 0%, var(--gold) 55%, var(--orange) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(157,0,255,.55)) drop-shadow(0 0 28px rgba(157,0,255,.7)); }
.hero__title span:last-child { background: linear-gradient(180deg, #fff 0%, var(--purple-lt) 60%, var(--purple) 100%); -webkit-background-clip: text; background-clip: text; }
.hero__tag { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 600; margin: 0; line-height: 1.45; text-shadow: 0 2px 12px rgba(0,0,0,.85), 0 0 34px rgba(0,0,0,.6); }
.hero__tag-em { color: var(--gold); font-weight: 800; text-shadow: 0 2px 14px rgba(0,0,0,.8), 0 0 22px rgba(255,215,0,.4); }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.hero__mascot { position: relative; flex: 0 1 320px; display: flex; align-items: center; justify-content: center; min-height: 280px; }
.mascot-img, .mascot-svg { width: min(300px, 72vw); height: auto; position: relative; z-index: 2; animation: bob 4.5s ease-in-out infinite; filter: drop-shadow(0 16px 36px rgba(157,0,255,.6)); }
.mascot-svg[hidden] { display: none; }   /* SVG ignores the bare [hidden] UA rule */
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-18px) rotate(1.5deg); } }
.mascot-glow { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(157,0,255,.6), transparent 65%); filter: blur(16px); animation: pulse 4.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } }
.mascot-ring { position: absolute; width: 320px; height: 320px; border-radius: 50%; border: 1px dashed rgba(255,215,0,.3); animation: spin 28s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3; width: 26px; height: 42px; border: 2px solid rgba(246,241,255,.4); border-radius: 14px; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--gold); border-radius: 2px; animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ============================================================
   Games grid + cards
   ============================================================ */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.loading { opacity: .6; grid-column: 1 / -1; }

.card {
  position: relative; background: var(--glass); border: 1.5px solid rgba(157,0,255,.45);
  border-radius: var(--radius); overflow: hidden; text-align: left; cursor: pointer;
  color: inherit; font-family: inherit; padding: 0; display: flex; flex-direction: column;
  box-shadow: 0 0 16px rgba(157,0,255,.22), var(--shadow-sm);
  transform-style: preserve-3d; transition: box-shadow .3s ease, border-color .3s ease, transform .12s ease;
}
.card--gold { border-color: rgba(255,215,0,.55); box-shadow: 0 0 18px rgba(255,215,0,.26), var(--shadow-sm); }
.card--orange { border-color: rgba(255,107,53,.5); box-shadow: 0 0 16px rgba(255,107,53,.24), var(--shadow-sm); }
.card:hover, .card:focus-visible { box-shadow: var(--shadow-glow); outline: none; }
.card--gold:hover, .card--gold:focus-visible { box-shadow: 0 0 0 1px var(--gold), 0 18px 50px rgba(255,215,0,.45); }
.card--orange:hover, .card--orange:focus-visible { box-shadow: 0 0 0 1px var(--orange), 0 18px 50px rgba(255,107,53,.45); }
.card__art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c0518; }
.card__art .art { width: 100%; height: 100%; display: block; transform-origin: 50% 60%; transition: transform .5s ease; }
.card:hover .card__art .art { transform: scale(1.07); }
.card__art .art-moon { transition: filter .4s; }
.card:hover .card__art .art-moon { filter: drop-shadow(0 0 14px rgba(255,215,0,.7)); }
.card:hover .art-subject { filter: drop-shadow(0 0 12px rgba(157,0,255,.9)); }
.card__art-fallback { display: grid; place-items: center; width: 100%; height: 100%; font-size: 3.6rem; background: linear-gradient(150deg, rgba(157,0,255,.35), rgba(10,0,16,.6)); }

/* moving glare */
.card__glare { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(180px circle at var(--mx,50%) var(--my,0%), rgba(255,255,255,.18), transparent 60%); }
.card:hover .card__glare { opacity: 1; }

.card__body { padding: 15px 17px 19px; flex: 1; display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 2; }
.card__name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .6px; color: var(--ghost); text-shadow: 0 0 14px rgba(157,0,255,.5); }
.card--gold .card__name { color: #fff; }
.card__tag { font-size: .86rem; opacity: .76; flex: 1; }
.card__cta { margin-top: 10px; align-self: flex-start; font-weight: 800; color: var(--gold); display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; }
.card__cta .btn__arr { transition: transform .2s; }
.card:hover .card__cta .btn__arr { transform: translateX(4px); }

/* accent top border glow */
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 4; background: linear-gradient(90deg, transparent, var(--purple), transparent); opacity: .6; transition: opacity .3s; }
.card--gold::before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.card--orange::before { background: linear-gradient(90deg, transparent, var(--orange), transparent); }
.card:hover::before { opacity: 1; }

/* coming soon */
.card--soon { cursor: default; border-color: rgba(157,0,255,.2); box-shadow: var(--shadow-sm); }
.card--soon:hover { border-color: rgba(157,0,255,.2); box-shadow: var(--shadow-sm); }
.card--soon .card__art { filter: grayscale(.65) brightness(.55); }
.card--soon .card__name { opacity: .55; }
.card--soon::before { opacity: .2; }
.badge-soon { position: absolute; top: 12px; right: 12px; z-index: 5; background: rgba(10,0,16,.88); border: 1px solid var(--gold); color: var(--gold); font-size: .66rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }

/* ---- art animations (use translate/scale/rotate so they COMPOSE with svg transform attrs) ----
   Paused by default for performance; the scene comes alive on hover/focus. ---- */
.card__art [class*="art-"] { animation-play-state: paused; }
.card:hover .card__art [class*="art-"],
.card:focus-within .card__art [class*="art-"] { animation-play-state: running; }
.art-stars { animation: aStars 4s ease-in-out infinite; }
@keyframes aStars { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
.art-moon { animation: aMoon 6s ease-in-out infinite; }
@keyframes aMoon { 0%,100% { opacity: .92; } 50% { opacity: 1; } }
.art-fog { animation: aFog 9s ease-in-out infinite alternate; }
@keyframes aFog { from { translate: -12px 0; } to { translate: 12px 0; } }
.art-bob { animation: aBob 3.6s ease-in-out infinite; }
.art-bob--slow { animation-duration: 5s; } .art-bob--fast { animation-duration: 2.4s; }
@keyframes aBob { 0%,100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.card:hover .art-bob { animation-duration: 1.6s; }
.art-fly { animation: aFly 1.9s ease-in-out infinite; }
@keyframes aFly { 0%,100% { translate: 0 0; rotate: -5deg; } 50% { translate: 0 -18px; rotate: 5deg; } }
.card:hover .art-fly { animation-duration: 1.1s; }
.art-hop { animation: aHop 1.7s ease-in-out infinite; }
@keyframes aHop { 0%,55%,100% { translate: 0 0; } 28% { translate: 0 -24px; } }
.card:hover .art-hop { animation-duration: 1s; }
.art-run { animation: aRun .5s ease-in-out infinite; }
@keyframes aRun { 0%,100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -7px; rotate: 3deg; } }
.art-rise { animation: aRise 2.8s ease-in-out infinite; }
@keyframes aRise { 0%,100% { translate: 0 48px; } 42%,72% { translate: 0 0; } }
.card:hover .art-rise { animation-duration: 1.6s; }
.art-flip { transform-box: fill-box; transform-origin: center; animation: aFlip 3.2s ease-in-out infinite; }
@keyframes aFlip { 0%,100% { scale: 1 1; } 50% { scale: -1 1; } }
.art-ball { animation: aBall 1.5s ease-in-out infinite alternate; }
@keyframes aBall { 0% { translate: -46px -8px; } 100% { translate: 46px 28px; } }
.card:hover .art-ball { animation-duration: .9s; }
.art-paddle { transform-box: fill-box; animation: aPaddle 1.5s ease-in-out infinite; }
@keyframes aPaddle { 0%,100% { translate: -28px 0; } 50% { translate: 28px 0; } }
.card:hover .art-paddle { animation-duration: .9s; }
.art-car { animation: aCar 3.6s linear infinite; }
@keyframes aCar { 0% { translate: -120px 0; } 100% { translate: 380px 0; } }
.art-reticle { transform-box: fill-box; transform-origin: center; animation: aReticle 1.9s ease-in-out infinite; }
@keyframes aReticle { 0%,100% { scale: 1; } 50% { scale: 1.14; } }
.art-beam { animation: aBeam 1.5s ease-in-out infinite; }
@keyframes aBeam { 0%,100% { opacity: .3; } 50% { opacity: .8; } }
.art-spark { transform-box: fill-box; transform-origin: center; animation: aSpark 2.2s ease-in-out infinite; }
@keyframes aSpark { 0%,100% { scale: .8; opacity: .7; rotate: 0deg; } 50% { scale: 1.2; opacity: 1; rotate: 24deg; } }
.art-shovel { transform-box: fill-box; transform-origin: 70px 110px; animation: aShovel 2.4s ease-in-out infinite; }
@keyframes aShovel { 0%,100% { rotate: 0deg; } 50% { rotate: -12deg; } }

/* ============================================================
   Leaderboard
   ============================================================ */
.lb { background: var(--glass); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-md); }
.lb__controls { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.lb__tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.lb__tab { background: rgba(157,0,255,.12); border: 1px solid var(--line); color: var(--ghost); border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer; font-family: inherit; font-size: .85rem; transition: background .2s, box-shadow .2s, transform .15s; }
.lb__tab:hover { transform: translateY(-1px); }
.lb__tab.is-active { background: var(--purple); color: #fff; box-shadow: 0 0 16px rgba(157,0,255,.7); }
.lb__period { display: inline-flex; background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lb__period-btn { background: transparent; border: none; color: var(--ghost); padding: 8px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-family: inherit; font-size: .85rem; }
.lb__period-btn.is-active { background: var(--gold); color: #2a1500; }
.lb__table { width: 100%; border-collapse: collapse; }
.lb__table th, .lb__table td { text-align: left; padding: 12px 12px; }
.lb__table th { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; opacity: .55; }
.lb__table tbody tr { border-top: 1px solid rgba(157,0,255,.16); transition: background .2s; }
.lb__table tbody tr:hover { background: rgba(157,0,255,.08); }
.lb__table tbody tr:nth-child(1) td { color: var(--gold); font-weight: 800; }
.lb__rank { width: 56px; font-weight: 800; }
.lb__score { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.lb__empty { text-align: center; padding: 36px 10px; opacity: .85; }
.lb__empty .ghost-emoji { font-size: 3.2rem; display: block; margin-bottom: 8px; animation: bob 4s ease-in-out infinite; }

/* ============================================================
   Competitions strip (advert — distinct)
   ============================================================ */
.comps { background: linear-gradient(180deg, rgba(255,107,53,.1), rgba(255,215,0,.04)); border: 1px solid rgba(255,215,0,.28); border-radius: var(--radius); max-width: calc(var(--maxw) + 20px); margin: 36px auto; }
.comps__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.comps__disclaimer { font-size: .82rem; opacity: .82; margin: 6px 0 0; max-width: 640px; line-height: 1.5; }
.comps__disclaimer a { color: var(--gold); text-decoration: underline; }
.footer__age { max-width: 660px; margin: 8px auto 0; font-size: .76rem; opacity: .72; line-height: 1.55; }
.footer__age a { color: var(--gold); }
.footer__age strong { color: var(--ghost); }
.comps__row { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.comp-card { flex: 0 0 250px; scroll-snap-align: start; background: rgba(10,0,16,.72); border: 1px solid rgba(255,215,0,.36); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .18s, box-shadow .25s; }
.comp-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(255,107,53,.45); }
.comp-card__img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--orange), var(--gold)); display: grid; place-items: center; font-size: 2.6rem; position: relative; }
.comp-card__img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.comp-card__body { padding: 13px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.comp-card__title { font-weight: 700; font-size: .9rem; line-height: 1.3; }
.comp-card__bar { position: relative; height: 6px; background: rgba(255,255,255,.14); border-radius: 999px; margin-top: 2px; }
.comp-card__bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--gold)); }
.comp-card__ghost { position: absolute; top: 50%; transform: translate(-50%,-50%); font-size: 14px; line-height: 1; filter: drop-shadow(0 0 4px rgba(255,215,0,.8)); pointer-events: none; }
.comp-card__tix { font-size: .68rem; opacity: .65; }
.comp-card__age { position: absolute; top: 8px; left: 8px; background: rgba(10,0,16,.85); color: var(--gold); border: 1px solid var(--gold); font-size: .6rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; letter-spacing: .5px; }
.comp-card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.comp-card__price { font-weight: 800; color: var(--gold); }
.comp-card__enter { background: var(--orange); color: #2a1500; font-weight: 800; padding: 7px 13px; border-radius: 999px; font-size: .82rem; transition: transform .15s; }
.comp-card:hover .comp-card__enter { transform: translateX(3px); }

/* ============================================================
   Footer
   ============================================================ */
.footer { position: relative; z-index: 2; text-align: center; padding: 48px 18px 64px; border-top: 1px solid var(--line-soft); background: rgba(8,0,14,.6); }
.footer__main { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer__line { font-weight: 700; opacity: .9; margin: 0; }
.footer__social { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer__social a { text-decoration: none; opacity: .82; font-weight: 600; transition: opacity .2s, text-shadow .2s; }
.footer__social a:hover { opacity: 1; text-shadow: 0 0 12px rgba(157,0,255,.9); }
.footer__copy { opacity: .5; font-size: .8rem; margin-top: 20px; }

/* ============================================================
   Overlay (game launcher)
   ============================================================ */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(4,0,8,.97); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.overlay[hidden] { display: none; }
.overlay__bar { display: flex; align-items: center; justify-content: space-between; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); background: rgba(8,0,14,.92); }
.overlay__title { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); letter-spacing: 1px; text-shadow: 0 0 12px rgba(255,215,0,.5); }
.overlay__close { display: inline-flex; align-items: center; gap: 7px; background: var(--orange); border: 1px solid rgba(255,255,255,.3); color: #190010; font-weight: 800; min-height: 42px; padding: 0 18px; border-radius: 999px; font-size: 1rem; letter-spacing: .02em; cursor: pointer; transition: background .2s, transform .12s; box-shadow: 0 0 18px rgba(255,107,53,.55); }
.overlay__close:hover { background: #ff8a5c; transform: scale(1.05); }
.overlay__close-x { font-size: 1.15rem; line-height: 1; }
.overlay__stage { flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; }
.overlay__stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.overlay__msg { text-align: center; padding: 30px; max-width: 440px; }
.overlay__msg .ghost-emoji { font-size: 3.6rem; display: block; margin-bottom: 14px; animation: bob 4s ease-in-out infinite; }
.overlay__msg code { background: rgba(157,0,255,.2); padding: 3px 8px; border-radius: 6px; font-size: .9em; }

/* ============================================================
   Modals
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 110; background: rgba(4,0,8,.86); display: grid; place-items: center; padding: 18px; animation: fadeIn .2s ease; }
.modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal__card { position: relative; width: min(390px, 100%); background: var(--glass-2); border: 1px solid var(--purple); border-radius: var(--radius); padding: 28px 26px 26px; box-shadow: 0 0 0 1px rgba(157,0,255,.4), 0 24px 70px rgba(0,0,0,.65); animation: popIn .28s cubic-bezier(.2,1.3,.4,1); }
@keyframes popIn { from { transform: scale(.88) translateY(10px); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__card--score { text-align: center; }
.modal__x { position: absolute; top: 12px; right: 12px; background: rgba(157,0,255,.18); border: 1px solid var(--line); color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; }
.modal__title { font-family: var(--font-display); font-size: 2.1rem; color: var(--gold); margin: 0 0 18px; letter-spacing: 1px; text-shadow: 0 0 14px rgba(255,215,0,.5); }
.modal__note { font-size: .78rem; opacity: .6; margin: 14px 0 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 600; cursor: pointer; border-bottom: 1px solid rgba(157,0,255,.16); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__track { width: 54px; height: 31px; background: rgba(0,0,0,.5); border: 1px solid var(--line); border-radius: 999px; position: relative; transition: background .2s; flex: 0 0 auto; }
.toggle__thumb { position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%; background: var(--ghost); transition: transform .25s cubic-bezier(.2,1.3,.4,1), background .2s; }
.toggle input:checked ~ .toggle__track { background: var(--purple); box-shadow: 0 0 14px rgba(157,0,255,.6); }
.toggle input:checked ~ .toggle__track .toggle__thumb { transform: translateX(23px); background: var(--gold); }
.score-big { font-family: var(--font-display); font-size: 4.4rem; color: var(--gold); margin: 6px 0; text-shadow: 0 0 28px rgba(255,215,0,.6); }
.score-sub { opacity: .85; margin: 0 0 18px; }
.handle-wrap { margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.handle-prompt { font-weight: 700; color: var(--gold); margin: 0; font-size: .95rem; }
#handleInput { width: 100%; background: rgba(0,0,0,.4); border: 1px solid var(--line); color: var(--ghost); border-radius: 12px; padding: 13px 14px; font-family: inherit; font-size: 1rem; text-align: center; }
#handleInput:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 14px rgba(157,0,255,.5); }
#scoreDismiss { margin-top: 6px; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  .nav__link { display: none; }
  .hide-sm { display: none; }
  .header { gap: 8px; padding: 0 12px; }
  .nav { gap: 7px; }
  .brand__logo { height: 40px; }
  .brand__text { font-size: 1.25rem; letter-spacing: .5px; }
  .btn--comps { font-size: .8rem; padding: .6em 1em; }
  .nav__icon { width: 38px; height: 38px; }
  .section { padding: 48px 16px; }
  .hero { min-height: 74vh; }
  .hero__inner { padding: 0 16px 52px; }
  .cobweb { width: 124px; height: 124px; }
  .hero__scroll { display: none; }
}
@media (min-width: 900px) { .games-grid { grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); } }
button, .btn, .nav__icon, a.btn { min-height: 44px; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bg-bats, .bg-dust { display: none; }
  .reveal { opacity: 1; transform: none; }
}
