:root {
  --void: #050508;
  --surface: #111119;
  --surface2: #191924;
  --accent: #c084fc;
  --gold: #e8c97a;
  --text: #f0edf8;
  --text-dim: #a8a2bd;
  --scram: #e8546a;
  --slam: #4ade80;
  font-family: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1, h2, .display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
}

a { color: var(--gold); }

/* ---------- Age gate ---------- */
#age-gate {
  position: fixed;
  inset: 0;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  text-align: center;
}
#age-gate.hidden { display: none; }
.gate-card {
  max-width: 420px;
  background: var(--surface);
  border: 1px solid #2a2a3a;
  border-radius: 16px;
  padding: 32px 28px;
}
.gate-card h1 { font-size: 2rem; margin: 0 0 8px; color: var(--accent); }
.gate-card p { color: var(--text-dim); line-height: 1.5; }
.gate-buttons { display: flex; gap: 12px; margin-top: 20px; }
.gate-buttons button { flex: 1; }
.btn-ghost {
  background: transparent; border: 1px solid #333; color: var(--text-dim);
  padding: 12px; border-radius: 10px; font-size: 1rem; cursor: pointer;
}

/* ---------- Header ---------- */
header {
  width: 100%;
  max-width: 900px;
  padding: 24px 16px 8px;
  text-align: center;
}
header .logo { font-size: 2.4rem; margin: 0; }
header .logo .scram { color: var(--scram); }
header .logo .slam { color: var(--slam); }
header p.tag { color: var(--text-dim); margin: 4px 0 0; }
nav { margin-top: 12px; display: flex; gap: 16px; justify-content: center; }
nav a { text-decoration: none; font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--text-dim); }
nav a.active, nav a:hover { color: var(--gold); }

/* ---------- Arena ---------- */
main { width: 100%; max-width: 900px; padding: 16px; flex: 1; }

.arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 640px) {
  .arena { grid-template-columns: 1fr; }
  .vs { order: 2; }
  .card:nth-child(3) { order: 3; }
}

.vs {
  align-self: center;
  font-family: 'DM Mono', monospace;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.card {
  background: var(--surface);
  border: 1px solid #2a2a3a;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.15s, opacity 0.15s;
  cursor: pointer;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card:active { transform: scale(0.98); }
.card.leaving { opacity: 0; transform: scale(0.9); }

.card .portrait { width: 180px; height: 180px; }
.card h2 { margin: 12px 0 2px; font-size: 1.5rem; }
.card .species { color: var(--gold); font-family: 'DM Mono', monospace; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.card .tagline { color: var(--text-dim); margin: 10px 0 16px; min-height: 2.6em; }

.vote-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.card:nth-child(1) .vote-btn { background: rgba(232, 84, 106, 0.15); color: var(--scram); }
.card:nth-child(3) .vote-btn { background: rgba(74, 222, 128, 0.15); color: var(--slam); }
.vote-btn:hover { filter: brightness(1.3); }

.status-line { text-align: center; color: var(--text-dim); font-family: 'DM Mono', monospace; font-size: 0.85rem; margin: 20px 0 0; }

/* ---------- Leaderboard ---------- */
.leaderboard-list { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.leaderboard-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid #2a2a3a; border-radius: 12px; padding: 10px 16px;
}
.leaderboard-row .rank { font-family: 'DM Mono', monospace; color: var(--gold); width: 28px; text-align: right; }
.leaderboard-row .portrait { width: 48px; height: 48px; flex-shrink: 0; }
.leaderboard-row .info { flex: 1; }
.leaderboard-row .info .name { font-weight: 600; }
.leaderboard-row .info .species { color: var(--text-dim); font-size: 0.8rem; }
.leaderboard-row .elo { font-family: 'DM Mono', monospace; color: var(--accent); }

/* ---------- CTA / footer ---------- */
.cta {
  margin: 40px 16px 24px; max-width: 640px; text-align: center;
  background: var(--surface2); border: 1px solid #33334a; border-radius: 16px; padding: 24px;
}
.cta h2 { color: var(--gold); margin: 0 0 8px; }
.cta p { color: var(--text-dim); }
.cta a.button {
  display: inline-block; margin-top: 12px; padding: 12px 24px; border-radius: 10px;
  background: var(--accent); color: #12081f; font-weight: 700; text-decoration: none;
}

footer { color: #55506a; font-size: 0.75rem; padding: 20px; text-align: center; }
