/* BLACK BULL ANSEM — fight-night poster theme */
:root {
  --bg: #07070c;
  --bg2: #0d0d16;
  --panel: #12121e;
  --line: #23233a;
  --text: #f2ede4;
  --dim: #9a94a8;
  /* brand recolored red/gold → green (var names kept so all references update) */
  --red: #35ff10;      /* primary accent (was blood red) → green */
  --red-dk: #12960e;   /* deep accent → dark green */
  --gold: #78ff4d;     /* highlight (was gold) → bright green */
  --green: #39ff14;
  --candle-red: #ef4444;
  --font-head: 'Anton', 'Arial Black', Impact, sans-serif;
  --font-body: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font-body); }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, .head { font-family: var(--font-head); letter-spacing: .02em; }

/* ---------- shared chrome ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(7,7,12,.94), rgba(7,7,12,.75) 70%, transparent);
}
.nav .brand { font-family: var(--font-head); font-size: 18px; color: var(--text); display: inline-flex; align-items: center; gap: 9px; }
.nav .brand em { color: var(--red); font-style: normal; }
.brand-logo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--dim);
  font-size: 13px; padding: 5px 12px; white-space: nowrap;
}
.chip b { color: var(--gold); }
.chip.ca { cursor: pointer; }
.chip.ca:hover { border-color: var(--gold); color: var(--text); }
.nav .spacer { flex: 1; }
.nav .soc { display: flex; gap: 8px; }
.nav .soc a {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--dim); background: var(--panel);
}
.nav .soc a svg { width: 16px; height: 16px; display: block; }
.nav .soc a:hover { color: var(--gold); border-color: var(--gold); }

.btn {
  display: inline-block; border: none; border-radius: 10px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em;
  padding: 14px 30px; font-size: 17px; color: #fff;
  background: linear-gradient(180deg, var(--red), var(--red-dk));
  box-shadow: 0 6px 24px rgba(53,255,16,.35), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .08s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: linear-gradient(180deg, var(--gold), #1aa614); color: #1a1206; box-shadow: 0 6px 24px rgba(120,255,77,.3); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--dim); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn:disabled { filter: grayscale(.8); opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- landing ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; }
#hero3d { position: absolute; inset: 0; }
.hero .vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 30%, rgba(7,7,12,.72) 78%, var(--bg) 100%); }
.hero .content {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  text-align: center; padding: 78px 20px 5svh;
}
.hero .content > * { pointer-events: auto; }
.hero-top, .hero-bottom { display: flex; flex-direction: column; align-items: center; }
.hero-top { position: relative; padding: 6px 30px 16px; }
.hero-top::before { content: ''; position: absolute; inset: -30px -120px -10px; z-index: -1;
  background: radial-gradient(ellipse 60% 100% at 50% 40%, rgba(7,7,12,.94) 35%, rgba(7,7,12,.55) 65%, transparent 82%); }
.hero-bottom { position: relative; padding: 14px 24px 4px; }
.hero-bottom::before { content: ''; position: absolute; inset: -6px -120px -40px; z-index: -1;
  background: radial-gradient(ellipse 55% 100% at 50% 60%, rgba(7,7,12,.9) 40%, transparent 80%); }
.wordmark { line-height: .9; text-transform: uppercase; }
.wordmark .l1 { display: block; font-family: var(--font-head); font-size: clamp(34px, 7vw, 82px);
  color: var(--text); text-shadow: 0 2px 30px rgba(0,0,0,.9), 0 0 40px rgba(53,255,16,.3); }
.wordmark .l1 em { color: var(--red); font-style: normal; }
.wordmark .l2 { display: block; font-family: var(--font-head); font-size: clamp(13px, 2.4vw, 24px);
  color: var(--gold); letter-spacing: .35em; margin-top: 8px; text-shadow: 0 2px 10px #000; }
.hero .sub { color: var(--text); font-family: var(--font-head); font-size: clamp(15px, 2vw, 22px);
  letter-spacing: .04em; margin: 0 0 16px; text-shadow: 0 2px 12px #000; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-info { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.hero-info .chip { font-size: 15px; padding: 8px 16px; background: rgba(18,18,30,.85); }
.hero-info .chip b { color: var(--gold); }
.hero-info .chip.ca { cursor: pointer; }
.hero-info .chip.launch b { color: var(--text); }

.countdown { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.countdown .cell { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  min-width: 66px; padding: 8px 6px; }
.countdown .cell b { display: block; font-family: var(--font-head); font-size: 26px; color: var(--text); }
.countdown .cell span { font-size: 11px; color: var(--dim); letter-spacing: .15em; }

/* ===================== LANDING (storytelling) ===================== */
h1, h2, h3, .head, .big-head { font-weight: 400; }  /* Anton is single-weight */

/* scrolling ticker */
.marquee { overflow: hidden; white-space: nowrap; border-top: 2px solid var(--red); border-bottom: 2px solid var(--red);
  background: linear-gradient(180deg, #0c1403, #091003); padding: 12px 0; }
.marquee-track { display: inline-flex; align-items: center; gap: 26px; animation: scrollx 26s linear infinite; }
.marquee span { font-family: var(--font-head); font-size: 26px; letter-spacing: .04em; color: var(--text); }
.marquee i { color: var(--red); font-style: normal; font-size: 16px; }
@keyframes scrollx { to { transform: translateX(-50%); } }

.kicker { display: inline-block; font-family: var(--font-head); letter-spacing: .3em; font-size: 15px;
  color: var(--red); border-left: 4px solid var(--red); padding-left: 12px; margin-bottom: 16px; }
.kicker.gold { color: var(--gold); border-color: var(--gold); }
.big-head { font-family: var(--font-head); font-size: clamp(40px, 7vw, 86px); line-height: .92; text-transform: uppercase; }
.big-head em { color: var(--red); font-style: normal; }
.lead { color: var(--dim); font-size: clamp(16px, 2vw, 20px); max-width: 640px; line-height: 1.5; }

/* story reveal sections */
.story { max-width: 1180px; margin: 0 auto; padding: clamp(60px, 9vw, 120px) 24px;
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(20px, 5vw, 70px); align-items: center; }
.story.alt { grid-template-columns: 1.1fr 0.9fr; }
.story.alt .story-char { order: 2; }
.story-char { position: relative; display: grid; place-items: center; }
.story-char img { width: 100%; max-width: 460px; filter: drop-shadow(0 30px 50px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(53,255,16,.25));
  animation: floaty 5s ease-in-out infinite; }
.story-char.bear img { filter: drop-shadow(0 30px 50px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(120,255,77,.28)); }
/* no broad backdrop behind the dancers — only the thin green body-glow (canvas drop-shadow) */
.story-char::after { content: none; }
@keyframes floaty { 50% { transform: translateY(-16px); } }
/* live 3D dancers — each box owns an in-flow canvas that scrolls with the page (no lag) */
.char3d { position: relative; width: 100%; max-width: 430px; aspect-ratio: 3 / 4.1; margin: 0 auto; }
.char3d canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; pointer-events: none;
  /* thin green glow that hugs the body outline (drop-shadow follows the canvas alpha) */
  filter: drop-shadow(0 0 3px rgba(120,255,77,.95)) drop-shadow(0 0 9px rgba(57,255,20,.55)); }
/* the walking bull gets a wider landscape stage so its stride reads */
.char3d.bull { max-width: 520px; aspect-ratio: 4 / 3.1; }
.char3d:not(.ready) { animation: dancerPulse 1.4s ease-in-out infinite; }
@keyframes dancerPulse { 50% { opacity: .58; } }
.story-text h2 { font-family: var(--font-head); font-size: clamp(34px, 6vw, 76px); line-height: .92; text-transform: uppercase; margin-bottom: 18px; }
.story-text h2 em { color: var(--red); font-style: normal; }
.story-text p { color: var(--dim); font-size: clamp(16px, 2.1vw, 21px); line-height: 1.55; margin-bottom: 14px; max-width: 560px; }
.story-text p.big-line { font-family: var(--font-head); color: var(--text); font-size: clamp(22px, 3.4vw, 40px); line-height: 1.05; text-transform: uppercase; margin: 6px 0 16px; }
.story-text p.big-line em { color: var(--gold); font-style: normal; }
.story-text b { color: var(--text); font-weight: 600; }

/* reveal animation */
.reveal .story-char, .reveal .story-text, .reveal .head-center, .reveal .grid3, .reveal .opps, .reveal .token-inner {
  opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.fromleft .story-char { transform: translateX(-120px); }
.reveal.fromright .story-char { transform: translateX(120px); }
.reveal.in .story-char, .reveal.in .story-text, .reveal.in .head-center, .reveal.in .grid3, .reveal.in .opps, .reveal.in .token-inner {
  opacity: 1; transform: none; }
.reveal.in .story-text { transition-delay: .12s; }

/* generic padded section */
.section-pad { max-width: 1120px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) 24px; }
.head-center { text-align: center; margin: 0 auto clamp(34px, 5vw, 56px); max-width: 780px; display: flex; flex-direction: column; align-items: center; }
.head-center .lead { margin-top: 14px; }

/* step cards */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: linear-gradient(180deg, var(--panel), #0c0c16); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); }
.card .num { font-family: var(--font-head); color: var(--red); font-size: 40px; line-height: 1; }
.card h3 { font-family: var(--font-head); font-size: 24px; margin: 6px 0 10px; text-transform: uppercase; }
.card p { color: var(--dim); font-size: 16px; line-height: 1.5; }
.card p b { color: var(--gold); font-weight: 600; }

/* ladder opponent cards with images */
.opps { align-items: end; }
.opp-card { background: linear-gradient(180deg, var(--panel), #0b0b13); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 18px 24px; text-align: center; position: relative; }
.opp-card.feature { border-color: var(--red); box-shadow: 0 0 40px rgba(53,255,16,.2); transform: translateY(-14px); }
.opp-img { height: 210px; display: grid; place-items: end center; overflow: hidden; margin-bottom: 8px; }
.opp-img img { height: 260px; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)); }
.opp-img.cub img { height: 200px; filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)) sepia(.3) saturate(1.2) brightness(1.1); }
.opp-img.draw img { filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)) sepia(1) saturate(2.4) hue-rotate(-8deg) brightness(1.05); }
.tierbadge { display: inline-block; font-family: var(--font-head); font-size: 12px; letter-spacing: .18em; padding: 5px 12px; border-radius: 999px; margin-bottom: 8px; }
.tierbadge.easy { background: #1c4c08; color: #90ff5e; }
.tierbadge.hard { background: #193c07; color: #90ff5e; }
.tierbadge.boss { background: #1e4a08; color: var(--gold); }
.opp-card h3 { font-family: var(--font-head); font-size: 26px; text-transform: uppercase; margin-bottom: 6px; }
.opp-card p { color: var(--dim); font-size: 15px; line-height: 1.45; }

/* token section */
.token { background: linear-gradient(180deg, #0d0d16, #07070c); border-top: 1px solid var(--line); }
.token-inner { max-width: 1120px; margin: 0 auto; padding: clamp(50px, 8vw, 90px) 24px;
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(20px, 5vw, 60px); align-items: center; }
.token-char { display: grid; place-items: center; position: relative; }
.token-char img { width: 100%; max-width: 420px; filter: drop-shadow(0 24px 44px rgba(0,0,0,.7)) drop-shadow(0 0 36px rgba(120,255,77,.25)); animation: floaty 5.5s ease-in-out infinite; }
.token-char::after { content: ''; position: absolute; z-index: -1; width: 76%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(120,255,77,.22), transparent 68%); filter: blur(10px); }
.token-body h2 { font-family: var(--font-head); font-size: clamp(40px, 6vw, 82px); line-height: .9; text-transform: uppercase; margin-bottom: 16px; }
.token-body h2 em { color: var(--gold); font-style: normal; }
.token-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.tstat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.tstat b { font-family: var(--font-head); color: var(--gold); font-size: 20px; display: block; }
.tstat span { color: var(--dim); font-size: 13px; letter-spacing: .05em; }
.token-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.token-cta .chip { font-size: 15px; padding: 10px 16px; }

footer { padding: 60px 20px 70px; text-align: center; color: var(--dim); font-size: 14px; border-top: 1px solid var(--line); }
footer .foot-word { font-family: var(--font-head); font-size: clamp(30px, 6vw, 60px); text-transform: uppercase; margin-bottom: 18px; color: var(--text); }
footer .foot-word em { color: var(--red); font-style: normal; }
footer .soc { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
footer .soc a { border: 1px solid var(--line); border-radius: 10px; padding: 10px 18px; display: inline-flex; align-items: center; gap: 8px; color: var(--dim); }
footer .soc a svg { width: 18px; height: 18px; }
footer .soc a:hover { color: var(--gold); border-color: var(--gold); }

@media (max-width: 820px) {
  .story, .story.alt, .token-inner { grid-template-columns: 1fr; text-align: center; }
  .story.alt .story-char { order: 0; }
  .story-text p, .lead { margin-left: auto; margin-right: auto; }
  .kicker { border: none; padding-left: 0; }
  .grid3 { grid-template-columns: 1fr; }
  .opp-card.feature { transform: none; }
  .reveal.fromleft .story-char, .reveal.fromright .story-char { transform: translateY(40px); }
  .token-cta { justify-content: center; }
}

/* ---------- fight page ---------- */
#game-wrap { position: fixed; inset: 0; background: var(--bg); }
#game3d { position: absolute; inset: 0; }
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.hud .top { position: absolute; top: 54px; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: center; gap: 14px; padding: 0 14px; }
.hpbar { width: min(34vw, 330px); }
.hpbar .name { font-family: var(--font-head); font-size: 13px; letter-spacing: .06em; margin-bottom: 4px; text-shadow: 0 2px 6px #000; }
.hpbar.right .name { text-align: right; }
.hpbar .track { height: 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.55); overflow: hidden; }
.hpbar .fill { height: 100%; width: 100%; border-radius: 7px; transition: width .18s ease; }
.hpbar.left .fill { background: linear-gradient(90deg, #39ff14, var(--red)); }
.hpbar.right .fill { background: linear-gradient(270deg, #2ed60e, #1a5c07); float: right; } /* enemy = dark green vs player's bright green */
.fight-timer { font-family: var(--font-head); font-size: 26px; color: var(--text); text-shadow: 0 2px 8px #000; min-width: 74px; text-align: center; }
/* RAGE power bars — one under EACH fighter's HP bar (SmackDown style) */
.rtrack { height: 8px; margin-top: 4px; border-radius: 5px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2); overflow: hidden; }
.rfill { height: 100%; width: 0%; background: linear-gradient(90deg, #39ff14, var(--gold)); transition: width .15s ease; }
.rfill.enemy { background: linear-gradient(270deg, #d43a3a, #7a1420); float: right; } /* enemy rage = danger red */
.rtag { font-size: 10px; letter-spacing: .22em; color: var(--dim); margin-top: 2px; }
.rtag.right { text-align: right; }

.controls { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center;
  gap: 10px; z-index: 6; flex-wrap: wrap; padding: 0 8px; }
.controls button {
  position: relative;
  pointer-events: auto; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(18,18,30,.85); color: var(--text);
  font-family: var(--font-head); font-size: 15px; padding: 15px 18px; min-width: 84px;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.controls button:active { transform: translateY(2px); }
.controls button small { position: absolute; top: 3px; right: 6px; font-size: 9px; color: var(--dim);
  font-family: var(--font-body); letter-spacing: .05em; }
.controls button.slip { background: rgba(30,30,48,.9); }
.controls button.slip:active { background: #2a2a44; }
.controls button.strike { border: none; }
.controls button.strike.jab { background: linear-gradient(180deg, #4b5563, #1f2937); }
.controls button.strike.kick { background: linear-gradient(180deg, var(--red), var(--red-dk)); min-width: 92px; }
.controls button.strike.knee { background: linear-gradient(180deg, #1aa614, #12960e); }
.controls button.strike:active { filter: brightness(1.3); }
.controls button.rage { background: linear-gradient(180deg, #39ff14, #1aa614); border: none; display: none; }
.controls button.rage.ready { display: block; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); box-shadow: 0 0 24px rgba(57,255,20,.7); } }

.combo { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); text-align: center;
  pointer-events: none; font-family: var(--font-head); z-index: 7; }
.combo b { display: block; font-size: clamp(30px, 6vw, 58px); color: var(--gold);
  text-shadow: 0 2px 14px #000, 0 0 30px rgba(120,255,77,.5); line-height: 1; }
.combo span { font-size: 14px; color: var(--red); letter-spacing: .2em; }
.combo.pop b { animation: comboPop .3s ease; }
@keyframes comboPop { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }

.help-btn { position: absolute; top: 92px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(18,18,30,.85); color: var(--gold);
  font-family: var(--font-head); font-size: 17px; pointer-events: auto; z-index: 7; }
.help-btn:hover { border-color: var(--gold); }

.moves { display: grid; gap: 6px; margin: 6px 0 16px; text-align: left; }
.move { display: grid; grid-template-columns: 78px 96px 1fr; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 8px; background: var(--bg2); font-size: 14px; }
.move .keys { font-family: var(--font-head); font-size: 12px; color: var(--gold); background: #000;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; text-align: center; }
.move .mv { font-family: var(--font-head); font-size: 13px; color: var(--text); }
.move .d { color: var(--dim); font-size: 13px; }
.combo-help { text-align: left; border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 14px; }
.combo-help h3 { font-family: var(--font-head); color: var(--red); font-size: 16px; letter-spacing: .1em; margin-bottom: 6px; }
.combo-help p { color: var(--dim); font-size: 14px; margin-bottom: 10px; }
.combo-help p b { color: var(--gold); }
.combo-row { display: flex; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 8px;
  background: var(--bg2); margin-bottom: 6px; font-size: 14px; }
.combo-row .seq { font-family: var(--font-head); color: var(--gold); min-width: 130px; font-size: 13px; }
.combo-row span:last-child { color: var(--text); }

@media (max-width: 620px) {
  .controls button { min-width: 60px; padding: 13px 10px; font-size: 13px; }
  .controls button.strike.kick { min-width: 66px; }
  .move { grid-template-columns: 66px 80px 1fr; }
}

.announce { position: absolute; top: 30%; left: 0; right: 0; text-align: center; pointer-events: none; }
.announce .big { font-family: var(--font-head); font-size: clamp(34px, 9vw, 90px); color: var(--gold);
  text-shadow: 0 4px 24px #000, 0 0 60px rgba(120,255,77,.4); text-transform: uppercase;
  opacity: 0; transform: scale(.6); }
.announce .big.show { animation: slam .55s cubic-bezier(.2,1.6,.35,1) forwards; }
@keyframes slam { to { opacity: 1; transform: scale(1); } }

.overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center;
  background: rgba(5,5,10,.86); backdrop-filter: blur(4px); }
.overlay .panel { width: min(560px, 92vw); max-height: 88svh; overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 26px; text-align: center; }
.overlay .panel h2 { text-transform: uppercase; font-size: 26px; margin-bottom: 6px; }
.overlay .panel h2 em { color: var(--red); font-style: normal; }
.overlay .panel .sub { color: var(--dim); margin-bottom: 18px; }
.overlay .panel .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.statline { display: flex; justify-content: space-between; padding: 8px 4px; border-top: 1px dashed var(--line); font-size: 16px; }
.statline b { color: var(--gold); }
.sharecard-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); margin: 10px 0; }

/* CHOOSE YOUR FIGHTER — Bull vs Barney cards */
.side-label { font-family: var(--font-head); letter-spacing: .24em; font-size: 12px; color: var(--dim); margin: 2px 0 8px; }
.side-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.side-card { position: relative; border: 2px solid var(--line); border-radius: 14px; background: var(--bg2);
  padding: 10px 8px 12px; cursor: pointer; color: var(--text); text-align: center; transition: border-color .12s ease, transform .08s ease; }
.side-card img { width: 100%; max-height: 110px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.side-card b { display: block; font-family: var(--font-head); font-size: 15px; margin-top: 6px; letter-spacing: .04em; }
.side-card span { display: block; color: var(--dim); font-size: 12px; }
.side-card:hover { border-color: var(--red); transform: translateY(-2px); }
.side-card.on { border-color: var(--gold); box-shadow: 0 0 22px rgba(120,255,77,.28); }
.side-card.on::after { content: '✔ SELECTED'; position: absolute; top: 7px; right: 8px; font-family: var(--font-head);
  font-size: 10px; letter-spacing: .12em; color: #10230a; background: var(--gold); border-radius: 6px; padding: 2px 7px; }

.opp-select { display: grid; gap: 8px; margin: 14px 0; max-height: 38vh; overflow-y: auto; padding-right: 4px; } /* 7-level ladder scrolls */
.opp-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 14px; background: var(--bg2); cursor: pointer; text-align: left; color: var(--text); }
.opp-row:hover { border-color: var(--red); }
.opp-row.locked { opacity: .45; cursor: not-allowed; }
.opp-row .face { font-size: 26px; }
.opp-row .info { flex: 1; }
.opp-row .info b { font-family: var(--font-head); display: block; }
.opp-row .info span { color: var(--dim); font-size: 13px; }
.opp-row .pts { color: var(--gold); font-family: var(--font-head); font-size: 14px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--panel); border: 1px solid var(--gold); color: var(--text);
  border-radius: 10px; padding: 12px 20px; z-index: 99; transition: transform .25s ease; font-size: 15px; }
.toast.show { transform: translateX(-50%) translateY(0); }

.tabbtns { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.tabbtns button { background: var(--bg2); border: 1px solid var(--line); color: var(--dim);
  border-radius: 8px; padding: 8px 16px; font-family: var(--font-head); font-size: 13px; }
.tabbtns button.on { color: var(--gold); border-color: var(--gold); }
.lb-row { display: flex; gap: 10px; padding: 9px 6px; border-top: 1px dashed var(--line); font-size: 15px; align-items: center; }
.lb-row .rank { width: 34px; color: var(--dim); font-family: var(--font-head); }
.lb-row .w { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .wins { color: var(--dim); font-size: 13px; }
.lb-row .v { color: var(--gold); font-family: var(--font-head); }
.lb-row.me { background: rgba(120,255,77,.08); border-radius: 8px; border-top-color: transparent; }
.lb-row.me .w { color: var(--gold); font-weight: 700; }

/* big START button + fighter chip (step-2 header) */
.startbtn { width: 100%; font-size: 20px; padding: 16px; margin-top: 4px; }
.fighter-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); padding: 9px 12px; margin-bottom: 12px; }
.fighter-chip span { font-family: var(--font-head); font-size: 16px; letter-spacing: .03em; }
.fighter-chip button { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--dim);
  font-size: 12px; padding: 5px 10px; }
.fighter-chip button:hover { border-color: var(--gold); color: var(--gold); }

/* fighter name input */
.name-row { display: flex; gap: 8px; margin-bottom: 12px; }
.name-row input { flex: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-family: var(--font-body); font-size: 15px; padding: 10px 12px; outline: none; }
.name-row input:focus { border-color: var(--gold); }
.name-row .btn { padding: 10px 18px; font-size: 14px; }

.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 8; }

/* floating damage numbers */
#dmgLayer { position: absolute; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.dmgnum { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-head);
  font-weight: 900; white-space: nowrap; text-shadow: 0 2px 6px #000, 0 0 3px #000;
  animation: dmgFloat 0.9s ease-out forwards; }
.dmgnum.deal { color: #a0ff6e; font-size: 34px; }
.dmgnum.take { color: #ff5a5a; font-size: 34px; }
.dmgnum.big { color: #fff; font-size: 52px; text-shadow: 0 2px 10px #000, 0 0 18px var(--gold); }
@keyframes dmgFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(1); }
}

@media (max-width: 760px) {
  .grid3 { grid-template-columns: 1fr; }
  .tape { grid-template-columns: 1fr; }
  .tape .vs { padding: 6px; }
  .hud .top { top: 60px; }
  .hpbar .name { font-size: 11px; }
  .fight-timer { font-size: 20px; min-width: 56px; }
}

/* ============ nav links + MEME page ============ */
.navlink { font-family: var(--font-head); font-size: 14px; letter-spacing: .04em; color: var(--dim);
  padding: 6px 11px; border-radius: 9px; border: 1px solid transparent; white-space: nowrap; }
.navlink:hover { color: var(--text); border-color: var(--line); }
.navlink.on { color: #10230a; background: var(--gold); }
@media (max-width: 720px) { .navlink { padding: 5px 8px; font-size: 12px; } .nav .brand { font-size: 15px; } }

.meme-hero { max-width: 900px; margin: 0 auto; padding: 92px 24px 6px; text-align: center; }
.meme-hero .big-head { margin: 6px 0 12px; }
.meme-grid { max-width: 1240px; margin: 0 auto; padding: 18px 20px 40px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.meme-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg2); }

/* live preview — the chosen bg colour is set inline by JS; container-type enables cqw text */
.meme3d { position: relative; width: 100%; aspect-ratio: 1; display: block; background: #fff;
  container-type: inline-size; overflow: hidden; touch-action: none; }
.meme3d canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.meme3d:not(.ready)::after { content: 'loading…'; position: absolute; inset: 0; display: grid; place-items: center;
  color: #888; font-size: 13px; letter-spacing: .1em; }

/* BIG draggable meme caption */
.cap-ov { position: absolute; left: 50%; top: 13%; transform: translate(-50%, -50%);
  font-family: 'Anton', 'Arial Black', Impact, sans-serif; text-transform: uppercase; color: #fff;
  white-space: nowrap; line-height: 1; cursor: grab; user-select: none; display: none; z-index: 3;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0 2px 3px #000; }
.cap-ov.drag { cursor: grabbing; }

.cap-row { display: flex; gap: 6px; padding: 8px 8px 0; }
.cap-row .cap { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-family: var(--font-body); font-size: 13px; padding: 7px 9px; outline: none; }
.cap-row .cap:focus { border-color: var(--gold); }

.surprise { display: block; width: calc(100% - 16px); margin: 8px 8px 0; padding: 8px; cursor: pointer;
  font-family: var(--font-head); font-size: 13px; letter-spacing: .06em; color: var(--text);
  background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; }
.surprise:hover { border-color: var(--gold); color: var(--gold); }
.size-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px 2px; }
.size-row .az { font-family: 'Anton'; color: var(--dim); }
.size-row .az.sm { font-size: 11px; } .size-row .az { font-size: 17px; }
.size-row .size { flex: 1; accent-color: var(--gold); }

.meme-foot { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; }
.meme-foot .lbl { font-family: var(--font-head); font-size: 14px; letter-spacing: .03em; color: var(--text); }
.meme-foot .tools { display: flex; align-items: center; gap: 8px; }
.bg-pick { display: inline-flex; gap: 5px; margin-right: auto; }
.bg-pick .sw { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.bg-pick .sw.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(120,255,77,.3); }
.dl-gif, .share-x { font-family: var(--font-head); font-size: 13px; letter-spacing: .04em; color: #10230a;
  background: var(--gold); border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.share-x { background: #eaf2ff; }
.dl-gif { min-width: 62px; } .share-x { min-width: 40px; }
.dl-gif:hover, .share-x:hover { filter: brightness(1.08); }
.dl-gif:disabled, .share-x:disabled { filter: grayscale(.5); opacity: .8; cursor: progress; }
.meme-footer { text-align: center; padding: 20px 24px 60px; }
.meme-footer .btn { margin-bottom: 12px; }

/* landing "what is this" — fight + meme feature cards */
.grid2 { max-width: 980px; margin: 30px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
.feat-card { display: block; border: 1px solid var(--line); border-radius: 18px; background: var(--bg2);
  padding: 28px 26px; color: var(--text); transition: border-color .12s ease, transform .1s ease; }
.feat-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.feat-card .feat-emoji { font-size: 46px; line-height: 1; }
.feat-card h3 { font-family: var(--font-head); font-size: 30px; margin: 10px 0 8px; text-transform: uppercase; }
.feat-card p { color: var(--dim); font-size: 16px; line-height: 1.5; }
.feat-card .feat-go { display: inline-block; margin-top: 14px; font-family: var(--font-head);
  color: var(--gold); letter-spacing: .04em; }

/* meme hero centering + text-colour picker */
.meme-hero .lead { margin-left: auto; margin-right: auto; }
.txt-pick { display: inline-flex; gap: 4px; margin-right: 8px; }
.txt-pick .tc { width: 24px; height: 22px; border-radius: 6px; border: 2px solid var(--line);
  background: #14141f; font-family: var(--font-head); font-size: 13px; cursor: pointer; line-height: 1; padding: 0; }
.txt-pick .tc.on { border-color: var(--gold); }
