:root {
  --bg: #16121a;
  --bg2: #1e1724;
  --panel: #241b2e;
  --panel-hot: #34223a;
  --ink: #f3ecf7;
  --dim: #b09ec2;
  --line: #3c2c47;
  --gold: #f2b544;
  --rose: #e8547a;
  --win: #4fd699;
  --lose: #77607f;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code",
    "Roboto Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(60% 45% at 15% -5%, rgba(232, 84, 122, 0.14), transparent),
    radial-gradient(50% 40% at 100% 0%, rgba(242, 181, 68, 0.10), transparent);
}

.wrap { max-width: 780px; margin: 0 auto; padding: 3rem 1.25rem 5rem; }

header { border-bottom: 2px solid var(--line); padding-bottom: 1.25rem; margin-bottom: 1.75rem; }
.kicker {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rose); margin: 0 0 0.5rem; font-weight: 700;
}
h1 {
  font-size: 2.1rem; margin: 0 0 0.6rem; font-weight: 800; letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--dim); font-size: 0.88rem; margin: 0 0 1rem; max-width: 56em; }
.sub a { color: var(--gold); text-decoration: none; }
.sub a:hover { text-decoration: underline; }
.meta { color: var(--dim); font-size: 0.76rem; margin: 0; }
.meta a { color: var(--rose); text-decoration: none; }
.meta a:hover { text-decoration: underline; }

.concept-bar {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.concept-bar label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim);
}
#concept-select {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.4rem 0.6rem; font-family: var(--mono); font-size: 0.85rem;
}
.spark { color: var(--dim); font-size: 0.8rem; font-style: italic; }

.banner {
  background: var(--panel-hot); border: 1px dashed var(--rose); color: var(--gold);
  padding: 0.6rem 0.9rem; border-radius: 4px; font-size: 0.82rem; margin-bottom: 1rem;
}

.arena {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem;
  align-items: stretch; margin-bottom: 1.25rem;
}
@media (max-width: 640px) {
  .arena { grid-template-columns: 1fr; }
  .vs { flex-direction: row; justify-content: center; }
}

.fighter {
  display: flex; flex-direction: column; gap: 0.6rem; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.1rem 1.1rem 1rem; color: var(--ink); font-family: var(--mono);
  cursor: pointer; transition: border-color 0.12s ease, transform 0.12s ease, background 0.12s ease;
  position: relative;
}
.fighter:hover { border-color: var(--gold); }
.fighter:active { transform: scale(0.99); }
.fighter.win { border-color: var(--win); background: #1c3329; }
.fighter.lose { border-color: var(--lose); opacity: 0.55; }

.badge {
  align-self: flex-start; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #0f0b13; background: var(--gold); padding: 0.15rem 0.5rem; border-radius: 3px; font-weight: 700;
}
.framing { font-size: 1.05rem; font-weight: 700; color: var(--gold); }
.definition { font-size: 0.86rem; color: var(--ink); flex: 1; }
.taunt { font-size: 0.8rem; color: var(--rose); font-style: italic; }
.rating { font-size: 0.72rem; color: var(--dim); margin-top: auto; padding-top: 0.3rem; border-top: 1px solid var(--line); }

.vs {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  color: var(--dim); min-width: 3.5rem;
}
.vs-label { font-weight: 800; font-size: 1.1rem; color: var(--rose); }
.hint { font-size: 0.65rem; text-align: center; max-width: 6rem; }

.controls {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  flex-wrap: wrap; margin-bottom: 2.25rem;
}
.share {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.85rem; border: 1px solid var(--line); border-radius: 4px;
  color: var(--ink); text-decoration: none; font-size: 0.82rem; background: var(--panel);
}
.share:hover { border-color: var(--gold); color: var(--gold); }
.ghost {
  background: none; border: 1px solid var(--line); color: var(--dim);
  border-radius: 4px; padding: 0.5rem 0.85rem; font-family: var(--mono); font-size: 0.78rem;
  cursor: pointer;
}
.ghost:hover { border-color: var(--rose); color: var(--rose); }

.leaderboard {
  border-top: 1px solid var(--line); padding-top: 1.25rem; margin-bottom: 2rem;
}
.leaderboard h2 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim);
  margin: 0 0 0.25rem;
}
.leaderboard-sub { color: var(--dim); font-size: 0.78rem; margin: 0 0 0.9rem; }
#leaderboard-list { list-style: none; margin: 0; padding: 0; }
#leaderboard-list li {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.6rem;
  border: 1px solid var(--line); border-radius: 4px; margin-bottom: 0.4rem; background: var(--panel);
  font-size: 0.85rem;
}
#leaderboard-list .rank { color: var(--gold); font-weight: 700; width: 1.4rem; }
#leaderboard-list .name { flex: 1; }
#leaderboard-list .record { color: var(--dim); font-size: 0.76rem; }
#leaderboard-list .elo { color: var(--rose); font-weight: 700; font-variant-numeric: tabular-nums; }
.leaderboard-empty { color: var(--dim); font-size: 0.82rem; font-style: italic; }

footer {
  border-top: 1px solid var(--line); padding-top: 1rem; color: var(--dim); font-size: 0.76rem;
}
footer a { color: var(--rose); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p { margin: 0 0 0.5rem; }
