:root {
  --bg: #050816;
  --panel: rgba(13, 20, 47, 0.86);
  --panel-2: rgba(15, 23, 54, 0.94);
  --line: rgba(112, 129, 197, 0.25);
  --text: #f6f7ff;
  --muted: #9ca7c9;
  --purple: #a33cff;
  --violet: #7047ff;
  --blue: #2f74ff;
  --cyan: #32f4d1;
  --gold: #ffd45f;
  --green: #31e19b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(rgba(5, 8, 22, 0.62), rgba(5, 8, 22, 0.72)),
    url("images/hero-background.png") top center / min(1440px, 150vw) auto no-repeat,
    radial-gradient(circle at 50% 22%, rgba(92, 42, 210, 0.22), transparent 26rem),
    radial-gradient(circle at 8% 16%, rgba(43, 243, 205, 0.08), transparent 18rem),
    linear-gradient(180deg, #070a18 0%, #050816 54%, #06091a 100%);
}

button,
input {
  font: inherit;
}

a[href="vip.html"] {
  display: none !important;
}

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

.subscribe,
.legal {
  display: none !important;
}

.floating-support {
  position: fixed;
  right: 18px;
  top: 54%;
  z-index: 50;
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 212, 95, 0.45);
  border-radius: 50%;
  background: rgba(13, 20, 47, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), 0 0 22px rgba(255, 212, 95, 0.18);
  transform: translateY(-50%);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.floating-support:hover {
  border-color: rgba(255, 212, 95, 0.9);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44), 0 0 28px rgba(255, 212, 95, 0.28);
  transform: translateY(-50%) translateX(-2px);
}

.floating-support img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.floating-support span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  height: 76px;
  padding: 0 34px;
  background: rgba(5, 8, 22, 0.86);
  border-bottom: 1px solid rgba(78, 92, 154, 0.28);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  width: 100%;
  margin: 0 28px;
  color: #dbe0ff;
  font-size: 15px;
}

.nav a {
  display: flex;
  align-items: center;
  height: 40px;
  white-space: nowrap;
}

.nav .active {
  padding: 0 16px;
  color: #fff;
  border: 1px solid rgba(170, 83, 255, 0.35);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(119, 64, 255, 0.34), rgba(75, 28, 132, 0.42));
  box-shadow: 0 0 22px rgba(166, 65, 255, 0.35);
}

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

.lang,
.account-entry,
.primary,
.ghost,
.task-row button,
.spin-button,
.subscribe button {
  border: 0;
  color: #fff;
  cursor: pointer;
}

.lang {
  padding: 0;
  color: #e5e9ff;
  background: transparent;
  white-space: nowrap;
}

.account-entry,
.primary,
.task-row button,
.spin-button,
.subscribe button {
  background: linear-gradient(135deg, #e642ff 0%, #8148ff 48%, #2e75ff 100%);
  box-shadow: 0 8px 25px rgba(101, 65, 255, 0.36);
}

.account-entry {
  min-width: 128px;
  height: 46px;
  border-radius: 9px;
  font-weight: 800;
}

main {
  padding: 24px 24px 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 330px minmax(520px, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.left-stack,
.right-stack {
  display: grid;
  gap: 18px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(24, 32, 73, 0.68), rgba(8, 13, 31, 0.88)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 45px rgba(0, 0, 0, 0.26);
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.2;
}

.panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.private-only {
  display: none;
}

.auth-only {
  display: none;
}

.is-authenticated .guest-only {
  display: none;
}

.is-authenticated .auth-only {
  display: block;
}

.is-authenticated .private-only {
  display: block;
}

.is-authenticated .balance.private-only {
  display: flex;
}

body.auth-pending main.app-page,
body.auth-pending [data-private-card] {
  visibility: hidden;
}

body.auth-locked [data-private-card] {
  display: none;
}

.welcome-panel {
  min-height: 356px;
  padding: 34px 40px 22px;
  background:
    radial-gradient(circle at 76% 24%, rgba(157, 50, 255, 0.45), transparent 9rem),
    radial-gradient(circle at 33% 14%, rgba(61, 239, 220, 0.1), transparent 11rem),
    linear-gradient(180deg, rgba(30, 32, 78, 0.9), rgba(9, 13, 31, 0.95));
}

.welcome-panel h1 {
  margin: 0 0 10px;
  font-size: 25px;
}

.welcome-panel h1 span {
  color: #6a91ff;
}

.welcome-gift {
  display: block;
  width: 168px;
  height: 120px;
  object-fit: contain;
  margin: 8px auto 12px;
}

.is-authenticated .welcome-panel {
  min-height: 172px;
  padding: 24px 28px;
}

.is-authenticated .welcome-panel h1 {
  font-size: 22px;
}

.is-authenticated .welcome-gift {
  width: 112px;
  height: 82px;
  margin: 8px auto 0;
}

.compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 12px;
  border-radius: 8px;
  font-weight: 800;
}

.ghost {
  border: 1px solid rgba(181, 75, 255, 0.86);
  background: rgba(9, 12, 29, 0.56);
}

.account-panel,
.token-panel,
.activity-panel,
.winners-panel {
  padding: 24px 24px;
}

.info-row,
.winner,
.task-row {
  display: grid;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid rgba(114, 130, 190, 0.18);
}

.info-row {
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  font-size: 14px;
}

.info-row:last-child,
.winner:last-child,
.task-row:last-child {
  border-bottom: 0;
}

.info-row img,
.winner img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.info-row strong,
.winner strong {
  font-size: 14px;
}

.mini-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #f2efff;
  border: 1px solid rgba(166, 166, 227, 0.52);
  border-radius: 6px;
  font-size: 13px;
}

.line-icon {
  grid-template-columns: 24px 1fr auto;
}

.token-panel p {
  margin-bottom: 12px;
}

.task-row {
  grid-template-columns: 1fr 78px;
  gap: 12px;
  min-height: 58px;
}

.task-row span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dce2ff;
  font-size: 14px;
}

.task-row img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.task-row button {
  height: 38px;
  border-radius: 7px;
  font-weight: 800;
}

.invite-card {
  display: grid;
  grid-template-columns: 1fr 128px;
  min-height: 170px;
  padding: 26px 22px;
  background:
    radial-gradient(circle at 86% 50%, rgba(214, 55, 255, 0.42), transparent 8rem),
    linear-gradient(180deg, rgba(31, 36, 89, 0.8), rgba(10, 14, 37, 0.9));
}

.invite-card img {
  width: 136px;
  height: 104px;
  object-fit: contain;
  align-self: end;
  justify-self: end;
}

.invite-card small {
  display: block;
  margin: 6px 0 14px;
  color: #e8e9ff;
  font-weight: 700;
}

.mini {
  width: 104px;
  height: 42px;
  border-radius: 7px;
  font-weight: 800;
}

.center-stage {
  min-width: 0;
  text-align: center;
}

.prize-sign {
  position: relative;
  display: grid;
  align-content: center;
  width: min(700px, 98%);
  height: 218px;
  margin: -10px auto 0;
  color: #ffe667;
  text-shadow: 0 3px 0 rgba(104, 36, 4, 0.55), 0 0 18px rgba(255, 205, 72, 0.42);
  overflow: visible;
}

.prize-sign::before {
  content: "";
  position: absolute;
  inset: -58px -150px -42px;
  z-index: 0;
  pointer-events: none;
  background: url("images/prize-sign-bg.png") center / contain no-repeat;
}

.prize-sign div,
.prize-sign strong {
  position: relative;
  z-index: 1;
}

.prize-sign div {
  margin-top: 26px;
  font-size: 38px;
  font-weight: 1000;
}

.prize-sign strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(64px, 7.5vw, 96px);
  line-height: 0.9;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #d9def8;
  font-weight: 700;
  margin: 6px 0 14px;
}

.countdown b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: rgba(20, 28, 66, 0.92);
  color: #fff;
}

.countdown strong {
  color: #fff;
  font-size: 14px;
}

.countdown em {
  font-style: normal;
}

.wheel-wrap {
  position: relative;
  width: min(704px, 100%);
  margin: 0 auto;
  aspect-ratio: 1;
  --slice-width: 120px;
  --slice-height: 194px;
  --slice-radius: 292px;
  --slice-pad-top: 50px;
  --slice-font: 22px;
  --slice-unit-font: 12px;
  --slice-icon: 54px;
}

.pointer {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 4;
  width: 70px;
  height: 98px;
  transform: translateX(-50%);
  background: url("images/wheel-pointer.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 9px rgba(0, 0, 0, 0.5));
}

.wheel {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: url("images/wheel-base.png") center / 108% 108% no-repeat;
  filter: drop-shadow(0 0 42px rgba(162, 43, 255, 0.75));
  transition: transform 3s cubic-bezier(.15, .85, .25, 1);
}

.wheel::before {
  content: "";
  display: none;
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: repeating-conic-gradient(from 0deg, transparent 0 35deg, rgba(155, 111, 255, 0.7) 35.4deg 36deg);
  mask: radial-gradient(circle, transparent 0 25%, #000 25.4% 100%);
  opacity: .75;
}

.wheel::after {
  content: "";
  display: none;
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 3px solid rgba(211, 151, 255, 0.85);
}

.bulbs {
  position: absolute;
  display: none;
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(circle, #fff 0 4px, #c044ff 5px 8px, transparent 9px) 50% 4px / 42px 42px;
  mask: radial-gradient(circle, transparent 0 86%, #000 87% 100%);
  animation: blink 1.4s linear infinite;
}

@keyframes blink {
  50% { filter: brightness(1.4); }
}

.slice {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--slice-width);
  height: var(--slice-height);
  margin-left: calc(var(--slice-width) / -2);
  margin-top: calc(var(--slice-radius) * -1);
  transform-origin: 50% var(--slice-radius);
  display: grid;
  justify-items: center;
  align-content: start;
  padding-top: var(--slice-pad-top);
  font-weight: 1000;
  font-size: var(--slice-font);
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 3px 9px rgba(0, 0, 0, 0.8);
}

.slice small {
  display: block;
  font-size: var(--slice-unit-font);
}

.slice span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.slice img {
  width: var(--slice-icon);
  height: var(--slice-icon);
  object-fit: contain;
  margin-top: 10px;
}

.s1 { transform: rotate(0deg); }
.s2 { transform: rotate(36deg); }
.s3 { transform: rotate(72deg); }
.s4 { transform: rotate(108deg); }
.s5 { transform: rotate(144deg); }
.s6 { transform: rotate(180deg); }
.s7 { transform: rotate(216deg); }
.s8 { transform: rotate(252deg); }
.s9 { transform: rotate(288deg); }
.s10 { transform: rotate(324deg); }

.wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  width: 238px;
  height: 238px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 5px solid #873cff;
  background: radial-gradient(circle at 50% 54%, #1b1120, #050611 76%);
  box-shadow: 0 0 0 4px rgba(197, 72, 255, 0.36), inset 0 0 28px rgba(255, 191, 64, 0.18);
  color: #ffe36d;
}

.wheel-center span {
  font-size: 20px;
  font-weight: 900;
}

.wheel-center strong {
  font-size: 34px;
  line-height: 1;
}

.wheel-center img {
  width: 130px;
  height: 86px;
  max-width: 90%;
  object-fit: contain;
  margin-top: -4px;
}

.spin-controls {
  margin: 8px auto 0;
  width: min(488px, 92%);
}

.balance {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-weight: 800;
  text-align: left;
}

.balance img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.spin-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 72px;
  border-radius: 9px;
  font-size: 27px;
  font-weight: 1000;
}

.spin-button img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.spin-controls p {
  margin: 12px 0 0;
  color: var(--muted);
}

.spin-controls a {
  color: #b866ff;
  text-decoration: underline;
}

.pool-share-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(488px, 92%);
  margin: 14px auto 0;
  padding: 14px 16px;
  border-color: rgba(255, 212, 95, 0.34);
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 212, 95, 0.16), transparent 13rem),
    rgba(11, 17, 42, 0.78);
}

.pool-share-card > img {
  width: 58px;
  height: 46px;
  object-fit: contain;
}

.pool-share-card div {
  min-width: 0;
}

.pool-share-card span {
  display: block;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.pool-share-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-share-card small {
  color: var(--muted);
}

.spin-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(164, 61, 255, 0.22), transparent 21rem),
    rgba(3, 6, 18, 0.76);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition: opacity .18s ease;
}

.spin-result-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.spin-result-dialog {
  position: relative;
  width: min(100%, 430px);
  padding: 34px 30px 28px;
  overflow: hidden;
  border: 1px solid rgba(154, 169, 238, 0.32);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 0%, rgba(166, 65, 255, 0.32), transparent 13rem),
    linear-gradient(180deg, rgba(28, 36, 82, 0.96), rgba(7, 11, 30, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 26px 70px rgba(0, 0, 0, 0.44),
    0 0 38px rgba(119, 71, 255, 0.22);
  text-align: center;
  transform: translateY(12px) scale(.98);
  transition: transform .18s ease;
}

.spin-result-overlay.is-visible .spin-result-dialog {
  transform: translateY(0) scale(1);
}

.spin-result-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 212, 95, 0.42);
  pointer-events: none;
}

.spin-result-dialog.is-miss {
  background:
    radial-gradient(circle at 50% 0%, rgba(50, 244, 209, 0.16), transparent 12rem),
    linear-gradient(180deg, rgba(24, 32, 73, 0.96), rgba(7, 11, 30, 0.98));
}

.spin-result-dialog.is-error {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 212, 95, 0.14), transparent 12rem),
    linear-gradient(180deg, rgba(34, 29, 64, 0.96), rgba(7, 11, 30, 0.98));
}

.spin-result-dialog.is-login-required {
  background:
    radial-gradient(circle at 50% 0%, rgba(50, 244, 209, 0.16), transparent 12rem),
    linear-gradient(180deg, rgba(24, 32, 73, 0.96), rgba(7, 11, 30, 0.98));
}

.spin-result-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(154, 169, 238, 0.28);
  border-radius: 8px;
  color: #dfe5ff;
  background: rgba(8, 12, 31, 0.68);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.spin-result-icon {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  margin: 0 auto 16px;
  border: 1px solid rgba(255, 212, 95, 0.36);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 212, 95, 0.2), transparent 58%),
    rgba(10, 15, 37, 0.72);
  box-shadow: 0 0 34px rgba(255, 212, 95, 0.18);
}

.spin-result-icon img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.pool-chest-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 104px;
  margin: 0 auto 12px;
}

.pool-chest-visual::before {
  content: "";
  position: absolute;
  inset: 18px 6px 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 212, 95, 0.34), transparent 66%);
  filter: blur(4px);
  transform: scale(.72);
  animation: chestGlow 1.1s ease-in-out infinite alternate;
}

.pool-chest-visual img {
  position: relative;
  width: 112px;
  height: 82px;
  object-fit: contain;
  animation: chestShake .72s ease-in-out infinite;
}

.pool-chest-dialog.is-opened .pool-chest-visual img {
  animation: chestOpen .7s ease both;
}

@keyframes chestShake {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-2deg); }
  50% { transform: translateY(1px) rotate(2deg); }
  75% { transform: translateY(-2px) rotate(-1deg); }
}

@keyframes chestOpen {
  0% { transform: scale(.94) rotate(-3deg); filter: brightness(1); }
  60% { transform: scale(1.08) rotate(2deg); filter: brightness(1.45); }
  100% { transform: scale(1) rotate(0deg); filter: brightness(1.18); }
}

@keyframes chestGlow {
  from { opacity: .45; transform: scale(.72); }
  to { opacity: .9; transform: scale(1); }
}

.spin-result-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.spin-result-dialog h2 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
}

.spin-result-amount {
  display: block;
  margin: 12px 0 10px;
  color: var(--gold);
  font-size: 30px;
  line-height: 1.1;
  word-break: break-word;
  text-shadow: 0 0 18px rgba(255, 212, 95, 0.32);
}

.spin-result-dialog.is-miss .spin-result-amount {
  color: #dfe5ff;
  text-shadow: none;
}

.spin-result-text {
  margin: 0 auto;
  max-width: 330px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.spin-result-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  margin: 22px 0 0;
  padding: 16px;
  border: 1px solid rgba(114, 130, 190, 0.2);
  border-radius: 8px;
  background: rgba(7, 12, 32, 0.66);
  text-align: left;
}

.spin-result-meta span {
  color: #8992bb;
  font-size: 13px;
}

.spin-result-meta strong {
  color: #e7ebff;
  font-size: 13px;
  text-align: right;
  word-break: break-word;
}

.spin-result-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.spin-result-primary,
.spin-result-secondary {
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.spin-result-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #e642ff 0%, #8148ff 48%, #2e75ff 100%);
  box-shadow: 0 8px 25px rgba(101, 65, 255, 0.36);
}

.spin-result-secondary {
  min-width: 108px;
  padding: 0 16px;
  border: 1px solid rgba(154, 169, 238, 0.3);
  color: #dfe5ff;
  background: rgba(8, 12, 31, 0.68);
}

.spin-result-actions a {
  color: #8cffc5;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.winners-panel {
  min-height: 516px;
}

.winners-marquee {
  position: relative;
  height: 456px;
  margin-top: 4px;
  overflow: hidden;
}

.winners-marquee::before,
.winners-marquee::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: 28px;
  pointer-events: none;
}

.winners-marquee::before {
  top: 0;
  background: linear-gradient(180deg, rgba(13, 19, 45, 0.98), rgba(13, 19, 45, 0));
}

.winners-marquee::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(13, 19, 45, 0.98), rgba(13, 19, 45, 0));
}

.winners-track {
  display: grid;
}

.winners-marquee.is-animated .winners-track {
  animation: winnersScroll 22s linear infinite;
}

.winners-marquee.is-animated:hover .winners-track {
  animation-play-state: paused;
}

.winners-marquee.is-static {
  height: auto;
  overflow: visible;
}

.winners-marquee.is-static::before,
.winners-marquee.is-static::after {
  display: none;
}

@keyframes winnersScroll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

.winner {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 76px;
}

.winner span {
  min-width: 0;
  overflow: hidden;
  color: #e8ecff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner strong {
  min-width: 0;
  color: #8cffc5;
  text-align: right;
  white-space: nowrap;
}

.winner small {
  display: block;
  margin-top: 7px;
  color: #8992bb;
  font-weight: 500;
}

.activity-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-panel h2 img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.notice-list {
  position: relative;
  height: 274px;
  margin-top: 12px;
  overflow: hidden;
}

.notice-list::before,
.notice-list::after {
  position: absolute;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 28px;
  pointer-events: none;
  content: "";
}

.notice-list::before {
  top: 0;
  background: linear-gradient(180deg, rgba(13, 19, 45, 0.98), rgba(13, 19, 45, 0));
}

.notice-list::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(13, 19, 45, 0.98), rgba(13, 19, 45, 0));
}

.notice-track {
  display: grid;
}

.notice-list.is-animated .notice-track {
  animation: noticeScroll 24s linear infinite;
}

.notice-list.is-animated:hover .notice-track {
  animation-play-state: paused;
}

.notice-list.is-static {
  height: auto;
  overflow: visible;
}

.notice-list.is-static::before,
.notice-list.is-static::after {
  display: none;
}

@keyframes noticeScroll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

.notice {
  position: relative;
  min-height: 70px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(7, 12, 32, 0.66);
  color: #e7e9ff;
  font-size: 14px;
}

.notice-list .notice:first-child {
  margin-top: 0;
}

.notice b,
.notice span {
  display: block;
  min-width: 0;
  line-height: 1.45;
  word-break: break-word;
}

.notice small {
  display: none;
}

.notice.hot {
  border: 1px solid rgba(72, 94, 175, 0.22);
}

.jackpot-panel {
  min-height: 246px;
  padding: 28px 24px 22px;
  background:
    radial-gradient(circle at 75% 16%, rgba(168, 51, 255, 0.45), transparent 9rem),
    linear-gradient(180deg, rgba(52, 28, 91, 0.86), rgba(11, 15, 36, 0.94));
}

.jackpot-panel h2 {
  margin: 0 0 20px;
  color: #ffe26a;
  font-size: 27px;
  text-shadow: 0 2px 0 #79200e, 0 0 12px rgba(255, 211, 64, 0.6);
}

.jackpot-panel strong {
  display: block;
  margin-top: 6px;
  color: #ffe164;
  font-size: 32px;
  line-height: 1.1;
}

.jackpot-panel > img {
  position: absolute;
  right: 16px;
  top: 34px;
  width: 128px;
  height: 92px;
  object-fit: contain;
}

.progress-label {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(118, 130, 187, 0.2);
  color: #e4e7ff;
  font-size: 13px;
}

.progress-label b {
  color: #856bff;
}

.progress {
  height: 11px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #020511;
}

.progress span {
  display: block;
  width: 88%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d43cff, #4e77ff);
}

.progress.is-muted span {
  width: 0;
}

.jackpot-panel small {
  display: block;
  margin-top: 9px;
  text-align: right;
  color: #ecf0ff;
}

.steps-panel {
  display: grid;
  grid-template-columns: 1fr 55px 1fr 55px 1fr 55px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 214px;
  margin-top: 26px;
  padding: 34px 90px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(16, 27, 64, 0.86), rgba(8, 13, 31, 0.92));
}

.step {
  text-align: center;
}

.step span,
.step img {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #bb51ff, #2c1d83 72%);
  color: #d947ff;
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(130, 62, 255, 0.34);
}

.step img {
  padding: 0;
  object-fit: contain;
  background: transparent;
}

.step b {
  display: block;
  font-size: 17px;
}

.step p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.steps-panel i {
  height: 2px;
  background: linear-gradient(90deg, transparent, #5a58b3 30%, #8c55ff 70%, transparent);
}

.footer {
  display: grid;
  grid-template-columns: 1.55fr .7fr .7fr .7fr 1.35fr;
  gap: 34px;
  padding: 40px 34px 24px;
  border-top: 1px solid rgba(69, 82, 138, 0.32);
  color: #dce1fb;
}

.footer p,
.footer small,
.footer a,
.subscribe p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.socials {
  display: none;
  gap: 14px;
  margin: 18px 0;
}

.socials span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #41f0ce, #7048ff 60%, #b43cff);
  opacity: .85;
}

.footer-links h3,
.subscribe h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-links a {
  display: block;
  margin: 8px 0;
}

.subscribe {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(13, 20, 47, 0.7);
}

.subscribe div {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  margin-top: 16px;
}

.subscribe input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid rgba(75, 89, 148, 0.24);
  border-radius: 7px;
  background: rgba(4, 8, 22, 0.8);
}

.subscribe button {
  border-radius: 7px;
  font-weight: 800;
}

.legal {
  display: flex;
  justify-content: flex-end;
  gap: 34px;
  padding: 0 36px 24px;
  color: var(--muted);
}

.legal strong {
  color: #29dc8b;
}

.app-page {
  padding: 28px 38px 0;
}

.auth-grid,
.records-layout,
.leader-layout {
  display: grid;
  gap: 24px;
}

.auth-grid {
  grid-template-columns: 1.15fr .85fr;
  align-items: stretch;
}

.auth-visual,
.auth-card {
  min-height: 560px;
  padding: 36px 42px;
}

.auth-visual {
  background:
    radial-gradient(circle at 50% 62%, rgba(173, 53, 255, 0.35), transparent 14rem),
    linear-gradient(180deg, rgba(20, 28, 68, 0.88), rgba(7, 12, 32, 0.94));
}

.auth-visual h1,
.page-title-row h1,
.leader-hero h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.1;
}

.auth-visual h1 span {
  color: #6d82ff;
}

.auth-visual > p,
.page-title-row p,
.leader-hero p {
  color: #c0c8ea;
  font-size: 18px;
}

.auth-gift {
  display: block;
  width: min(440px, 70%);
  height: 260px;
  object-fit: contain;
  margin: 18px auto 22px;
}

.benefit-strip,
.security-strip {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(105, 124, 190, 0.25);
  border-radius: 8px;
  background: rgba(6, 11, 30, 0.55);
}

.benefit-strip {
  grid-template-columns: repeat(4, 1fr);
}

.benefit-strip div,
.security-strip,
.trust-card {
  align-items: center;
}

.benefit-strip img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.benefit-strip b,
.trust-card b {
  display: block;
  margin-bottom: 4px;
}

.benefit-strip span,
.security-strip span,
.trust-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.security-strip {
  grid-template-columns: 52px 1fr 34px 34px 34px;
  margin-top: 12px;
}

.security-strip img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 22px;
  border: 1px solid rgba(93, 112, 178, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.auth-tabs button,
.tabs button,
.pager button {
  height: 52px;
  color: #dfe4ff;
  border: 0;
  background: rgba(8, 13, 33, 0.72);
  cursor: pointer;
  font-weight: 800;
}

.auth-tabs .selected,
.tabs .selected,
.pager .selected {
  color: #fff;
  background: linear-gradient(135deg, #d63cff, #704dff);
  box-shadow: 0 0 24px rgba(177, 64, 255, 0.34);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(114, 130, 190, 0.28);
}

.form-field {
  display: block;
  margin-bottom: 16px;
}

.form-field span {
  display: block;
  margin-bottom: 8px;
  color: #cbd3f4;
}

.form-field input {
  width: 100%;
  height: 62px;
  color: #fff;
  border: 1px solid rgba(93, 112, 178, 0.38);
  border-radius: 8px;
  background: rgba(5, 9, 25, 0.65);
}

.code-field div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.code-field button {
  height: 62px;
}

.form-meta,
.switch-auth {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.form-meta a,
.switch-auth a {
  color: #d055ff;
}

.auth-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.auth-message[data-tone="success"] {
  color: #7dffc3;
}

.auth-message[data-tone="error"] {
  color: #ff9aad;
}

.auth-submit {
  margin-top: 22px;
}

.switch-auth {
  justify-content: center;
  gap: 8px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.trust-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  min-height: 112px;
  padding: 18px 22px;
}

.trust-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.trust-card em {
  align-self: start;
  padding: 5px 14px;
  color: #7bffc4;
  border-radius: 999px;
  background: rgba(36, 211, 138, 0.16);
  font-style: normal;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}

.page-title-row img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  min-height: 120px;
  padding: 22px;
}

.stat-card div {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.stat-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.stat-card strong,
.claim-card strong,
.podium strong {
  color: #ffe36d;
  font-size: 32px;
}

.stat-card small,
.claim-card span {
  color: #dce2ff;
  font-size: 18px;
}

.records-layout {
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: start;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.rewards-table-card,
.leaderboard-table-card {
  padding: 24px;
}

.tabs {
  display: inline-grid;
  grid-auto-flow: column;
  margin: 10px 0 16px;
  overflow: hidden;
  border: 1px solid rgba(93, 112, 178, 0.3);
  border-radius: 8px;
}

.tabs button {
  min-width: 112px;
}

.data-table {
  overflow: hidden;
  border: 1px solid rgba(105, 124, 190, 0.22);
  border-radius: 8px;
}

.data-table > div {
  display: grid;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(105, 124, 190, 0.16);
}

.data-table > div:last-child {
  border-bottom: 0;
}

.table-head {
  color: var(--muted);
  background: rgba(9, 15, 36, 0.6);
}

.reward-table > div {
  grid-template-columns: 1.1fr 1.25fr 1fr 1.6fr .8fr .75fr;
}

.data-table img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

.data-table b {
  color: #3cffbc;
}

.data-table em {
  justify-self: start;
  padding: 6px 12px;
  color: #24e89f;
  border-radius: 999px;
  background: rgba(34, 199, 132, 0.15);
  font-style: normal;
}

.data-table em.pending {
  color: #ffd24d;
  background: rgba(255, 178, 38, 0.18);
}

.data-table em.expired {
  color: #b7bfdc;
  background: rgba(125, 135, 168, 0.15);
}

.data-table button {
  height: 38px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, #d63cff, #4b6fff);
  font-weight: 800;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.pager button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.claim-card,
.spin-balance-card,
.distribution-card,
.recent-card,
.rules-card {
  padding: 24px;
}

.claim-card {
  display: grid;
  grid-template-columns: 1fr 160px;
  align-items: center;
}

.claim-card > img {
  width: 170px;
  height: 130px;
  object-fit: contain;
}

.spin-balance-card div {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
}

.spin-balance-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.spin-balance-card strong {
  font-size: 34px;
}

.distribution-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
}

.distribution-card h2,
.distribution-card p {
  grid-column: 1 / -1;
}

.donut {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: conic-gradient(#20d08f 0 76%, #914dff 76% 88%, #e646c6 88% 96%, #3376ff 96% 100%);
  mask: radial-gradient(circle, transparent 0 42%, #000 43%);
}

.distribution-card li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 11px 0;
  color: #dce2ff;
}

.distribution-card li b {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 3px;
  background: #20d08f;
}

.distribution-card li:nth-child(2) b { background: #914dff; }
.distribution-card li:nth-child(3) b { background: #e646c6; }
.distribution-card li:nth-child(4) b { background: #3376ff; }

.leader-hero {
  display: grid;
  grid-template-columns: 260px 1fr 360px;
  align-items: center;
  gap: 26px;
  min-height: 180px;
  padding: 26px 34px;
  margin-bottom: 24px;
}

.leader-hero > img {
  width: 240px;
  height: 150px;
  object-fit: contain;
}

.leader-hero .tabs {
  margin: 0;
}

.leader-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 20px;
  margin-bottom: 18px;
  align-items: end;
}

.podium {
  min-height: 170px;
  padding: 18px 22px;
  text-align: center;
}

.podium.gold {
  min-height: 198px;
  border-color: rgba(255, 205, 77, 0.65);
}

.podium > img:not(.medal) {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.podium .medal {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.podium b,
.podium span {
  display: block;
  color: #dfe4ff;
}

.leader-table > div {
  grid-template-columns: 70px 1.8fr 1fr .85fr 1.2fr .65fr;
}

.leader-table em {
  color: #ffd86a;
  background: rgba(255, 197, 75, 0.15);
}

.leader-table strong {
  color: #51ffba;
}

.leader-table strong.down {
  color: #ff6b8a;
}

.recent-card .winner {
  min-height: 62px;
}

.rules-card {
  position: relative;
  min-height: 230px;
}

.rules-card ol {
  margin: 0;
  padding-left: 20px;
  color: #dce2ff;
  line-height: 1.9;
}

.rules-card > img {
  position: absolute;
  right: 16px;
  bottom: 12px;
  width: 110px;
  height: 110px;
  object-fit: contain;
  opacity: .85;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.vip-hero,
.invite-hero,
.help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 28px;
  min-height: 240px;
  margin-bottom: 24px;
  padding: 34px 42px;
  background:
    radial-gradient(circle at 86% 28%, rgba(166, 65, 255, 0.34), transparent 12rem),
    linear-gradient(180deg, rgba(22, 32, 78, 0.9), rgba(7, 12, 32, 0.96));
}

.invite-hero {
  background:
    radial-gradient(circle at 86% 42%, rgba(255, 212, 95, 0.18), transparent 12rem),
    linear-gradient(180deg, rgba(22, 32, 78, 0.9), rgba(7, 12, 32, 0.96));
}

.help-hero {
  grid-template-columns: minmax(0, 1fr);
}

.vip-hero h1,
.invite-hero h1,
.help-hero h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.08;
}

.vip-hero p,
.invite-hero p,
.help-hero p {
  max-width: 680px;
  color: #c0c8ea;
  font-size: 18px;
  line-height: 1.6;
}

.vip-hero > img,
.invite-hero > img {
  justify-self: center;
  width: 220px;
  height: 160px;
  object-fit: contain;
}

.vip-progress {
  max-width: 520px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid rgba(105, 124, 190, 0.24);
  border-radius: 8px;
  background: rgba(7, 12, 32, 0.62);
}

.vip-progress div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #dce2ff;
}

.vip-progress strong {
  color: var(--gold);
}

.vip-progress .progress span {
  width: 64%;
}

.vip-layout,
.help-category-grid,
.invite-code-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.vip-layout {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vip-level-card {
  min-height: 300px;
  padding: 24px;
}

.vip-level-card.active {
  border-color: rgba(255, 212, 95, 0.62);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.32), 0 0 34px rgba(255, 212, 95, 0.14);
}

.vip-level-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.vip-level-card h2 {
  margin: 14px 0 6px;
  font-size: 28px;
}

.vip-level-card strong {
  color: var(--gold);
}

.vip-level-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: #dce2ff;
  line-height: 1.9;
}

.vip-table > div {
  grid-template-columns: .9fr 1.2fr 1fr 1fr 1fr;
}

.invite-code-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, .55fr) minmax(240px, .55fr);
}

.invite-code-card,
.invite-reward-card,
.contact-card,
.help-category,
.faq-card {
  padding: 24px;
}

.invite-code {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(255, 212, 95, 0.34);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(7, 12, 32, 0.66);
  font-size: 28px;
  font-weight: 1000;
  text-align: center;
  word-break: break-word;
}

.invite-code-card label {
  display: block;
}

.invite-code-card label span {
  display: block;
  margin-bottom: 8px;
  color: #cbd3f4;
}

.invite-code-card input,
.help-search input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid rgba(93, 112, 178, 0.38);
  border-radius: 8px;
  background: rgba(5, 9, 25, 0.65);
}

.invite-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.invite-reward-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: center;
}

.invite-reward-card img,
.help-category img,
.contact-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.invite-reward-card strong {
  color: var(--gold);
  font-size: 30px;
}

.invite-table > div {
  grid-template-columns: 1.3fr 1.3fr .8fr .8fr 1.3fr;
}

.help-search {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
}

.help-search button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #e642ff 0%, #8148ff 48%, #2e75ff 100%);
  cursor: pointer;
  font-weight: 900;
}

.help-category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-category {
  min-height: 190px;
}

.help-category h2 {
  margin: 16px 0 10px;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.faq-card details {
  border-bottom: 1px solid rgba(105, 124, 190, 0.18);
  padding: 18px 0;
}

.faq-card details:last-child {
  border-bottom: 0;
}

.faq-card summary {
  color: #f6f7ff;
  cursor: pointer;
  font-weight: 900;
}

.faq-card p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

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

.contact-card img {
  display: block;
  margin: 0 auto 12px;
}

.legal-page {
  max-width: 960px;
  margin: 0 auto;
}

.legal-content-card {
  padding: 34px 42px;
}

.legal-content-card h1 {
  margin: 0 0 20px;
  font-size: 42px;
  line-height: 1.12;
}

.legal-content {
  color: #d9def7;
  font-size: 16px;
  line-height: 1.9;
}

.legal-content p {
  margin: 0 0 16px;
}

.contact-page .contact-card {
  margin-top: 26px;
  border: 1px solid rgba(105, 124, 190, 0.22);
  border-radius: 8px;
  background: rgba(7, 12, 32, 0.44);
}

.compact-footer {
  margin-top: 28px;
}

@media (max-width: 1180px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    gap: 14px;
    padding: 18px 24px;
  }

  .nav {
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    margin: 0;
    padding-bottom: 4px;
  }

  .top-actions {
    margin-left: auto;
  }

  .dashboard-grid {
    grid-template-columns: 300px minmax(430px, 1fr);
  }

  .right-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .winners-panel,
  .activity-panel,
  .jackpot-panel {
    min-height: 0;
  }

  .footer {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .auth-grid,
  .records-layout,
  .leader-layout {
    grid-template-columns: 1fr;
  }

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

  .leader-hero {
    grid-template-columns: 180px 1fr;
  }

  .leader-hero .tabs {
    grid-column: 1 / -1;
  }

  .vip-layout,
  .help-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invite-code-grid,
  .help-layout {
    grid-template-columns: 1fr;
  }

  .invite-table {
    overflow-x: auto;
  }

  .invite-table > div {
    min-width: 860px;
  }
}

@media (max-width: 820px) {
  main {
    padding: 18px 14px 0;
  }

  .dashboard-grid,
  .right-stack,
  .footer {
    grid-template-columns: 1fr;
  }

  .center-stage {
    order: -1;
  }

  .left-stack {
    grid-template-columns: 1fr;
  }

  .prize-sign {
    width: 88%;
    height: 142px;
    margin: -8px auto 0;
  }

  .prize-sign::before {
    inset: -34px -68px -28px;
  }

  .prize-sign div {
    margin-top: 16px;
    font-size: 28px;
  }

  .prize-sign strong {
    font-size: 56px;
  }

  .wheel-wrap {
    width: min(100%, 560px);
    --slice-width: 96px;
    --slice-height: 158px;
    --slice-radius: 238px;
    --slice-pad-top: 36px;
    --slice-font: 18px;
    --slice-unit-font: 10px;
    --slice-icon: 42px;
  }

  .pointer {
    width: 58px;
    height: 82px;
  }

  .slice {
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.86);
  }

  .wheel-center strong {
    font-size: 26px;
  }

  .wheel-center {
    width: 190px;
    height: 190px;
  }

  .pool-share-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .pool-share-card button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .steps-panel {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 18px;
  }

  .steps-panel i {
    width: 2px;
    height: 28px;
    margin: 0 auto;
  }

  .app-page {
    padding: 18px 14px 0;
  }

  .auth-visual,
  .auth-card {
    min-height: 0;
    padding: 24px 18px;
  }

  .auth-visual h1,
  .page-title-row h1,
  .leader-hero h1 {
    font-size: 36px;
  }

  .benefit-strip,
  .trust-grid,
  .stat-grid,
  .podium-grid {
    grid-template-columns: 1fr;
  }

  .security-strip {
    grid-template-columns: 48px 1fr;
  }

  .security-strip > img:nth-last-child(-n + 3) {
    display: none;
  }

  .trust-card {
    grid-template-columns: 62px 1fr auto;
  }

  .page-title-row {
    align-items: flex-start;
  }

  .records-layout,
  .leader-layout {
    gap: 18px;
  }

  .reward-table,
  .leader-table {
    overflow-x: auto;
  }

  .reward-table > div {
    min-width: 860px;
  }

  .leader-table > div {
    min-width: 800px;
  }

  .claim-card {
    grid-template-columns: 1fr 120px;
  }

  .claim-card > img {
    width: 120px;
  }

  .distribution-card {
    grid-template-columns: 1fr;
  }

  .donut {
    margin: 0 auto;
  }

  .leader-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .leader-hero > img {
    justify-self: center;
  }

  .vip-hero,
  .invite-hero,
  .help-hero {
    grid-template-columns: 1fr;
    padding: 26px 20px;
    text-align: center;
  }

  .vip-hero h1,
  .invite-hero h1,
  .help-hero h1 {
    font-size: 36px;
  }

  .vip-hero > img,
  .invite-hero > img {
    width: 180px;
    height: 132px;
  }

  .vip-progress {
    margin-inline: auto;
    text-align: left;
  }

  .vip-table {
    overflow-x: auto;
  }

  .vip-table > div {
    min-width: 720px;
  }
}

@media (max-width: 480px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: center;
    padding: 12px 12px 10px;
  }

  .brand {
    min-width: 0;
    font-size: 22px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    justify-self: end;
    width: auto;
    gap: 8px;
    margin-left: 0;
  }

  .lang {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid rgba(126, 145, 215, 0.26);
    border-radius: 8px;
    background: rgba(8, 12, 31, 0.68);
    font-size: 0;
  }

  .lang::after {
    content: "ZH";
    color: #dfe5ff;
    font-size: 12px;
    font-weight: 900;
  }

  .lang-en .lang::after {
    content: "EN";
  }

  .account-entry {
    width: auto;
    min-width: 0;
    max-width: 136px;
    height: 38px;
    padding: 0 12px;
    overflow: hidden;
    border-radius: 8px;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav {
    grid-column: 1 / -1;
    gap: 8px;
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(126, 145, 215, 0.18);
    border-radius: 10px;
    background: rgba(6, 10, 27, 0.58);
    font-size: 13px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(15, 23, 54, 0.72);
  }

  .nav .active {
    padding: 0 12px;
    border-color: rgba(170, 83, 255, 0.42);
  }

  .welcome-panel,
  .account-panel,
  .token-panel,
  .activity-panel,
  .winners-panel,
  .jackpot-panel {
    padding: 20px 16px;
  }

  .welcome-panel {
    min-height: 0;
  }

  .countdown {
    flex-wrap: wrap;
    font-size: 13px;
  }

  .wheel {
    inset: 20px;
    border-width: 7px;
  }

  .wheel-wrap {
    min-height: 330px;
    --slice-width: clamp(56px, 18vw, 68px);
    --slice-height: 104px;
    --slice-radius: clamp(132px, 42vw, 150px);
    --slice-pad-top: 20px;
    --slice-font: clamp(10px, 3.2vw, 12px);
    --slice-unit-font: 8px;
    --slice-icon: clamp(22px, 7vw, 28px);
  }

  .pointer {
    top: 4px;
    width: 44px;
    height: 62px;
  }

  .slice {
    letter-spacing: 0;
  }

  .slice img {
    margin-top: 5px;
  }

  .wheel-center span {
    font-size: 12px;
  }

  .wheel-center strong {
    font-size: 19px;
  }

  .wheel-center {
    width: 116px;
    height: 116px;
    border-width: 3px;
  }

  .wheel-center img {
    width: 80px;
    height: 48px;
  }

  .spin-button {
    height: 58px;
    font-size: 20px;
  }

  .spin-result-overlay {
    padding: 14px;
  }

  .spin-result-dialog {
    padding: 30px 18px 22px;
  }

  .spin-result-dialog h2 {
    font-size: 24px;
  }

  .spin-result-amount {
    font-size: 24px;
  }

  .spin-result-meta {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .spin-result-meta strong {
    text-align: center;
  }

  .spin-result-actions {
    grid-template-columns: 1fr;
  }

  .invite-card {
    grid-template-columns: 1fr 110px;
  }

  .invite-card img {
    width: 116px;
  }

  .winner {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .winners-marquee {
    height: 344px;
  }

  .winner strong {
    grid-column: 2;
    text-align: left;
  }

  .notice small {
    right: 14px;
    bottom: 12px;
    margin-top: 0;
    text-align: right;
    white-space: nowrap;
  }

  .jackpot-panel > img {
    width: 104px;
    opacity: .9;
  }

  .jackpot-panel strong {
    font-size: 26px;
  }

  .footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
    padding: 26px 16px 18px;
  }

  .footer-brand,
  .subscribe {
    grid-column: 1 / -1;
  }

  .footer-brand .brand {
    font-size: 22px;
  }

  .footer-brand p {
    margin: 10px 0 0;
    font-size: 13px;
  }

  .socials {
    display: none;
  }

  .footer-links h3,
  .subscribe h3 {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .footer-links a {
    margin: 6px 0;
    font-size: 13px;
  }

  .subscribe {
    padding: 16px;
  }

  .subscribe div {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .subscribe input,
  .subscribe button {
    height: 42px;
  }

  .legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 0 16px 22px;
    font-size: 12px;
  }

  .auth-gift {
    width: 100%;
    height: 190px;
  }

  .auth-tabs button,
  .tabs button {
    min-width: 0;
    height: 46px;
    padding: 0 14px;
  }

  .tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .form-meta {
    gap: 10px;
    flex-wrap: wrap;
  }

  .page-title-row img {
    width: 70px;
    height: 70px;
  }

  .stat-card strong,
  .claim-card strong,
  .podium strong {
    font-size: 26px;
  }

  .claim-card {
    grid-template-columns: 1fr;
  }

  .claim-card > img {
    justify-self: center;
  }

  .leader-hero > img {
    width: 180px;
    height: 130px;
  }

  .leader-hero {
    padding: 20px 16px;
    gap: 12px;
  }

  .leader-hero h1,
  .vip-hero h1,
  .invite-hero h1 {
    font-size: 32px;
  }

  .leader-hero p,
  .leader-hero span,
  .vip-hero p,
  .invite-hero p {
    font-size: 15px;
  }

  .leaderboard-table-card,
  .vip-table-card,
  .invite-table-card {
    padding: 16px;
  }

  .leader-table,
  .vip-table,
  .invite-table {
    display: grid;
    gap: 12px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .leader-table .table-head,
  .vip-table .table-head,
  .invite-table .table-head {
    display: none;
  }

  .leader-table > div:not(.table-head),
  .vip-table > div:not(.table-head),
  .invite-table > div:not(.table-head) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    min-width: 0;
    min-height: 0;
    padding: 14px;
    border: 1px solid rgba(105, 124, 190, 0.18);
    border-radius: 8px;
    background: rgba(7, 12, 32, 0.58);
  }

  .leader-table > div:not(.table-head) > *,
  .vip-table > div:not(.table-head) > *,
  .invite-table > div:not(.table-head) > * {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: #e4e9ff;
    text-align: right;
    word-break: break-word;
  }

  .leader-table > div:not(.table-head) > *::before,
  .vip-table > div:not(.table-head) > *::before,
  .invite-table > div:not(.table-head) > *::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
  }

  .leader-table > div:not(.table-head) > :first-child,
  .vip-table > div:not(.table-head) > :first-child,
  .invite-table > div:not(.table-head) > :first-child {
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(105, 124, 190, 0.14);
    color: var(--gold);
    font-size: 17px;
    font-weight: 900;
  }

  .leader-table .empty-row,
  .vip-table .empty-row,
  .invite-table .empty-row {
    display: block;
    padding: 18px;
    color: var(--muted);
    text-align: center;
  }

  .leader-table .empty-row span,
  .vip-table .empty-row span,
  .invite-table .empty-row span {
    display: none;
  }

  .leader-table .empty-row span:first-child,
  .vip-table .empty-row span:first-child,
  .invite-table .empty-row span:first-child {
    display: block;
    border: 0;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 14px;
  }

  .leader-table em,
  .vip-table em,
  .invite-table em {
    padding: 0;
    background: transparent;
  }

  .leader-table img {
    width: 26px;
    height: 26px;
  }

  .data-table em {
    justify-self: auto;
  }

  .podium {
    min-height: 150px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 4px 12px;
    align-items: center;
    padding: 14px 16px;
    text-align: left;
  }

  .podium.gold {
    min-height: 150px;
  }

  .podium .medal,
  .podium > img:not(.medal) {
    grid-row: span 2;
    width: 48px;
    height: 48px;
  }

  .podium b,
  .podium strong,
  .podium span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vip-layout,
  .help-category-grid {
    grid-template-columns: 1fr;
  }

  .invite-code {
    font-size: 22px;
  }

  .invite-actions,
  .help-search {
    grid-template-columns: 1fr;
  }

  .help-search button {
    height: 46px;
  }

  .floating-support {
    right: 12px;
    top: auto;
    bottom: 92px;
    width: 50px;
    height: 50px;
    transform: none;
  }

  .floating-support:hover {
    transform: translateX(-2px);
  }

  .floating-support img {
    width: 48px;
    height: 48px;
  }
}
