:root {
  --bg: #0d0d12;
  --bg-2: #15151d;
  --card: #1b1b25;
  --line: #2a2a38;
  --text: #f3f1ec;
  --muted: #a6a3b3;
  --red: #ff3b30;
  --red-2: #ff6a3d;
  --gold: #ffc53d;
  --sky: #4cc3ff;
  --radius: 18px;
  --max: 1160px;
  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 18, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 26px; color: #fff;
  transform: rotate(-6deg);
  box-shadow: 0 6px 18px rgba(255, 59, 48, .35);
}
.brand-name { font-family: var(--font-display); font-size: 26px; letter-spacing: 1.5px; }
.brand-name span { color: var(--red); }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font-size: 18px; cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 20px; border-top: 1px solid var(--line); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--red), var(--red-2)); color: #fff; box-shadow: 0 10px 26px rgba(255, 59, 48, .35); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sky { background: var(--sky); color: #06202e; box-shadow: 0 10px 26px rgba(76, 195, 255, .3); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 110px 0 120px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(255, 59, 48, .28), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -50% -15%; width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(76, 195, 255, .16), transparent 65%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); margin-bottom: 18px; }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 10vw, 128px); line-height: .9; margin: 0 0 24px; letter-spacing: 1px; }
.hero h1 .stroke { color: transparent; -webkit-text-stroke: 2px var(--text); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 580px; margin: 0 0 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 90px 0; }
.section-head { margin-bottom: 44px; }
.section-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(42px, 6vw, 68px); line-height: 1; margin: 0 0 10px; letter-spacing: 1px; }
.section-head p { color: var(--muted); margin: 0; max-width: 620px; }

/* ---------- Game cards ---------- */
.games-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 860px) { .games-grid { grid-template-columns: 1fr; } }
.game-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.game-card:hover { transform: translateY(-6px); border-color: #3c3c50; box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
.game-art { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.game-card:hover .game-art img { transform: scale(1.05); }
.platform-tag {
  position: absolute; top: 16px; left: 16px;
  background: rgba(0, 0, 0, .65); backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
}
.game-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; margin: 0; letter-spacing: 1px; }
.game-body p { margin: 0; color: var(--muted); }
.game-body .more { margin-top: auto; padding-top: 12px; font-weight: 700; color: var(--red); }

/* FIST key art (pure CSS/SVG) */
.fist-art {
  width: 100%; height: 100%;
  background:
    radial-gradient(circle at 70% 40%, rgba(255, 59, 48, .55), transparent 55%),
    radial-gradient(circle at 20% 90%, rgba(255, 197, 61, .25), transparent 50%),
    linear-gradient(160deg, #1a0606, #050505 70%);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.fist-art svg { width: 62%; max-width: 420px; filter: drop-shadow(0 18px 40px rgba(255, 59, 48, .45)); }
.fist-art .crack { position: absolute; inset: 0; opacity: .5; }

/* ---------- Game detail page ---------- */
.game-hero { padding: 70px 0 60px; position: relative; overflow: hidden; }
.game-hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .game-hero .wrap { grid-template-columns: 1fr; gap: 36px; } }
.game-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(60px, 9vw, 112px); line-height: .9; margin: 0 0 18px; letter-spacing: 1px; }
.game-hero .lead { font-size: 19px; color: var(--muted); margin: 0 0 30px; }
.game-hero .media { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1 / 1; box-shadow: 0 30px 70px rgba(0, 0, 0, .5); }
.game-hero .media img { width: 100%; height: 100%; object-fit: cover; }
.app-icon { width: 84px; height: 84px; border-radius: 20px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .15); margin-bottom: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.feature .icon { font-size: 30px; margin-bottom: 12px; }
.feature h3 { margin: 0 0 8px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Pawtopia theme */
.theme-paw { --accent: var(--sky); }
.theme-paw .game-hero { background: radial-gradient(circle at 80% 20%, rgba(76, 195, 255, .2), transparent 55%), radial-gradient(circle at 10% 90%, rgba(255, 197, 61, .12), transparent 50%); }
.theme-paw .eyebrow { color: var(--sky); }
.theme-paw .more { color: var(--sky); }

/* FIST theme */
.theme-fist .game-hero { background: radial-gradient(circle at 80% 30%, rgba(255, 59, 48, .25), transparent 55%); }
.theme-fist .media { background: #050505; }

/* ---------- About / contact ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { color: var(--muted); font-size: 17px; margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 46px; line-height: 1; color: var(--red); }
.stat span { color: var(--muted); font-size: 14px; }

.contact-box {
  background: linear-gradient(135deg, #24110f, #15151d 60%);
  border: 1px solid var(--line); border-radius: 26px; padding: 56px; text-align: center;
}
@media (max-width: 600px) { .contact-box { padding: 36px 22px; } }
.contact-box h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1; margin: 0 0 12px; }
.contact-box p { color: var(--muted); margin: 0 auto 28px; max-width: 540px; }

/* ---------- Legal pages ---------- */
.legal { padding: 60px 0 90px; }
.legal .wrap { max-width: 860px; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(46px, 7vw, 76px); line-height: 1; margin: 0 0 10px; letter-spacing: 1px; }
.legal .updated { color: var(--muted); margin: 0 0 36px; font-size: 15px; }
.legal h2 { font-size: 22px; margin: 44px 0 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.legal h3 { font-size: 17px; margin: 24px 0 8px; }
.legal p, .legal li { color: #cfccd8; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--sky); }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--bg-2); }
.legal .table-scroll { overflow-x: auto; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; }
.toc b { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 30px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.toc a { color: var(--muted); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--text); }
.policy-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
@media (max-width: 760px) { .policy-cards { grid-template-columns: 1fr; } }
.policy-cards a { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--text); font-weight: 700; transition: border-color .2s; }
.policy-cards a:hover { border-color: var(--red); }
.policy-cards a span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 50px 0 34px; background: #09090d; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; color: #d6d3de; font-size: 15px; }
.footer-grid a:hover { color: var(--red); }
.footer-grid p { color: var(--muted); font-size: 14px; margin: 12px 0 0; max-width: 300px; }
.copyright { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
