:root {
  --bg: #0d0e0d;
  --panel: #171813;
  --panel-soft: #202119;
  --text: #f5f0df;
  --muted: #b9b29f;
  --line: #403d32;
  --gold: #e5c867;
  --green: #8fd09c;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(229, 200, 103, 0.12),
      transparent 28rem
    ),
    linear-gradient(
      180deg,
      #12130f,
      #090a08
    );
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.site-header {
  width: min(
    1120px,
    calc(100% - 32px)
  );
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--gold);
  font-size: 1.25rem;
  font-weight: 950;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

.shell {
  width: min(
    1120px,
    calc(100% - 32px)
  );
  margin: 0 auto;
  padding: 32px 0 80px;
}

.panel {
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0.012)
    ),
    var(--panel);
  box-shadow:
    0 18px 50px
    rgba(0, 0, 0, 0.22);
}

.hero h1,
.panel h1,
.panel h2 {
  margin:
    0.25rem 0 0.75rem;
}

.hero h1 {
  font-size:
    clamp(
      2.2rem,
      6vw,
      4.7rem
    );
  line-height: 0.98;
}

.section-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted,
.score-info p,
.message {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.button {
  min-height: 44px;
  padding: 11px 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: transparent;
  background: var(--gold);
  color: #111006;
}

.button.secondary {
  background: var(--panel-soft);
  color: var(--text);
}

.metrics {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns:
    repeat(
      6,
      minmax(0, 1fr)
    );
  gap: 10px;
}

.metrics article {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  color: var(--gold);
  font-size: 2rem;
}

.winner-panel {
  border-color:
    rgba(143, 208, 156, 0.38);
}

.winner-detail {
  margin-bottom: 0;
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 900;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
}

.score-list {
  display: grid;
  gap: 10px;
}

.score-card {
  display: grid;
  grid-template-columns:
    48px
    minmax(0, 1fr)
    auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    rgba(229, 200, 103, 0.12);
  color: var(--gold);
  font-weight: 950;
}

.score-info strong {
  font-size: 1.05rem;
}

.score-info p {
  margin: 5px 0 0;
  font-size: 0.86rem;
}

.points {
  min-width: 86px;
  text-align: right;
}

.points strong {
  display: block;
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
}

.points span {
  color: var(--muted);
  font-size: 0.78rem;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}

@media (
  max-width: 900px
) {
  .metrics {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }
}

@media (
  max-width: 620px
) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .shell {
    padding-top: 18px;
  }

  .panel {
    padding: 20px;
  }

  .metrics {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-card {
    grid-template-columns:
      42px
      minmax(0, 1fr);
  }

  .points {
    grid-column: 2;
    text-align: left;
  }
}
