/* CentipedeScores.com — Phase 1 styles.
 * Palette (Case, Nov 22): BLACK page background, Milk text, StackSandos
 * accents — Mint #00D4BB primary (links, highlights, scores, headings),
 * Olive #808000 secondary. Neon-arcade look: black with mint and olive
 * glowing accents, matching the Centipede artwork's dark feel.
 * Artwork (CS badge, CENTIPEDE SCORES banner) is used as-is for imagery. */

:root {
  --bg: #000000;
  --panel: #0d0b09;
  --panel-2: #141009;
  --ink: #FDFBF4; /* Milk — text on black */
  --muted: #b3aa9c;
  --mint: #00D4BB;
  --mint-dark: #00907f;
  --olive: #808000;
  --olive-dark: #5f5f00;
  --olive-light: #a8a800;
  --espresso: #4E312D;
  --line: #2b241f;
  --red: #ff6b81;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--mint); }
a:hover { color: var(--olive-light); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #050403;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; display: block; }
.brand-name {
  font-family: "Bungee", "Press Start 2P", "Courier New", monospace;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--olive);
}
.brand-name span { color: var(--mint); }
.site-nav { margin-left: auto; display: flex; gap: 1rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a.active { color: var(--mint); }
/* Hover is Milk, never Mint: on touch devices a tapped link keeps its
 * :hover state, which used to leave a second link mint alongside the
 * active one. Only .active is ever mint — one mint link per page. */
.site-nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { margin: 0; }
.hero img {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: auto;
}
.tagline {
  text-align: center;
  color: var(--mint);
  font-size: 1.05rem;
  margin: 1.25rem auto 0;
  max-width: 640px;
}
.tagline strong { color: var(--mint); }

/* ---------- board selector (dropdowns) ----------
 * Game / Mode / Players dropdowns (Case, Nov 23). Mode and Players only
 * appear for Centipede: Recharged; Chaos and Classic show their board
 * directly. Dark selects to match the admin form. */
.switcher {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem 0 0;
}
.switcher .selector {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 11rem;
}
.switcher .selector span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.switcher select {
  background: #171310;
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}
.switcher select:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.board-title {
  text-align: center;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 1rem;
  color: var(--mint);
  margin: 1.75rem 0 0.25rem;
  line-height: 1.6;
}
.board-sub { text-align: center; color: var(--muted); margin: 0 0 1rem; font-size: 0.9rem; }

/* ---------- leaderboard table ----------
 * Fixed layout + explicit column widths: every column gets a defined
 * width so spacing is even and deterministic on all screen sizes
 * (auto layout let the Player column absorb all the slack, leaving a
 * big uneven gap before Score). Player takes the remaining width. */
.board { width: 100%; border-collapse: collapse; margin: 0 0 2rem; table-layout: fixed; }
.board th, .board td { padding: 0.6rem 0.5rem; text-align: left; }
.board th.rank, .board td.rank { width: 3.5rem; }
.board th.score, .board td.score { width: 7rem; }
.board th.platform, .board td.platform { width: 9rem; }
.board th.date, .board td.date { width: 6.5rem; white-space: nowrap; }
.board thead th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--line);
}
.board tbody tr { border-bottom: 1px solid var(--line); }
.board tbody tr:hover { background: var(--panel); }
.board td.rank {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  width: 3.5rem;
}
.board td.rank.top1 { color: var(--mint); }
.board td.rank.top2, .board td.rank.top3 { color: var(--olive-light); }
.board td.score {
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--mint);
  text-align: right;
}
.board td.player { font-weight: 700; }
.board td.player .you { color: var(--olive-light); font-size: 0.8rem; font-weight: 600; }
.board td.date, .board td.platform { color: var(--muted); font-size: 0.9rem; }
.board th.score { text-align: right; }
.empty {
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 2rem 1rem;
  margin: 0 0 2rem;
}
.empty strong { color: var(--mint); }
.loading { text-align: center; color: var(--muted); padding: 2rem 0; }

/* ---------- submit box ---------- */
.submit-box {
  border: 1px solid var(--mint-dark);
  border-radius: 10px;
  background: var(--panel);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.5rem;
}
.submit-box h2 {
  margin: 0 0 0.5rem;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.9rem;
  color: var(--mint);
  line-height: 1.6;
}
.submit-box p { margin: 0.4rem 0; }
.submit-box code {
  background: #171310;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  color: var(--mint);
}

/* ---------- about page ---------- */
.page h1 {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 1.1rem;
  color: var(--mint);
  line-height: 1.7;
  margin: 2rem 0 0.25rem;
}
.page h2 {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--mint);
  line-height: 1.7;
  margin: 2rem 0 0.5rem;
}
.page p, .page li { max-width: 680px; }
.page ul { padding-left: 1.25rem; }
.page li { margin: 0.35rem 0; }
.founder {
  display: flex;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  max-width: 680px;
}
.founder img { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.founder p { margin: 0.25rem 0; }
.founder .big {
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--mint);
}

/* ---------- admin page ---------- */
.admin-form {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 2rem;
  max-width: 560px;
}
.admin-form label { display: block; font-weight: 700; font-size: 0.9rem; margin: 0.75rem 0 0.25rem; }
.admin-form input, .admin-form select {
  width: 100%;
  background: #171310;
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
}
.admin-form input:focus, .admin-form select:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.btn {
  display: inline-block;
  background: var(--mint);
  color: #000;
  border: 0;
  font: inherit;
  font-weight: 800;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 1rem;
}
.btn:hover { background: var(--olive-light); }
.btn.danger { background: transparent; border: 1px solid var(--red); color: var(--red); padding: 0.25rem 0.6rem; margin: 0; font-size: 0.85rem; }
.btn.danger:hover { background: var(--red); color: #fff; }
.msg { margin: 0.75rem 0 0; font-weight: 700; }
.msg.ok { color: var(--mint); }
.msg.err { color: var(--red); }
.admin-list { width: 100%; border-collapse: collapse; margin: 0 0 2.5rem; }
.admin-list th, .admin-list td { padding: 0.45rem 0.4rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.admin-list th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- forum (Phase 2) ---------- */
.auth-bar {
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
  margin: 1rem 0 0;
}
.admin-tag {
  background: var(--olive);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  vertical-align: middle;
}
.pin-tag {
  background: var(--mint);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  vertical-align: middle;
}
.crumbs { color: var(--muted); font-size: 0.9rem; margin: 1.5rem 0 0; }
.meta { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.forum-cats { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0 2.5rem; }
.forum-cat {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
}
.forum-cat:hover { border-color: var(--mint-dark); }
.forum-cat-name {
  display: block;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--mint);
  line-height: 1.7;
}
.forum-cat-desc { display: block; color: var(--muted); margin: 0.3rem 0; }
.forum-cat-meta { display: block; color: var(--muted); font-size: 0.85rem; }
.thread-list { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem; }
.thread-list th, .thread-list td { padding: 0.6rem 0.5rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.thread-list th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.thread-list td a { font-weight: 700; text-decoration: none; }
.posts { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0 2rem; }
.post {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 1rem 1.25rem;
}
.post header { border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; margin-bottom: 0.75rem; }
.post header .btn.danger { float: right; }
.post p { margin: 0.5rem 0; white-space: pre-wrap; word-break: break-word; }
.admin-form textarea {
  width: 100%;
  background: #171310;
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  resize: vertical;
}
.admin-form textarea:focus { outline: 2px solid var(--mint); outline-offset: 1px; }
.auth-cols { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.auth-cols .admin-form { flex: 1 1 280px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.5rem 0 2.5rem;
}
.site-footer p { margin: 0.3rem 0; }
.site-footer .disclaimer { font-size: 0.8rem; }
.site-footer .links { display: flex; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 640px) {
  /* Platform stays visible on mobile (Case, Nov 23) — it wraps to two
   * lines ("Nintendo" / "Switch") instead of being hidden. Compact
   * padding/fonts and narrower fixed columns so all five columns fit
   * a phone screen with no overflow. */
  .board th, .board td { padding: 0.55rem 0.35rem; }
  .board thead th { font-size: 0.65rem; letter-spacing: 0.02em; }
  .board th.rank, .board td.rank { width: 2.5rem; }
  .board td.rank { font-size: 0.7rem; }
  .board th.player, .board td.player { width: 5.5rem; }
  .board th.score, .board td.score { width: 4.5rem; }
  .board td.score { font-size: 1rem; white-space: nowrap; }
  .board th.platform, .board td.platform { width: 4.5rem; }
  .board td.platform { font-size: 0.8rem; line-height: 1.35; }
  .board th.date, .board td.date { width: 4rem; }
  .board td.date { font-size: 0.8rem; }
  .board td.player { font-size: 0.95rem; }
  .brand-name { font-size: 0.9rem; }
  .founder { flex-direction: column; align-items: flex-start; }
}
