:root {
  --bg: #14100c;
  --bg-2: #1a1410;
  --bg-3: #211a14;
  --surface: #2a201a;
  --surface-2: #34281f;
  --surface-3: #3d3024;
  --border: #4a3a2a;
  --border-soft: #3a2c20;
  --text: #f5e8d6;
  --text-2: #e8dcc4;
  --muted: #b6a486;
  --muted-2: #8a7a5e;

  --gold: #f6c043;
  --gold-2: #e0a527;
  --gold-3: #c98712;
  --gold-soft: rgba(246, 192, 67, 0.12);
  --gold-glow: rgba(246, 192, 67, 0.35);

  --primary: #2ecc71;
  --primary-2: #27ae60;
  --primary-soft: rgba(46, 204, 113, 0.14);

  --accent: #c9a87a;
  --silver: #c8c0b0;
  --silver-2: #9a9180;
  --bronze: #cd7a3a;
  --bronze-2: #a55d24;
  --danger: #e0573b;

  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 12px 30px rgba(246, 192, 67, 0.16);
  --radius: 12px;
  --radius-lg: 16px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 500px at 80% -10%, rgba(246, 192, 67, 0.10), transparent 60%),
    radial-gradient(800px 600px at -10% 30%, rgba(201, 135, 18, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }

img { display: block; max-width: 100%; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* SVG icon helper */
.icon { width: 1em; height: 1em; vertical-align: -0.15em; fill: currentColor; }
.icon-trophy { color: var(--gold); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background-color: rgba(20, 16, 12, 0.85);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .accent { color: var(--gold); }
.brand:hover { text-decoration: none; }
.brand .icon { font-size: 22px; color: var(--gold); }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.nav-links a:hover { background: var(--surface); color: var(--gold); text-decoration: none; }
.nav-links a.active { background: var(--gold-soft); color: var(--gold); }

.nav-toggle { display: none; }

.btn-cta {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #2a1f00;
  border: 0;
  border-radius: 8px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(246, 192, 67, 0.25);
}
.btn-cta:hover { color: #2a1f00; text-decoration: none; transform: translateY(-1px); }

/* Hero */
.hero {
  position: relative;
  padding: 100px 0 70px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(closest-side, var(--gold-soft), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

.hero-trophy {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  color: var(--gold);
  filter: drop-shadow(0 6px 18px var(--gold-glow));
  animation: trophy-shine 3.5s ease-in-out infinite;
}
@keyframes trophy-shine {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.04); }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #fff 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lede {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 660px;
  margin: 0 auto 32px;
}

/* Copy IP */
.copy-ip {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow);
  max-width: 100%;
}
.copy-ip__addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 14px 20px;
  font-size: 18px;
  user-select: all;
  color: var(--text);
}
.copy-ip__btn {
  background: var(--primary);
  color: #07291a;
  border: 0;
  border-radius: 8px;
  padding: 14px 22px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: background 0.15s ease, transform 0.05s ease;
}
.copy-ip__btn:hover { background: var(--primary-2); }
.copy-ip__btn:active { transform: translateY(1px); }
.copy-ip__btn.copied { background: var(--gold); color: #2a1f00; }

.copy-hint {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 14px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--gold);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Generic page */
section.page { padding: 56px 0; }
section.page h2 {
  font-size: clamp(28px, 4vw, 36px);
  margin: 0 0 14px;
  color: var(--gold);
  letter-spacing: -0.3px;
}
section.page h3 {
  color: var(--text);
  font-size: 19px;
  margin: 0 0 6px;
}
section.page p { color: var(--text-2); }
section.page p.muted { color: var(--muted); }

.section-eyebrow {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--gold-2);
  display: inline-block;
}

/* Feature cards (home) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.feat-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.feat-card:hover { transform: translateY(-2px); border-color: var(--gold-2); }
.feat-card .feat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid rgba(246, 192, 67, 0.25);
}
.feat-card .feat-icon .icon { font-size: 22px; }
.feat-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.feat-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Accordion (details/summary) */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.accordion details {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.accordion details[open] {
  border-color: var(--gold);
  box-shadow: 0 6px 22px rgba(246, 192, 67, 0.10);
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-right: 4px;
}
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion summary:hover { background: rgba(246, 192, 67, 0.05); }
.accordion summary .ac-icon {
  color: var(--gold);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
}
.accordion .ac-body {
  padding: 4px 18px 18px;
  color: var(--text-2);
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.18);
}
.accordion .ac-body p:first-child { margin-top: 14px; }
.accordion .ac-body p:last-child { margin-bottom: 0; }
.accordion .ac-body ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); }
.accordion .ac-body ul li { margin-bottom: 4px; }

/* ===== Leaderboard page ===== */
.lb-page { padding-top: 48px; padding-bottom: 64px; }
.lb-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.lb-header-text { flex: 1; min-width: 200px; }
.lb-kicker {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.5px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.lb-title {
  margin: 0;
  color: var(--gold);
  background: linear-gradient(180deg, #fff 0%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lb-sub { margin-top: 6px; color: var(--muted); }
.lb-meta { display: none; }

/* Search (right side of the leaderboard page header) */
.lb-search {
  position: relative;
  width: 260px;
  flex-shrink: 0;
  margin-left: auto;
}
.lb-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
  z-index: 2;
}
.lb-search input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lb-search input:focus {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(246, 192, 67, 0.12);
}
.lb-search input::-webkit-search-cancel-button { display: none; }
.lb-search__clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 20px;
  width: 24px; height: 24px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
}
.lb-search__clear:hover { color: var(--gold); background: var(--surface-2); }

.lb-search__sugg {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  top: 100%;
  right: 0;
  width: max(280px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  z-index: 200;
  max-height: 360px;
  overflow-y: auto;
}
.lb-search__sugg li {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.lb-search__sugg li:hover, .lb-search__sugg li.active { background: var(--surface-2); }
.lb-search__sugg li img {
  width: 36px; height: 36px;
  border-radius: 6px;
  image-rendering: pixelated;
  background: var(--bg-3);
}
.lb-search__sugg li .s-name { font-weight: 700; color: var(--text); }
.lb-search__sugg li .s-rank { color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.lb-search__sugg li .s-elo { color: var(--gold); font-family: ui-monospace, monospace; font-size: 12px; font-weight: 700; }
.lb-search__sugg li.lb-search__empty {
  display: block;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  cursor: default;
}
.lb-search__sugg li.lb-search__empty:hover { background: transparent; }

/* Profile card */
.profile-card {
  margin: 8px 0 28px;
  background:
    radial-gradient(180% 90% at 50% 0%, rgba(246, 192, 67, 0.10), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-3) 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 22px 24px 26px;
  position: relative;
  box-shadow: 0 14px 38px rgba(246, 192, 67, 0.12);
}
.profile-card__close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: inherit;
  margin-bottom: 14px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.profile-card__close:hover { color: var(--gold); border-color: var(--gold); }

.profile-card__head {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.profile-card__body {
  width: 110px;
  height: 220px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}
.profile-card__info { flex: 1; min-width: 200px; }
.profile-card__rank {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.profile-card__name {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
  line-height: 1.1;
}
.profile-card__level {
  margin-top: 6px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.profile-card__level .star { color: var(--gold); }

.profile-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.stat-block {
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 18px;
}
.stat-block--best { border-color: rgba(246, 192, 67, 0.4); }
.stat-block__lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stat-block--best .stat-block__lbl { color: var(--gold); }
.stat-block__lbl .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.stat-block__lbl .dot-gold { background: var(--gold); box-shadow: 0 0 0 3px rgba(246, 192, 67, 0.18); }

.stat-grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.stat-grid > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.stat-grid > div:last-child { border-bottom: 0; }
.stat-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.stat-grid dd {
  margin: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
}
.stat-block--best .stat-grid dd { color: var(--gold); }

@media (max-width: 640px) {
  .profile-card__stats { grid-template-columns: 1fr; }
  .profile-card__name { font-size: 26px; }
  .profile-card__body { width: 90px; height: 180px; }
}

/* Podium */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 14px;
  align-items: end;
  margin: 24px 0 28px;
}
.podium__card {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(246, 192, 67, 0.05), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  text-align: center;
}
.podium__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.04) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.03) 0 1px, transparent 1.5px),
    radial-gradient(circle at 32% 78%, rgba(255,255,255,0.04) 0 1px, transparent 1.5px);
  pointer-events: none;
}
.podium__rank { font-weight: 900; font-size: 22px; letter-spacing: 0.5px; }
.podium__level {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.podium__level .star { color: var(--gold); font-size: 11px; }
.podium__name {
  font-size: 17px;
  font-weight: 800;
  margin: 6px 0 12px;
  word-break: break-word;
  max-width: 100%;
  color: var(--text);
}
.podium__body {
  width: 100px;
  height: 200px;
  object-fit: contain;
  image-rendering: pixelated;
  margin-bottom: 12px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.45));
  position: relative;
  z-index: 1;
}
.podium__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: calc(100% + 28px);
  margin: 0 -14px;
  padding: 12px 4px;
  gap: 4px;
  color: #2b2014;
  font-weight: 800;
  position: relative;
  z-index: 1;
}
.podium__stats .stat { text-align: center; padding: 0 4px; }
.podium__stats .stat .lbl { font-size: 9px; letter-spacing: 1.5px; font-weight: 800; opacity: 0.75; }
.podium__stats .stat .val { font-size: 16px; font-weight: 900; margin-top: 2px; }

.podium__card.rank-1 {
  border-color: var(--gold);
  transform: translateY(-26px);
  padding-top: 28px;
  box-shadow: var(--shadow-gold);
}
.podium__card.rank-1::after {
  content: "";
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 56px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f6c043'><path d='M7 4h10v2h3a1 1 0 0 1 1 1v3a4 4 0 0 1-4 4h-.18A6 6 0 0 1 13 17.91V20h3v2H8v-2h3v-2.09A6 6 0 0 1 7.18 14H7a4 4 0 0 1-4-4V7a1 1 0 0 1 1-1h3V4zm12 4h-2v3a4 4 0 0 0 .14 1.04A2 2 0 0 0 19 10V8zM5 8v2a2 2 0 0 0 1.86 2.04A4 4 0 0 0 7 11V8H5z'/></svg>") center/contain no-repeat;
  filter: drop-shadow(0 4px 14px var(--gold-glow));
}
.podium__card.rank-1 .podium__rank { color: var(--gold); font-size: 26px; }
.podium__card.rank-1 .podium__name { font-size: 20px; }
.podium__card.rank-1 .podium__body { width: 116px; height: 230px; }
.podium__card.rank-1 .podium__stats {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
}

.podium__card.rank-2 { border-color: var(--silver); }
.podium__card.rank-2 .podium__rank { color: var(--silver); }
.podium__card.rank-2 .podium__stats {
  background: linear-gradient(180deg, var(--silver) 0%, var(--silver-2) 100%);
}

.podium__card.rank-3 { border-color: var(--bronze); }
.podium__card.rank-3 .podium__rank { color: var(--bronze); }
.podium__card.rank-3 .podium__stats {
  background: linear-gradient(180deg, var(--bronze) 0%, var(--bronze-2) 100%);
  color: #2a1308;
}

/* List */
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.lb-list-header,
.lb-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px 90px 90px;
  align-items: center;
  gap: 12px;
}
.lb-list-header {
  position: sticky;
  top: 58px;                                 /* sits below the sticky site-header */
  z-index: 10;
  padding: 12px 18px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(15, 19, 28, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.lb-list-header.is-stuck {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  border-color: var(--gold-2);
}
.lb-list-header .col-num { text-align: right; }
.lb-list-header .col-num:first-of-type { color: var(--gold); }

.lb-row {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 18px;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}
.lb-row:hover {
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border-color: var(--gold-2);
}
.lb-row .col-rank {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  font-weight: 700;
}
.lb-row .col-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.lb-row .col-player .head {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  image-rendering: pixelated;
  background: var(--bg-3);
}
.lb-row .col-player .lvl-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.lb-row .col-player .lvl-badge .star { color: var(--gold); font-size: 10px; }
.lb-row .col-player .pname {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-row .col-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
  font-weight: 700;
}
.lb-row .col-num:first-of-type { color: var(--gold); }

.lb-show-more-wrap {
  margin-top: 14px;
  text-align: center;
}
.btn-toggle {
  background: var(--surface);
  color: var(--gold);
  border: 1px solid var(--gold-2);
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-toggle:hover { background: var(--gold); color: #2a1f00; }
.btn-toggle .icon { font-size: 16px; transition: transform 0.2s ease; }
.btn-toggle.expanded .icon { transform: rotate(180deg); }

.lb-list.collapsed .lb-row.beyond { display: none; }

.loading, .error {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}
.error { color: var(--danger); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.contact-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.contact-card:hover { border-color: var(--gold-2); transform: translateY(-2px); }
.contact-card .contact-icon {
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 8px;
  display: inline-flex;
}
.contact-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted-2);
  font-weight: 800;
  margin-bottom: 6px;
}
.contact-card .value { font-size: 18px; word-break: break-word; font-weight: 600; }

/* Discord-focused contact card */
.discord-card {
  margin-top: 24px;
  background:
    radial-gradient(140% 100% at 50% -20%, rgba(88, 101, 242, 0.18), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.discord-card__icon {
  color: #5865f2;
  display: inline-flex;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 18px rgba(88, 101, 242, 0.4));
}
.discord-card__icon .icon { width: 56px; height: 56px; }
.discord-card__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.discord-card__url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 22px;
  user-select: all;
}
.discord-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5865f2;
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.35);
  transition: background 0.15s ease, transform 0.06s ease;
}
.discord-card__btn:hover { background: #4752d6; color: #fff; text-decoration: none; transform: translateY(-1px); }
.discord-card__btn:active { transform: translateY(0); }

.discord-card__channels {
  list-style: none;
  margin: 28px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--border-soft);
  text-align: left;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
}
.discord-card__channels li { display: flex; gap: 12px; align-items: baseline; }
.discord-card__channels .ch {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 140px;
}

@media (max-width: 540px) {
  .discord-card__channels li { flex-direction: column; gap: 2px; }
  .discord-card__channels .ch { min-width: auto; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  margin-top: 48px;
  color: var(--muted-2);
  font-size: 14px;
}
.site-footer .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

/* Responsive */
@media (max-width: 760px) {
  .podium { grid-template-columns: 1fr; gap: 18px; }
  .podium__card.rank-1 { transform: none; order: -1; }
  .podium__card.rank-1::after { top: -22px; width: 44px; height: 44px; }
  .podium__body { height: 180px; }
  .podium__card.rank-1 .podium__body { height: 220px; }
  .lb-list-header, .lb-row { grid-template-columns: 44px 1fr 80px 70px 70px; gap: 8px; padding: 10px 12px; }
  .lb-row .col-player .lvl-badge { display: none; }
}
@media (max-width: 480px) {
  .lb-list-header, .lb-row { grid-template-columns: 36px 1fr 70px 60px; }
  .lb-list-header .col-num:last-child, .lb-row .col-num:last-child { display: none; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-toggle {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px; height: 36px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .copy-ip { flex-direction: column; padding: 12px; gap: 8px; width: 100%; max-width: 360px; }
  .copy-ip__addr { padding: 8px 4px; }
  .copy-ip__btn { width: 100%; justify-content: center; }

  /* Search becomes full-width below the heading on mobile */
  .lb-search { width: 100%; margin-left: 0; }
  .lb-search__sugg { right: 0; width: 100%; }
}
