/* ===================== Design tokens ===================== */
:root {
  --bg: #0a0a0c;
  --surface: #17171c;
  --surface-2: #121216;
  --surface-hover: #1e1e25;
  --border: #26262e;
  --border-strong: #34343e;
  --text: #f2f2f0;
  --text-dim: #8a8a94;
  --text-faint: #5f5f68;
  --accent: #e9fb59;
  --accent-strong: #f0ff85;
  --accent-dim: rgba(233, 251, 89, .13);
  --accent-rgb: 233, 251, 89;
  --gold: #ffd700;
  --silver: #c8c8d0;
  --bronze: #cd7f32;
  --positive: #5be27f;
  --negative: #e2585b;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --font-display: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

.icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }

/* ===================== Header ===================== */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 12, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .3px;
  color: var(--text);
}

.brand .icon { color: var(--accent); }

.icon-link {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, transform .15s;
  flex: 0 0 30px;
  height: 30px;
  border-radius: var(--radius-sm);
}

.icon-link:hover { color: var(--text); background: var(--surface); transform: translateY(-1px); }

nav { display: flex; gap: 4px; flex-wrap: wrap; }

nav a {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color .15s, background .15s;
}

nav a:hover { color: var(--text); background: var(--surface); }
nav a.active { color: var(--bg); background: var(--accent); }

.search-wrap { margin-left: auto; position: relative; min-width: 220px; }

.search-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px 9px 36px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s;
}

.search-wrap input:focus { border-color: var(--accent); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6);
  z-index: 30;
}

.search-results .result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

.search-results .result-row:last-child { border-bottom: none; }
.search-results .result-row:hover { background: var(--surface-hover); color: var(--text); }
.search-results .result-row .icon { color: var(--accent); }

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .15s, border-color .15s, background-color .15s;
}

.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }

/* ===================== Layout ===================== */
main {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 22px 70px;
  min-height: 60vh;
}

.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 26px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  animation: fadeUp .4s ease both;
  transition: border-color .2s;
}

.card:hover { border-color: var(--border-strong); }

.card .label {
  font-size: 11.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 9px;
  font-weight: 600;
}

.card .value {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.card .sub { font-size: 12px; color: var(--text-dim); margin-top: 5px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  0% { transform: scale(.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

h2.section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0 0 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}

h2.section-title::before {
  content: '';
  width: 3px;
  height: 17px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
}

section { margin-bottom: 36px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.section-head h2.section-title { margin-bottom: 0; }

.caption {
  color: var(--text-dim);
  font-size: 13px;
  margin: -6px 0 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* ===================== Tables ===================== */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}

/* Only headers wired to a sort handler look and act clickable. */
th[data-key], th[data-compare-sort] {
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color .15s, background-color .15s;
}

th[data-key]:hover, th[data-compare-sort]:hover { color: var(--text); background: var(--surface-hover); }
th.sorted { color: var(--accent); }

th .icon { margin-left: 4px; opacity: .5; }
th.sorted .icon { opacity: 1; }

td { padding: 10px 12px; border-top: 1px solid var(--border); white-space: nowrap; }

tr.row-anim { animation: fadeUp .35s ease both; }
tbody tr:hover { background: var(--accent-dim); }

.player-cell { display: flex; align-items: center; gap: 10px; }

/* ===================== Avatars ===================== */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  color: var(--bg);
  flex-shrink: 0;
}

.medal { display: inline-flex; margin-right: 5px; vertical-align: -5px; }
.medal.gold { color: var(--gold); }
.medal.silver { color: var(--silver); }
.medal.bronze { color: var(--bronze); }

.avatar-wrap { position: relative; display: inline-block; flex-shrink: 0; }

.avatar-edit-btn {
  position: absolute; bottom: -2px; right: -2px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; line-height: 1;
}

.avatar-edit-btn:hover { transform: scale(1.1); }

.avatar-remove-link {
  background: none; border: none; color: var(--text-dim);
  font-size: 12px; cursor: pointer; text-decoration: underline;
  padding: 0; display: inline-flex; align-items: center; gap: 5px;
}

.avatar-remove-link:hover { color: var(--accent); }

/* ===================== Modal ===================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 7, 8, .72);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeUp .15s ease both;
}

.modal {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%; max-width: 360px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6);
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.modal-head b { font-size: 15px; }

.modal-close {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; padding: 4px; display: flex;
}

.modal-close:hover { color: var(--text); }

.field-label {
  font-size: 11.5px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .4px;
  display: block; margin-bottom: 7px; font-weight: 600;
}

.field-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.field-input:focus { border-color: var(--accent); }

.field-row { display: flex; gap: 6px; }
.field-row .field-input { flex: 1; min-width: 0; }

.divider {
  text-align: center; color: var(--text-faint);
  font-size: 11.5px; margin: 14px 0;
  text-transform: uppercase; letter-spacing: .5px;
}

.modal-error { color: var(--negative); font-size: 12px; margin-top: 9px; min-height: 1em; }

.modal-block { margin-bottom: 14px; }
.modal-block:last-of-type { margin-bottom: 0; }

/* ===================== Movement / achievements ===================== */
.move-up { color: var(--positive); display: inline-flex; align-items: center; gap: 3px; }
.move-down { color: var(--negative); display: inline-flex; align-items: center; gap: 3px; }
.move-same { color: var(--text-faint); }

.countdown {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  padding: 26px; background: var(--surface);
  border-radius: var(--radius-lg); border: 1px solid var(--border);
}

.countdown .unit { text-align: center; min-width: 68px; }

.countdown .num {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.countdown .unit-label {
  font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .5px;
}

.countdown-title {
  text-align: center; color: var(--text-dim);
  font-size: 13px; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}

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

.badge-list { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px 7px 10px;
  font-size: 12.5px;
  display: flex; align-items: center; gap: 7px;
  animation: pop .25s ease both;
  font-weight: 600;
  transition: border-color .2s;
}

.badge:hover { border-color: var(--border-strong); }
.badge .icon { color: var(--accent); }

.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.filter-btn {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}

.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }

.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ===================== Directory / cards ===================== */
.directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  animation: fadeUp .35s ease both;
}

.player-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.player-card .avatar { width: 48px; height: 48px; font-size: 16px; margin: 0 auto 10px; }
.player-card .pname { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.player-card .pmeta { font-size: 12px; color: var(--text-dim); }

.edition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.video-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  animation: fadeUp .35s ease both;
}

.video-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.video-card.expanded { grid-column: 1 / -1; cursor: default; animation: none; }
.video-card.expanded:hover { transform: none; border-color: var(--border); }

.video-thumb-wrap { position: relative; aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.video-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, .3);
  opacity: 0; transition: opacity .15s;
}

.video-play-overlay .icon { width: 44px; height: 44px; }
.video-card:hover .video-play-overlay { opacity: 1; }

.video-card-title {
  padding: 12px 14px;
  font-size: 13px; font-weight: 600; line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-expanded-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 16px; font-size: 14px;
}

.video-expanded-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.video-collapse-hint {
  color: var(--text-dim); font-size: 12.5px; flex-shrink: 0;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
}

.video-collapse-hint:hover { color: var(--text); }

.video-watch-link {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px 14px;
  color: var(--accent); font-size: 12.5px; font-weight: 600;
}

.edition-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 17px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  animation: fadeUp .35s ease both;
}

.edition-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.edition-card .enum { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 9px; }
.edition-card .erow { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px; }
.edition-card .erow b { color: var(--text); font-weight: 600; }

.breadcrumb { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; display: flex; align-items: center; gap: 6px; }
.breadcrumb a:hover { color: var(--text); }

.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.profile-header .avatar { width: 72px; height: 72px; font-size: 26px; }
.profile-header h1 { margin: 0; font-family: var(--font-display); font-size: 27px; font-weight: 700; }
.profile-header .rank-tag { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-top: 4px; }

.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
}

.profile-hero .profile-header { margin-bottom: 0; }

.profile-season-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }

.podium-banner {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: 13px;
}

.podium-banner strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.podium-icon { color: var(--gold); display: flex; }
.podium-icon .icon { width: 24px; height: 24px; }

.profile-stat-emphasis .value { color: var(--accent); }

.edition-podium-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 0 18px;
}

.edition-podium-place {
  background: var(--surface);
  padding: 16px 14px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

.edition-podium-place .medal { display: flex; justify-content: center; margin: 0 0 6px; }
.edition-podium-place b { display: block; color: var(--text); font-size: 15px; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edition-podium-place.gold { box-shadow: inset 0 3px 0 var(--gold); }
.edition-podium-place.silver { box-shadow: inset 0 3px 0 var(--silver); }
.edition-podium-place.bronze { box-shadow: inset 0 3px 0 var(--bronze); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }

select, input.h2h-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}

select:hover, select:focus, input.h2h-select:hover, input.h2h-select:focus { border-color: var(--border-strong); }

.h2h-select-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: center; margin-bottom: 22px; }
.h2h-select-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.h2h-select-side select { min-width: 160px; text-align: center; font-weight: 600; }

.h2h-vs-badge {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  color: var(--accent); flex-shrink: 0;
}

.h2h-header {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px;
  padding: 26px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.h2h-header-bg { position: absolute; inset: 0; opacity: .16; z-index: 0; }

.h2h-side-header { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; }
.h2h-side-header.side-a { align-items: flex-end; text-align: right; }
.h2h-side-header.side-b { align-items: flex-start; text-align: left; }

.h2h-avatar-big {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  color: var(--bg);
  box-shadow: 0 0 0 3px var(--bg);
}

.h2h-side-name { font-weight: 700; font-size: 16px; }
.h2h-side-rank { font-size: 12px; color: var(--text-dim); }

.h2h-center-label {
  text-align: center; font-size: 12.5px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .6px;
  position: relative; z-index: 1; font-weight: 700; padding-top: 4px;
}

.h2h-shared { text-align: center; color: var(--text-dim); font-size: 12px; margin: 15px 0 6px; }

.h2h-stats { display: flex; flex-direction: column; }

.h2h-row {
  display: grid; grid-template-columns: 1fr 2fr 1fr;
  align-items: center; gap: 10px;
  padding: 13px 8px;
  border-top: 1px solid var(--border);
  animation: fadeUp .3s ease both;
}

.h2h-row:first-child { border-top: none; }
.h2h-row .h2h-val { font-size: 14px; font-weight: 700; color: var(--text); }
.h2h-row .h2h-val.side-left { text-align: right; }
.h2h-row .h2h-val.side-right { text-align: left; }
.h2h-row .h2h-label { text-align: center; font-size: 12.5px; color: var(--text-dim); font-weight: 500; }

.h2h-pill {
  display: inline-block; min-width: 44px;
  padding: 5px 12px; border-radius: 999px;
  font-weight: 700; font-size: 13.5px; color: var(--bg);
  animation: pop .25s ease both;
}

.h2h-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.h2h-summary-item { background: var(--surface-2); padding: 14px 10px; text-align: center; font-size: 12px; color: var(--text-dim); }
.h2h-summary-item b { display: block; color: var(--text); font-family: var(--font-display); font-size: 17px; margin-top: 4px; }

.h2h-swap {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; font-weight: 600; transition: .15s;
}

.h2h-swap:hover { border-color: var(--border-strong); color: var(--text); }

.h2h-matchups { border-top: 1px solid var(--border); padding: 18px; }
.h2h-matchups-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.h2h-matchups-head b { font-size: 13px; color: var(--text); }
.h2h-matchups-head span { font-size: 12px; color: var(--text-dim); }
.h2h-matchups table { font-size: 12.5px; }
.h2h-matchups th, .h2h-matchups td { padding: 8px 10px; }

.intro-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}

.compare-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: auto; background: var(--surface-2); }
.compare-table-wrap table { min-width: 760px; }
.compare-table-wrap th { position: sticky; top: 0; background: var(--surface); z-index: 1; transition: color .15s; }
.compare-table-wrap td { font-variant-numeric: tabular-nums; }
.compare-table-wrap .player-name { color: var(--text); }
.data-table th { position: static; }

.compare-spotlight { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin: 0 0 18px; }

.compare-spotlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color .2s;
}

.compare-spotlight-card:hover { border-color: var(--border-strong); }

.compare-spotlight-card .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); font-weight: 600; }
.compare-spotlight-card b { display: block; margin-top: 7px; font-size: 18px; color: var(--text); }
.compare-spotlight-card strong { color: var(--accent); }
.compare-spotlight-card.compact b { font-family: var(--font-display); font-size: 25px; color: var(--accent); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}

.empty-state .icon { color: var(--text-faint); }

.loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 70px; color: var(--text-dim); font-size: 13.5px; }

.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.export-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  padding: 7px 13px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px;
  display: flex; align-items: center; gap: 6px; font-weight: 600;
  transition: color .15s, border-color .15s, background-color .15s;
}

.export-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }

.table-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }

/* ===================== Status banner ===================== */
.status-banner {
  max-width: 1220px; margin: 0 auto 20px; padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  border: 1px solid rgba(233, 251, 89, .3);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--text);
}

.status-banner .icon { color: var(--accent); flex-shrink: 0; }
.status-banner .link-out { color: var(--accent); margin-left: auto; display: flex; align-items: center; gap: 5px; font-weight: 600; }

/* ===================== Footer ===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 22px 26px;
}

.footer-inner { max-width: 1220px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}

.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand .brand { font-size: 17px; }
.footer-brand p { color: var(--text-dim); font-size: 13px; line-height: 1.6; margin: 0; max-width: 320px; }
.footer-social { display: flex; gap: 8px; margin-top: 4px; }

.footer-col h4 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-faint); font-weight: 700; margin: 0 0 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  color: var(--text-dim); font-size: 13.5px;
  display: flex; align-items: center; gap: 7px;
  transition: color .15s, transform .15s;
  width: fit-content;
}

.footer-col a:hover { color: var(--text); transform: translateX(3px); }
.footer-col a .icon { color: var(--text-faint); flex-shrink: 0; transition: color .15s; }
.footer-col a:hover .icon { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  color: var(--text-faint); font-size: 12px;
}

/* ===================== Cursor spotlight ===================== */
/* A faint highlight that tracks the pointer within clickable cards — position
   set by js/effects.js via --spot-x/--spot-y. Skipped entirely for touch/
   coarse pointers, where there's no cursor to track. */
@media (hover: hover) and (pointer: fine) {
  .player-card::after, .edition-card::after, .video-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(220px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(var(--accent-rgb), .10), transparent 70%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
  }

  .player-card:hover::after, .edition-card:hover::after, .video-card:hover::after { opacity: 1; }
}

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

@media (max-width: 640px) {
  header { padding: 12px 14px; }
  nav { order: 3; width: 100%; }
  .search-wrap { order: 2; flex: 1; }
  .countdown .num { font-size: 24px; }
  .h2h-row { grid-template-columns: 0.7fr 1.6fr 0.7fr; font-size: 12px; }
  .h2h-avatar-big { width: 48px; height: 48px; font-size: 16px; }
  .h2h-header { padding: 18px 10px; gap: 8px; }
  .h2h-summary-item { padding: 10px 4px; font-size: 11px; }
  .h2h-summary-item b { font-size: 14px; }
  .compare-spotlight { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
