:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cream: #f3ead7;
  --cream-soft: #c8bda9;
  color: var(--cream);
  background: #080b14;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(32, 202, 255, .18), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(190, 66, 255, .15), transparent 30rem),
    linear-gradient(145deg, #080b14, #0d1322 58%, #090a13);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 32px; position: relative; }
.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; margin-bottom: 28px; }
.brand-mark {
  width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px;
  font-size: 38px; font-weight: 950; color: #071019;
  background: linear-gradient(135deg, #64e7ff, #8a76ff 58%, #ee5cff);
  box-shadow: 0 16px 50px rgba(46, 209, 255, .22), inset 0 1px rgba(255,255,255,.65);
}
.eyebrow { margin: 0 0 5px; color: #65dcff; letter-spacing: .18em; font-size: 12px; font-weight: 850; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: .95; letter-spacing: -.045em; }
.subtitle { margin: 11px 0 0; color: #b9ae9d; font-size: 16px; }
.hero-actions { display: flex; align-items: center; gap: 10px; }
.home-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 9px 13px;
  border: 1px solid rgba(137,177,217,.20); border-radius: 12px; color: var(--cream-soft);
  background: rgba(7,11,22,.50); text-decoration: none; font-size: 12px; font-weight: 800;
  white-space: nowrap; transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.home-link:hover {
  color: var(--cream); border-color: rgba(111,225,255,.35); background: rgba(35,74,96,.32); transform: translateY(-1px);
}
.home-link:focus-visible { outline: 2px solid #64e7ff; outline-offset: 2px; }
.language-switch {
  display: inline-flex; padding: 3px; border: 1px solid rgba(137,177,217,.20); border-radius: 12px;
  background: rgba(7,11,22,.62); box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.language-option {
  appearance: none; border: 0; border-radius: 9px; padding: 8px 10px; color: #818da5; background: transparent;
  font: inherit; font-size: 12px; font-weight: 900; letter-spacing: .05em; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.language-option:hover { color: var(--cream); }
.language-option.active { color: #071019; background: linear-gradient(135deg, #64e7ff, #8a76ff); }
.refresh {
  appearance: none; border: 1px solid rgba(111,225,255,.35); color: var(--cream); background: rgba(35,74,96,.42);
  padding: 11px 16px; border-radius: 13px; font: inherit; font-weight: 750; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.refresh:hover { background: rgba(42,104,132,.58); transform: translateY(-1px); }
.refresh:disabled { opacity: .55; cursor: wait; transform: none; }
.score-card {
  border: 1px solid rgba(137, 177, 217, .20); border-radius: 28px; overflow: hidden;
  background: rgba(13, 17, 31, .86); box-shadow: 0 30px 80px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.045);
  backdrop-filter: blur(20px);
}
.table-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 26px 28px 19px; border-bottom: 1px solid rgba(255,255,255,.07); }
h2 { margin: 0; font-size: 22px; }
.status { margin: 6px 0 0; color: #a99f90; font-size: 13px; }
.status.error { color: #ff929d; }
.updated { color: #857b6e; font-size: 12px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th { text-align: left; padding: 13px 18px; color: #8d8274; text-transform: uppercase; letter-spacing: .09em; font-size: 11px; }
td { padding: 17px 18px; border-top: 1px solid rgba(255,255,255,.055); font-size: 15px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(255,255,255,.035); }
.rank { width: 72px; text-align: center; }
td.rank { font-variant-numeric: tabular-nums; color: #9a8f7f; font-weight: 900; }
.player { font-weight: 800; font-size: 16px; }
.score { text-align: right; font-variant-numeric: tabular-nums; }
td.score { font-weight: 950; font-size: 17px; color: #68e4ff; }
.platform { text-align: center; width: 120px; }
.platform-pill { display: inline-block; min-width: 70px; padding: 4px 9px; border-radius: 999px; background: rgba(100,231,255,.10); color: #bcefff; font-size: 11px; font-weight: 850; }
.language { text-align: center; width: 110px; }
.lang-pill { display: inline-block; min-width: 42px; padding: 4px 8px; border-radius: 999px; background: rgba(126,139,169,.14); color: #bbc3d6; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.date { text-align: right; width: 180px; color: #a39888; }
tr.podium-1 td.rank, tr.podium-1 td.score { color: #ffd35f; }
tr.podium-2 td.rank, tr.podium-2 td.score { color: #d7e5f4; }
tr.podium-3 td.rank, tr.podium-3 td.score { color: #dc9c69; }
tr.podium-1 { background: linear-gradient(90deg, rgba(255,193,54,.08), transparent 65%); }
.empty { padding: 58px 24px; text-align: center; color: #9f9586; display: grid; gap: 8px; }
.empty[hidden] { display: none; }
.empty strong { color: #eadfca; font-size: 18px; }
footer { text-align: center; color: #756c60; font-size: 12px; padding: 22px 0 0; }
@media (max-width: 700px) {
  .shell { padding-top: 28px; }
  .hero { grid-template-columns: auto 1fr; }
  .brand-mark { width: 56px; height: 56px; border-radius: 18px; font-size: 30px; }
  .hero-actions { grid-column: 1 / -1; width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .home-link { order: 3; width: 100%; justify-content: center; }
  .refresh { flex: 1; }
  .table-head { align-items: flex-start; flex-direction: column; padding: 22px 20px 16px; }
}
