/* ============================================================
   KVK TRACKER — KINGDOM 2358
   Design: Tactical Intelligence Operations
   Fonts: Rajdhani (headers) | IBM Plex Mono (data) | Barlow Condensed (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Barlow+Condensed:wght@300;400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --void:          #04040a;
  --deep:          #07070f;
  --surface:       #0c0c1a;
  --raised:        #111128;
  --hover:         #16163a;
  --border:        #1c1c38;
  --border-hi:     #2a2a55;

  --gold:          #c8a84b;
  --gold-bright:   #e8c870;
  --gold-dim:      #5a4a1a;
  --gold-glow:     rgba(200,168,75,0.12);

  --cyan:          #00c8e0;
  --cyan-dim:      rgba(0,200,224,0.12);
  --red:           #e83355;
  --red-dim:       rgba(232,51,85,0.12);
  --green:         #00e676;
  --green-dim:     rgba(0,230,118,0.12);
  --amber:         #f0a030;
  --amber-dim:     rgba(240,160,48,0.12);

  --text:          #dde0f0;
  --text-2:        #8890b8;
  --text-3:        #44486a;
  --text-4:        #28283f;

  --font-display:  'Rajdhani', sans-serif;
  --font-mono:     'IBM Plex Mono', monospace;
  --font-body:     'Barlow Condensed', sans-serif;

  --radius:        4px;
  --radius-lg:     8px;
  --trans:         0.2s ease;
  --shadow:        0 4px 24px rgba(0,0,0,0.6);
  --shadow-gold:   0 0 30px rgba(200,168,75,0.15);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold-dim); color: var(--gold-bright); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Background Grid ────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,168,75,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,168,75,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.page-content { position: relative; z-index: 1; padding-top: 80px; padding-bottom: 60px; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7,7,15,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 0;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 40px;
}
.nav-logo {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  color: var(--gold);
}
.nav-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
}
.nav-title span { color: var(--gold); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-2);
  border-radius: var(--radius);
  transition: color var(--trans), background var(--trans);
}
.nav-link svg { width: 15px; height: 15px; opacity: 0.7; flex-shrink: 0; }
.nav-link:hover { color: var(--text); background: var(--raised); }
.nav-link.active { color: var(--gold); background: var(--gold-glow); }
.nav-link.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.nav-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Page Header ────────────────────────────────────────── */
.page-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.page-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
.page-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
}
.page-meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.8;
}
.page-meta strong { color: var(--text-2); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--trans), transform var(--trans);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--trans);
}
.card:hover { border-color: var(--border-hi); }
.card:hover::before { opacity: 1; }
.card-pad { padding: 24px; }
.card-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}

/* ── KPI Cards ──────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(200,168,75,0.04), transparent);
  transition: none;
  pointer-events: none;
}
.kpi-card:hover::after {
  left: 150%;
  transition: left 0.7s ease;
}
.kpi-card:hover { border-color: var(--gold-dim); box-shadow: var(--shadow-gold); }
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kpi-label svg { width: 13px; height: 13px; color: var(--gold); flex-shrink: 0; }
.kpi-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--text);
  line-height: 1;
  letter-spacing: 1px;
}
.kpi-value.mono { font-family: var(--font-mono); font-size: 26px; }
.kpi-sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.kpi-accent { color: var(--gold); }

/* ── Charts Grid ────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.charts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.chart-wrap {
  position: relative;
  height: 280px;
}
.chart-wrap canvas { max-height: 100%; }

/* ── Section header ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 4px; height: 18px;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Table ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}
thead th {
  background: var(--raised);
  padding: 12px 16px;
  text-align: left;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
thead th.sortable { cursor: pointer; }
thead th.sortable:hover { color: var(--gold); }
thead th.sort-asc::after { content: ' ↑'; color: var(--gold); }
thead th.sort-desc::after { content: ' ↓'; color: var(--gold); }
thead th.num { text-align: right; }
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--trans);
  cursor: pointer;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--raised); }
tbody tr.top-1 { background: rgba(200,168,75,0.06); }
tbody tr.top-2 { background: rgba(192,192,192,0.04); }
tbody tr.top-3 { background: rgba(205,127,50,0.04); }
td {
  padding: 11px 16px;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
td.num { text-align: right; }
td.player-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.rank-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-3);
}
.rank-num.r1 { color: var(--gold); }
.rank-num.r2 { color: #c0c0c0; }
.rank-num.r3 { color: #cd7f32; }
.kp-value { color: var(--gold); font-weight: 600; }
.death-value { color: var(--red); }

/* ── Status Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.badge svg { width: 10px; height: 10px; flex-shrink: 0; }
.badge-full    { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,230,118,0.3); }
.badge-partial { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(240,160,48,0.3); }
.badge-notmet  { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(232,51,85,0.3); }
.badge-zeroed  { background: rgba(232,51,85,0.15); color: var(--red); border: 1px solid rgba(232,51,85,0.4); }
.badge-rallied { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(240,160,48,0.4); }
.badge-live    { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,230,118,0.3); animation: pulse-badge 2s infinite; }
@keyframes pulse-badge { 0%,100%{opacity:1;} 50%{opacity:0.6;} }

/* ── Progress Bars ──────────────────────────────────────── */
.progress-wrap { margin-bottom: 16px; }
.progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.progress-label { color: var(--text-3); letter-spacing: 1px; text-transform: uppercase; }
.progress-pct { font-weight: 600; }
.progress-bar {
  height: 6px;
  background: var(--raised);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.gold  { background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
.progress-fill.red   { background: linear-gradient(90deg, var(--red-dim), var(--red)); }
.progress-fill.green { background: linear-gradient(90deg, var(--green-dim), var(--green)); }
.progress-fill.full  { background: linear-gradient(90deg, rgba(0,230,118,0.4), var(--green)); }

/* ── Search ─────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}
.search-wrap svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px 10px 42px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color var(--trans);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { border-color: var(--gold-dim); }

/* ── Filters ────────────────────────────────────────────── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  transition: all var(--trans);
}
.filter-btn:hover { color: var(--text); border-color: var(--border-hi); }
.filter-btn.active { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-glow); }
.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 32px 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2344486a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-select:focus { border-color: var(--gold-dim); }

/* ── Player Hero ────────────────────────────────────────── */
.player-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.player-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.player-hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.player-rank-badge {
  width: 72px; height: 72px;
  background: var(--raised);
  border: 2px solid var(--gold-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.player-rank-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
}
.player-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}
.player-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.player-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.player-power {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  margin-left: auto;
  text-align: right;
}
.player-power-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--cyan);
  display: block;
  line-height: 1;
}
.player-power-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ── Stat Cards Row ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color var(--trans);
}
.stat-card:hover { border-color: var(--border-hi); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-value.gold { color: var(--gold); }
.stat-value.cyan { color: var(--cyan); }
.stat-value.red  { color: var(--red); }
.stat-value.green{ color: var(--green); }

/* ── Zone Cards ─────────────────────────────────────────── */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.zone-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}
.zone-card.zone-active { border-color: var(--cyan); background: var(--cyan-dim); }
.zone-card.zone-done   { border-color: var(--border); opacity: 0.6; }
.zone-card.zone-upcoming { border-color: var(--border); }
.zone-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}
.zone-dates {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.zone-kp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
}
.zone-status-pill {
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.zone-active .zone-status-pill  { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,200,224,0.3); }
.zone-done .zone-status-pill    { background: var(--raised); color: var(--text-3); border: 1px solid var(--border); }
.zone-upcoming .zone-status-pill{ background: var(--raised); color: var(--text-3); border: 1px solid var(--border); }

/* ── Penalty Alert ──────────────────────────────────────── */
.penalty-alert {
  background: rgba(232,51,85,0.08);
  border: 1px solid rgba(232,51,85,0.3);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.penalty-icon { color: var(--red); flex-shrink: 0; }
.penalty-icon svg { width: 24px; height: 24px; }
.penalty-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 4px;
}
.penalty-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

/* ── Scan activity ──────────────────────────────────────── */
.scan-list { list-style: none; }
.scan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
}
.scan-item:last-child { border-bottom: none; }
.scan-date { color: var(--text-2); width: 110px; flex-shrink: 0; }
.scan-players { color: var(--text-3); flex: 1; }
.scan-kp { color: var(--gold); font-weight: 600; text-align: right; }

/* ── KvK Selector ───────────────────────────────────────── */
.kvk-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.kvk-btn {
  padding: 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text-3);
  transition: all var(--trans);
}
.kvk-btn:hover { color: var(--text); border-color: var(--border-hi); }
.kvk-btn.active { color: var(--gold); border-color: var(--gold); background: var(--gold-glow); }

/* ── Loading Skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--raised) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }
.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 40px; margin-bottom: 12px; }
.skeleton-card  { height: 100px; border-radius: var(--radius-lg); }
.skeleton-row   { height: 44px; margin-bottom: 2px; }

/* ── Loading Spinner ────────────────────────────────────── */
.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ── Error state ────────────────────────────────────────── */
.error-state {
  text-align: center;
  padding: 60px 24px;
}
.error-state svg { width: 48px; height: 48px; color: var(--red); margin: 0 auto 16px; }
.error-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}
.error-msg { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

/* ── Divider ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
  margin: 24px 0;
}

/* ── Two col grid ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-4);
}
.footer-inner a:hover { color: var(--text-3); }

/* ── Tooltip ────────────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--raised);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

/* ── Animations ─────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.4s ease both; }
.fade-in-up { animation: fadeInUp 0.5s ease both; }
@keyframes fadeIn    { from{opacity:0;} to{opacity:1;} }
@keyframes fadeInUp  { from{opacity:0;transform:translateY(16px);} to{opacity:1;transform:none;} }
.stagger > * { animation: fadeInUp 0.5s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-links .nav-link span { display: none; }
  .page-header-inner { flex-direction: column; align-items: flex-start; }
  .page-meta { text-align: left; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .player-hero-inner { flex-wrap: wrap; }
  .player-power { margin-left: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .filter-row { gap: 8px; }
  .charts-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 24px; }
  .player-rank-badge { width: 56px; height: 56px; }
  .player-rank-num { font-size: 28px; }
  .player-name { font-size: 28px; }
}
