* {
  box-sizing: border-box;
}

:root {
  --bg: #07120f;
  --surface: rgba(255, 255, 255, 0.09);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.09);
  --text: #f7fbf8;
  --muted: #b8c6c0;
  --green: #20e3a2;
  --green-dark: #009b69;
  --gold: #ffd166;
  --bronze: #d99a62;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(32, 227, 162, 0.22), transparent 34rem),
    radial-gradient(circle at 86% 8%, rgba(255, 209, 102, 0.18), transparent 30rem),
    linear-gradient(135deg, #06100d, #132923 48%, #07120f);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.5;
}

.app {
  position: relative;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 24px;
  margin-bottom: 22px;
}

.hero-card,
.leader-card,
.stats article,
.podium-card,
.table-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-card {
  min-height: 430px;
  padding: 34px;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.26), transparent 70%);
}

.topline,
.hero-card .eyebrow,
.hero-card h1,
.hero-card .subtitle,
.actions {
  position: relative;
  z-index: 1;
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 38px;
}

.logo {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  height: 44px;
  border-radius: 15px;
  color: #043628;
  background: #ffffff;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(32, 227, 162, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--green);
  background: rgba(32, 227, 162, 0.11);
  font-size: 0.92rem;
  font-weight: 700;
}

.live i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(32, 227, 162, 0.7);
  animation: pulse 1.7s infinite;
}

@keyframes pulse {
  to { box-shadow: 0 0 0 12px rgba(32, 227, 162, 0); }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 780px;
  font-size: clamp(3.1rem, 7vw, 6.2rem);
  line-height: 0.94;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 800;
}

.subtitle {
  max-width: 680px;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
  font-weight: 400;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  color: #032218;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(0, 155, 105, 0.32);
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 46px rgba(0, 155, 105, 0.40);
}

button:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}

#lastUpdated {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
}

.leader-card {
  min-width: 0;
  border-radius: 32px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.trophy {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 12px;
  border-radius: 26px;
  background: rgba(255, 209, 102, 0.17);
  border: 1px solid rgba(255, 209, 102, 0.16);
  font-size: 2.35rem;
}

.leader-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.leader-card h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.leader-card strong {
  color: var(--gold);
  font-size: 1.65rem;
  font-weight: 800;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stats article {
  border-radius: 26px;
  padding: 22px;
}

.stats small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 800;
}

.stats strong {
  display: block;
  margin-top: 13px;
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 800;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.podium-card {
  min-height: 160px;
  padding: 24px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.podium-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.podium-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--gold);
  background: rgba(255, 209, 102, 0.13);
  font-weight: 800;
}

.podium-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.podium-card strong {
  margin-top: 16px;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.podium-card small {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 600;
}

.podium-1 {
  border-color: rgba(255, 209, 102, 0.55);
  background:
    linear-gradient(145deg, rgba(255, 209, 102, 0.15), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.045);
}

.podium-2 {
  border-color: rgba(255, 255, 255, 0.30);
}

.podium-3 {
  border-color: rgba(217, 154, 98, 0.45);
}

.table-card {
  border-radius: 30px;
  padding: 24px;
}

.table-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
}

#statusText {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.14);
}

table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
}

th,
td {
  padding: 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 800;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

tr:last-child td {
  border-bottom: 0;
}

td {
  font-size: 1rem;
}

td strong {
  display: block;
  font-weight: 700;
}

.rank {
  display: inline-flex;
  justify-content: center;
  min-width: 48px;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--gold);
  background: rgba(255, 209, 102, 0.13);
  font-weight: 800;
}

.rank-1 {
  color: #1c1300;
  background: linear-gradient(135deg, #ffe59d, var(--gold));
}

.rank-2 {
  color: #102016;
  background: rgba(255, 255, 255, 0.82);
}

.rank-3 {
  color: #1d1005;
  background: rgba(217, 154, 98, 0.92);
}

.points {
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 800;
}

.empty {
  padding: 38px !important;
  color: var(--muted);
  text-align: center;
}

.footer-note {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 940px) {
  .hero,
  .stats,
  .podium {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: auto;
  }

  .leader-card {
    min-height: 275px;
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 22px, 1160px);
    padding-top: 18px;
  }

  .hero-card,
  .leader-card,
  .table-card {
    border-radius: 24px;
  }

  .hero-card {
    padding: 24px;
  }

  .topline,
  .actions,
  .table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.85rem, 14vw, 4.7rem);
  }

  button {
    width: 100%;
  }
}
