/* Fox Battles website: dark glass, clean and modern (like the game UI). */
@font-face { font-family: "Titan One"; src: url("../fonts/TitanOne-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0a0c13;
  --bg2: #111522;
  --glass: rgba(24, 29, 46, 0.62);
  --glass2: rgba(34, 40, 62, 0.55);
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --muted: #98a2b8;
  --gold: #ffc44d;
  --orange: #ff8a3d;
  --good: #5fe08a;
  --bad: #ff6b6b;
  --r: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --gold-grad: linear-gradient(180deg, #fff3c4 0%, #ffd25e 42%, #ff9d2a 70%, #c45d12 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 400 1rem/1.6 "Poppins", system-ui, sans-serif; min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 138, 61, 0.13), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(110, 90, 255, 0.12), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(60, 200, 180, 0.08), transparent 60%),
    linear-gradient(180deg, #0c0f19, var(--bg) 40%);
  background-attachment: fixed;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { font-family: "Titan One", "Poppins", sans-serif; font-weight: 400; letter-spacing: 0.5px; line-height: 1.15; margin: 0 0 0.4em;
  font-synthesis: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: geometricPrecision;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.18); }  /* (owner: headings looked pixelated: soften the edges of the heavy Titan One) */
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
h2, h3 { font-family: "Poppins", sans-serif; font-weight: 700; letter-spacing: 0; }  /* (owner: section headings in a different font; Titan One stays for page titles + logo) */
.gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }  /* (a shadow would show through the see-through gold letters) */
.muted { color: var(--muted); }
.tiny { font-size: 0.8rem; }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.center { text-align: center; }
section { padding: 56px 0; }
.lead { font-size: 1.12rem; color: #c9d1e3; max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- logo */
.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 0.95; font-family: "Titan One"; }
.logo .lw, .logo .lb { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90, 30, 0, 0.7)); }
.logo .lw { font-size: 1.5rem; display: inline-flex; align-items: center; }
.logo .lw img { height: 1.15em; margin: 0 0.04em; filter: drop-shadow(0 2px 0 rgba(90, 30, 0, 0.6)); }
.logo .lb { font-size: 0.78rem; letter-spacing: 2.5px; }
.logo.big .lw { font-size: clamp(3.4rem, 10vw, 6.4rem); }
.logo.big .lb { font-size: clamp(1.5rem, 4.4vw, 2.8rem); letter-spacing: 0.2em; }
.logo.big { position: relative; z-index: 1; filter: drop-shadow(0 0 16px var(--logo-glow, rgba(0, 0, 0, 0))); transition: filter 1.2s; }
.logo-fx { position: absolute; pointer-events: none; z-index: 2; }  /* (fx.js logoFx: drips + sparks on the big logo) */

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, calc((100% - 1180px) / 2));
  background: rgba(10, 12, 19, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand:hover { text-decoration: none; }
#nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
#nav a { color: #cdd4e4; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 0.93rem; }
#nav a:hover { background: var(--glass2); text-decoration: none; color: #fff; }
#nav a.on { color: var(--gold); background: rgba(255, 196, 77, 0.08); }
#nav a.acc { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); margin-left: 6px; }
.acc-ico { width: 22px; height: 22px; border-radius: 50%; background: url("../fox_head.svg") center/70% no-repeat, #26304a; display: inline-block; }
.acc-ico.pic { background-size: cover; }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .burger { display: block; }
  #nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px 16px 16px;
    background: rgba(10, 12, 19, 0.96); border-bottom: 1px solid var(--line); }
  body.menu-open #nav { display: flex; }
  #nav a.acc { margin: 6px 0 0; }
}

/* ---------------------------------------------------------------- glass cards + buttons */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 14px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line2); background: var(--glass2); color: #fff; font-family: inherit; font-size: 1rem; transition: transform 0.15s, background 0.15s; }
.btn:hover { transform: translateY(-1px); background: rgba(50, 58, 88, 0.7); text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, #ffb347, #ff7a1f); border-color: rgba(255, 220, 150, 0.6); color: #2a1200; box-shadow: 0 8px 24px rgba(255, 122, 31, 0.3); }
.btn.primary:hover { background: linear-gradient(180deg, #ffc163, #ff8a35); }
.btn.play { background: #05070c; border-color: #3a4152; padding: 8px 18px 8px 14px; }
.btn.play span { display: flex; flex-direction: column; line-height: 1.1; font-size: 1.15rem; }
.btn.play small { font-size: 0.62rem; font-weight: 600; letter-spacing: 1px; color: #c7cede; }
.btn.play.soon { cursor: default; opacity: 0.92; }
.btn.play.soon:hover { transform: none; }
.btn.play.pc svg { flex: none; }
.btn.small { padding: 7px 14px; border-radius: 11px; font-size: 0.88rem; gap: 6px; }
.btn.ghost { background: transparent; }
.btn.play.small { transform: scale(0.88); transform-origin: left center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 600;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.05); white-space: nowrap; }
.rank { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border: 2px solid; border-radius: 8px;
  font-family: "Titan One"; font-size: 0.85rem; background: rgba(0, 0, 0, 0.35); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tab { padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: #cfd6e6; font: 600 0.95rem "Poppins";
  cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { border-color: var(--line2); color: #fff; }
.tab.on { color: #2a1200; background: linear-gradient(180deg, #ffd06a, #ff9a3b); border-color: transparent; }
.tab img { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- hero (top of a page) */
.hero-top { position: relative; padding: 70px 0 40px; overflow: hidden; }
.hero-top.home { padding: 60px 0 30px; min-height: 78vh; display: flex; align-items: center; }
.hero-top .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.35; filter: saturate(1.2);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.hero-top .wrap { position: relative; }
.home-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center; }
.home-grid .pitch { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.home-lineup { position: relative; height: 480px; }
.home-lineup img { position: absolute; bottom: 0; height: 88%; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6)); transition: transform 0.4s; }
.home-lineup img:hover { transform: translateY(-8px); }
@media (max-width: 860px) { .home-grid { grid-template-columns: minmax(0, 1fr); } .home-grid > * { min-width: 0; } .home-lineup { height: 320px; } .home-grid .pitch { align-items: center; text-align: center; } }
.stats-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { padding: 10px 16px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); min-width: 110px; }
.stat b { display: block; font-family: "Titan One"; font-size: 1.5rem; color: var(--gold); line-height: 1.1; font-weight: 400; }
.stat span { font-size: 0.8rem; color: var(--muted); }

/* ---------------------------------------------------------------- feature tiles */
.feature { display: flex; flex-direction: column; gap: 10px; overflow: hidden; padding: 0; }
.feature .pic { height: 190px; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.feature .txt { padding: 16px 20px 20px; }
.feature .txt p { margin: 0; color: #c3cadb; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- heroes */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.hcard { position: relative; border-radius: var(--r); overflow: hidden; cursor: pointer; border: 1px solid var(--line); background: var(--glass);
  transition: transform 0.2s, border-color 0.2s; aspect-ratio: 3 / 4.2; display: flex; flex-direction: column; justify-content: flex-end; }
.hcard:hover { transform: translateY(-4px); border-color: var(--c, var(--line2)); }
.hcard .glow { position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 45%, var(--c), transparent 70%); opacity: 0.28; }
.hcard img.body { position: absolute; left: 0; right: 0; top: 4%; margin: auto; height: 82%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55)); }
.hcard .meta { position: relative; padding: 10px 12px; background: linear-gradient(180deg, transparent, rgba(5, 7, 12, 0.92) 40%); }
.hcard .meta b { font-family: "Titan One"; font-weight: 400; font-size: 1.12rem; display: block; }
.hcard .meta small { color: var(--muted); font-size: 0.78rem; }
.hcard .tier { position: absolute; top: 10px; right: 10px; }
.hcard .el { position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; }
.tier-rare { color: #5aa8ff; border-color: #5aa8ff; }
.tier-epic { color: #c08cff; border-color: #c08cff; }
.tier-legendary { color: #ffb84a; border-color: #ffb84a; }
.tier-mythical { color: #ff5a73; border-color: #ff5a73; }
.tier-god { color: #fff09a; border-color: #fff09a; background: rgba(255, 220, 100, 0.12); }
.tier-hidden { color: #59ffcf; border-color: #59ffcf; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(4, 6, 10, 0.75); backdrop-filter: blur(6px); padding: 16px; }
.modal.open { display: grid; }
.modal .box { width: min(820px, 100%); max-height: 92vh; overflow: auto; position: relative; }
.modal .close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line2); background: var(--glass2);
  color: #fff; font-size: 1.2rem; cursor: pointer; }
.hero-detail { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; }
.hero-detail .pic { position: relative; height: 340px; border-radius: 16px; overflow: hidden; background: radial-gradient(60% 50% at 50% 45%, var(--c), transparent 75%), rgba(0, 0, 0, 0.25); }
.hero-detail .pic img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 640px) { .hero-detail { grid-template-columns: 1fr; } .hero-detail .pic { height: 280px; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; font-size: 0.95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------------------------------------------------------------- world: areas + mobs */
.area { position: relative; overflow: hidden; padding: 0; min-height: 210px; display: flex; align-items: flex-end; }
.area .bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.6s; }
.area:hover .bg { transform: scale(1.05); }
.area .txt { position: relative; width: 100%; padding: 18px 20px; background: linear-gradient(180deg, transparent, rgba(5, 7, 12, 0.94) 55%); }
.area .txt p { margin: 0; color: #c3cadb; font-size: 0.92rem; }
.mob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.mcard { border-radius: 14px; border: 1px solid var(--line); background: var(--glass); padding: 8px 8px 10px; text-align: center; }
a.mcard { color: inherit; text-decoration: none; display: block; }
a.card.area { color: inherit; text-decoration: none; }
a.mcard:hover { border-color: var(--gold); }
.mcard img { width: 100%; aspect-ratio: 1; object-fit: contain; background: radial-gradient(closest-side, rgba(150, 140, 255, 0.18), transparent); border-radius: 10px; }
.mcard b { display: block; font-size: 0.9rem; }
.mcard small { color: var(--muted); font-size: 0.75rem; }
.mcard.rare { border-color: var(--c); box-shadow: inset 0 0 30px -12px var(--c); }
.mcard.rare img { background: radial-gradient(closest-side, var(--c), transparent); }

/* ---------------------------------------------------------------- tables / leaderboards */
.board { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.board th { text-align: left; font-size: 0.78rem; color: var(--muted); font-weight: 600; padding: 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.board td { padding: 10px 12px; background: rgba(255, 255, 255, 0.035); vertical-align: middle; }
.board td:first-child { border-radius: 12px 0 0 12px; width: 52px; text-align: center; font-family: "Titan One"; color: var(--muted); }
.board td:last-child { border-radius: 0 12px 12px 0; }
.board tr.top1 td:first-child { color: #ffd54a; } .board tr.top2 td:first-child { color: #dfe6f2; } .board tr.top3 td:first-child { color: #e0a06a; }
.board tr.me td { background: rgba(255, 196, 77, 0.12); }
.board .num { text-align: right; font-weight: 700; white-space: nowrap; }
.board .name b { display: block; }
.board .name small { color: var(--muted); }
.board-wrap { overflow-x: auto; }
@media (max-width: 640px) { .board .hide-s { display: none; } .board td { padding: 8px; } }
.faces { display: inline-flex; gap: 4px; }
.face { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #555; background: #1b2133; object-fit: cover; }
.minis { display: inline-flex; gap: 2px; }
.minis img { width: 38px; height: 38px; object-fit: contain; transform: scale(1.4); }
.note { padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line2); color: #c3cadb; background: rgba(255, 255, 255, 0.03); }
.loading { color: var(--muted); padding: 24px; text-align: center; }

/* ---------------------------------------------------------------- gallery */
.gallery { columns: 3 260px; column-gap: 16px; }
.gallery img { width: 100%; border-radius: 14px; margin: 0 0 16px; border: 1px solid var(--line); cursor: zoom-in; break-inside: avoid; display: block; }
.lightbox { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; background: rgba(0, 0, 0, 0.88); cursor: zoom-out; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 92vh; max-width: 100%; border-radius: 12px; }

/* ---------------------------------------------------------------- account */
.signin { max-width: 460px; margin: 30px auto; text-align: center; }
.sbtn { width: 100%; justify-content: center; margin: 8px 0; padding: 13px; background: #fff; color: #1f1f1f; border-color: #dadce0; }
.sbtn:hover { background: #f2f2f2; }
.sbtn.fb { background: #1877f2; color: #fff; border-color: #1877f2; }
.sbtn.fb:hover { background: #2a84f5; }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.avatar { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--gold); object-fit: cover; background: #222a40; }
.bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ff7a1f); border-radius: 99px; }
.owned-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.own { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.own.team { border-color: var(--gold); background: rgba(255, 196, 77, 0.07); }
.own img.f { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--c, #555); object-fit: cover; background: #1b2133; flex: none; }
.own img.m { width: 58px; height: 58px; object-fit: contain; flex: none; transform: scale(1.45); }
.own { overflow: hidden; }
.own .info { flex: 1; min-width: 0; }
.own .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.own .info small { color: var(--muted); font-size: 0.78rem; display: block; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 0.85rem; }
.stars .off { color: rgba(255, 255, 255, 0.18); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 34px 0 14px; }
.sec-title h2 { margin: 0; }

/* ---------------------------------------------------------------- footer */
.foot { margin-top: 60px; padding: 30px 0 20px; border-top: 1px solid var(--line); background: rgba(5, 7, 12, 0.6); }
.foot-in { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 24px; align-items: center; }
.foot-in p { margin: 8px 0 0; font-size: 0.85rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: #c7cede; font-size: 0.9rem; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* privacy page */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose li { margin: 4px 0; }

/* small fixes */
.hero-top.home .bg { background-position: center; opacity: 0.45; }
#areas.g2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
@media (max-width: 860px) {
  .home-grid .pitch > div { justify-content: center; }
  .hero-top.home { min-height: 0; }
}
@media (max-width: 420px) { #areas.g2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- animation (assets/js/fx.js adds the embers + counters) */
.embers { position: absolute; inset: 0; pointer-events: none; z-index: 0; mix-blend-mode: screen; }
@media (prefers-reduced-motion: no-preference) {
  /* top picture drifts slowly; on the home page it also follows the mouse a little */
  .hero-top .bg { animation: kenburns 36s ease-in-out infinite alternate; }
  .hero-top.home .bg { transform: translate(calc(var(--px, 0) * -18px), calc(var(--py, 0) * -10px)) scale(1.08); animation: none; }
  @keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }

  /* gold logo: a shine passes over it, the fox head nods */
  .logo .lw, .logo .lb {
    background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%), var(--gold-grad);
    background-size: 260% 100%, 100% 100%; background-repeat: no-repeat; animation: shine 5.5s ease-in-out infinite; }
  .logo .lb { animation-delay: 0.25s; }
  @keyframes shine { 0%, 55% { background-position: 130% 0, 0 0; } 85%, 100% { background-position: -40% 0, 0 0; } }
  .logo img { animation: nod 4s ease-in-out infinite; transform-origin: 50% 80%; }
  @keyframes nod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg) translateY(-2px); } }
  .logo.big { animation: pop-in 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
  @keyframes pop-in { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }

  /* home heroes: step up one by one, then breathe; they lean with the mouse */
  .home-lineup { transform: translate(calc(var(--px, 0) * 22px), calc(var(--py, 0) * 10px)); }
  .home-lineup img { animation: rise-in 0.9s cubic-bezier(0.2, 1.2, 0.4, 1) both, breathe 4.2s ease-in-out 1s infinite; }
  .home-lineup img:nth-child(2) { animation-delay: 0.15s, 1.6s; }
  .home-lineup img:nth-child(3) { animation-delay: 0.3s, 2.3s; }
  .home-lineup img:nth-child(4) { animation-delay: 0.45s, 2.9s; }
  .home-lineup img.out { animation: sink-out 0.55s ease-in both !important; }
  @keyframes sink-out { to { opacity: 0; translate: 0 50px; } }
  @keyframes rise-in { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
  @keyframes breathe { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

  /* buttons + cards */
  .btn.primary { position: relative; overflow: hidden; animation: glow 2.6s ease-in-out infinite; }
  @keyframes glow { 0%, 100% { box-shadow: 0 8px 24px rgba(255, 122, 31, 0.3); } 50% { box-shadow: 0 8px 34px rgba(255, 150, 50, 0.6); } }
  .btn.primary::after, .hcard::after, .feature::after, .area::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%); transform: translateX(-120%); }
  .btn.primary:hover::after, .hcard:hover::after, .feature:hover::after, .area:hover::after { transition: transform 0.7s; transform: translateX(120%); }
  .feature, .area { position: relative; }
  .feature { transition: transform 0.25s, border-color 0.25s; }
  .feature:hover { transform: translateY(-4px); border-color: var(--line2); }
  .feature .pic { transition: transform 0.6s; }
  .feature:hover .pic { transform: scale(1.04); }
  .hcard img.body { transition: transform 0.35s; }
  .hcard:hover img.body { transform: translateY(-6px) scale(1.04); }
  .hcard .glow { transition: opacity 0.3s; }
  .hcard:hover .glow { opacity: 0.5; }
  .mcard { transition: transform 0.2s, border-color 0.2s; }
  .mcard:hover { transform: translateY(-3px); border-color: var(--line2); }
  .mcard:hover img { animation: hop 0.5s ease-out; }
  @keyframes hop { 40% { transform: translateY(-6px) scale(1.05); } }

  /* leaderboard rows slide in, the leader glows */
  .board tr { animation: row-in 0.45s ease-out both; }
  .board tr:nth-child(2) { animation-delay: 0.04s; } .board tr:nth-child(3) { animation-delay: 0.08s; }
  .board tr:nth-child(4) { animation-delay: 0.12s; } .board tr:nth-child(5) { animation-delay: 0.16s; }
  .board tr:nth-child(6) { animation-delay: 0.2s; } .board tr:nth-child(7) { animation-delay: 0.24s; }
  .board tr:nth-child(8) { animation-delay: 0.28s; } .board tr:nth-child(n+9) { animation-delay: 0.32s; }
  @keyframes row-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
  .board tr.top1 td:first-child { animation: gold-pulse 2.2s ease-in-out infinite; }
  @keyframes gold-pulse { 50% { text-shadow: 0 0 12px rgba(255, 213, 74, 0.9); } }

  .modal.open .box { animation: pop-in 0.3s cubic-bezier(0.2, 1.3, 0.4, 1); }
  .stat { animation: rise-in 0.7s ease-out both; }
}
.hero-top .wrap { z-index: 1; }

/* game clips (assets/js/combos.js: one picture sheet of frames played like a video) */
.clip { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0d1120 center / cover no-repeat;
  border: 1px solid var(--line); }
.clip .play { position: absolute; right: 10px; bottom: 8px; font-size: 0.72rem; color: #fff; background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px; border-radius: 99px; pointer-events: none; }
.clip.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* hero window: "In action" clip + "Team-ups" cards (heroes.html) */
.modal .box:has(.tu-title) { width: min(900px, 100%); }
.tu-title { margin: 22px 0 10px; font-size: 1.1rem; }
.tu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.tu { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.03); }
.tu .clip { border: 0; border-radius: 0; }
.tu-txt { padding: 10px 14px 12px; }
.tu-txt p { margin: 4px 0 0; font-size: 0.88rem; color: #c9d1e3; }
.tu-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.95rem; }
.tu-head span { font-size: 0.72rem; color: var(--muted); }
.tu-head b { margin-left: 4px; }
.tu.noclip { background: linear-gradient(135deg, rgba(255, 201, 74, 0.08), rgba(255, 255, 255, 0.02)); }
.tu-note { margin: 16px 0 8px; font-size: 0.85rem; }
.fuse-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fuse { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04); font-size: 0.78rem; }
.fuse span { color: var(--muted); }
.fuse b { margin-left: 4px; color: #ffd27a; letter-spacing: 0.02em; }
@media (max-width: 640px) { .tu-grid { grid-template-columns: 1fr; } }
.clip.hover { cursor: pointer; }
.clip.hover .hint { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.3rem; color: #fff; background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.7); transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.clip.hover:hover .hint { transform: scale(1.1); }
.clip.hover.playing .hint, .clip.hover.loading .hint, .clip.hover.playing .play { opacity: 0; }
.clip.vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.clip.vid .play, .clip.vid .hint { z-index: 1; }

/* home page trailer (index.html) */
.trailer { display: grid; grid-template-columns: auto 1fr; gap: 44px; align-items: center; }
.trailer .phone { width: min(320px, 78vw); aspect-ratio: 9 / 16; border-radius: 30px; overflow: hidden; background: #000;
  border: 6px solid #1b2133; box-shadow: 0 0 0 1px var(--line2), 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 160, 60, 0.15); }
.trailer .phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.trailer-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 760px) { .trailer { grid-template-columns: 1fr; justify-items: center; text-align: center; } .trailer-btns { justify-content: center; } }
/* "See the world →" style links: easier to tap on phones */
.sec-title a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; }
:focus-visible { outline: 2px solid #ffc94a; outline-offset: 3px; border-radius: 6px; }

/* "Tell me when it's out" */
.launch-box { margin: 16px 0 6px; max-width: 460px; }
.launch-box > b { display: block; font-weight: 600; margin-bottom: 6px; }
.launch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.launch-row input { flex: 1 1 9em; min-width: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line2);
  background: rgba(10, 12, 19, 0.6); color: var(--text); font: inherit; }
.launch-row input:focus { outline: 2px solid #ffc94a; outline-offset: 1px; }
.launch-msg { margin: 6px 0 0; min-height: 1.4em; color: var(--gold); font-size: 0.92rem; }
.launch .tiny { margin: 2px 0 0; }
.launch.done .launch-row { display: none; }
.launch-center { display: flex; justify-content: center; text-align: left; margin-top: 8px; }

/* News */
.news { display: grid; gap: 16px; max-width: 860px; }
.news-head { display: flex; align-items: center; gap: 12px; }
.news-head h2 { margin: 0; font-size: 1.3rem; }
.chip.gold { color: var(--gold); border-color: var(--gold); }
.news-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.news-list li { display: flex; gap: 12px; align-items: flex-start; color: #d4dae8; }
.news-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 196, 77, 0.12); border: 1px solid rgba(255, 196, 77, 0.35); color: var(--gold); font-size: 0.95rem; }

/* Press kit */
.press-file { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit; text-decoration: none; }
.press-pic { height: 150px; background: rgba(255, 255, 255, 0.03) center / cover no-repeat; border-bottom: 1px solid var(--line); }
.press-pic.contain { background-size: contain; background-origin: content-box; padding: 18px; }
.press-cap { padding: 10px 14px 12px; display: grid; gap: 2px; }
.press-file:hover { border-color: var(--line2); }
/* text only screen readers read (the home page's main heading: the logo is a picture) */
.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; }

/* site search (common.js openSearch) */
.search-btn { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; cursor: pointer; display: flex; }
.search-btn:hover { border-color: var(--gold); }
.search-ov { position: fixed; inset: 0; z-index: 100; background: rgba(5, 7, 12, 0.7); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 14px 14px; }
.search-box { width: min(640px, 100%); background: #10141f; border: 1px solid var(--line2); border-radius: 18px; padding: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.search-box input.search { width: 100%; margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass); color: #fff; font: 500 1rem "Poppins", sans-serif; outline: none; }
.search-box input.search:focus { border-color: var(--gold); }
.sr-list { max-height: 60vh; overflow-y: auto; }
.sr-list p { margin: 10px 6px; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; color: #fff; text-decoration: none; }
.sr-item:hover, .sr-item.on { background: rgba(255, 255, 255, 0.07); text-decoration: none; }
.sr-item img, .sr-item .sr-dot { width: 36px; height: 36px; flex: none; border-radius: 9px; object-fit: contain; background: rgba(255,255,255,.05); }
.sr-item > span:nth-child(2) { flex: 1; min-width: 0; }
.sr-item b { display: block; font-size: .92rem; }
.sr-item small { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item .chip { flex: none; font-size: .7rem; }
@media (max-width: 900px) { .search-btn { margin-left: auto; } .burger { margin-left: 0; } }

/* "New in v0.18" / "Updated in v0.18" (common.js changeBadge, data/changes.js) */
.chg-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; color: #1a1205; background: #ffc94a; letter-spacing: .02em; }
.chg-badge.new { background: #6dffb0; color: #06210f; }
.hcard .chg-badge, .mcard .chg-badge { position: absolute; top: 40px; left: 10px; z-index: 2; }
.mcard { position: relative; }
.chg-note { margin: 8px 0 0; font-size: .85rem; color: #ffd98a; }
a.hcard { color: inherit; text-decoration: none; }

/* guide articles (guides/*.html, assets/js/guide_art.js) */
.crumbs-top { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs-top a { color: var(--muted); }
.art { max-width: 900px; }
.art p, .art li { color: #c3cadb; line-height: 1.6; }
.art h2 { margin-top: 34px; }
.art .card ul, .art .card ol { margin: 0; padding-left: 20px; }
.art-teams { display: grid; gap: 14px; }
.art-team h3 { margin: 0 0 10px; }
.art-faces { display: flex; gap: 10px; flex-wrap: wrap; }
.art-faces a { width: 96px; text-align: center; color: #fff; text-decoration: none; font-size: .82rem; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: rgba(255,255,255,.03); }
.art-faces a:hover { border-color: var(--c); }
.art-faces img { width: 72px; height: 96px; object-fit: contain; display: block; margin: 0 auto 2px; }
.art-faces small { display: block; color: var(--c); }
.art-bonus { font-size: .88rem; color: #c3cadb; margin-top: 6px; }
.art-combos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.art-combo { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; padding: 12px; border-left: 3px solid var(--c); }
.art-combo p { margin: 4px 0 0; font-size: .88rem; }
.art-pair { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--muted); }
.art-pair img { width: 28px; height: 28px; }
.art-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.art-chips img { width: 16px; height: 16px; vertical-align: -3px; }
.art-bosses { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.art-boss { display: grid; grid-template-columns: 90px 1fr; gap: 12px; color: #fff; text-decoration: none; }
.art-boss img { width: 90px; height: 90px; object-fit: contain; }
.art-boss p { margin: 4px 0 0; font-size: .86rem; }
.art-boss .bad { color: #ff8a8a; font-weight: 600; }
.art-boss .good { color: #7dffa8; font-weight: 600; }
.art-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.art-tiers .card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.art-tiers .card span:last-child { color: #c3cadb; font-size: .9rem; }
.art-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.art-list a { display: flex; flex-direction: column; gap: 4px; color: #fff; text-decoration: none; }
.art-list a:hover { border-color: var(--gold, #ffc94a); }
.art-list span { color: #c3cadb; font-size: .9rem; }
@media (max-width: 560px) { .art-combo { grid-template-columns: 1fr; } .art-boss { grid-template-columns: 64px 1fr; } .art-boss img { width: 64px; height: 64px; } }

/* keyboard users: a "Skip to content" link that shows when focused */
.skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: #ffc94a; color: #2a1200; font-weight: 700; padding: 8px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 10px; }
main:focus { outline: none; }
/* hero bonds (hero pages + the Heroes window) */
.bond-list { display: grid; gap: 10px; margin: 8px 0 18px; }
.bond { display: grid; grid-template-columns: 78px 1fr; gap: 14px; align-items: center; padding: 12px 14px; }
.bond-face { display: block; text-align: center; color: var(--text); text-decoration: none; font-size: .8rem; }
.bond-face img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 4px; background: var(--bg2); }
.bond-lines { margin: 6px 0 0; color: #c3cadb; font-size: .9rem; }

/* Where you stand (FB.myPlaces): your place on every board */
.places-card { margin-bottom: 16px; }
.stat.place { text-align: left; cursor: pointer; font: inherit; color: inherit; text-decoration: none; }
.stat.place:hover { border-color: var(--gold); }
.stat.place small { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.stat.place.top1 { border-color: #ffd23f; box-shadow: 0 0 14px #ffd23f44; }
.stat.place.top2 { border-color: #cfd8e3; }
.stat.place.top3 { border-color: #d38a4e; }

/* home: one tile per class */
.class-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.class-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 170px;
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); color: #fff; text-decoration: none;
  background: radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%), var(--glass);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.class-tile:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 30%, transparent); }
.class-tile .ct-hero { position: absolute; right: -10px; bottom: 0; height: 92%; opacity: 0.85; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); transition: transform 0.3s; pointer-events: none; }
.class-tile:hover .ct-hero { transform: scale(1.06) translateX(-4px); opacity: 1; }
.class-tile .ct-icon { position: relative; width: 34px; height: 34px; margin-bottom: auto; filter: drop-shadow(0 0 8px var(--c)); }
.class-tile b, .class-tile small { position: relative; text-shadow: 0 2px 6px #000; }
.class-tile b { font-family: "Titan One"; font-weight: 400; font-size: 1.1rem; color: var(--c); }
.class-tile small { color: #c3cadb; }
.top-card .sec-title { margin-bottom: 10px; }
@media (max-width: 640px) { .class-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .class-tile { min-height: 124px; } .class-tile .ct-icon { width: 28px; height: 28px; } }
