/* ============================================================
   TOKENS — "Candy Arcade" : violet-night bg + neon candy accents
   ============================================================ */
:root {
  --void:        #0a0716;
  --void-2:      #050310;
  --panel:       #1a1436;
  --panel-hi:    #241c4c;
  --line:        rgba(255,255,255,0.10);
  --line-soft:   rgba(255,255,255,0.06);

  --ivory:       #f6f3ff;
  --ivory-dim:   #b6aee0;
  --ivory-low:   #7d76a8;

  --purple:      #3a6cd8;
  --purple-hi:   #6f9af0;
  --purple-dim:  #1e3a78;

  --pink:        #ff4fa8;
  --pink-hi:     #ff8bc6;

  --cyan:        #34e7d0;
  --cyan-hi:     #7ff5e6;

  --gold:        #ffcb4d;
  --gold-hi:     #ffe08a;

  --green:       #35d488;
  --red:         #ff5470;

  --silver:      #b9c1d9;
  --bronze:      #e0972a;

  --radius-lg:   24px;
  --radius-md:   16px;
  --radius-sm:   10px;

  --font-display: 'Fredoka', sans-serif;
  --font-body:    'Nunito', sans-serif;
  --font-badge:   'Baloo 2', sans-serif;
}

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */
html[data-theme="light"] {
  --void:        #f2f3f9;
  --void-2:      #e8eaf4;
  --panel:       #ffffff;
  --panel-hi:    #ffffff;
  --line:        rgba(20,20,40,0.12);
  --line-soft:   rgba(20,20,40,0.07);

  --ivory:       #1b1a2e;
  --ivory-dim:   #4a4870;
  --ivory-low:   #7b7898;

  --purple-dim:  #dbe6fc;
}

html[data-theme="light"] body {
  background: var(--void);
}

html[data-theme="light"] .topnav {
  background: rgba(255,255,255,0.75);
  border-bottom: 1px solid var(--line);
}

html[data-theme="light"] .modal-backdrop {
  background: rgba(30,32,60,0.35);
}

html[data-theme="light"] .hero__blob { opacity: 0.16; }
html[data-theme="light"] .hero__rings { opacity: 0.4; }
html[data-theme="light"] .bgfx__icon { opacity: 0.55; }
html[data-theme="light"] .rankcard,
html[data-theme="light"] .ranklist,
html[data-theme="light"] .timer__unit,
html[data-theme="light"] .codechip,
html[data-theme="light"] .btn--ghost,
html[data-theme="light"] .modal {
  box-shadow: 0 4px 18px -8px rgba(30,32,60,0.15);
}
html[data-theme="light"] .rankcard__wageramt,
html[data-theme="light"] .ranklist__amt {
  color: var(--ivory-dim);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(58,108,216,0.22), transparent 60%),
    linear-gradient(180deg, var(--void-2), var(--void));
}

/* Floating twinkling background dots */
.loader__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.loader__dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ivory-dim);
  opacity: 0.3;
  animation: dotTwinkle 2.6s ease-in-out infinite;
}
.loader__dot--accent { background: var(--purple-hi); width: 5px; height: 5px; }

.loader__dot--1  { top: 15%; left: 12%; animation-delay: 0s; }
.loader__dot--2  { top: 34%; left: 82%; animation-delay: 0.3s; }
.loader__dot--3  { top: 62%; left: 8%;  animation-delay: 0.6s; }
.loader__dot--4  { top: 78%; left: 88%; animation-delay: 0.9s; }
.loader__dot--5  { top: 22%; left: 46%; animation-delay: 1.2s; }
.loader__dot--6  { top: 85%; left: 40%; animation-delay: 1.5s; }
.loader__dot--7  { top: 10%; left: 70%; animation-delay: 1.8s; }
.loader__dot--8  { top: 55%; left: 92%; animation-delay: 0.4s; }
.loader__dot--9  { top: 45%; left: 20%; animation-delay: 0.8s; }
.loader__dot--10 { top: 68%; left: 62%; animation-delay: 1.1s; }

@keyframes dotTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 0.9; transform: scale(1.3); }
}

.loader__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader__brandline {
  margin: 0 0 22px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-low);
}
.loader__brandline .loader__x {
  margin: 0 6px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ivory-low);
}

.loader__hero {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 16px 30px rgba(232,224,60,0.35));
  animation: heroFloat 2.4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  50% { transform: translateY(-16px) rotate(4deg) scale(1.04); }
}

.loader__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 260px;
  margin: 30px 0 16px;
}

.loader__progress-label {
  font-family: var(--font-badge);
  font-weight: 600;
  font-size: 12px;
  color: var(--ivory-low);
}

.loader__progress-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.loader__progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-hi), var(--purple));
  box-shadow: 0 0 14px rgba(58,108,216,0.65);
}

.loader__text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ivory-dim);
}

/* ============================================================
   PAGE REVEAL
   ============================================================ */
.page {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.page.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================
   TOP NAV
   ============================================================ */
.topnav {
  border-bottom: 1px solid var(--line);
  background: rgba(10,7,22,0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topnav__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  position: relative;
}

.topnav__logo {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  width: auto;
  object-fit: contain;
}

.theme-toggle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ivory-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.theme-toggle:hover { border-color: var(--purple-hi); color: var(--purple-hi); transform: translateY(-50%) scale(1.06); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .theme-toggle__sun { display: none; }
html[data-theme="light"] .theme-toggle .theme-toggle__moon { display: none; }
html[data-theme="light"] .theme-toggle .theme-toggle__sun { display: block; }

.navlink {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ivory-low);
  padding: 9px 16px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.navlink__icon { width: 16px; height: 16px; flex-shrink: 0; }

.navlink:hover {
  color: var(--ivory);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.navlink--active {
  color: var(--void);
  background: linear-gradient(135deg, var(--cyan), var(--purple-hi));
}
.navlink--active:hover { color: var(--void); transform: none; }

.navlink--cta {
  background: linear-gradient(135deg, var(--purple-hi), var(--purple));
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(58,108,216,0.55);
}
.navlink--cta:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 22px -8px rgba(58,108,216,0.65);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 56px 20px 44px;
  text-align: center;
  overflow: hidden;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
  pointer-events: none;
}
.hero__blob--1 {
  width: 420px; height: 420px;
  top: -180px; left: -80px;
  background: var(--purple);
  animation: blobDrift 9s ease-in-out infinite;
}
.hero__blob--2 {
  width: 360px; height: 360px;
  top: -120px; right: -100px;
  background: var(--purple-hi);
  opacity: 0.65;
  animation: blobDrift 11s ease-in-out infinite reverse;
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px, 20px) scale(1.08); }
}

/* Sonar concentric rings behind the hero */
.hero__rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle,
      rgba(58,108,216,0.10) 0px,
      rgba(58,108,216,0.10) 1.5px,
      transparent 1.5px,
      transparent 60px);
  opacity: 0.7;
  pointer-events: none;
  animation: ringPulse 8s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -55%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -55%) scale(1.04); }
}

/* Floating slot-game decorative icons */
.bgfx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bgfx__icon {
  position: absolute;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45));
  opacity: 0.9;
}

.bgfx__icon--1 { top: 10%; left: 6%;  transform: rotate(-8deg);  animation: floatA 7s ease-in-out infinite; }
.bgfx__icon--2 { top: 8%;  right: 8%; transform: rotate(7deg);   animation: floatB 8.5s ease-in-out infinite; }
.bgfx__icon--3 { top: 48%; left: 4%;  width: 70px; height: 70px; transform: rotate(6deg); animation: floatA 9s ease-in-out infinite 1.2s; }
.bgfx__icon--4 { top: 56%; right: 6%; width: 70px; height: 70px; transform: rotate(-9deg); animation: floatB 7.5s ease-in-out infinite 0.6s; }

@keyframes floatA {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-16px) rotate(2deg); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(7deg); }
  50% { transform: translateY(14px) rotate(-3deg); }
}

.bgfx__stamp {
  position: absolute;
  font-family: var(--font-badge);
  font-weight: 800;
  color: var(--ivory-low);
  opacity: 0.28;
  letter-spacing: 0.04em;
  user-select: none;
}
.bgfx__stamp--rtp {
  top: 34%;
  right: 8%;
  font-size: 26px;
  transform: rotate(-14deg);
}
.bgfx__stamp--x2 {
  bottom: 6%;
  left: 8%;
  font-size: 18px;
  transform: rotate(10deg);
}

@media (max-width: 860px) {
  .bgfx__icon--3, .bgfx__icon--4, .bgfx__stamp--x2 { display: none; }
}
@media (max-width: 640px) {
  .bgfx__icon { opacity: 0.55; width: 60px; height: 60px; }
  .hero__rings { width: 600px; height: 600px; }
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.brandmark--hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto 30px;
  justify-content: center;
  width: 100%;
}

.brandmark__icon {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
}

.brandmark__word {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: -0.01em;
  font-size: 30px;
}

.brandmark__x {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ivory-low);
  margin: 0 3px;
}

.brandmark__partner {
  height: 150px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
  margin-left: -6px;
}

/* Area toggle */
.areatoggle {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  margin: 0 auto 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.areatoggle__pill {
  position: absolute;
  top: 4px; left: 4px;
  width: calc(33.333% - 3px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border: none;
  transition: transform 0.32s cubic-bezier(.34,1.56,.64,1);
  z-index: 0;
}

.areatoggle__opt {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--ivory-dim);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.areatoggle__opt.is-active { color: #fff; }

.hero__prizerow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 10px;
}

.hero__badge {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.5));
}
.hero__badge--spin { animation: badgeSpin 5s ease-in-out infinite; }
.hero__badge--bob { animation: badgeBob 2.4s ease-in-out infinite; }

@keyframes badgeSpin {
  0%, 80%, 100% { transform: rotate(0deg); }
  90% { transform: rotate(18deg); }
}
@keyframes badgeBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.hero__title {
  margin: 4px 0 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 10vw, 82px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ivory);
}

.hero__actions--rules {
  display: flex;
  justify-content: center;
  margin-top: 26px;
  margin-bottom: 0;
}
.hero__actions--rules .btn--ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  padding: 16px 30px;
}
.hero__actions--rules .btn--ghost svg { width: 19px; height: 19px; }

.hero__prize {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(68px, 13vw, 108px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero__prize span {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--bronze));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__prize-dollar {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--bronze));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.hero__sub {
  margin: 0 0 30px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ivory-dim);
  line-height: 1.5;
}
.hero__sub--caption {
  margin: 16px 0 40px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 40px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease, filter 0.18s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--purple-hi), var(--purple));
  color: #fff;
  min-width: 220px;
  box-shadow: 0 10px 26px -10px rgba(58,108,216,0.5);
}
.btn--primary:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 30px -10px rgba(58,108,216,0.6); }
.btn--primary:active { transform: translateY(0) scale(0.98); }

.btn--ghost {
  background: var(--panel);
  border: 2px solid var(--line);
  color: var(--ivory);
  min-width: 190px;
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan-hi); transform: translateY(-2px); }

.btn--outline {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--ivory-dim);
  height: 40px;
  padding: 0 18px;
  font-size: 12px;
  border-radius: 999px;
}
.btn--outline:hover { border-color: var(--purple-hi); color: var(--purple-hi); }

.hero__actions--secondary { margin-top: 14px; }

/* Copyable promo code chip */
.codechip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 14px 0 24px;
  border-radius: 999px;
  background: var(--panel);
  border: 2px solid var(--line);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.codechip:hover { border-color: var(--cyan); transform: translateY(-2px); }
.codechip.is-copied { border-color: var(--green); }

.codechip__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--ivory-low);
}
.codechip__value {
  font-family: var(--font-badge);
  font-weight: 600;
  font-size: 18px;
  color: var(--cyan-hi);
  min-width: 68px;
  text-align: left;
}
.codechip__icon {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--ivory-dim);
  flex-shrink: 0;
}

/* ============================================================
   PODIUM (TOP 3)
   ============================================================ */
.podium { padding: 8px 20px 56px; }

.podium__grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: end;
}

.rankcard {
  position: relative;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 20px 26px;
  text-align: center;
  overflow: visible;
  transition: transform 0.25s ease;
}
.rankcard:hover { transform: translateY(-4px); }

.rankcard--silver { border-color: rgba(58,108,216,0.45); box-shadow: 0 20px 44px -22px rgba(58,108,216,0.3); }
.rankcard--bronze { border-color: rgba(255,138,61,0.45); box-shadow: 0 20px 44px -22px rgba(255,138,61,0.3); }

.rankcard--gold {
  border-color: rgba(52,231,208,0.55);
  padding-top: 48px;
  transform: translateY(-16px);
  box-shadow: 0 26px 56px -22px rgba(52,231,208,0.35);
}
.rankcard--gold:hover { transform: translateY(-20px); }

.rankcard__die {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 10px 20px -6px rgba(0,0,0,0.5);
  animation: dieWobble 3.4s ease-in-out infinite;
}
.rankcard__die--silver { background: linear-gradient(160deg, var(--silver), #7f89a8); border: 2px solid #e4e8f2; }
.rankcard__die--gold { background: linear-gradient(160deg, var(--gold-hi), var(--gold)); border: 2px solid #fff4d6; color: #4a3305; width: 60px; height: 60px; font-size: 28px; top: -26px; }
.rankcard__die--bronze { background: linear-gradient(160deg, var(--bronze), #a8641a); border: 2px solid #ffd9a0; }

@keyframes dieWobble {
  0%, 100% { transform: translateX(-50%) rotate(-6deg); }
  50% { transform: translateX(-50%) rotate(6deg); }
}

.rankcard__sparkle {
  position: absolute;
  color: var(--gold-hi);
  font-size: 18px;
  animation: sparkleTwinkle 1.8s ease-in-out infinite;
}
.rankcard__sparkle--a { top: 14px; left: 18px; animation-delay: 0.2s; }
.rankcard__sparkle--b { top: 30px; right: 20px; animation-delay: 0.8s; font-size: 13px; }
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.rankcard__avatar {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 10px auto 16px;
  overflow: visible;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--purple-hi), var(--purple));
}
.rankcard__avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(150deg, var(--purple-hi), var(--purple));
  border: 3px solid var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rankcard__avatar-photo img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; filter: brightness(0) invert(1); }
.rankcard__avatar--gold { width: 92px; height: 92px; background: linear-gradient(135deg, var(--cyan-hi), var(--cyan)); }
.rankcard__avatar--bronze { background: linear-gradient(135deg, #ffb066, var(--bronze)); }

.rankcard__avatar-verified {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(160deg, #4fc3ff, #2f8fdb);
  border: 2.5px solid var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 8px -1px rgba(0,0,0,0.6);
}
.rankcard__avatar-verified svg { width: 12px; height: 12px; }

.rankcard__avatar-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: #1b1a3a;
  border: 2.5px solid;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.6);
  z-index: 2;
}
.rankcard__avatar-badge--silver { border-color: var(--purple-hi); }
.rankcard__avatar-badge--gold   { border-color: var(--cyan); width: 34px; height: 34px; font-size: 17px; bottom: -8px; right: -8px; }
.rankcard__avatar-badge--bronze { border-color: var(--bronze); }

.rankcard__name {
  margin: 0 0 16px;
  font-weight: 800;
  font-size: 14.5px;
  color: var(--ivory);
}

.mask { color: var(--ivory-low); font-weight: 700; }

.rankcard__wagerlabel {
  margin: 0 0 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivory-low);
}

.rankcard__wageramt {
  margin: 0 0 18px;
  font-family: var(--font-badge);
  font-weight: 600;
  font-size: 17px;
  color: var(--ivory);
}

.rankcard__prize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}
.rankcard__prize svg { width: 18px; height: 18px; }
.rankcard__prize--silver { background: linear-gradient(135deg, var(--silver), #7f89a8); }
.rankcard__prize--gold   { background: linear-gradient(135deg, var(--gold-hi), var(--bronze)); font-size: 19px; padding: 10px 24px; }
.rankcard__prize--bronze { background: linear-gradient(135deg, var(--bronze), #8a5416); }

/* ============================================================
   TIMER + LIST SECTION
   ============================================================ */
.board { padding: 0 20px 80px; }
.board__inner { max-width: 980px; margin: 0 auto; }

.timer__kicker {
  text-align: center;
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-hi);
}

.timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 0 30px;
  flex-wrap: wrap;
}

.timer__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 78px;
  padding: 14px 6px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
}

.timer__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4.5vw, 36px);
  line-height: 1;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  animation: tick 1s ease-in-out infinite;
}
@keyframes tick {
  0%, 90%, 100% { transform: scale(1); }
  95% { transform: scale(1.08); }
}

.timer__label {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivory-low);
}

.board__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
}

.ranklist {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ranklist__head {
  display: grid;
  grid-template-columns: 1fr auto 90px;
  padding: 14px 24px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-low);
  border-bottom: 2px solid var(--line);
}
.ranklist__head span:nth-child(2) { text-align: right; }
.ranklist__head span:nth-child(3) { text-align: right; }

.ranklist__row {
  display: grid;
  grid-template-columns: 1fr auto 90px;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s ease;
}
.ranklist__row:last-child { border-bottom: none; }
.ranklist__row:hover { background: rgba(58,108,216,0.08); }
.ranklist__row:nth-child(even) { background: rgba(255,255,255,0.015); }
.ranklist__row:nth-child(even):hover { background: rgba(58,108,216,0.08); }

.ranklist__user { display: flex; align-items: center; gap: 12px; }

.ranklist__rank {
  font-family: var(--font-badge);
  font-weight: 600;
  font-size: 13px;
  color: var(--ivory-low);
  width: 20px;
  text-align: center;
}

.ranklist__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  padding: 2px;
  background: linear-gradient(135deg, var(--purple-hi), var(--purple));
}
.ranklist__avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--panel);
  background: linear-gradient(150deg, var(--purple-hi), var(--purple));
  padding: 6px;
}
.ranklist__avatar img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; filter: brightness(0) invert(1); }

.ranklist__name {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ivory);
}

.ranklist__amt {
  font-family: var(--font-badge);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ivory-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ranklist__prize {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--gold-hi);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   FOOTER
   ============================================================ */
.sitefooter {
  padding: 40px 20px 36px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.sitefooter__notice {
  max-width: 640px;
  margin: 0 auto 26px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ivory-low);
}

.sitefooter__socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ivory-dim);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), color 0.2s ease, background 0.2s ease;
}
.social svg { width: 18px; height: 18px; }
.social:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--purple-hi), var(--purple));
  transform: translateY(-3px) rotate(-6deg) scale(1.08);
}

.sitefooter__copy {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ivory-low);
}

/* ============================================================
   MODAL — Competition Rules
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5,3,16,0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; }

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  transform: scale(0.9) translateY(10px);
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6);
}
.modal-backdrop.is-open .modal { transform: scale(1) translateY(0); }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel-hi);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  background: linear-gradient(90deg, var(--cyan-hi), var(--purple-hi));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--ivory);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.modal__close:hover { background: var(--purple); transform: rotate(90deg); }

.modal__body { padding: 22px 26px 26px; }

.modal__section { margin-bottom: 22px; }
.modal__section:last-of-type { margin-bottom: 18px; }

.modal__section h4 {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan-hi);
}

.modal__section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ivory-dim);
}
.modal__section p strong { color: var(--gold-hi); font-family: var(--font-badge); }

.ruletable {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ruletable__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ivory);
  border-bottom: 1px solid var(--line-soft);
}
.ruletable__row:last-child { border-bottom: none; }
.ruletable__row:nth-child(even) { background: rgba(255,255,255,0.02); }

.tag {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
}
.tag--green { background: rgba(53,212,136,0.16); color: var(--green); }
.tag--gold  { background: rgba(255,203,77,0.16); color: var(--gold-hi); }
.tag--red   { background: rgba(255,84,112,0.16); color: var(--red); }

.modal__note {
  padding: 14px 16px;
  background: rgba(58,108,216,0.08);
  border: 1px solid rgba(58,108,216,0.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ivory-low);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .podium__grid { grid-template-columns: 1fr; max-width: 380px; }
  .rankcard--gold { order: -1; transform: none; }
  .rankcard--gold:hover { transform: translateY(-4px); }
}

@media (max-width: 640px) {
  .topnav__inner { gap: 4px; }
  .topnav__logo { display: none; }
  .theme-toggle { right: 8px; width: 32px; height: 32px; }
  .theme-toggle svg { width: 15px; height: 15px; }
  .navlink span { display: none; }
  .navlink { padding: 10px; }
  .navlink__icon { width: 19px; height: 19px; }
  .hero { padding: 40px 16px 32px; }
  .hero__badge { width: 48px; height: 48px; }
  .brandmark--hero { margin-bottom: 18px; }
  .brandmark--hero .brandmark__icon { height: 20px; }
  .brandmark--hero .brandmark__word { font-size: 16px; }
  .brandmark__partner { height: 68px; width: auto; }
  .board__toolbar { justify-content: center; text-align: center; }
  .timer__unit { min-width: 64px; padding: 10px 4px; }
  .ranklist__row { padding: 12px 16px; grid-template-columns: 1fr auto 64px; gap: 10px; }
  .ranklist__head { padding: 12px 16px; grid-template-columns: 1fr auto 64px; gap: 10px; }
  .ranklist__name { font-size: 12.5px; }
  .ranklist__amt { font-size: 12px; }
  .ranklist__prize { font-size: 13px; }
  .modal__head { padding: 18px 20px; }
  .modal__body { padding: 18px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
