:root {
  color-scheme: dark;
  --bg: #030207;
  --surface: #0d0815;
  --surface-2: #151022;
  --surface-3: #211134;
  --text: #fffaff;
  --muted: rgba(255, 250, 255, .62);
  --faint: rgba(255, 250, 255, .38);
  --purple: #8f31ff;
  --violet: #c04dff;
  --gold: #ffc83d;
  --orange: #ff9300;
  --green: #45e6a1;
  --blue: #35a7ff;
  --red: #ff5078;
  --line: rgba(179, 72, 255, .25);
  --gold-line: rgba(255, 200, 61, .32);
  --radius: 8px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
body { overflow: hidden; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.app {
  position: relative;
  width: min(100vw, 430px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 4%, rgba(137, 42, 255, .18), transparent 31%),
    linear-gradient(180deg, #08040e 0%, #030207 58%, #010102 100%);
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.page {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: max(14px, env(safe-area-inset-top)) 14px calc(104px + env(safe-area-inset-bottom));
}
.page::-webkit-scrollbar { display: none; }
.page.no-nav { padding-bottom: max(24px, env(safe-area-inset-bottom)); }

.topbar {
  height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(174, 77, 255, .24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(29, 15, 53, .92), rgba(10, 6, 20, .94));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.24);
  cursor: pointer;
  touch-action: manipulation;
}
.icon-btn:active { transform: scale(.96); }
.icon-btn img { width: 30px; height: 30px; object-fit: contain; }
.icon-btn.back { font-size: 25px; line-height: 1; }
.notification-button { position: relative; overflow: visible; }
.notification-alert {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 5;
  width: 10px;
  height: 10px;
  border: 2px solid #12091f;
  border-radius: 50%;
  background: #ff334f;
  box-shadow: 0 0 0 rgba(255, 51, 79, .7);
  animation: notification-pulse 1.25s ease-out infinite;
  pointer-events: none;
}
@keyframes notification-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 51, 79, .72); }
  70% { box-shadow: 0 0 0 7px rgba(255, 51, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 51, 79, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .notification-alert { animation: none; }
}

.screen-name { min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 850; }
.screen-name img { width: 34px; height: 34px; flex: 0 0 auto; object-fit: cover; border: 1px solid rgba(255, 200, 61, .7); border-radius: 50%; box-shadow: 0 0 16px rgba(130, 38, 238, .48); }
.screen-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.balance-pill {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px 0 7px;
  border: 1px solid rgba(255, 200, 61, .38);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 193, 47, .18), rgba(103, 51, 0, .13));
  color: #ffe794;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance-pill img { width: 23px; height: 23px; object-fit: contain; }

.page-heading { margin: 4px 2px 16px; }
.page-heading.inline { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.page-heading h1 { margin: 0; font-size: 25px; line-height: 1.1; letter-spacing: 0; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.section { margin-top: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 9px; }
.section-head h2 { margin: 0; font-size: 15px; letter-spacing: 0; }
.section-head span, .section-head a { color: var(--muted); font-size: 10px; }

.panel {
  display: block;
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(24, 13, 42, .93), rgba(9, 6, 16, .96));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 14px 34px rgba(0,0,0,.26);
}
.panel.gold { border-color: var(--gold-line); }
.panel.blue { border-color: rgba(53, 167, 255, .45); }
.panel-pad { padding: 14px; }

.home-balance-card {
  min-height: 118px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background:
    radial-gradient(circle at 84% 42%, rgba(133,49,255,.24), transparent 34%),
    linear-gradient(150deg, rgba(27,14,48,.96), rgba(8,5,16,.98));
}
.home-balance-main { min-width: 0; }
.home-balance-main > span {
  display: block;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  font-weight: 650;
}
.home-balance-value {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  color: #ffc83d;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.home-balance-value .mc-coin-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: contain;
}
.home-wallet-action {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px;
}
.home-wallet-action img {
  width: 64px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 8px 15px rgba(148,51,255,.42));
}
.home-wallet-action span {
  min-width: 90px;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(255,226,130,.52);
  border-radius: 999px;
  color: #291300;
  background: linear-gradient(180deg,#fff2a9,#ffc83d 58%,#ff9800);
  box-shadow: 0 7px 16px rgba(255,151,0,.2), inset 0 1px rgba(255,255,255,.7);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .04em;
}
.home-wallet-action b { font-size: 13px; line-height: 1; }

.segmented {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 5, 14, .88);
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segment {
  min-width: max-content;
  height: 36px;
  flex: 1 0 auto;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.segment.active { color: #fff; background: linear-gradient(180deg, rgba(151, 49, 255, .55), rgba(94, 27, 174, .5)); box-shadow: inset 0 1px rgba(255,255,255,.1); }

.task-list, .list { display: grid; gap: 8px; }
.task-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 8, 24, .88);
}
.task-row.offer { border-color: rgba(53, 167, 255, .44); background: linear-gradient(145deg, rgba(15, 34, 58, .84), rgba(10, 8, 23, .94)); }
.task-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: rgba(132, 44, 255, .12); }
.task-icon img { width: 42px; height: 42px; object-fit: contain; }
.task-copy { min-width: 0; }
.task-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.task-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.task-copy span.reward { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-size: 11px; }

.reward { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-size: 11px; font-weight: 900; white-space: nowrap; }
.reward img { width: 18px; height: 18px; object-fit: contain; }
.status { min-width: 68px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--gold-line); border-radius: 7px; background: rgba(255, 190, 45, .1); color: var(--gold); font-size: 10px; font-weight: 900; cursor: pointer; }
.status.primary { border: 0; color: #1e0d00; background: linear-gradient(180deg, #ffe783, #ffad18); }
.status.done { border-color: rgba(69, 230, 161, .28); color: var(--green); background: rgba(69, 230, 161, .08); }
.status.pending { border-color: rgba(53,167,255,.3); color: #7bc8ff; background: rgba(53,167,255,.08); }
.status:disabled { opacity: .72; cursor: default; }

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 13, 43, .92);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn.primary { border: 0; color: #211000; background: linear-gradient(180deg, #fff1a0, #ffc83d 52%, #ff9300); box-shadow: 0 10px 24px rgba(255, 151, 0, .22); }
.btn.secondary { border-color: rgba(152, 51, 255, .42); background: rgba(116, 34, 211, .16); }
.btn.claim-success,
.btn.claim-success:disabled {
  opacity: 1;
  color: #052818;
  border-color: rgba(143,255,204,.82);
  background: linear-gradient(180deg,#9affcf,#39e58f 62%,#16b968);
  box-shadow: 0 0 20px rgba(57,229,143,.3);
}
.btn.blue { border-color: rgba(53,167,255,.5); background: rgba(53,167,255,.12); color: #a6dcff; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 10px; }
.btn:disabled { opacity: .48; cursor: default; }

.grid-2, .stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { min-height: 88px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 8, 24, .88); }
.stat img { width: 30px; height: 30px; object-fit: contain; margin-bottom: 8px; }
.stat span { display: block; color: var(--muted); font-size: 9px; }
.stat strong { display: block; margin-top: 3px; font-size: 16px; font-variant-numeric: tabular-nums; }

.hero-balance { display: grid; grid-template-columns: minmax(0, 1fr) 112px; align-items: center; min-height: 145px; padding: 18px; }
.hero-balance img { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 0 24px rgba(255, 183, 30, .2)); }
.hero-balance small { color: var(--muted); font-size: 10px; }
.hero-balance strong { display: block; margin-top: 6px; color: #ffe783; font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-balance span { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }

.progress { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.progress > i { display: block; height: 100%; width: var(--progress, 50%); border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--gold)); box-shadow: 0 0 12px rgba(153, 51, 255, .45); }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.03); font-size: 9px; font-weight: 800; white-space: nowrap; }
.badge.gold { border-color: var(--gold-line); color: #ffe28a; background: rgba(255, 190, 42, .09); }
.badge.green { border-color: rgba(69,230,161,.28); color: var(--green); background: rgba(69,230,161,.08); }
.badge.red { border-color: rgba(255,80,120,.28); color: #ff92aa; background: rgba(255,80,120,.08); }

.form { display: grid; gap: 12px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.input-wrap { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(4,3,8,.82); }
.input-wrap:focus-within { border-color: rgba(180, 72, 255, .58); box-shadow: 0 0 0 3px rgba(151, 49, 255, .1); }
.input-wrap img { width: 23px; height: 23px; object-fit: contain; }
.input-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.input-wrap output { color: var(--gold); font-size: 12px; font-weight: 900; }
input[type="range"] { width: 100%; accent-color: var(--gold); }

.notice { padding: 11px 12px; border-left: 3px solid var(--blue); border-radius: 4px; background: rgba(53, 167, 255, .08); color: #b8ddf8; font-size: 10px; line-height: 1.5; }
.notice.gold { border-left-color: var(--gold); background: rgba(255,200,61,.08); color: #ffe9a7; }

.timeline { display: grid; gap: 11px; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.step-index { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: rgba(139, 43, 255, .09); font-size: 11px; font-weight: 900; }
.step.complete .step-index { border-color: rgba(69,230,161,.35); color: #062417; background: var(--green); }
.step.active .step-index { border-color: var(--gold-line); color: #2c1500; background: var(--gold); box-shadow: 0 0 16px rgba(255,200,61,.24); }
.step-copy strong { display: block; font-size: 12px; }
.step-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.countdown-ring {
  --timer-progress: 360deg;
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--timer-progress), rgba(151,49,255,.22) 0);
}
.countdown-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #10091b; }
.countdown-ring span { position: relative; z-index: 1; color: var(--gold); font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }

.transaction, .menu-row, .notification-row, .rank-row {
  min-height: 60px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.transaction:last-child, .menu-row:last-child, .notification-row:last-child, .rank-row:last-child { border-bottom: 0; }
.row-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: rgba(142, 45, 255, .12); }
.row-icon img { width: 32px; height: 32px; object-fit: contain; }
.row-copy { min-width: 0; }
.row-copy strong { display: block; font-size: 12px; }
.row-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-value { text-align: right; font-size: 11px; font-weight: 900; }
.row-value.positive { color: var(--green); }
.row-value.negative { color: #ff91a8; }

.referral-link { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; }
.link-box { min-width: 0; height: 44px; display: flex; align-items: center; padding: 0 11px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(4,3,8,.8); color: #d9c6ed; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }

.podium { min-height: 214px; display: grid; grid-template-columns: 1fr 1.08fr 1fr; align-items: end; gap: 6px; padding: 12px 10px 0; }
.podium-user { text-align: center; }
.podium-user.first { align-self: start; padding-top: 4px; }
.podium-user img { width: 58px; height: 58px; margin: 0 auto 7px; object-fit: cover; border: 2px solid var(--purple); border-radius: 50%; }
.podium-user.first img { width: 72px; height: 72px; border-color: var(--gold); box-shadow: 0 0 20px rgba(255,200,61,.28); }
.podium-user strong { display: block; font-size: 11px; }
.podium-user span { display: block; margin-top: 3px; color: var(--gold); font-size: 9px; font-weight: 800; }
.podium-user .benchmark-label {
  display: inline-flex;
  width: max-content;
  margin: 3px auto 0;
  padding: 2px 5px;
  border: 1px solid rgba(192,77,255,.34);
  border-radius: 999px;
  color: #d5b4ff;
  background: rgba(143,49,255,.12);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .06em;
}
.podium-block { height: var(--height, 62px); display: grid; place-items: start center; margin-top: 8px; padding-top: 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, rgba(136,42,238,.34), rgba(41,15,72,.25)); color: rgba(255,255,255,.7); font-size: 20px; font-weight: 900; }
.first .podium-block { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(255,194,38,.28), rgba(96,45,0,.2)); }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.day { min-width: 0; min-height: 82px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 7px; background: rgba(15,9,25,.86); color: var(--muted); font-size: 8px; text-align: center; }
.day img { width: 29px; height: 29px; object-fit: contain; }
.day strong { color: #fff; font-size: 9px; }
.day.active { border-color: var(--gold-line); background: rgba(255,188,36,.1); box-shadow: 0 0 18px rgba(255,188,36,.13); }
.day.complete {
  border-color: rgba(143,255,204,.82);
  background: linear-gradient(180deg,#79ffc0,#27d980 68%,#13a95f);
  color: #052818;
  box-shadow: 0 0 16px rgba(39,217,128,.28);
}
.day.complete strong { color: #052818; }
.day.locked { opacity: .45; filter: grayscale(.45); }

.achievement { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14,8,24,.88); }
.achievement > img { width: 52px; height: 52px; object-fit: contain; }
.achievement h3 { margin: 0 0 4px; font-size: 12px; }
.achievement p { margin: 0 0 8px; color: var(--muted); font-size: 9px; }

.profile-hero { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px; }
.profile-hero .avatar { width: 82px; height: 82px; object-fit: cover; border: 2px solid var(--gold); border-radius: 50%; box-shadow: 0 0 22px rgba(135,43,255,.35); }
.profile-hero h1 { margin: 0; font-size: 20px; }
.profile-hero p { margin: 4px 0 10px; color: var(--muted); font-size: 10px; }

details.faq { border-bottom: 1px solid rgba(255,255,255,.07); }
details.faq:last-child { border-bottom: 0; }
details.faq summary { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; list-style: none; cursor: pointer; font-size: 11px; font-weight: 800; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--gold); font-size: 18px; }
details.faq[open] summary::after { content: "-"; }
details.faq p { margin: 0; padding: 0 12px 12px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.notification-row.unread { background: linear-gradient(90deg, rgba(143,49,255,.13), transparent 76%); }
.notification-row { border-top: 0; border-left: 0; border-right: 0; background-color: transparent; color: inherit; text-align: left; cursor: pointer; }
.notification-row time { color: var(--faint); font-size: 8px; white-space: nowrap; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(255,200,61,.75); }

.about-lockup { display: grid; justify-items: center; padding: 22px 16px; text-align: center; }
.about-lockup img { width: 128px; height: 128px; object-fit: cover; border: 1px solid var(--gold-line); border-radius: 50%; box-shadow: 0 0 30px rgba(143,49,255,.28); }
.about-lockup h2 { margin: 13px 0 4px; font-size: 21px; }
.about-lockup p { margin: 0; color: var(--muted); font-size: 9px; }

.support-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.support-action { min-height: 104px; display: grid; align-content: center; justify-items: start; gap: 6px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14,8,24,.88); cursor: pointer; }
.support-action img { width: 36px; height: 36px; object-fit: contain; }
.support-action strong { font-size: 11px; }
.support-action span { color: var(--muted); font-size: 8px; line-height: 1.4; }

.legal-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.legal-links a { min-height: 42px; display: grid; place-items: center; background: #0c0713; color: var(--muted); font-size: 9px; font-weight: 800; }

.modal-backdrop { position: absolute; z-index: 40; inset: 0; display: none; align-items: end; padding: 14px; background: rgba(0,0,0,.68); backdrop-filter: blur(5px); }
.modal-backdrop.open { display: flex; }
.spin-result-backdrop {
  position: fixed;
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.spin-result-backdrop .modal {
  width: min(100%, 340px);
  padding: 24px 20px 18px;
  border-radius: 24px;
  background: linear-gradient(160deg, #21103d, #0d0719 72%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .72), 0 0 40px rgba(135, 56, 255, .24);
}
.reward-verification-overlay {
  position: fixed;
  z-index: 9500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 1, 8, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.reward-verification-card {
  width: min(100%, 330px);
  padding: 26px 20px 22px;
  border: 1px solid rgba(255, 200, 61, .32);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(34, 16, 60, .98), rgba(10, 5, 19, .99));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .75), 0 0 44px rgba(132, 47, 255, .24);
  text-align: center;
}
.reward-verification-card strong { display: block; margin-top: 14px; font-size: 19px; }
.reward-verification-card span { display: block; margin-top: 7px; color: #ffc83d; font-size: 13px; font-weight: 850; }
.reward-verification-card p { margin: 9px 0 0; color: rgba(255,255,255,.62); font-size: 11px; line-height: 1.55; }
.reward-verification-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 4px solid rgba(255,255,255,.12);
  border-top-color: #ffc83d;
  border-right-color: #973cff;
  border-radius: 50%;
  animation: rewardVerifySpin .8s linear infinite;
}
@keyframes rewardVerifySpin { to { transform: rotate(360deg); } }

/* Admin-configured crypto withdrawal cards */
.withdraw-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.withdraw-method-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(151, 49, 255, .28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 15% 15%, rgba(160, 55, 255, .17), transparent 42%),
    linear-gradient(145deg, rgba(20, 10, 39, .96), rgba(8, 5, 16, .98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 10px 28px rgba(0,0,0,.2);
}
.withdraw-method-image {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 205, 80, .18);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.withdraw-method-image img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.withdraw-method-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}
.withdraw-method-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.withdraw-method-copy em { color: #ba7fff; font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.withdraw-method-copy small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.withdraw-method-arrow { color: var(--gold); font-size: 23px; }
.withdraw-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.withdraw-choice {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: #fff;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 9, 30, .9);
  cursor: pointer;
}
.withdraw-choice.selected {
  border-color: rgba(255, 202, 66, .65);
  background: linear-gradient(145deg, rgba(255, 198, 53, .12), rgba(119, 31, 255, .11));
  box-shadow: 0 0 22px rgba(154, 48, 255, .14);
}
.withdraw-choice img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.withdraw-choice span { min-width: 0; display: grid; }
.withdraw-choice strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.withdraw-choice small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.withdraw-selected-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.withdraw-selected-card > div { min-width: 0; }
.withdraw-selected-card strong { display: block; font-size: 15px; }
.withdraw-selected-card span:not(.badge):not(.withdraw-method-image) { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.withdraw-calculation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 2px 3px;
  color: var(--muted);
  font-size: 10px;
}
.withdraw-calculation strong { color: var(--gold); font-size: 15px; }
.empty-state { padding: 22px; color: var(--muted); font-size: 11px; line-height: 1.55; text-align: center; }

@media (max-width: 520px) {
  .withdraw-method-grid { grid-template-columns: 1fr; }
  .withdraw-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.modal { width: 100%; padding: 16px; border: 1px solid var(--gold-line); border-radius: 8px; background: #10091b; box-shadow: 0 -20px 50px rgba(0,0,0,.5); }
.modal h2 { margin: 0; font-size: 18px; }
.modal p { margin: 7px 0 16px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.toast { position: absolute; z-index: 60; left: 50%; top: 74px; max-width: calc(100% - 32px); padding: 10px 14px; border: 1px solid var(--gold-line); border-radius: 999px; background: rgba(17,9,29,.96); box-shadow: 0 14px 30px rgba(0,0,0,.45); color: #fff2bd; font-size: 11px; font-weight: 850; transform: translate(-50%, -18px); opacity: 0; pointer-events: none; transition: .22s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.bottom-nav { position: absolute; z-index: 20; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); height: 72px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; border: 1px solid rgba(179,72,255,.25); border-radius: 18px; background: rgba(7,4,13,.92); box-shadow: inset 0 1px rgba(255,255,255,.07), 0 -14px 35px rgba(0,0,0,.4); backdrop-filter: blur(18px); }
.nav-item { min-width: 0; min-height: 54px; display: grid; place-items: center; gap: 3px; color: rgba(255,255,255,.42); font-size: 9px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.nav-item img { width: 25px; height: 25px; object-fit: contain; opacity: .56; }
.nav-item.active { color: var(--gold); }
.nav-item.active img { opacity: 1; filter: drop-shadow(0 0 12px rgba(151,51,255,.85)); }

.splash { width: 100%; height: 100dvh; display: grid; place-items: center; overflow: hidden; background: #000; text-align: center; }
.splash-content { display: grid; place-items: center; }
.splash-logo { width: min(62vw, 250px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold), 0 0 54px rgba(137, 42, 255, .52); animation: splashPulse 1.8s ease-in-out infinite; }
.splash h1 { margin: 24px 0 4px; font-size: 31px; }
.splash p { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: 0; }
.loading-dots { display: flex; gap: 7px; margin-top: 26px; }
.loading-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: dotPulse 1s ease-in-out infinite; }
.loading-dots i:nth-child(2) { animation-delay: .16s; }
.loading-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes splashPulse { 50% { transform: scale(1.025); box-shadow: 0 0 0 5px rgba(255,200,61,.55), 0 0 70px rgba(137,42,255,.65); } }
@keyframes dotPulse { 50% { opacity: .25; transform: translateY(-3px); } }

.onboarding { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.onboarding-top { display: flex; justify-content: flex-end; padding: max(16px, env(safe-area-inset-top)) 16px 0; }
.skip { border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.slides { position: relative; min-height: 0; }
.slide { position: absolute; inset: 0; display: none; align-content: center; justify-items: center; padding: 20px 30px; text-align: center; }
.slide.active { display: grid; }
.slide img { width: min(68vw, 280px); height: 250px; object-fit: contain; filter: drop-shadow(0 0 32px rgba(137,42,255,.32)); }
.slide h1 { margin: 18px 0 8px; font-size: 27px; }
.slide p { max-width: 310px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.onboarding-bottom { padding: 0 16px max(18px, env(safe-area-inset-bottom)); }
.dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 16px; }
.dots i { width: 7px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.2); transition: .2s; }
.dots i.active { width: 22px; background: var(--gold); }

@media (max-width: 350px) {
  .screen-name span { display: none; }
  .balance-pill { font-size: 11px; }
  .page-heading h1 { font-size: 22px; }
  .hero-balance { grid-template-columns: minmax(0, 1fr) 92px; }
  .hero-balance img { width: 90px; height: 90px; }
  .home-balance-card { min-height: 104px; grid-template-columns: minmax(0,1fr) 94px; gap: 8px; padding: 11px 10px 11px 12px; }
  .home-balance-value { font-size: 25px; }
  .home-balance-value .mc-coin-icon { width: 46px; height: 46px; flex-basis: 46px; }
  .home-wallet-action { min-height: 82px; }
  .home-wallet-action img { width: 52px; height: 44px; }
  .home-wallet-action span { min-width: 78px; min-height: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── SPA-specific additions ─────────────────────────────────── */

/* Page transition */
#me-app { transition: opacity .18s ease; }

/* Topbar (SPA version) */
.topbar {
  height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}
.screen-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 850;
}
.screen-name img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 200, 61, .7);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 16px rgba(130, 38, 238, .48);
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(174, 77, 255, .24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(29, 15, 53, .92), rgba(10, 6, 20, .94));
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 8px 22px rgba(0, 0, 0, .24);
  cursor: pointer;
  touch-action: manipulation;
  font-size: 18px;
}
.icon-btn:active { transform: scale(.96); }
.icon-btn img { width: 31px; height: 31px; object-fit: contain; }
.icon-btn.back { font-size: 20px; font-weight: 900; color: var(--text); }
.balance-pill {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px 0 7px;
  border: 1px solid rgba(255, 200, 61, .38);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 193, 47, .18), rgba(103, 51, 0, .13));
  color: #ffe794;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance-pill img { width: 23px; height: 23px; object-fit: contain; }

.mc-coin-icon {
  object-fit: cover !important;
  object-position: 50% 50%;
  border-radius: 50%;
  filter: drop-shadow(0 0 9px rgba(255,190,36,.32));
}

/* Bottom nav (SPA version) */
.bottom-nav {
  position: absolute;
  z-index: 20;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  height: 72px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0 6px;
  border: 1px solid rgba(179, 72, 255, .25);
  border-radius: 18px;
  background: rgba(7, 4, 13, .92);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 -14px 35px rgba(0, 0, 0, .4);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-item {
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: rgba(255, 255, 255, .42);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}
.nav-item img { width: 25px; height: 25px; object-fit: contain; opacity: .56; }
.nav-item.active { color: var(--gold); }
.nav-item.active img { opacity: 1; filter: drop-shadow(0 0 14px rgba(179, 55, 255, .84)); }

/* Hero card (home) */
.hero {
  position: relative;
  min-height: 238px;
  padding: 20px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 42%, rgba(255, 200, 61, .24), transparent 34%),
    linear-gradient(135deg, rgba(123, 44, 255, .36), rgba(9, 5, 21, .96) 58%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 26px 56px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .10);
  cursor: pointer;
  transition: transform .15s ease;
}
.hero:active { transform: scale(.99); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .45;
  pointer-events: none;
}

/* Task rows (SPA earn screen) */
.task-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(25, 17, 51, .90), rgba(10, 7, 23, .95));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.task-row.offer { border-color: rgba(255, 200, 61, .22); }
.task-icon { display: grid; place-items: center; }
.task-icon img { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; }
.task-copy strong { display: block; font-size: 13px; margin-bottom: 4px; }
.task-copy .reward { display: flex; align-items: center; gap: 4px; color: var(--gold); font-size: 12px; font-weight: 700; }
.task-copy .reward img { width: 16px; height: 16px; }
.status { min-height: 36px; padding: 0 13px; border: 0; border-radius: 10px; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.status.primary { background: linear-gradient(135deg, #7b2cff, #d33dff); color: #fff; }
.status.pending { background: rgba(255, 200, 61, .15); color: var(--gold); border: 1px solid rgba(255, 200, 61, .3); }
.status.done { background: rgba(69, 230, 161, .12); color: #4de6a1; border: 1px solid rgba(69, 230, 161, .28); }
.status:disabled { opacity: .7; cursor: default; }

/* Segmented filters (SPA earn screen) */
.segmented {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 10px;
}
.segmented::-webkit-scrollbar { display: none; }
.segment {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid rgba(179, 72, 255, .22);
  border-radius: 999px;
  background: rgba(15, 9, 30, .88);
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: .15s;
}
.segment.active {
  background: linear-gradient(135deg, #7b2cff, #d33dff);
  border-color: transparent;
  color: #fff;
}

/* Referral link */
.referral-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.link-box {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 9, 30, .88);
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Notification rows */
.notification-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: none;
}
.notification-row:last-child { border-bottom: 0; }
.notification-row.unread { background: rgba(123, 44, 255, .07); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* AdsGram Task placements occupy no space until the SDK has inventory. */
.native-ad-slot[hidden] { display: none !important; }
.native-ad-slot {
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 61, .2);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(36, 16, 62, .96), rgba(8, 5, 18, .98));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
}
.adsgram-native-task {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 12px;
  color: #fff;
}
.native-task-reward {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #211000;
  background: linear-gradient(180deg, #fff1a8, #ffc83d 62%, #ff9300);
  font-size: 12px;
  font-weight: 900;
}
.notification-row time { color: var(--muted); font-size: 10px; }

/* FAQ accordions */
.faq summary {
  padding: 13px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.faq[open] summary { color: var(--gold); }
.faq p { padding: 10px 14px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }

/* Support actions */
.support-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.support-action {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 9, 30, .88);
  cursor: pointer;
  text-align: center;
}
.support-action img { width: 38px; height: 38px; object-fit: contain; }
.support-action strong { font-size: 12px; }
.support-action span { color: var(--muted); font-size: 10px; line-height: 1.3; }

/* About lockup */
.about-lockup { display: grid; place-items: center; gap: 8px; padding: 24px; text-align: center; }
.about-lockup img { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--gold-line); }
.about-lockup h2 { margin: 0; font-size: 20px; }
.about-lockup p { margin: 0; color: var(--muted); font-size: 11px; }

/* Legal links */
.legal-links { display: flex; justify-content: center; gap: 16px; }
.legal-links a { color: var(--blue); font-size: 11px; font-weight: 700; }

/* Menu open/close */
.modal-backdrop.open { display: flex; }
/* Spin ticket economy */
.spin-ticket-card,
.buy-ticket-card {
  margin-top: 12px;
  border: 1px solid rgba(133, 78, 255, .32);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(21, 13, 55, .97), rgba(7, 5, 25, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 16px 32px rgba(0, 0, 0, .26);
}
.spin-ticket-card {
  min-height: 110px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 12px;
  overflow: hidden;
}
.spin-ticket-card > img {
  width: 105px;
  height: 94px;
  margin-left: -8px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(117, 62, 255, .5));
}
.spin-ticket-copy { min-width: 0; }
.spin-ticket-copy > span {
  display: block;
  color: #9f8acf;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
}
.spin-ticket-copy strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.1;
}
.spin-ticket-copy strong b { color: #cbb5ff; font-size: 26px; }
.spin-ticket-copy small,
.buy-ticket-card > small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, .52);
  font-size: 9px;
  line-height: 1.45;
}
.buy-ticket-card { padding: 15px; }
.buy-ticket-heading { display: flex; align-items: center; gap: 10px; }
.buy-ticket-heading img { width: 44px; height: 44px; object-fit: contain; }
.buy-ticket-heading strong { display: block; font-size: 15px; }
.buy-ticket-heading span { display: block; margin-top: 3px; color: rgba(255,255,255,.52); font-size: 10px; }
.buy-ticket-rate {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 7px;
  margin: 13px 0 10px;
  padding: 10px;
  border: 1px solid rgba(255, 200, 61, .22);
  border-radius: 13px;
  background: rgba(255, 184, 0, .07);
}
.buy-ticket-rate strong { color: #ffc83d; font-size: 19px; }
.buy-ticket-rate span { color: rgba(255,255,255,.72); font-size: 11px; font-weight: 750; }
