:root {
  --bg: #09111f;
  --bg-deep: #050912;
  --panel: rgba(12, 24, 44, 0.82);
  --panel-strong: rgba(10, 20, 38, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f6f3eb;
  --muted: #b9c3d6;
  --gold: #f0b24a;
  --gold-soft: #f7d28a;
  --accent: #79c2ff;
  --danger: #ff8d83;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(240, 178, 74, 0.16), transparent 18%),
    radial-gradient(circle at 15% 20%, rgba(121, 194, 255, 0.14), transparent 22%),
    radial-gradient(circle at 85% 28%, rgba(255, 255, 255, 0.06), transparent 16%),
    linear-gradient(180deg, #0a1323 0%, #060b14 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.hero,
.admin-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 27, 48, 0.96), rgba(9, 17, 31, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero::before,
.admin-panel::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -8%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(240, 178, 74, 0.28), transparent 68%);
  pointer-events: none;
}

.page-leaderboard .hero::before {
  inset: -12% 50% auto auto;
  transform: translateX(50%);
  width: 250px;
  height: 250px;
  opacity: 0.8;
}

.hero {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 6px 0 4px;
  border-radius: 0;
  align-items: center;
  text-align: center;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.hero-copy,
.hero-topline,
.section-heading,
.rank-row,
.podium-card,
.admin-panel > *,
.admin-entry-card {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.eyebrow,
.mini-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.hero-copy h1,
.admin-topbar h1,
.auth-card h1 {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1;
}

.hero-copy p,
.section-heading p,
.admin-panel p,
.auth-card p {
  margin: 0;
  color: var(--muted);
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--gold) 0%, #f7c873 100%);
  color: #1a1204;
  font-weight: 700;
}

.hero .primary-button {
  min-height: 44px;
  padding: 0 18px;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-topline {
  width: min(100%, 760px);
  display: grid;
  gap: 10px;
  justify-items: center;
}

.countdown-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.countdown-segment {
  min-width: 100px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  backdrop-filter: blur(14px);
}

.countdown-value {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.3rem, 3.2vw, 1.9rem);
  font-weight: 700;
}

.countdown-label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-copy {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.hero-copy #hero-subtitle {
  max-width: 58ch;
  font-size: 0.98rem;
}

.hero-bonus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(240, 178, 74, 0.1);
  border: 1px solid rgba(240, 178, 74, 0.22);
  color: var(--gold-soft);
  font-size: 0.92rem;
}

.content {
  margin-top: 18px;
  display: grid;
  gap: 24px;
}

.podium-section,
.rankings-section {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.section-heading {
  margin-bottom: 18px;
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
  font-size: 1.35rem;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}

.podium-card {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 8px 0 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.podium-card.rank-1 {
  transform: translateY(-10px);
}

.podium-card.rank-2 .podium-base {
  height: 122px;
}

.podium-card.rank-1 .podium-base {
  height: 162px;
}

.podium-card.rank-3 .podium-base {
  height: 94px;
}

.podium-top {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 0 14px;
}

.podium-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(240, 178, 74, 0.12);
  border: 1px solid rgba(240, 178, 74, 0.24);
  color: var(--gold);
  font-weight: 700;
}

.avatar {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.podium-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.08rem;
}

.podium-stats,
.rank-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.stat-chip {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.84rem;
}

.stat-chip strong {
  color: var(--text);
}

.podium-base {
  display: grid;
  place-items: center;
  margin-top: 8px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(240, 178, 74, 0.94), rgba(185, 123, 22, 0.94));
  color: #1d1205;
  font-family: "Sora", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.22);
}

.podium-card.rank-2 .podium-base,
.podium-card.rank-3 .podium-base {
  background: linear-gradient(180deg, rgba(207, 214, 221, 0.94), rgba(126, 139, 159, 0.94));
}

.podium-card.rank-3 .podium-base {
  background: linear-gradient(180deg, rgba(214, 160, 119, 0.94), rgba(152, 98, 58, 0.94));
}

.rankings-list {
  display: grid;
  gap: 14px;
  width: min(100%, 960px);
  margin: 0 auto;
}

.rank-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  border-radius: 18px;
  background: rgba(240, 178, 74, 0.12);
  color: var(--gold);
  font-weight: 700;
}

.rank-row-name {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 1rem;
}

.rank-row-values {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.rank-value-label {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rank-value-amount {
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: min(100%, 980px);
  margin: 38px auto 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copy {
  display: grid;
  gap: 6px;
}

.footer-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.footer-copy p {
  margin: 0;
  color: var(--muted);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.footer-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.footer-button-kick {
  background: rgba(95, 255, 116, 0.1);
  border-color: rgba(95, 255, 116, 0.22);
}

.admin-shell {
  max-width: 1260px;
}

.auth-gate {
  min-height: calc(100vh - 88px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 580px);
  padding: 32px;
  border-radius: 30px;
}

.admin-dashboard {
  display: grid;
  gap: 22px;
}

.is-hidden {
  display: none;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.admin-topbar-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.admin-panel {
  padding: 28px;
  border-radius: 28px;
}

.stack-form,
.entries-form,
.entries-grid,
.countdown-editor {
  display: grid;
  gap: 14px;
}

.stack-form label,
.countdown-editor label,
.entry-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

input:focus {
  outline: none;
  border-color: rgba(121, 194, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(121, 194, 255, 0.12);
}

.timer-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(121, 194, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.status-pill.paused {
  background: rgba(240, 178, 74, 0.14);
  color: var(--gold);
}

.status-pill.finished {
  background: rgba(255, 141, 131, 0.14);
  color: var(--danger);
}

.timer-preview {
  margin: 4px 0 0;
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.countdown-editor {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.entries-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-entry-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-entry-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.admin-entry-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-feedback,
.admin-note {
  color: var(--muted);
}

.admin-feedback {
  min-height: 24px;
}

@media (max-width: 980px) {
  .hero,
  .admin-grid,
  .entries-grid {
    grid-template-columns: 1fr;
  }

  .podium-grid {
    grid-template-columns: 1fr;
  }

  .podium-card.rank-1,
  .podium-card.rank-2,
  .podium-card.rank-3 {
    transform: none;
  }

  .podium-card.rank-1 .podium-base,
  .podium-card.rank-2 .podium-base,
  .podium-card.rank-3 .podium-base {
    height: 120px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 20px;
  }

  .hero,
  .podium-section,
  .rankings-section,
  .admin-panel,
  .auth-card {
    padding: 22px;
  }

  .rank-row {
    grid-template-columns: 1fr;
    justify-items: start;
    padding-inline: 0;
  }

  .rank-row-values {
    justify-items: start;
    text-align: left;
  }

  .countdown-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-topbar {
    align-items: start;
    flex-direction: column;
  }

  .timer-preview {
    font-size: 1.15rem;
  }

  .countdown-segment {
    min-width: calc(50% - 8px);
  }

  .site-footer {
    align-items: center;
    text-align: center;
  }

  .footer-actions {
    justify-content: center;
  }

  .page-leaderboard .hero {
    padding: 4px 0 2px;
  }
}
