:root {
  --contest-gold: #ffd400;
  --contest-gold-soft: #ffe76a;
  --contest-black: #08050d;
  --contest-card: rgba(18, 10, 28, 0.88);
  --contest-border: rgba(255, 255, 255, 0.13);
  --contest-max: 1180px;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -5;
  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: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

.contest-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 72px;
  padding: 10px max(18px, calc((100vw - var(--contest-max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 4, 11, 0.82);
  backdrop-filter: blur(18px);
}

.contest-brand {
  display: inline-flex;
  align-items: baseline;
  color: #fff;
  text-decoration: none;
  font-size: 2rem;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -0.07em;
  line-height: 1;
}

.contest-brand strong {
  margin-left: 0.03em;
  color: var(--contest-gold);
  font-size: 1.12em;
  text-shadow: 0 0 18px rgba(255, 212, 0, 0.42);
}

.contest-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.header-link {
  padding: 10px 13px;
  border: 0;
  border-radius: 999px;
  color: #e7dfed;
  background: transparent;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.header-link:hover,
.header-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.header-link-muted {
  color: #a99db4;
}

.contest-container {
  width: min(var(--contest-max), calc(100% - 36px));
  margin-inline: auto;
}

.landing-view {
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: -180px;
  left: 45%;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 50, 224, 0.31), rgba(84, 22, 126, 0.1) 45%, transparent 70%);
  filter: blur(10px);
}

.hero-grid {
  min-height: min(760px, calc(100svh - 72px));
  padding-block: clamp(62px, 9vw, 118px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  align-items: center;
  gap: clamp(34px, 7vw, 92px);
}

.date-badge,
.eyebrow-text {
  margin: 0 0 16px;
  color: var(--contest-gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.date-badge {
  display: inline-flex;
  padding: 8px 13px;
  border: 1px solid rgba(255, 212, 0, 0.34);
  border-radius: 999px;
  background: rgba(255, 212, 0, 0.07);
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: clamp(3.1rem, 7.8vw, 7rem);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-copy h1 span {
  display: block;
  margin-top: 0.09em;
  color: var(--contest-gold);
  text-shadow: 0 0 38px rgba(255, 212, 0, 0.25);
}

.hero-lead {
  max-width: 680px;
  margin: 28px 0 0;
  color: #d6cddd;
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.75;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.gold-button,
.secondary-button,
.refresh-button,
.back-button,
.game-back-button {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease, border-color 160ms ease;
}

.gold-button {
  min-height: 54px;
  padding: 14px 28px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: #09070b;
  background: linear-gradient(115deg, #ffef67 0%, var(--contest-gold) 48%, #f2ae00 100%);
  box-shadow: 0 10px 38px rgba(255, 198, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.gold-button-large {
  min-width: 220px;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.12rem;
}

.gold-button:hover,
.gold-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  outline: 3px solid rgba(255, 230, 91, 0.25);
  outline-offset: 3px;
}

.gold-button:disabled {
  cursor: wait;
  filter: grayscale(0.7);
  opacity: 0.65;
  transform: none;
}

.secondary-button {
  min-height: 54px;
  padding: 13px 23px;
  border: 1px solid rgba(210, 147, 255, 0.36);
  color: #f6effb;
  background: rgba(54, 21, 77, 0.46);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: rgba(226, 176, 255, 0.75);
  background: rgba(90, 31, 128, 0.66);
  outline: none;
}

.microcopy {
  max-width: 650px;
  margin: 18px 0 0;
  color: #998ca4;
  font-size: 0.82rem;
  line-height: 1.75;
}

.microcopy a,
.check-row a,
.contest-footer a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 212, 0, 0.46);
  text-underline-offset: 3px;
}

.prize-card {
  position: relative;
  overflow: hidden;
  padding: clamp(27px, 4vw, 43px);
  border: 1px solid rgba(255, 224, 92, 0.3);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 212, 0, 0.1), transparent 44%),
    linear-gradient(150deg, rgba(28, 15, 40, 0.97), rgba(10, 6, 15, 0.97));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.44), 0 0 60px rgba(255, 199, 0, 0.08);
}

.prize-card::after {
  content: "♪";
  position: absolute;
  right: -12px;
  top: -50px;
  color: rgba(255, 212, 0, 0.07);
  font-size: 13rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(12deg);
}

.prize-card > * {
  position: relative;
  z-index: 1;
}

.prize-rank {
  margin: 0;
  color: var(--contest-gold);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.2em;
}

.prize-card h2 {
  margin: 9px 0 22px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 950;
  line-height: 1.03;
}

.prize-card ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 17px;
  list-style: none;
  color: #d7cddd;
}

.prize-card li {
  position: relative;
  padding-left: 24px;
  line-height: 1.65;
}

.prize-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--contest-gold);
  font-weight: 950;
}

.prize-exclusion {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--contest-gold);
  color: #e9dfe9;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.9rem;
  line-height: 1.65;
}

.stats-row {
  margin-bottom: clamp(74px, 9vw, 120px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--contest-border);
  border-radius: 22px;
  background: rgba(15, 8, 23, 0.72);
}

.stats-row div {
  min-height: 116px;
  padding: 20px;
  display: grid;
  place-content: center;
  text-align: center;
}

.stats-row div + div {
  border-left: 1px solid var(--contest-border);
}

.stats-row strong,
.stats-row span {
  display: block;
}

.stats-row strong {
  color: #fff;
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
}

.stats-row span {
  color: #a99caf;
  font-size: 0.82rem;
}

.leaderboard-section {
  margin-bottom: clamp(70px, 9vw, 120px);
  scroll-margin-top: 100px;
}

.section-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading .eyebrow-text {
  margin-bottom: 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.refresh-button,
.back-button,
.game-back-button {
  padding: 10px 15px;
  border: 1px solid var(--contest-border);
  color: #ded4e5;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.76rem;
}

.refresh-button:hover,
.refresh-button:focus-visible,
.back-button:hover,
.back-button:focus-visible,
.game-back-button:hover,
.game-back-button:focus-visible {
  border-color: rgba(255, 212, 0, 0.52);
  color: #fff;
  outline: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--contest-border);
  border-radius: 20px;
  background: rgba(14, 8, 22, 0.84);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

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

th,
td {
  padding: 17px 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

th {
  color: #a99cac;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: #e9e2ed;
}

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

tbody tr:nth-child(-n + 3) td:first-child,
tbody tr:nth-child(-n + 3) td:last-child {
  color: var(--contest-gold);
  font-weight: 950;
}

td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.table-message {
  padding-block: 34px;
  color: #9d90a7;
  text-align: center !important;
  font-weight: 500 !important;
}

.privacy-note {
  margin: 12px 4px 0;
  color: #8f8299;
  font-size: 0.8rem;
  line-height: 1.65;
}

.form-view {
  min-height: calc(100svh - 72px);
  padding: clamp(30px, 6vw, 78px) 18px 70px;
}

.form-shell {
  width: min(900px, 100%);
  margin-inline: auto;
}

.form-shell-small {
  width: min(620px, 100%);
}

.back-button {
  margin-bottom: 16px;
}

.form-card {
  padding: clamp(25px, 5vw, 52px);
  border: 1px solid rgba(211, 149, 255, 0.25);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0, rgba(145, 47, 224, 0.17), transparent 36%),
    var(--contest-card);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.form-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.form-intro {
  max-width: 700px;
  margin: 15px 0 30px;
  color: #bfb3c6;
  line-height: 1.75;
}

.form-preview-note {
  margin: -10px 0 30px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 212, 0, 0.3);
  border-radius: 14px;
  color: #fff1a8;
  background: rgba(255, 212, 0, 0.075);
  font-size: 0.92rem;
  line-height: 1.65;
}

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

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid label > span,
.consent-list legend {
  color: #dcd2e2;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.form-wide {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  background: rgba(6, 3, 10, 0.62);
}

select option {
  color: #111;
  background: #fff;
}

input:focus,
select:focus {
  border-color: rgba(255, 212, 0, 0.8);
  outline: 3px solid rgba(255, 212, 0, 0.11);
}

.consent-list {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  border: 0;
}

.consent-list legend {
  margin-bottom: 11px;
}

.check-row {
  padding: 17px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #cfc5d5;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.88rem;
  line-height: 1.75;
}

.check-row input {
  width: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  accent-color: var(--contest-gold);
}

.check-row-marketing {
  border-color: rgba(255, 212, 0, 0.2);
}

.form-message {
  min-height: 24px;
  margin-top: 18px;
  color: #ffcabf;
  font-size: 0.9rem;
  line-height: 1.6;
}

.captcha-wrap {
  min-height: 65px;
  margin-top: 18px;
}

.form-message.is-success {
  color: #8ef2b7;
}

.submit-button {
  width: 100%;
  margin-top: 8px;
}

.verification-card {
  text-align: center;
}

.verification-card > p:not(.eyebrow-text) {
  color: #c8bdce;
  line-height: 1.7;
}

.mail-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 19px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 212, 0, 0.42);
  border-radius: 50%;
  color: var(--contest-gold);
  background: rgba(255, 212, 0, 0.08);
  font-size: 1.8rem;
}

.verification-email {
  color: #fff !important;
  font-weight: 850;
}

.game-view {
  min-height: calc(100svh - 72px);
}

.game-view .game-page {
  min-height: calc(100svh - 72px);
}

.game-back-button {
  flex: 0 0 auto;
}

.player-name {
  max-width: 180px;
  overflow: hidden;
  color: #bfb3c8;
  font-size: 0.76rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-save-status {
  min-height: 22px;
  margin: 0 0 8px;
  color: #d7cddd;
  font-size: 0.82rem;
}

.score-save-status.is-success {
  color: #8ef2b7;
}

.score-save-status.is-error {
  color: #ffb6aa;
}

.contest-footer {
  min-height: 76px;
  padding: 22px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #988c9f;
  font-size: 0.82rem;
}

.contest-footer a:hover {
  color: #fff;
}

.footer-action {
  padding: 0;
  border: 0;
  color: #b9acbf;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 212, 0, 0.46);
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-action:hover,
.footer-action:focus-visible {
  color: #fff;
  outline: none;
}

.toast {
  position: fixed;
  z-index: 2000;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 36px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  color: #fff;
  background: rgba(16, 9, 23, 0.96);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .prize-card {
    width: min(650px, 100%);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--contest-border);
  }

  .stats-row div:nth-child(4) {
    border-top: 1px solid var(--contest-border);
  }
}

@media (max-width: 680px) {
  .contest-header {
    min-height: 66px;
    padding-inline: 12px;
  }

  .contest-brand {
    font-size: 1.6rem;
  }

  .contest-header nav {
    gap: 0;
  }

  .header-link {
    padding: 9px 8px;
    font-size: 0.66rem;
  }

  .header-link-muted {
    display: none;
  }

  .hero-grid {
    padding-top: 44px;
  }

  .hero-copy h1 {
    font-size: clamp(2.75rem, 15vw, 4.7rem);
  }

  .hero-actions {
    display: grid;
  }

  .gold-button-large,
  .secondary-button {
    width: 100%;
  }

  .stats-row div {
    min-height: 98px;
    padding: 14px 8px;
  }

  .stats-row strong {
    font-size: 1.45rem;
  }

  .section-heading {
    align-items: center;
  }

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

  .form-wide {
    grid-column: auto;
  }

  .game-view .game-page {
    min-height: calc(100svh - 66px);
  }

  .game-view .topbar {
    gap: 8px;
  }

  .game-back-button {
    padding-inline: 10px;
    font-size: 0.67rem;
  }

  .player-name {
    display: none;
  }
}

@media (max-width: 390px) {
  .header-link {
    padding-inline: 6px;
    font-size: 0.61rem;
  }

  .contest-container {
    width: min(var(--contest-max), calc(100% - 24px));
  }

  .date-badge {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
