/* Space Time Continuum leaderboard. leaflet.css is loaded alongside this file. */
:root {
  --bg: #0b1020;
  --bg-2: #121a33;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #6366f1;
  --accent-2: #06b6d4;
  --gold: #f59e0b;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f1f5f9; color: var(--text); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

.site-header { background: linear-gradient(120deg, var(--bg), var(--bg-2) 60%, #1e1b4b); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.site-header .brand { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.site-header .logo { color: var(--accent-2); margin-right: 4px; }
.site-header nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-header nav a { color: #cbd5e1; padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.site-header nav a:hover, .site-header nav a.active { color: #fff; background: rgba(255,255,255,.12); }

.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0 0 4px; font-size: 2rem; }
.hero p { margin: 0 0 16px; }

.tabs { display: inline-flex; background: #e2e8f0; padding: 4px; border-radius: 999px; gap: 2px; }
.tabs a { padding: 6px 16px; border-radius: 999px; color: var(--text); font-weight: 500; }
.tabs a.active { background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.15); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 8px 24px rgba(15,23,42,.04); padding: 18px 20px; margin: 16px 0; }
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }

.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.boards .card { margin: 16px 0 0; }
.board#key_distance h2 { color: var(--accent); }
.board#pointer_distance h2 { color: #0891b2; }
.board#active_time h2 { color: #d97706; }
.board .empty { margin: 8px 0; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: 6px 4px; }
td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
td.rank, th.rank { width: 2.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
tbody tr:nth-child(1) td.rank { color: var(--gold); font-weight: 700; }
td.name { font-weight: 500; word-break: break-word; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.silly { color: var(--muted); font-size: .78rem; white-space: normal; }

.chart-card .chart-box { position: relative; height: 320px; }

.map-card { padding: 0; overflow: hidden; }
.map-card .map { height: 70vh; min-height: 420px; }
.map-status { padding: 10px 16px; margin: 0; font-size: .9rem; }
.stc-marker div { background: var(--accent); color: #fff; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 8px rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.map-popup .place { font-weight: 700; margin-bottom: 6px; }
.map-popup .title { font-weight: 400; font-size: .75rem; color: var(--muted); }
.map-popup table { font-size: .8rem; }
.map-popup td, .map-popup th { padding: 3px 4px; }

.site-footer { color: var(--muted); font-size: .85rem; padding: 24px 20px 40px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .site-header .brand { font-size: 1rem; }
}
