@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:            #06060a;
  --s1:            #0e0c16;
  --s2:            #131020;
  --s3:            #1a1729;
  --border:        #231d38;
  --border-strong: #302648;

  --accent:      #9d65fd;
  --accent-deep: #7c4de8;
  --accent-glow: rgba(157,101,253,0.18);
  --accent-soft: rgba(157,101,253,0.06);
  --gold:        #f59e0b;
  --danger:      #ef4444;

  --fg1: #ffffff;
  --fg2: #e6edec;
  --fg3: #8a9794;
  --fg4: #5b6967;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 20px;

  --font-display: 'Shlop', 'Inter', system-ui, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --grad-brand:  linear-gradient(135deg, #fff 30%, var(--accent));
  --grad-mint-h: linear-gradient(90deg, var(--accent), var(--accent-deep));
  --grad-page:   radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-soft), transparent 70%);

  --grid-color: rgba(157, 101, 253, 0.045);
  --grid-bg:
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px) 0 0 / 48px 48px;

  --t-fast: 0.15s;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg2);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.surface-grid {
  background:
    linear-gradient(to bottom,  var(--bg) 0%, transparent 18%),
    linear-gradient(to top,     var(--bg) 0%, transparent 18%),
    linear-gradient(to right,   var(--bg) 0%, transparent 14%),
    linear-gradient(to left,    var(--bg) 0%, transparent 14%),
    var(--grad-page),
    var(--grid-bg),
    var(--bg);
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  overflow: hidden;
}

.figure {
  position: absolute;
  right: -40px;
  top: 70px;
  width: 300px;
  opacity: 0.45;
  pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(0,229,160,0.06));
}
@media (max-width: 900px) { .figure { display: none; } }

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 48px;
  position: relative; z-index: 2;
}
.topbar-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.topbar-brand img { width: 36px; height: 36px; }
.topbar-brand .wm {
  font-family: var(--font-display);
  font-size: 1.6rem; letter-spacing: 0.08em;
  color: var(--accent);
}
.topbar hr {
  position: absolute; left: 48px; right: 48px; bottom: 0;
  border: none; border-top: 1px solid var(--border);
}
/* ── Hamburger menu ── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 38px; height: 38px;
  background: var(--s2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; flex-shrink: 0;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.hamburger:hover { background: var(--s3); border-color: var(--border-strong); }
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--fg2); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed; inset: 0; top: 0; z-index: 999;
  background: rgba(6,6,10,0.92); backdrop-filter: blur(12px);
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px;
}
.mobile-nav.open { display: flex; }
.mobile-nav .btn {
  width: 100%; max-width: 280px; padding: 16px 24px;
  font-size: 1rem; justify-content: center;
}
.mobile-nav-close {
  position: absolute; top: 20px; right: 20px;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--s2); border: 1px solid var(--border);
  color: var(--fg3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

@media (max-width: 640px) {
  .topbar { padding: 18px 20px; }
  .topbar hr { left: 20px; right: 20px; }
  .topbar-desktop-nav { display: none !important; }
  .hamburger { display: flex; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-md);
  font-family: inherit; font-size: 0.85rem; font-weight: 700; line-height: 1;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn--primary { background: var(--accent); color: #0a0412; border-color: var(--accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 90%, white); }

.btn--ghost { background: var(--s2); color: var(--fg1); border-color: var(--border); }
.btn--ghost:hover { background: var(--s3); border-color: var(--border-strong); }

.btn--sm { padding: 8px 16px; font-size: 0.8rem; }
.btn--lg { padding: 16px 30px; font-size: 0.95rem; }

/* ── Status pill ── */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--s3); border: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 600; color: var(--fg2); line-height: 1;
}
.status-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 20%, transparent);
}
.status-pill--ok   { --c: var(--accent); }
.status-pill--warn { --c: var(--gold); }

/* ── Eyebrow pill ── */
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--s3); border: 1px solid var(--border);
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg2);
}
.eyebrow-pill svg { width: 13px; height: 13px; color: var(--accent); }

/* ── Hero ── */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 24px 40px;
  text-align: center; position: relative; z-index: 2;
}
.hero-eyebrow { margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800; line-height: 1; letter-spacing: -0.02em;
  color: var(--fg1); margin: 0;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  margin-top: 20px;
  font-size: 1.05rem; color: var(--fg3);
  max-width: 600px; line-height: 1.5;
}
.hero-ctas {
  margin-top: 36px;
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
@media (max-width: 480px) {
  .hero-ctas .btn--lg { padding: 13px 20px; font-size: 0.88rem; }
}

/* ── Stat panel ── */
.stat-panel {
  max-width: 780px; margin: 32px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
}

.home-grid {
  max-width: 1100px; margin: 32px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch;
}
.home-grid > * { min-width: 0; }
@media (max-width: 640px) {
  .home-grid { grid-template-columns: 1fr; }
}
.panel-inner {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px 36px;
}
.panel-label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg3); margin-bottom: 20px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--s2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 24px;
}
.stat-card .s-label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--fg4);
  display: block; margin-bottom: 10px;
}
.stat-card .s-value {
  font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--accent); font-family: var(--font-mono); line-height: 1;
}
.stat-card .s-sub {
  font-size: 0.74rem; color: var(--fg4); margin-top: 8px;
}

/* ── Admin ── */
.admin-lock-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--s2); border: 1px solid var(--border);
  color: var(--fg4); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.admin-lock-btn:hover { background: var(--s3); border-color: var(--border-strong); color: var(--fg2); }
.admin-lock-btn svg { width: 16px; height: 16px; }

.admin-exit-btn {
  background: color-mix(in srgb, var(--accent) 10%, var(--s2));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.admin-exit-btn:hover { background: color-mix(in srgb, var(--accent) 18%, var(--s2)); }

.admin-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.admin-modal-overlay.open { display: flex; }

.admin-modal-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px 32px;
  width: 100%; max-width: 340px;
}
.admin-modal-title {
  font-size: 1rem; font-weight: 800; color: var(--fg1);
  margin: 0 0 20px; letter-spacing: -0.01em;
}
.admin-modal-input { margin-bottom: 16px; }
.admin-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── VIP page ── */
.page-hero {
  text-align: center;
  padding: 64px 24px 24px;
  position: relative; z-index: 2;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800; line-height: 1; letter-spacing: -0.02em;
  color: var(--fg1); margin: 0;
}
.page-hero h1 .accent { color: var(--accent); }
.page-hero .hero-eyebrow { margin-bottom: 24px; }
.page-hero .hero-sub {
  margin-top: 16px; font-size: 1rem;
  color: var(--fg3); max-width: 540px;
  margin-left: auto; margin-right: auto; line-height: 1.5;
}

.vip-wrap {
  max-width: 1020px; margin: 40px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
}
.vip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 780px) {
  .vip-grid { grid-template-columns: 1fr; }
}

.vip-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px 24px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  height: 100%;
}
.vip-benefits { list-style: none; margin: 0; padding: 0; flex: 1; }
.vip-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--tier-color, var(--border));
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--tier-color, var(--border)) 70%, transparent);
}
.vip-card.featured {
  border-color: var(--tier-color);
  box-shadow: 0 0 0 1px var(--tier-color), 0 8px 40px color-mix(in srgb, var(--tier-color) 12%, transparent);
}
.vip-best-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--tier-color) 15%, transparent);
  color: var(--tier-color);
  border: 1px solid color-mix(in srgb, var(--tier-color) 35%, transparent);
}

.vip-tier-label {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--tier-color); margin-bottom: 10px;
}
.vip-name {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em;
  color: var(--fg1); margin-bottom: 8px;
}
.vip-price {
  font-size: 2rem; font-weight: 900; letter-spacing: -0.03em;
  color: var(--tier-color); font-family: var(--font-mono);
  margin-bottom: 20px; line-height: 1;
}
.vip-price span {
  font-size: 1rem; font-weight: 600; color: var(--fg3);
  letter-spacing: 0; margin-left: 2px;
}
.vip-price-old {
  font-size: 1.1rem; font-weight: 600; color: var(--fg4);
  text-decoration: line-through; margin-right: 6px;
  letter-spacing: 0; font-family: var(--font-mono);
}
.vip-get-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; padding: 13px;
  border-radius: var(--radius-md); font-weight: 700; font-size: 0.88rem;
  text-decoration: none; text-align: center;
  border: 1px solid var(--tier-color);
  background: color-mix(in srgb, var(--tier-color) 12%, transparent);
  color: var(--tier-color);
  transition: background var(--t-fast);
}
.vip-get-btn:hover { background: color-mix(in srgb, var(--tier-color) 22%, transparent); }
.vip-get-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.vip-divider {
  border: none; border-top: 1px solid var(--border); margin: 0 0 20px;
}

.vip-benefit {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 0.87rem; color: var(--fg3);
}
.vip-benefit:last-child { border-bottom: none; }
.vip-benefit-icon {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px;
  color: var(--tier-color);
}
.vip-benefit b { color: var(--fg1); font-weight: 700; }

.vip-spawn-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px;
}
.vip-tag {
  font-size: 0.68rem; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-sm);
  background: var(--s3); border: 1px solid var(--border);
  color: var(--fg3);
}

@media (max-width: 720px) {
  .lb-two-col { grid-template-columns: 1fr !important; }
}

/* ── Help page ── */
.help-wrap {
  max-width: 860px; margin: 40px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
}
.help-section { margin-bottom: 40px; }
.help-section-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--fg3); margin-bottom: 14px;
}
.help-table { width: 100%; border-collapse: collapse; }
.help-table th {
  background: var(--s2); padding: 12px 20px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg3); border-bottom: 1px solid var(--border); text-align: left;
}
.help-table th:not(:first-child) { text-align: right; }
.help-table td { padding: 13px 20px; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--fg2); }
.help-table tr:last-child td { border-bottom: none; }
.help-table tr:hover td { background: var(--s2); }
.help-table td:not(:first-child) { text-align: right; font-family: var(--font-mono); font-size: 0.85rem; }
.help-table .td-action { font-weight: 600; color: var(--fg1); }
.help-table .td-threshold { color: var(--fg4); font-size: 0.8rem; }
.help-table .td-credits { color: #fbbf24; font-weight: 700; }
.help-table .td-xp { color: var(--accent); font-weight: 700; }

.help-callout {
  display: flex; align-items: flex-start; gap: 14px;
  background: color-mix(in srgb, var(--accent) 6%, var(--s1));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 32px;
}
.help-callout svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.help-callout-body { font-size: 0.88rem; color: var(--fg2); line-height: 1.5; }
.help-callout-body b { color: var(--fg1); }
.help-vip-tiers { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.help-vip-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 0.75rem; font-weight: 700; font-family: var(--font-mono);
  background: var(--s3); border: 1px solid var(--border);
}

.cmd {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  padding: 2px 8px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 10%, var(--s2));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--accent); white-space: nowrap;
}
.cmd-alias {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.75rem;
  padding: 1px 6px; border-radius: var(--radius-sm);
  background: var(--s3); border: 1px solid var(--border);
  color: var(--fg4); margin-left: 4px; white-space: nowrap;
}
.td-cmd { white-space: nowrap; width: 1%; }
.help-badge {
  display: inline-block;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid; white-space: nowrap;
}
.help-badge-human  { color: #44aaff; border-color: rgba(68,170,255,0.3); background: rgba(68,170,255,0.08); }
.help-badge-zombie { color: #ff4444; border-color: rgba(255,68,68,0.3);   background: rgba(255,68,68,0.08);  }
.help-badge-both   { color: #ffdd44; border-color: rgba(255,221,68,0.3); background: rgba(255,221,68,0.08); }
.help-badge-hev    { color: #4fc3f7; border-color: rgba(79,195,247,0.3); background: rgba(79,195,247,0.08); }

/* ── Player profile ── */
.profile-wrap {
  max-width: 860px; margin: 32px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
}
.profile-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 36px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px; align-items: start;
  position: relative; overflow: hidden;
}
@media (max-width: 640px) {
  .profile-card { grid-template-columns: 1fr; }
  .profile-actions { order: -1; }
}
.profile-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 0% 0%, rgba(157,101,253,0.09), transparent 60%);
}
.profile-card > * { position: relative; z-index: 1; }

.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 130px; height: 130px; border-radius: var(--radius-lg);
  border: 2px solid rgba(157,101,253,0.3); object-fit: cover;
  background: var(--s2); display: block;
  box-shadow: 0 0 0 4px rgba(157,101,253,0.08), 0 8px 32px rgba(0,0,0,0.4);
}

.profile-info { min-width: 0; }
.profile-name {
  font-size: 2rem; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--fg1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 0 4px;
}
.profile-sid {
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--fg4); margin: 0 0 18px;
}
.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--s2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 7px 14px;
}
.profile-badge .lbl { color: var(--fg4); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.profile-badge .val { color: var(--fg1); font-weight: 800; font-family: var(--font-mono); font-size: 0.88rem; }
.profile-badge .val.accent { color: var(--accent); }

.profile-actions { justify-self: end; }

.profile-stat-section { margin-top: 24px; }
.profile-section-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--fg3); margin-bottom: 12px; padding-left: 2px;
}
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.profile-stat-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  transition: border-color var(--t-fast);
}
.profile-stat-card:hover { border-color: var(--border-strong); }
.profile-stat-card .s-lbl {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--fg4); display: block; margin-bottom: 8px;
}
.profile-stat-card .s-val {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--fg1); font-family: var(--font-mono); line-height: 1;
}
.profile-stat-card .s-val.accent  { color: var(--accent); }
.profile-stat-card .s-val.danger  { color: var(--danger); }
.profile-stat-card .s-val.gold    { color: #fbbf24; }
.profile-stat-card .s-val.violet  { color: var(--accent2, #7c6aff); }
.profile-stat-card .s-val.magenta { color: #e879f9; }

/* ── Sort tabs ── */
.sort-tabs {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; margin-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sort-tabs::-webkit-scrollbar { display: none; }
.sort-tab {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--border); background: var(--s2);
  color: var(--fg3); text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.sort-tab:hover { background: var(--s3); color: var(--fg1); border-color: var(--border-strong); }
.sort-tab.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--s2));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ── Leaderboard ── */
.lb-wrap {
  max-width: 780px; margin: 32px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
}
.lb-wrap-wide {
  max-width: 1300px; margin: 32px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
}
.lb-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.lb-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--fg3);
}

.table-wrap {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  overflow: clip;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) {
  .table-scroll { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
}

.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  background: var(--s2); padding: 11px 14px;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg3); border-bottom: 1px solid var(--border); text-align: left;
  white-space: nowrap;
}
.lb-table th.sorted { color: var(--accent); }
.lb-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; white-space: nowrap; }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr:hover td { background: var(--s2); }
#lb-body { transition: opacity 0.15s; }

.lb-rank { width: 48px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg4); font-weight: 700; }
.lb-rank-gold   { color: #fbbf24; }
.lb-rank-silver { color: #94a3b8; }
.lb-rank-bronze { color: #cd7c3b; }

.lb-name a { color: var(--fg1); font-weight: 700; text-decoration: none; transition: color var(--t-fast); }
.lb-name a:hover { color: var(--accent); }

.lb-val { font-family: var(--font-mono); font-weight: 700; color: var(--fg2); }
.lb-val.sorted { color: var(--accent); }
.lb-muted { font-family: var(--font-mono); color: var(--fg4); font-size: 0.82rem; }

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 28px 0; flex-wrap: wrap;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--radius-sm); background: var(--s2); border: 1px solid var(--border);
  color: var(--fg3); font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: background var(--t-fast), color var(--t-fast);
}
.page-btn:hover { background: var(--s3); color: var(--fg1); }
.page-btn.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--s2));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.page-btn.disabled { opacity: 0.35; pointer-events: none; }

/* ── Footer ── */
.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 48px;
  color: var(--fg4); font-size: 0.78rem;
  border-top: 1px solid var(--border);
  margin-top: 72px;
  position: relative; z-index: 2;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { color: color-mix(in srgb, var(--accent) 90%, white); }
@media (max-width: 640px) {
  .site-footer { padding: 20px; flex-direction: column; gap: 8px; text-align: center; }
}
