/* Spazzyorbit's Gaming Hub: fantasy Halloween styling to match Number Rush. Mobile-first. */
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Cinzel Decorative"; src: url("../fonts/cinzel-decorative-bold-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cinzel Decorative"; src: url("../fonts/cinzel-decorative-black-latin.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #140a24; --bg2: #1d0f33; --panel: rgba(36, 18, 60, 0.86); --panel-solid: #26133f;
  --gold: #e9b960; --gold-hi: #ffe7b0; --orange: #ff8a1e; --violet: #b78cff; --text: #efe6ff; --muted: #c8b8e6;
  --line: rgba(233, 185, 96, 0.45); --radius: 14px; --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --wrap: 1120px; --pad: clamp(16px, 4vw, 32px);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  --font-head: "Cinzel", Georgia, "Times New Roman", serif;
  --font-deco: "Cinzel Decorative", "Cinzel", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg) radial-gradient(ellipse at 50% -10%, #3a1d5e 0%, var(--bg) 60%) no-repeat; color: var(--text);
  font: 400 1rem/1.6 var(--font-body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: rgba(255,255,255,0.08); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.5em; overflow-wrap: break-word; }
h3 { font-size: 1.08rem; color: var(--gold-hi); letter-spacing: 0.02em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 820px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--gold); color: #1a0d2c; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.fine { font-size: 0.88rem; color: var(--muted); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(20, 10, 36, 0.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding-top: env(safe-area-inset-top); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold-hi); text-decoration: none; font-family: var(--font-deco); font-weight: 700;
  font-size: clamp(0.95rem, 3.6vw, 1.2rem); min-width: 0; }
.brand img { border-radius: 8px; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; }
.nav a { display: inline-block; padding: 8px 10px; min-height: 40px; border-radius: 8px; color: var(--muted); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; }
.nav a:hover, .nav a[aria-current] { color: var(--gold-hi); background: rgba(233, 185, 96, 0.12); }

/* heroes */
.hub-hero, .game-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,10,36,0.55) 0%, rgba(20,10,36,0.78) 60%, var(--bg) 100%); }
.hub-hero-inner { padding-top: clamp(56px, 12vw, 140px); padding-bottom: clamp(56px, 10vw, 120px); text-align: center; }
.eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); font-size: 0.8rem; margin-bottom: 0.6em; }
.title-deco { font-family: var(--font-deco); font-weight: 900; color: var(--gold-hi); font-size: clamp(2rem, 8.5vw, 4.2rem);
  text-shadow: 0 2px 0 #4a1f00, 0 0 24px rgba(255, 138, 30, 0.45), 0 4px 18px rgba(0,0,0,0.7); margin-bottom: 0.3em; }
.lead { font-size: clamp(1.02rem, 2.6vw, 1.2rem); color: #f3eaff; max-width: 40em; margin-left: auto; margin-right: auto; text-shadow: 0 1px 8px rgba(0,0,0,0.8); }
.game-hero-inner { display: grid; gap: 28px; padding-top: clamp(36px, 8vw, 96px); padding-bottom: clamp(40px, 8vw, 96px); align-items: center; }
.game-hero-text { text-align: center; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(20,10,36,0.7);
  color: var(--gold-hi); font-family: var(--font-head); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; vertical-align: middle; }

/* card fan */
.card-fan { position: relative; height: clamp(170px, 46vw, 300px); max-width: 520px; width: 100%; margin: 0 auto; }
.card-fan img { position: absolute; left: 50%; bottom: 0; width: clamp(96px, 26vw, 176px); height: auto; aspect-ratio: 240 / 336;
  transform-origin: 50% 110%; border-radius: 10px; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.6)); }
.card-fan img:nth-child(1) { transform: translateX(-50%) rotate(-21deg); }
.card-fan img:nth-child(2) { transform: translateX(-50%) rotate(-7deg); }
.card-fan img:nth-child(3) { transform: translateX(-50%) rotate(7deg); }
.card-fan img:nth-child(4) { transform: translateX(-50%) rotate(21deg); }
@media (prefers-reduced-motion: no-preference) {
  .card-fan img { transition: transform 0.35s ease; }
  .card-fan:hover img:nth-child(1) { transform: translateX(-50%) rotate(-28deg) translateY(-6px); }
  .card-fan:hover img:nth-child(4) { transform: translateX(-50%) rotate(28deg) translateY(-6px); }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px; border-radius: 12px;
  font-family: var(--font-head); font-weight: 900; font-size: 1rem; text-decoration: none; letter-spacing: 0.03em; margin: 4px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-primary { background: linear-gradient(180deg, #ffb24a, #e0701a); color: #2a1200; border: 1px solid #ffd28a; box-shadow: 0 6px 20px rgba(255,138,30,0.35); }
.btn-primary:hover { color: #1c0b00; transform: translateY(-1px); box-shadow: 0 8px 26px rgba(255,138,30,0.5); }
.btn-ghost { color: var(--gold-hi); border: 1px solid var(--line); background: rgba(20,10,36,0.6); }
.btn-ghost:hover { background: rgba(233,185,96,0.14); }
.ico { width: 28px; height: 28px; fill: currentColor; flex: none; }

/* sections */
.section { padding: clamp(40px, 7vw, 80px) 0; }
.section-title { font-family: var(--font-deco); font-weight: 700; color: var(--gold); font-size: clamp(1.5rem, 5vw, 2.2rem); text-align: center; margin-bottom: 0.9em; }
.section-title::after { content: ""; display: block; width: 120px; max-width: 40%; height: 2px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* downloads */
.download { background: linear-gradient(180deg, rgba(58, 29, 94, 0.35), transparent); }
.downloads { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 820px; margin: 0 auto 12px; }
.dl { text-align: center; min-width: 0; }
.btn-dl { width: 100%; margin: 0; padding: 14px 18px; min-height: 72px; justify-content: flex-start; text-align: left; color: var(--gold-hi);
  background: linear-gradient(180deg, #3b1d63, #26133f); border: 1px solid var(--line); box-shadow: var(--shadow); }
.btn-dl:hover { color: #fff; background: linear-gradient(180deg, #4a2678, #2e1750); transform: translateY(-1px); }
.btn-text { display: flex; flex-direction: column; min-width: 0; }
.btn-label { font-size: clamp(1rem, 4.2vw, 1.2rem); line-height: 1.25; }
.btn-meta { font-family: var(--font-body); font-weight: 500; font-size: 0.82rem; color: var(--muted); letter-spacing: 0; overflow-wrap: anywhere; }
.dl.is-recommended .btn-dl { background: linear-gradient(180deg, #ffb24a, #d9661a); color: #2a1200; border-color: #ffd28a; box-shadow: 0 8px 28px rgba(255,138,30,0.45); }
.dl.is-recommended .btn-meta { color: #4a2400; }
.dl-req { margin: 8px 0 0; font-size: 0.86rem; color: var(--muted); }
.rec-tag { color: var(--orange); font-weight: 700; }
.os-note { max-width: 820px; margin: 0 auto 10px; text-align: center; color: var(--gold-hi); }
.download .fine { max-width: 820px; margin: 10px auto 0; text-align: center; }

/* gallery */
.gallery { display: grid; gap: 16px; grid-template-columns: 1fr; }
.shot { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.shot a { display: block; }
.shot img { width: 100%; }
.shot figcaption { padding: 10px 14px; font-size: 0.9rem; color: var(--muted); }
.shot-tall img { max-height: 70vh; width: auto; margin: 0 auto; }

/* features */
.features, .card-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.features li, .card-legend li { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.features img { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--gold); flex: none; background: #2a1540; }
.features p, .card-legend p { margin: 0; color: var(--muted); }
.features div, .card-legend div { min-width: 0; }

/* rules */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 58px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--orange); color: #2a1200; font-family: var(--font-head); font-weight: 900; }
.card-legend { margin-bottom: 16px; }
.card-legend img { width: 72px; height: auto; border-radius: 6px; flex: none; }

/* help */
details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
summary { cursor: pointer; padding: 14px 16px; min-height: 48px; font-family: var(--font-head); font-weight: 700; color: var(--gold-hi); list-style-position: inside; }
details[open] summary { border-bottom: 1px solid var(--line); }
details > :not(summary) { margin-left: 16px; margin-right: 16px; }
details ol, details ul { padding-left: 1.2em; }
details li { margin-bottom: 6px; }
details > p:last-child, details > ul:last-child, details > ol:last-child { margin-bottom: 14px; }
details > :nth-child(2) { margin-top: 12px; }

/* changelog */
.release { border-left: 3px solid var(--gold); padding: 2px 0 2px 16px; margin-bottom: 22px; }
.release h3 { margin-bottom: 0.1em; }
.release-date { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.4em; }
.release ul { margin: 0; padding-left: 1.2em; }

/* hub grid */
.game-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: 1fr; }
.game-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 0; transition: transform .2s ease, border-color .2s ease; }
.game-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.game-card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.game-card-link:hover { color: inherit; }
.game-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.game-card-media img { width: 100%; height: 100%; object-fit: cover; }
.game-card-body { padding: 16px 18px 18px; }
.game-card-title { font-family: var(--font-deco); font-size: 1.4rem; color: var(--gold-hi); margin-bottom: 0.2em; }
.game-card-meta { color: var(--orange); font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5em; }
.game-card-body p { color: var(--muted); }
.game-card-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 0; }
.plats { font-size: 0.85rem; color: var(--muted); }
.game-card-soon { display: grid; place-items: center; text-align: center; border-style: dashed; background: rgba(36,18,60,0.5); min-height: 200px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: #0f071c; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 0.9rem; }

/* narrow phones: one compact, swipeable nav row so the sticky header stays short */
@media (max-width: 639px) {
  .header-inner { gap: 0; padding-top: 4px; padding-bottom: 2px; }
  .site-header nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .nav { flex-wrap: nowrap; }
  .nav a { white-space: nowrap; font-size: 0.82rem; padding: 8px 9px; min-height: 36px; }
  .nav li:first-child a { padding-left: 0; }
}

/* wider screens */
@media (min-width: 640px) {
  .downloads { grid-template-columns: 1fr 1fr; }
  .features, .card-legend { grid-template-columns: 1fr 1fr; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr 1fr; }
  .shot-wide { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .game-hero-inner { grid-template-columns: 1.15fr 1fr; }
  .game-hero-text { text-align: left; }
  .game-hero-text .lead { margin-left: 0; }
  .badges { justify-content: flex-start; }
  .gallery { grid-template-columns: 2fr 1fr; }
  .shot-wide { grid-column: auto; }
  .shot-tall { grid-row: span 2; }
  .shot-tall img { max-height: none; width: 100%; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.center { text-align: center; }
.site-footer p:last-child { margin-bottom: 0; }
