/* Agent Arena — cyberpunk gladiator pit theme.
 * Layered on top of /style.css, which provides the global terminal/matrix
 * base. This file overrides the green palette with a dual amber/cyan one
 * for the pages under /agent-arena/, plus shared pit components.
 */

:root {
  /* Pit palette overrides — scoped via .arena-skin on <body> */
}

.arena-skin {
  --bg: #060309;
  --bg-card: #110812;
  --bg-terminal: #080510;

  /* Map the legacy green tokens to amber so existing inline styles using
   * var(--green) just work. The page reads as gold/amber instead of green. */
  --green: #ffb84d;
  --green-dim: #cc8a2a;
  --green-muted: #66421a;
  --green-dark: #2e1d08;
  --green-glow: rgba(255, 184, 77, 0.18);
  --green-glow-strong: rgba(255, 184, 77, 0.34);
  --text: #ffe7c4;
  --text-dim: #d1965a;
  --text-muted: #7a4a1c;
  --white: #fff3df;
  --border: #3a1d0a;
  --red: #ff5470;

  /* New cyberpunk tokens — the amber/gold side */
  --amber: #ffb84d;
  --amber-dim: #cc8a2a;
  --amber-muted: #66421a;
  --amber-dark: #2e1d08;
  --amber-glow: rgba(255, 184, 77, 0.18);
  --amber-glow-strong: rgba(255, 184, 77, 0.34);

  /* Cyan side — HUD, hologram, data */
  --cyan: #00e5ff;
  --cyan-dim: #00a4bf;
  --cyan-muted: #08506a;
  --cyan-dark: #04293a;
  --cyan-glow: rgba(0, 229, 255, 0.20);
  --cyan-glow-strong: rgba(0, 229, 255, 0.34);

  /* Gold — Signal Booster prestige */
  --gold: #ffd700;
  --gold-dim: #cc8800;
  --gold-muted: #8b6914;
  --gold-dark: #3d3000;
  --gold-glow: rgba(255, 215, 0, 0.22);
  --gold-glow-strong: rgba(255, 215, 0, 0.40);

  /* Magenta — ranked badges, vs glyph */
  --magenta: #ff3eaa;
  --magenta-glow: rgba(255, 62, 170, 0.22);

  background: var(--bg);
  color: var(--text);
}

/* Tone the global matrix rain canvas down a touch under arena skin so the
 * warm amber UI reads cleanly over it. */
.arena-skin #matrix-canvas {
  opacity: 0.04;
  filter: hue-rotate(-110deg) saturate(0.8);
}

/* Scanline tint shifts warmer */
.arena-skin::after {
  content: "";
}

/* ── Hero pit block ─────────────────────────────────────────── */

.arena-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  background: var(--bg-terminal) url('/agent-arena/assets/hero.webp') center / cover no-repeat;
  border: 1px solid var(--amber-dark);
  overflow: hidden;
  margin-bottom: 28px;
}
.arena-hero .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s linear;
}
@media (prefers-reduced-motion: reduce) {
  .arena-hero .hero-video { display: none; }
}
.arena-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 3, 9, 0) 32%, rgba(6, 3, 9, 0.94) 100%),
    radial-gradient(ellipse 55% 38% at 50% 96%, rgba(0, 229, 255, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.arena-hero .hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  text-align: center;
  z-index: 2;
  padding: 0 24px;
}
.arena-hero .hero-text .tag {
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.95), 0 0 18px var(--cyan-glow);
}
.arena-hero .hero-text h1 {
  font-size: 60px;
  color: var(--amber);
  text-shadow:
    0 0 18px rgba(0, 0, 0, 0.95),
    0 0 32px var(--amber-glow-strong);
  margin: 8px 0 6px;
  letter-spacing: 4px;
  font-weight: 800;
}
.arena-hero .hero-text .sub {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.95);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}
.arena-hero .hero-text .sub strong { color: var(--cyan); }

/* HUD overlay corners */
.arena-hero .hud-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--cyan);
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 0 6px var(--cyan-glow));
}
.arena-hero .hud-corner.tl { top: 14px; left: 14px; border-top: 2px solid; border-left: 2px solid; }
.arena-hero .hud-corner.tr { top: 14px; right: 14px; border-top: 2px solid; border-right: 2px solid; }
.arena-hero .hud-corner.bl { bottom: 14px; left: 14px; border-bottom: 2px solid; border-left: 2px solid; }
.arena-hero .hud-corner.br { bottom: 14px; right: 14px; border-bottom: 2px solid; border-right: 2px solid; }

/* ── VS divider — used between two cards ──────────────────── */

.vs-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 30px 0 22px;
}
.vs-divider .line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-muted), var(--amber));
}
.vs-divider .line.right {
  background: linear-gradient(90deg, var(--cyan), var(--cyan-muted), transparent);
}
.vs-divider .glyph {
  font-size: 22px;
  font-weight: 800;
  color: var(--magenta);
  letter-spacing: 4px;
  text-shadow: 0 0 14px var(--magenta-glow);
  padding: 6px 14px;
  border: 1px solid var(--magenta);
  background: rgba(6, 3, 9, 0.7);
}

/* ── Pit cards (two-column ranked vs training) ───────────── */

.pit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 8px 0 36px;
}
@media (max-width: 880px) { .pit-grid { grid-template-columns: 1fr; } }

.pit-card {
  position: relative;
  border: 1px solid var(--amber-dark);
  background: var(--bg-card);
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.pit-card.cyan { border-color: var(--cyan-dark); }
.pit-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--amber-glow), transparent 60%);
  pointer-events: none;
  opacity: 0.7;
}
.pit-card.cyan::before {
  background: radial-gradient(ellipse at 50% 0%, var(--cyan-glow), transparent 60%);
}
.pit-card:hover {
  border-color: var(--amber);
  box-shadow: 0 0 26px var(--amber-glow);
}
.pit-card.cyan:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 26px var(--cyan-glow);
}

.pit-card .badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--amber);
  color: var(--amber);
  background: rgba(255, 184, 77, 0.06);
  align-self: flex-start;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}
.pit-card.cyan .badge {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
}

.pit-card h2 {
  font-size: 28px;
  color: var(--amber);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 0 14px var(--amber-glow);
  position: relative;
  z-index: 2;
}
.pit-card.cyan h2 {
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan-glow);
}
.pit-card p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}
.pit-card .pit-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 240px;
  object-fit: cover;
  border: 1px solid var(--amber-dark);
  margin-bottom: 16px;
  filter: saturate(1.05) contrast(1.04);
  position: relative;
  z-index: 2;
}
.pit-card.cyan .pit-img { border-color: var(--cyan-dark); }
.pit-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 12px;
  color: var(--text);
  position: relative;
  z-index: 2;
}
.pit-card ul li { padding: 3px 0; }
.pit-card ul li::before { content: "▸ "; color: var(--amber); }
.pit-card.cyan ul li::before { color: var(--cyan); }
.pit-card .cta {
  margin-top: auto;
  display: inline-block;
  text-align: center;
  padding: 14px 18px;
  border: 1px solid var(--amber);
  color: var(--amber);
  background: rgba(255, 184, 77, 0.05);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: background 0.15s, box-shadow 0.15s;
  font-weight: 700;
  position: relative;
  z-index: 2;
}
.pit-card .cta:hover {
  background: var(--amber-dark);
  box-shadow: 0 0 22px var(--amber-glow-strong);
}
.pit-card.cyan .cta {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.05);
}
.pit-card.cyan .cta:hover {
  background: var(--cyan-dark);
  box-shadow: 0 0 22px var(--cyan-glow-strong);
}

/* ── HUD info row ─────────────────────────────────────────── */

.hud-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 26px 0 30px;
}
@media (max-width: 760px) { .hud-row { grid-template-columns: 1fr; } }
.hud-tile {
  border: 1px solid var(--cyan-dark);
  background: var(--bg-terminal);
  padding: 18px 20px;
  position: relative;
}
.hud-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
}
.hud-tile::after {
  content: "";
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  border-bottom: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
}
.hud-tile h3 {
  color: var(--cyan);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.hud-tile p {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.hud-tile p strong { color: var(--amber); }

/* ── Weight class strip ──────────────────────────────────── */

.classes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}
@media (max-width: 880px) { .classes { grid-template-columns: 1fr; } }
.class-card {
  display: block;
  border: 1px solid var(--amber-dark);
  background: var(--bg-card);
  padding: 20px 20px 22px;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.class-card:hover {
  border-color: var(--amber);
  background: var(--bg-terminal);
  box-shadow: 0 0 22px var(--amber-glow);
}
.class-card .class-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border: 1px solid var(--amber-dark);
  margin-bottom: 14px;
  filter: saturate(1.05) contrast(1.06);
}
.class-card:hover .class-img { border-color: var(--amber); }
.class-card h3 {
  color: var(--amber);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-shadow: 0 0 12px var(--amber-glow);
}
.class-card p {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.7;
}
.class-card .status {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--cyan-dark);
  padding: 2px 8px;
  background: var(--bg-card);
}
.class-card .status.live { color: var(--cyan); border-color: var(--cyan); }
.class-card .status.soon { color: var(--text-muted); }

/* ── Auth banner ─────────────────────────────────────────── */

.auth-banner {
  margin: 16px 0 28px;
  padding: 14px 18px;
  border: 1px dashed var(--amber-muted);
  background: rgba(255, 184, 77, 0.04);
  font-size: 12px;
  color: var(--text-dim);
}
.auth-banner.signed-in {
  border-style: solid;
  border-color: var(--amber);
  color: var(--text);
}
.auth-banner a { color: var(--amber); text-decoration: underline; }
.auth-banner strong { color: var(--amber); }

/* ── Mobile tweaks ───────────────────────────────────────── */

@media (max-width: 760px) {
  /* Hero: video sits in a fixed-height strip at the top, text drops into
     a static block below it. That way the video is fully visible instead
     of getting half-covered by the headline. */
  .arena-hero {
    aspect-ratio: auto;
    max-height: none;
    height: auto;
    padding-top: 200px;
    overflow: hidden;
    background-image: none;
    margin-bottom: 20px;
  }
  .arena-hero .hero-video { bottom: auto; height: 200px; }
  .arena-hero::after {
    bottom: auto;
    height: 200px;
    background: linear-gradient(180deg, rgba(6, 3, 9, 0) 60%, rgba(6, 3, 9, 0.55) 100%);
  }
  .arena-hero .hud-corner.bl { top: 172px; bottom: auto; }
  .arena-hero .hud-corner.br { top: 172px; bottom: auto; }
  .arena-hero .hud-corner { width: 16px; height: 16px; }
  .arena-hero .hero-text {
    position: static;
    padding: 14px 18px 16px;
    bottom: auto;
    left: auto;
    right: auto;
  }
  .arena-hero .hero-text .tag { font-size: 9px; letter-spacing: 2px; }
  .arena-hero .hero-text h1 { font-size: 26px; letter-spacing: 2px; margin: 4px 0 6px; }
  .arena-hero .hero-text .sub { display: block; font-size: 11px; line-height: 1.6; }
  .pit-card { min-height: 0; padding: 22px 20px 22px; }
  .pit-card h2 { font-size: 22px; }
  .pit-card .pit-img { max-height: 200px; }
  .vs-divider { gap: 12px; margin: 22px 0 18px; }
  .vs-divider .glyph { font-size: 16px; padding: 4px 10px; }
}

/* ── Signal Booster — gold nameplate ────────────────────── */
.gold-nameplate {
  color: var(--gold) !important;
  text-shadow: 0 0 8px var(--gold-glow-strong);
  font-weight: 700;
}
.gold-nameplate::before {
  content: "★ ";
  color: var(--gold);
}
.lb-name.gold-nameplate::before {
  content: "★ ";
}

/* ── Signal Booster — gold fighter pick ─────────────────── */
.fighter-pick.selected.gold {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 0 14px var(--gold-glow-strong);
}
.fighter-pick.gold .name { color: var(--gold); }
.fighter-pick.gold .flavor { color: var(--gold-dim); }
