/* ============================================================
   BET OFFICE ARCADE — Tema casa de fliperama 80s/90s
   3 sub-temas via [data-theme]: neon · synth · hot
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection { background: var(--accent-1); color: #000; }

:root {
  --pix: 4px;
  --radius: 0;
  --radius-sm: 0;
  --radius-lg: 0;
  --radius-pill: 999px;

  /* shared neon palette */
  --neon-pink:    #ff2e9a;
  --neon-magenta: #ff00d4;
  --neon-cyan:    #00f0ff;
  --neon-yellow:  #ffee00;
  --neon-green:   #00ff9c;
  --neon-orange:  #ff8800;
  --neon-purple:  #b833ff;
  --neon-blue:    #1e90ff;
  --neon-red:     #ff2244;
}

/* ============================================================
   THEME 1 — NEON ARCADE (default)
   Black void + magenta/cyan/yellow neon. Pac-Man cabinet vibe.
   ============================================================ */
body[data-theme="neon"] {
  --bg: #04020e;
  --bg-2: #0a0418;
  --surface: #150828;
  --surface-2: #1f0e3a;
  --surface-3: #2d1858;
  --border: rgba(255, 0, 212, 0.22);
  --border-2: rgba(0, 240, 255, 0.40);

  --text: #ffffff;
  --text-dim: #b29ae0;
  --text-mute: #6a5a99;

  --c-futebol:  var(--neon-green);
  --c-sinuca:   var(--neon-cyan);
  --c-fifa:     var(--neon-purple);
  --c-mk:       var(--neon-pink);
  --c-pingpong: var(--neon-orange);
  --c-apostas:  var(--neon-yellow);
  --c-jogadores: #ffffff;
  --c-dashboard: var(--neon-cyan);

  --accent-1: var(--neon-magenta);
  --accent-2: var(--neon-cyan);
  --accent-3: var(--neon-yellow);
  --good: var(--neon-green);
  --bad:  var(--neon-red);
  --warn: var(--neon-yellow);

  background:
    radial-gradient(ellipse 900px 600px at 15% 5%,  rgba(255,0,212,0.22), transparent 55%),
    radial-gradient(ellipse 900px 600px at 90% 90%, rgba(0,240,255,0.18), transparent 55%),
    radial-gradient(ellipse 400px 400px at 80% 25%, rgba(255,238,0,0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* pixel grid overlay */
body[data-theme="neon"]::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,0,212,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ============================================================
   THEME 2 — SYNTHWAVE / OUTRUN
   Sunset gradient + perspective grid + magenta sun.
   ============================================================ */
body[data-theme="synth"] {
  --bg: #0a0024;
  --bg-2: #15003c;
  --surface: #260669;
  --surface-2: #3a0d92;
  --surface-3: #5418b8;
  --border: rgba(255, 90, 200, 0.35);
  --border-2: rgba(0, 240, 255, 0.45);

  --text: #ffeefb;
  --text-dim: #d4a4ee;
  --text-mute: #8866cc;

  --c-futebol:  #00ffaa;
  --c-sinuca:   #00f0ff;
  --c-fifa:     #ff66cc;
  --c-mk:       #ff2266;
  --c-pingpong: #ffaa00;
  --c-apostas:  #ffee00;
  --c-jogadores: #ffffff;
  --c-dashboard: #ff66cc;

  --accent-1: #ff2e9a;
  --accent-2: #00f0ff;
  --accent-3: #ffaa00;
  --good: #00ffaa;
  --bad:  #ff2266;
  --warn: #ffee00;

  background:
    /* sun core */
    radial-gradient(ellipse 600px 180px at 50% 70%, rgba(255,238,0,0.55), transparent 50%),
    radial-gradient(ellipse 900px 300px at 50% 72%, rgba(255,80,0,0.45), transparent 55%),
    /* sky bands */
    linear-gradient(180deg,
      #0a0024 0%,
      #15003c 18%,
      #2d0070 36%,
      #5a0090 52%,
      #aa1080 62%,
      #ff3366 70%,
      #ff7700 76%,
      #15003c 86%,
      #0a0024 100%
    );
  background-attachment: fixed;
}

/* perspective grid horizon */
body[data-theme="synth"]::before {
  content: '';
  position: fixed;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 50vh;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(8% - 2px),
      #ff2e9a calc(8% - 2px),
      #ff2e9a 8%
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(4% - 1px),
      #ff2e9a calc(4% - 1px),
      #ff2e9a 4%
    );
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.7) 35%, transparent 80%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.7) 35%, transparent 80%);
  transform: perspective(360px) rotateX(58deg);
  transform-origin: 50% 100%;
  opacity: 0.7;
  filter: drop-shadow(0 0 6px #ff00ff);
}

/* ============================================================
   THEME 3 — HOT QUARTERS
   Carpet retro de fliperama. Vermelho + teal + amarelo.
   ============================================================ */
body[data-theme="hot"] {
  --bg: #1a0410;
  --bg-2: #240a18;
  --surface: #2a0f22;
  --surface-2: #381434;
  --surface-3: #4a1d4c;
  --border: rgba(255, 80, 80, 0.25);
  --border-2: rgba(0, 230, 200, 0.35);

  --text: #fff7e8;
  --text-dim: #d9b3a8;
  --text-mute: #a07a8a;

  --c-futebol:  #00e6c2;
  --c-sinuca:   #00d9ff;
  --c-fifa:     #ff44aa;
  --c-mk:       #ff3030;
  --c-pingpong: #ffaa00;
  --c-apostas:  #ffd700;
  --c-jogadores: #fff7e8;
  --c-dashboard: #ffd700;

  --accent-1: #ff3030;
  --accent-2: #00d9ff;
  --accent-3: #ffd700;
  --good: #00e6c2;
  --bad:  #ff3030;
  --warn: #ffd700;

  background:
    radial-gradient(circle at 15% 20%, rgba(255,50,50,0.25), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(0,200,230,0.22), transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(255,200,0,0.10), transparent 40%),
    var(--bg);
  background-attachment: fixed;
}

/* carpet zigzag overlay */
body[data-theme="hot"]::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,50,50,0.06) 0 8px,
      transparent 8px 16px,
      rgba(0,217,255,0.05) 16px 24px,
      transparent 24px 32px),
    repeating-linear-gradient(-45deg,
      rgba(255,200,0,0.04) 0 12px,
      transparent 12px 28px);
}

/* ============================================================
   BASE — applies to all themes
   ============================================================ */
html, body { background: var(--bg); }
body {
  font-family: 'Share Tech Mono', 'VT323', 'Courier New', monospace;
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  letter-spacing: 0.3px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
  font-smoothing: never;
  text-rendering: geometricPrecision;
  image-rendering: pixelated;
}

/* CRT scanlines layer (above everything except top UI) */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.30) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: multiply;
}

/* CRT vignette */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9996;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%);
}

/* Soft flicker over the whole screen */
@keyframes crtFlicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.85; }
  97% { opacity: 1; }
  98% { opacity: 0.92; }
}
body { animation: crtFlicker 6s infinite; }

/* Make sure interactive content sits above the bg overlay */
header, main, .carousel-strip, .cabinet-picker, .arcade-marquee { position: relative; z-index: 2; }

/* ============================================================
   SCROLLBARS — neon
   ============================================================ */
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: var(--bg-2); border: 1px solid var(--border); }
*::-webkit-scrollbar-thumb {
  background: var(--accent-1);
  border: 2px solid var(--bg);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.6);
}
*::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* ============================================================
   ARCADE MARQUEE (top banner with looping text)
   ============================================================ */
.arcade-marquee {
  overflow: hidden;
  background: var(--bg-2);
  border-bottom: 2px solid var(--accent-1);
  border-top: 2px solid var(--accent-1);
  padding: 8px 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--accent-3);
  text-shadow: 0 0 6px var(--accent-1);
}
.arcade-marquee-track {
  display: inline-flex;
  gap: 36px;
  white-space: nowrap;
  animation: marqueeRoll 30s linear infinite;
  padding-left: 100%;
}
.arcade-marquee-track span { flex: 0 0 auto; }
.arcade-marquee-track span::before {
  content: '★ ';
  color: var(--accent-2);
}
@keyframes marqueeRoll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 4px solid var(--accent-1);
  flex-wrap: wrap;
  box-shadow:
    0 0 0 1px var(--accent-2),
    0 4px 0 0 var(--accent-2),
    0 6px 20px rgba(0,0,0,0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* pixel-art-ish brand mark (placeholder until user sends logo) */
/* Pixel-art umbrella brand mark */
.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--bg);
  position: relative;
  box-shadow:
    -3px -3px 0 var(--accent-1),
     3px  3px 0 var(--accent-2),
     inset 0 0 0 2px var(--accent-3);
  padding: 4px;
}
.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 4px var(--accent-1));
}
.brand-mark::before,
.brand-mark::after { content: none; }

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent-1);
  text-shadow:
    2px 2px 0 var(--accent-2),
    4px 4px 0 rgba(0,0,0,0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.logo span {
  display: block;
  font-family: 'Silkscreen', 'VT323', monospace;
  font-size: 0.62rem;
  letter-spacing: 5px;
  color: var(--text-dim);
  margin-top: 7px;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 0 4px var(--accent-2);
}

.header-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Nav buttons — arcade cabinet button style */
.nav-btn {
  font-family: 'Press Start 2P', 'Silkscreen', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 9px 13px;
  border: 2px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow:
    0 3px 0 rgba(0,0,0,0.6),
    inset 0 0 0 1px var(--bg);
  position: relative;
}
.nav-btn:hover {
  background: var(--surface-2);
  color: var(--accent-3);
  border-color: var(--accent-3);
  transform: translateY(-2px);
  box-shadow:
    0 5px 0 rgba(0,0,0,0.6),
    inset 0 0 0 1px var(--bg),
    0 0 12px var(--accent-3);
}
.nav-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.6), inset 0 0 0 1px var(--bg);
}
.nav-btn.is-active {
  color: #000;
  background: var(--accent-3);
  border-color: var(--accent-3);
  box-shadow:
    0 3px 0 var(--accent-1),
    inset 0 0 0 1px rgba(0,0,0,0.4),
    0 0 16px var(--accent-3);
  animation: navPulse 1.2s ease-in-out infinite;
}
@keyframes navPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.3); }
}
.nav-btn.is-active.dashboard { background: var(--c-dashboard); border-color: var(--c-dashboard); box-shadow: 0 3px 0 var(--accent-1), 0 0 18px var(--c-dashboard); }
.nav-btn.is-active.jogadores { background: #fff; border-color: #fff; box-shadow: 0 3px 0 var(--accent-1), 0 0 18px #fff; }
.nav-btn.is-active.futebol   { background: var(--c-futebol); border-color: var(--c-futebol); box-shadow: 0 3px 0 var(--accent-1), 0 0 18px var(--c-futebol); }
.nav-btn.is-active.sinuca    { background: var(--c-sinuca); border-color: var(--c-sinuca); box-shadow: 0 3px 0 var(--accent-1), 0 0 18px var(--c-sinuca); }
.nav-btn.is-active.fifa      { background: var(--c-fifa); border-color: var(--c-fifa); color:#fff; box-shadow: 0 3px 0 var(--accent-1), 0 0 18px var(--c-fifa); }
.nav-btn.is-active.mk        { background: var(--c-mk); border-color: var(--c-mk); color:#fff; box-shadow: 0 3px 0 var(--accent-1), 0 0 18px var(--c-mk); }
.nav-btn.is-active.pingpong  { background: var(--c-pingpong); border-color: var(--c-pingpong); box-shadow: 0 3px 0 var(--accent-1), 0 0 18px var(--c-pingpong); }
.nav-btn.is-active.apostas   { background: var(--c-apostas); border-color: var(--c-apostas); box-shadow: 0 3px 0 var(--accent-1), 0 0 18px var(--c-apostas); }

/* ============================================================
   CAROUSEL — Top performers as arcade highscore tickets
   ============================================================ */
.carousel-strip {
  background: transparent;
  padding: 14px 0 16px;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: carousel-scroll 40s linear infinite;
  padding: 10px 16px;
}
@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.carousel-strip:hover .carousel-track { animation-play-state: paused; }

.chip-card {
  position: relative;
  flex: 0 0 auto;
  width: 260px;
  height: 134px;
  background: var(--surface);
  border: 2px solid var(--border-2);
  padding: 14px 14px 12px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease;
  box-shadow:
    4px 4px 0 rgba(0,0,0,0.55),
    inset 0 0 0 1px var(--bg);
}
.chip-card:hover {
  transform: translate(-2px, -2px);
  box-shadow:
    6px 6px 0 var(--accent-1),
    inset 0 0 0 1px var(--bg);
}
.chip-rank {
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  letter-spacing: 0;
}
.chip-rank.r1 { background: var(--accent-1); color: #000; border-color: var(--accent-1); box-shadow: 0 0 10px var(--accent-1); }
.chip-rank.r2 { background: var(--accent-2); color: #000; border-color: var(--accent-2); }
.chip-rank.r3 { background: var(--accent-3); color: #000; border-color: var(--accent-3); }

.chip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 36px;
}
.chip-sport {
  font-family: 'Press Start 2P', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 8px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip-sport .chip-emoji { font-size: 1rem; letter-spacing: 0; }

.chip-body {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.chip-avatar {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #000;
  flex-shrink: 0;
  border: 2px solid var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4);
  overflow: hidden;
  position: relative;
}

/* Photo support for any avatar container */
.player-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.player-avatar, .chip-avatar { overflow: hidden; position: relative; }

/* Idle pulse on placeholder chips so the carousel always feels alive */
.chip-card .chip-name {
  transition: color 0.2s;
}
.chip-card:not(.on-fire) {
  animation: chipIdlePulse 3s ease-in-out infinite;
}
@keyframes chipIdlePulse {
  0%, 100% { box-shadow: 4px 4px 0 rgba(0,0,0,0.55), inset 0 0 0 1px var(--bg); }
  50%      { box-shadow: 4px 4px 0 rgba(0,0,0,0.55), inset 0 0 0 1px var(--bg), 0 0 18px var(--accent-2); }
}
.chip-info { min-width: 0; flex: 1; }
.chip-name {
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 1.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--accent-2);
}
.chip-metric {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--good);
  margin-top: 2px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--good);
}

/* ON FIRE — arcade combo treatment */
.chip-card.on-fire {
  border: 2px solid var(--warn);
  background:
    radial-gradient(ellipse 220px 90px at 50% 110%, rgba(255,136,0,0.30), transparent 70%),
    var(--surface);
  animation: fireBorder 0.9s steps(4) infinite, fireGlow 1.4s ease-in-out infinite;
  box-shadow:
    4px 4px 0 var(--accent-1),
    inset 0 0 0 1px var(--bg),
    0 0 30px var(--warn);
}
.chip-card.on-fire .chip-name {
  color: var(--warn);
  text-shadow:
    0 0 8px var(--warn),
    0 0 14px var(--neon-orange);
  animation: textShake 0.3s steps(2) infinite;
}
.chip-card.on-fire .chip-metric { color: var(--neon-orange); text-shadow: 0 0 8px var(--neon-orange); }
.chip-card.on-fire .chip-avatar { border-color: var(--warn); box-shadow: 0 0 14px var(--warn); }

.chip-onfire {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #000;
  background: linear-gradient(90deg, var(--neon-red), var(--neon-orange), var(--neon-yellow));
  padding: 4px 8px;
  margin-left: auto;
  border: 1px solid #000;
}
.chip-onfire .flame {
  display: inline-block;
  animation: flameBounce 0.4s steps(2) infinite;
}

@keyframes fireBorder {
  0%   { border-color: var(--neon-yellow); }
  25%  { border-color: var(--neon-orange); }
  50%  { border-color: var(--neon-red); }
  75%  { border-color: var(--neon-orange); }
  100% { border-color: var(--neon-yellow); }
}
@keyframes fireGlow {
  0%, 100% { box-shadow: 4px 4px 0 var(--accent-1), inset 0 0 0 1px var(--bg), 0 0 14px var(--warn); }
  50%      { box-shadow: 4px 4px 0 var(--accent-1), inset 0 0 0 1px var(--bg), 0 0 34px var(--neon-orange); }
}
@keyframes flameBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-2px) rotate(4deg); }
}
@keyframes textShake {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(-1px, 0); }
  50%      { transform: translate(1px, 0); }
  75%      { transform: translate(0, -1px); }
}

/* ============================================================
   MAIN
   ============================================================ */
main { padding: 1.5rem 1.5rem 4rem; max-width: 1280px; margin: 0 auto; }
.section { display: none; }
.section.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: none; } }

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.8rem;
  padding: 10px 14px 14px;
  border-bottom: 4px double var(--accent-1);
  position: relative;
}
.section-header::before {
  content: '';
  position: absolute;
  inset: 0 0 4px 0;
  background: linear-gradient(90deg, transparent, var(--accent-1) 30%, var(--accent-2) 70%, transparent);
  opacity: 0.06;
  pointer-events: none;
}

.section-icon {
  font-size: 1.6rem;
  line-height: 1;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 2px solid var(--accent-2);
  box-shadow:
    3px 3px 0 var(--accent-1),
    inset 0 0 0 1px var(--bg),
    0 0 14px var(--accent-2);
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--text);
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow:
    2px 2px 0 var(--accent-1),
    4px 4px 0 rgba(0,0,0,0.4);
}
.section-sub {
  font-family: 'Silkscreen', 'VT323', monospace;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent-3);
  font-size: 0.7rem;
  margin-left: auto;
  text-transform: uppercase;
  text-shadow: 0 0 6px var(--accent-3);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 2px solid var(--border-2);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
  transition: all .15s ease;
  box-shadow:
    4px 4px 0 rgba(0,0,0,0.55),
    inset 0 0 0 1px var(--bg);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px;
  width: 12px; height: 12px;
  background: var(--accent-1);
  box-shadow:
    calc(100% + 4px) 0 0 var(--accent-2),
    0 calc(100vw) 0 var(--accent-2),
    0 0 0 var(--accent-2);
}
.card::after {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 12px; height: 12px;
  background: var(--accent-2);
}
.card:hover {
  border-color: var(--accent-2);
  box-shadow:
    6px 6px 0 var(--accent-1),
    inset 0 0 0 1px var(--bg);
}
.card-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.78rem;
  color: var(--text);
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 6px var(--accent-2);
}
.card-title small {
  font-family: 'Silkscreen', 'VT323', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--accent-3);
  text-transform: uppercase;
  margin-left: auto;
  text-shadow: 0 0 4px var(--accent-3);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-row { display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap; margin-bottom:1rem; }
.form-group { display:flex; flex-direction:column; gap:8px; flex:1; min-width:150px; }

label {
  font-family: 'Silkscreen', 'VT323', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-3);
  text-shadow: 0 0 4px var(--accent-3);
}

input, select {
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  padding: 10px 14px;
  border: 2px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: all 0.12s ease;
  width: 100%;
  letter-spacing: 1px;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.6);
}
input::placeholder { color: var(--text-mute); }
input:focus, select:focus {
  border-color: var(--accent-3);
  background: var(--bg-2);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.6), 0 0 12px var(--accent-3);
  color: var(--accent-3);
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-2) 50%),
    linear-gradient(-45deg, transparent 50%, var(--accent-2) 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}
input[type=number] {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent-2);
  text-shadow: 0 0 6px var(--accent-2);
}

/* ============================================================
   BUTTONS — INSERT COIN vibe
   ============================================================ */
.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 14px 22px;
  border: 2px solid #000;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  color: #000;
  background: var(--accent-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  box-shadow:
    4px 4px 0 #000,
    inset 0 0 0 1px rgba(255,255,255,0.3);
  position: relative;
}
.btn::before {
  content: '►';
  font-size: 9px;
  color: #000;
  animation: btnBlink 1s steps(2) infinite;
}
@keyframes btnBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow:
    6px 6px 0 #000,
    inset 0 0 0 1px rgba(255,255,255,0.5),
    0 0 18px var(--accent-3);
  filter: brightness(1.1);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000, inset 0 0 0 1px rgba(0,0,0,0.4);
}

.btn-futebol  { background: var(--c-futebol);  color: #000; }
.btn-sinuca   { background: var(--c-sinuca);   color: #000; }
.btn-fifa     { background: var(--c-fifa);     color: #fff; box-shadow: 4px 4px 0 #000, inset 0 0 0 1px rgba(255,255,255,0.3); }
.btn-fifa::before { color: #fff; }
.btn-mk       { background: var(--c-mk);       color: #fff; box-shadow: 4px 4px 0 #000, inset 0 0 0 1px rgba(255,255,255,0.3); }
.btn-mk::before { color: #fff; }
.btn-pingpong { background: var(--c-pingpong); color: #000; }
.btn-apostas  { background: var(--c-apostas);  color: #000; }
.btn-jogador  { background: #fff;              color: #000; }

.btn-danger {
  background: var(--bad);
  color: #fff;
  box-shadow: 2px 2px 0 #000;
}
.btn-danger::before { color: #fff; content: '✕'; animation: none; }
.btn-sm { padding: 6px 10px; font-size: 8px; }
.btn-sm::before { font-size: 7px; }

/* ============================================================
   TABLES — Highscore screen
   ============================================================ */
.ranking-wrap, .hist-wrap {
  overflow-x: auto;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.ranking-wrap table, .hist-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.hist-wrap table { min-width: 540px; }
.ranking-wrap th, .hist-wrap th {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-3);
  padding: 12px 14px;
  text-align: left;
  background: var(--bg);
  border-bottom: 2px solid var(--accent-1);
  white-space: nowrap;
  text-shadow: 0 0 4px var(--accent-3);
}
.ranking-wrap td, .hist-wrap td {
  padding: 12px 14px;
  border-bottom: 1px dashed var(--border);
  vertical-align: middle;
  color: var(--text);
}
.ranking-wrap tr:last-child td, .hist-wrap tr:last-child td { border-bottom: none; }
.ranking-wrap tr:hover td, .hist-wrap tr:hover td {
  background: rgba(255,0,212,0.06);
  color: var(--accent-2);
}

/* Rank badges */
.rank-1 td:first-child::before,
.rank-2 td:first-child::before,
.rank-3 td:first-child::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  font-size: 9px;
  margin-right: 12px;
  vertical-align: middle;
  line-height: 1;
  letter-spacing: 0;
  color: #000;
}
.rank-1 td:first-child::before { content: '1'; background: var(--accent-3); box-shadow: 0 0 12px var(--accent-3); }
.rank-2 td:first-child::before { content: '2'; background: var(--accent-2); }
.rank-3 td:first-child::before { content: '3'; background: var(--accent-1); color: #fff; }
.rank-1 td:first-child {
  color: var(--accent-3);
  text-shadow: 0 0 6px var(--accent-3);
  font-size: 1.25rem;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-family: 'Press Start 2P', 'Silkscreen', monospace;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 5px 9px;
  display: inline-block;
  white-space: nowrap;
  border: 1px solid #000;
  text-transform: uppercase;
}
.badge-gold    { background: var(--accent-3); color: #000; }
.badge-silver  { background: var(--surface-3); color: var(--text); }
.badge-dupla   { background: var(--accent-2); color: #000; }
.badge-vitoria { background: var(--good); color: #000; }
.badge-derrota { background: var(--bad); color: #fff; }
.badge-empate  { background: var(--surface-3); color: var(--text-dim); }

.badge-pulse { animation: pulseBadge 1s steps(2) infinite; }
@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-3); }
  50%      { box-shadow: 0 0 14px var(--accent-3); }
}

/* ============================================================
   STATS — scoreboard display
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 1.6rem;
}
.stat-card {
  position: relative;
  background: #000;
  border: 2px solid var(--accent-2);
  padding: 16px 18px;
  box-shadow:
    4px 4px 0 rgba(0,0,0,0.5),
    inset 0 0 0 1px var(--bg-2),
    inset 0 0 16px rgba(0,240,255,0.15);
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,240,255,0.04) 2px 3px);
  pointer-events: none;
}
.stat-card:nth-child(1) { border-color: var(--c-futebol); box-shadow: 4px 4px 0 rgba(0,0,0,0.5), inset 0 0 0 1px var(--bg-2), inset 0 0 16px rgba(0,255,156,0.15); }
.stat-card:nth-child(2) { border-color: var(--c-sinuca); box-shadow: 4px 4px 0 rgba(0,0,0,0.5), inset 0 0 0 1px var(--bg-2), inset 0 0 16px rgba(0,240,255,0.15); }
.stat-card:nth-child(3) { border-color: var(--c-apostas); box-shadow: 4px 4px 0 rgba(0,0,0,0.5), inset 0 0 0 1px var(--bg-2), inset 0 0 16px rgba(255,238,0,0.15); }
.stat-card:nth-child(4) { border-color: var(--c-mk); box-shadow: 4px 4px 0 rgba(0,0,0,0.5), inset 0 0 0 1px var(--bg-2), inset 0 0 16px rgba(255,46,154,0.15); }
.stat-card:nth-child(1) .stat-value { color: var(--c-futebol); text-shadow: 0 0 12px var(--c-futebol); }
.stat-card:nth-child(2) .stat-value { color: var(--c-sinuca);  text-shadow: 0 0 12px var(--c-sinuca); }
.stat-card:nth-child(3) .stat-value { color: var(--c-apostas); text-shadow: 0 0 12px var(--c-apostas); }
.stat-card:nth-child(4) .stat-value { color: var(--c-mk);      text-shadow: 0 0 12px var(--c-mk); }
.stat-value {
  font-family: 'VT323', 'Press Start 2P', monospace;
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent-3);
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-shadow: 0 0 12px var(--accent-3);
}
.stat-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

/* ============================================================
   PLAYER TAG
   ============================================================ */
.player-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 2px solid var(--border-2);
  padding: 4px 12px 4px 4px;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin: 4px;
  color: var(--text);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}
.player-avatar {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  font-size: 8px;
  color: #000;
  flex-shrink: 0;
  border: 2px solid var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
}
.delete-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 0 4px;
  transition: color 0.12s;
}
.delete-btn:hover { color: var(--bad); }
.foto-btn {
  cursor: pointer;
  font-size: 15px;
  padding: 0 4px;
  filter: grayscale(0.4) brightness(0.85);
  transition: filter 0.12s, transform 0.12s;
  user-select: none;
  line-height: 1;
}
.foto-btn:hover { filter: none; transform: scale(1.2); }
.rename-btn {
  background: none;
  border: 2px solid var(--accent-2);
  cursor: pointer;
  color: var(--accent-2);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.12s, border-color 0.12s, transform 0.12s;
}
.rename-btn:hover {
  color: var(--accent-3);
  border-color: var(--accent-3);
  transform: scale(1.1);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--accent-2);
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--accent-2);
  animation: blink 1.4s steps(2) infinite;
}
.empty-state .emoji {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.8;
  filter: drop-shadow(0 0 8px var(--accent-1));
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--accent-1);
}
.tab-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 12px 20px;
  border: 2px solid var(--accent-1);
  border-bottom: none;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-dim);
  transition: all 0.12s;
  text-transform: uppercase;
  margin-right: 6px;
  margin-bottom: -2px;
  position: relative;
}
.tab-btn:hover { color: var(--accent-2); background: var(--surface-2); }
.tab-btn.active {
  background: var(--accent-1);
  color: #000;
  border-color: var(--accent-1);
  box-shadow: 0 0 14px var(--accent-1);
}
.tab-content { display: none; } .tab-content.active { display: block; }

/* ============================================================
   MONEY
   ============================================================ */
.money-positive {
  color: var(--good);
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  text-shadow: 0 0 6px var(--good);
}
.money-negative {
  color: var(--bad);
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  text-shadow: 0 0 6px var(--bad);
}

.apostas-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 5px 10px;
  white-space: nowrap;
  letter-spacing: 1px;
  border: 1px solid #000;
}
.status-pendente { background: var(--warn); color: #000; animation: blink 1s steps(2) infinite; }
.status-ganhou   { background: var(--good); color: #000; }
.status-perdeu   { background: var(--bad);  color: #fff; }

/* ============================================================
   DUPLA + TEAM PANELS
   ============================================================ */
.dupla-toggle { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; padding: 10px; border: 1px dashed var(--accent-2); }
.dupla-toggle label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--text);
  cursor: pointer;
  letter-spacing: 1px;
}
.dupla-toggle input[type=checkbox] { width: 20px; height: 20px; cursor: pointer; accent-color: var(--accent-3); }
.dupla-fields { display: none; }
.dupla-fields.show { display: block; }

.team-panel {
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid;
  background: var(--bg-2);
  box-shadow: inset 0 0 16px rgba(0,0,0,0.4);
}
.team-panel.win  { border-color: var(--good); box-shadow: inset 0 0 20px rgba(0,255,156,0.10), 3px 3px 0 var(--good); }
.team-panel.lose { border-color: var(--bad);  box-shadow: inset 0 0 20px rgba(255,46,154,0.10), 3px 3px 0 var(--bad); }
.team-panel-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.team-panel.win .team-panel-title  { color: var(--good); text-shadow: 0 0 8px var(--good); }
.team-panel.lose .team-panel-title { color: var(--bad);  text-shadow: 0 0 8px var(--bad); }

/* ============================================================
   APOSTA INLINE
   ============================================================ */
.aposta-inline {
  position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(255,238,0,0.04) 0 8px, transparent 8px 16px),
    var(--bg-2);
  border: 2px dashed var(--accent-3);
  padding: 22px;
  margin-top: 16px;
  box-shadow: inset 0 0 30px rgba(255,238,0,0.05);
}
.aposta-inline-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--accent-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 8px var(--accent-3);
  text-transform: uppercase;
}
.aposta-total {
  display: inline-block;
  background: #000;
  color: var(--accent-3);
  font-family: 'VT323', monospace;
  font-weight: 400;
  font-size: 2rem;
  padding: 8px 24px;
  margin-top: 14px;
  letter-spacing: 3px;
  border: 2px solid var(--accent-3);
  box-shadow:
    0 0 22px var(--accent-3),
    inset 0 0 14px rgba(255,238,0,0.20);
  text-shadow: 0 0 12px var(--accent-3);
  animation: jackpotPulse 1.6s ease-in-out infinite;
}
@keyframes jackpotPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.25); }
}

.aposta-checkbox-label {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--text);
  letter-spacing: 1px;
  padding: 8px;
  border: 1px dashed var(--accent-3);
}
.aposta-checkbox-label input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent-3); }

/* ============================================================
   SALDO ROWS
   ============================================================ */
.saldo-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.8fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px dashed var(--border);
}
.saldo-row:last-child { border-bottom: none; }
.saldo-row .saldo-name {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: 1px;
}
.saldo-row .saldo-name small {
  display: block;
  color: var(--text-dim);
  font-family: 'Silkscreen', monospace;
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 3px;
}
.saldo-bar {
  position: relative;
  height: 10px;
  background: #000;
  border: 1px solid var(--border-2);
  overflow: hidden;
}
.saldo-bar::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent-3);
}
.saldo-bar-fill {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
}
.saldo-bar-fill.pos { background: var(--good); box-shadow: 0 0 8px var(--good); }
.saldo-bar-fill.neg { background: var(--bad);  box-shadow: 0 0 8px var(--bad); }
.saldo-value {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  letter-spacing: 1px;
  min-width: 130px;
  text-align: right;
}
.saldo-value.pos { color: var(--good); text-shadow: 0 0 8px var(--good); }
.saldo-value.neg { color: var(--bad);  text-shadow: 0 0 8px var(--bad); }
.saldo-value.zer { color: var(--text-dim); }
.saldo-badge {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 1px;
  padding: 4px 8px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  border: 1px solid #000;
}
.saldo-badge.king { background: var(--accent-3); color: #000; box-shadow: 0 0 14px var(--accent-3); }
.saldo-badge.azar { background: var(--bad); color: #fff; }

/* ============================================================
   DASHBOARD GRID
   ============================================================ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
  margin-bottom: 1.4rem;
}
.sport-summary {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border-2);
  padding: 18px;
  overflow: hidden;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5), inset 0 0 0 1px var(--bg);
}
.sport-summary::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--accent, var(--accent-2));
  box-shadow: 0 0 14px var(--accent, var(--accent-2));
}
.sport-summary[data-sport="futebol"]  { --accent: var(--c-futebol); }
.sport-summary[data-sport="sinuca"]   { --accent: var(--c-sinuca); }
.sport-summary[data-sport="fifa"]     { --accent: var(--c-fifa); }
.sport-summary[data-sport="mk"]       { --accent: var(--c-mk); }
.sport-summary[data-sport="pingpong"] { --accent: var(--c-pingpong); }

.sport-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.sport-summary-emoji {
  font-size: 1.4rem;
  width: 44px; height: 44px;
  background: var(--bg);
  border: 1px solid var(--accent, var(--accent-2));
  display: grid; place-items: center;
}
.sport-summary-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text);
  flex: 1;
  text-transform: uppercase;
  text-shadow: 0 0 4px var(--accent, var(--accent-2));
}
.sport-summary-count {
  font-family: 'VT323', monospace;
  color: var(--accent, var(--accent-2));
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1;
  text-align: right;
  text-shadow: 0 0 10px var(--accent, var(--accent-2));
}
.sport-summary-count small {
  font-family: 'Silkscreen', monospace;
  font-size: 0.55rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-top: 4px;
  text-shadow: none;
}
.sport-leaderline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.sport-leaderline + .sport-leaderline { border-top: 1px dashed var(--border); }
.lead-rank {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  font-size: 8px;
  flex-shrink: 0;
  color: #000;
}
.lead-rank-1 { background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); }
.lead-rank-2 { background: var(--accent-2); }
.lead-name { flex: 1; color: var(--text); }
.lead-metric {
  font-family: 'VT323', monospace;
  color: var(--good);
  font-size: 1.1rem;
  letter-spacing: 1px;
  background: rgba(0,255,156,0.10);
  padding: 2px 10px;
  border: 1px solid var(--good);
  text-shadow: 0 0 6px var(--good);
}
.sport-no-data {
  color: var(--text-mute);
  text-align: center;
  padding: 0.75rem 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 1px;
}

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.feed-row {
  display: grid;
  grid-template-columns: 46px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--border);
}
.feed-row:last-child { border-bottom: none; }
.feed-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--bg);
  border: 2px solid var(--accent-2);
  font-size: 1.2rem;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}
.feed-desc {
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: 1px;
}
.feed-desc strong {
  color: var(--accent-3);
  font-weight: 400;
  text-shadow: 0 0 6px var(--accent-3);
}
.feed-date {
  font-family: 'Silkscreen', monospace;
  color: var(--text-dim);
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ============================================================
   CABINET PICKER — bottom-right floating arcade machines
   ============================================================ */
.cabinet-picker {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  align-items: flex-end;
}
.cabinet-picker-toggle {
  width: 48px; height: 48px;
  background: var(--accent-3);
  border: 2px solid #000;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #000;
  box-shadow: 3px 3px 0 #000, 0 0 14px var(--accent-3);
  transition: transform 0.12s;
}
.cabinet-picker-toggle:hover { transform: rotate(-8deg) scale(1.08); }
.cabinet-row {
  display: none;
  gap: 8px;
  background: var(--bg);
  border: 2px solid var(--accent-1);
  padding: 12px;
  box-shadow: 4px 4px 0 #000, 0 0 18px var(--accent-1);
}
.cabinet-row.show { display: flex; flex-direction: column; }
.cabinet-row-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--accent-3);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
  text-align: center;
  text-shadow: 0 0 4px var(--accent-3);
}
.cabinet-row-grid { display: flex; gap: 8px; }
.cabinet-btn {
  width: 64px;
  background: var(--surface);
  border: 2px solid var(--border-2);
  cursor: pointer;
  padding: 6px 4px;
  color: var(--text);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.5px;
  transition: all 0.12s;
  text-align: center;
}
.cabinet-btn:hover {
  border-color: var(--accent-3);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--accent-1);
}
.cabinet-btn.is-on {
  border-color: var(--accent-3);
  background: var(--accent-3);
  color: #000;
  box-shadow: 0 0 12px var(--accent-3);
}
.cabinet-mini {
  width: 36px;
  height: 44px;
  margin: 0 auto 4px;
  background: #000;
  border: 2px solid currentColor;
  position: relative;
  box-shadow: inset 0 0 8px currentColor;
}
.cabinet-mini::before {
  content: '';
  position: absolute;
  inset: 4px 4px 12px 4px;
  background: linear-gradient(135deg, var(--mini-c1, #ff00d4), var(--mini-c2, #00f0ff));
  opacity: 0.8;
}
.cabinet-mini::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 6px;
  right: 6px;
  height: 6px;
  background: currentColor;
}
.cabinet-btn[data-theme="neon"]  .cabinet-mini { color: #ff00d4; --mini-c1:#ff00d4; --mini-c2:#00f0ff; }
.cabinet-btn[data-theme="synth"] .cabinet-mini { color: #ff66cc; --mini-c1:#ff66cc; --mini-c2:#ffaa00; }
.cabinet-btn[data-theme="hot"]   .cabinet-mini { color: #ff3030; --mini-c1:#ff3030; --mini-c2:#00d9ff; }

/* ============================================================
   FATALITY / PERFECT — text treatment
   ============================================================ */
.badge-gold.badge-pulse[data-perfect],
.fatality-text {
  font-family: 'Press Start 2P', monospace;
  color: var(--bad);
  text-shadow:
    0 0 6px var(--bad),
    0 0 12px var(--bad),
    2px 2px 0 #000;
  animation: textShake 0.2s steps(2) infinite, fatalityFlick 1.4s steps(8) infinite;
}
@keyframes fatalityFlick {
  0%, 100% { color: var(--bad); }
  50%      { color: var(--accent-3); }
}

/* ============================================================
   DASHBOARD — TV MODE 16:9 (fit without scroll)
   ============================================================ */
main { max-width: min(1800px, 96vw); padding: 0.75rem 1.5rem 1.25rem; }

.dashboard-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 0;
}
.dashboard-bottom-row .card { margin-bottom: 0; height: 100%; }

/* compact paddings only inside dashboard so other sections stay airy */

/* Hide the section header on dashboard \u2014 maximize TV real estate */
.dashboard-section .section-header { display: none; }

.dashboard-section .stat-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 0.8rem;
}
.dashboard-section .stat-card { padding: 16px 20px; }
.dashboard-section .stat-value {
  font-size: 3.2rem;
  margin-bottom: 4px;
  letter-spacing: 2px;
  line-height: 0.95;
}
.dashboard-section .stat-label {
  font-size: 11px;
  letter-spacing: 1.8px;
}

.dashboard-section .card {
  padding: 1rem 1.2rem;
  margin-bottom: 0.7rem;
}
.dashboard-section .card-title {
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
  letter-spacing: 1.3px;
}
.dashboard-section .card-title small {
  font-size: 0.66rem;
  letter-spacing: 2.5px;
}

.dashboard-section .dash-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}
.dashboard-section .sport-summary { padding: 14px; }
.dashboard-section .sport-summary-head {
  padding-bottom: 10px;
  margin-bottom: 10px;
  gap: 10px;
}
.dashboard-section .sport-summary-emoji {
  width: 40px; height: 40px;
  font-size: 1.25rem;
}
.dashboard-section .sport-summary-name {
  font-size: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-section .sport-summary-count {
  font-size: 2.4rem;
  letter-spacing: 1px;
  line-height: 0.95;
}
.dashboard-section .sport-summary-count small {
  font-size: 0.6rem;
  margin-top: 3px;
  letter-spacing: 1.5px;
}

/* Show only TOP 1 leader per sport on TV dashboard */
.dashboard-section .sport-summary > .sport-leaderline ~ .sport-leaderline {
  display: none;
}
.dashboard-section .sport-leaderline {
  padding: 8px 0;
  font-size: 1.2rem;
  gap: 8px;
}
.dashboard-section .lead-rank {
  width: 26px; height: 26px;
  font-size: 10px;
}
.dashboard-section .lead-name { font-size: 1.2rem; }
.dashboard-section .lead-metric {
  font-size: 1rem;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}
.dashboard-section .player-avatar {
  width: 30px !important;
  height: 30px !important;
  font-size: 0.7rem !important;
}

/* compact saldo for TV */
.dashboard-section .saldo-row {
  padding: 10px 4px;
  gap: 12px;
  grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1.2fr) auto;
}
.dashboard-section .saldo-row .saldo-name { font-size: 1.25rem; }
.dashboard-section .saldo-row .saldo-name small { font-size: 0.65rem; margin-top: 3px; letter-spacing: 1.5px; }
.dashboard-section .saldo-value { font-size: 1.45rem; min-width: 120px; }
.dashboard-section .saldo-bar { height: 10px; }
.dashboard-section .saldo-badge { font-size: 8px; padding: 4px 8px; }

/* compact feed for TV \u2014 limit to 4 rows */
.dashboard-section .feed-row:nth-child(n+5) { display: none; }
.dashboard-section .feed-row {
  padding: 10px 4px;
  gap: 12px;
  grid-template-columns: 42px 1fr auto auto;
}
.dashboard-section .feed-icon {
  width: 42px; height: 42px;
  font-size: 1.25rem;
}
.dashboard-section .feed-desc { font-size: 1.2rem; line-height: 1.3; }
.dashboard-section .feed-date { font-size: 0.75rem; letter-spacing: 1.5px; }
.dashboard-section .feed-row .badge { font-size: 9px; padding: 4px 9px; }
.dashboard-section .feed-row .badge { font-size: 6px; padding: 3px 6px; }

/* Shrink carousel slightly so dashboard fits */
.dashboard-section ~ * .carousel-strip,
body:has(.dashboard-section.active) .carousel-strip {
  padding: 14px 0 16px;
}

/* Dashboard scroll-free guarantee: when active, lock the section to viewport */
.dashboard-section.active {
  display: flex;
  flex-direction: column;
}

/* Stack-up at smaller widths so it still works on laptop preview */
@media (max-width: 1100px) {
  .dashboard-section .dash-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
  .dashboard-bottom-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  header { padding: 14px 14px; }
  .header-nav { width: 100%; justify-content: flex-start; }
  .logo { font-size: 1rem; }
  .logo span { font-size: 0.55rem; letter-spacing: 4px; }
  main { padding: 1rem 1rem 3rem; }
  .section-title { font-size: 1rem; }
  .section-icon { width: 48px; height: 48px; font-size: 1.3rem; }
  .stat-value { font-size: 2.2rem; }
  .card { padding: 1rem; }
  .card-title { font-size: 0.62rem; }
  .saldo-row {
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
  }
  .saldo-row .saldo-bar-wrap { grid-column: 2 / -1; }
  .saldo-value { min-width: 0; font-size: 1.1rem; }
  .feed-row { grid-template-columns: 36px 1fr auto; }
  .feed-row > span:last-child { grid-column: 2 / -1; }
  .nav-btn { font-size: 7px; padding: 8px 10px; }
  .btn { font-size: 8px; padding: 10px 14px; }

  /* Dashboard mobile: 2x2 stats, 2-col sport summary, stacked bottom row */
  .dashboard-section .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 0.7rem;
  }
  .dashboard-section .stat-card { padding: 12px 14px; }
  .dashboard-section .stat-value { font-size: 2rem; letter-spacing: 1px; }
  .dashboard-section .stat-label { font-size: 9px; letter-spacing: 1.2px; word-break: break-word; }

  .dashboard-section .dash-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .dashboard-section .sport-summary { padding: 10px; }
  .dashboard-section .sport-summary-head { gap: 8px; padding-bottom: 8px; margin-bottom: 8px; }
  .dashboard-section .sport-summary-emoji { width: 34px; height: 34px; font-size: 1rem; }
  .dashboard-section .sport-summary-name { font-size: 9px; }
  .dashboard-section .sport-summary-count { font-size: 1.8rem; }
}

@media (max-width: 420px) {
  .dashboard-section .dash-grid { grid-template-columns: 1fr; }
  .dashboard-section .stat-value { font-size: 1.7rem; }
}
