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

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --border:    #30363d;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --green:     #3fb950;
  --green-dim: rgba(63,185,80,.18);
  --red:       #f85149;
  --red-dim:   rgba(248,81,73,.18);
  --gold:      #e3b341;
  --gold-dim:  rgba(227,179,65,.18);
  --gray-dim:  rgba(139,148,158,.12);
  --radius:    10px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.logo { font-size: 26px; }

h1 {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
}

.server-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  transition: background .4s, box-shadow .4s;
  flex-shrink: 0;
}

.dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-dim);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 3px var(--green-dim); }
  50%      { box-shadow: 0 0 0 6px rgba(63,185,80,.08); }
}

.dot-label { font-size: 13px; color: var(--muted); }

/* ── Main ────────────────────────────────────────────────────────────────── */
main {
  flex: 1;
  padding: 24px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Banner ──────────────────────────────────────────────────────────────── */
.banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--surface);
  transition: border-color .5s, box-shadow .5s, background .5s;
}

.banner.active   { border-color: var(--green); background: var(--green-dim); box-shadow: 0 0 24px var(--green-dim); }
.banner.game_over{ border-color: var(--red);   background: var(--red-dim);   box-shadow: 0 0 24px var(--red-dim);   animation: pulse-banner 2s ease-in-out infinite; }
.banner.victory  { border-color: var(--gold);  background: var(--gold-dim);  box-shadow: 0 0 24px var(--gold-dim);  animation: pulse-banner-gold 2s ease-in-out infinite; }
.banner.offline  { border-color: var(--border); }

@keyframes pulse-banner      { 0%,100%{box-shadow:0 0 24px var(--red-dim)}  50%{box-shadow:0 0 48px rgba(248,81,73,.3)} }
@keyframes pulse-banner-gold { 0%,100%{box-shadow:0 0 24px var(--gold-dim)} 50%{box-shadow:0 0 48px rgba(227,179,65,.3)} }

.banner-icon { font-size: 44px; line-height: 1; }

.banner-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
}

.banner.active    .banner-title { color: var(--green); }
.banner.game_over .banner-title { color: var(--red);   }
.banner.victory   .banner-title { color: var(--gold);  }

.banner-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.big {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin-bottom: 5px;
}

.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.sub { font-size: 12px; color: var(--muted); }

/* ── 3-column grid ───────────────────────────────────────────────────────── */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 540px) { .grid3 { grid-template-columns: 1fr; } }

/* ── Players ─────────────────────────────────────────────────────────────── */
.players {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--green);
  background: var(--green-dim);
  font-size: 14px;
  font-weight: 600;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* ── Death message ───────────────────────────────────────────────────────── */
.death-msg {
  margin-top: 6px;
  font-size: 14px;
  color: var(--red);
  font-style: italic;
  min-height: 20px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}

.muted { color: var(--muted); }
