:root {
  --bg: #0e0c14;
  --card: #1a1822;
  --card-2: #26232f;
  --line: #2f2f33;
  --text: #ffffff;
  --muted: #8e8e93;
  --orange: #f26b1d;
  --orange-2: #ff8a3d;
  --purple: #8b5cf6;
  --purple-2: #a77bff;
  --blue: #0a84ff;
  --green: #34c759;
  --red: #ff453a;
  --gem: #4da3ff;
  --radius: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; background: transparent; color: var(--text); }
body::before, body::after {
  content: ""; position: fixed; z-index: -1; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: .22; pointer-events: none;
}
body::before { background: #f26b1d; top: -35vmax; left: -25vmax; animation: aurora1 18s ease-in-out infinite alternate; }
body::after { background: #7c4dff; bottom: -40vmax; right: -30vmax; animation: aurora2 22s ease-in-out infinite alternate; }
@keyframes aurora1 { to { transform: translate(18vmax, 12vmax) scale(1.15) } }
@keyframes aurora2 { to { transform: translate(-16vmax, -14vmax) scale(1.1) } }
body {
  font: 16px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input { font: inherit; color: var(--text); }
svg { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 22px; background: radial-gradient(circle at 50% 40%, #2a1608 0, var(--bg) 60%);
  transition: opacity .5s ease, visibility .5s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-logo { position: relative; width: 120px; height: 120px; animation: float 2.4s ease-in-out infinite; }
.loader-logo::before {
  content: ""; position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,107,29,.45), transparent 65%); animation: pulse 2.4s ease-in-out infinite;
}
.loader-logo svg { position: relative; width: 100%; height: 100%; }
.loader-logo .lid { transform-origin: 60px 52px; animation: lid 2.4s ease-in-out infinite; }
.loader-title { font-size: 30px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(90deg, #fff 0%, var(--orange-2) 40%, #fff 60%, #fff 100%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2s linear infinite; }
.loader-bar { width: 160px; height: 5px; border-radius: 5px; background: var(--card-2); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--purple)); transition: width .35s ease; }
.loader-note { color: var(--muted); font-size: 14px; min-height: 18px; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
@keyframes pulse { 0%,100% { opacity: .6; transform: scale(.9) } 50% { opacity: 1; transform: scale(1.05) } }
@keyframes lid { 0%,60%,100% { transform: translateY(0) rotate(0) } 70% { transform: translateY(-8px) rotate(-6deg) } 80% { transform: translateY(-2px) rotate(3deg) } }
@keyframes shine { to { background-position: -200% 0 } }

/* ---------- layout ---------- */
#app { padding: 12px 16px calc(150px + var(--safe-bottom)); max-width: 520px; margin: 0 auto; }
.screen { animation: screenIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
.rise { opacity: 0; animation: rise .5s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98) } to { opacity: 1; transform: none } }

.top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cal-btn { position: relative; width: 50px; height: 50px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--purple-2), #6d3bea); box-shadow: 0 6px 24px rgba(139,92,246,.45); }
.cal-btn .ico { width: 26px; height: 26px; }
.cal-btn .dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--bg); }
.cal-btn .dot.off { background: var(--muted); }
.cal-btn.ready { animation: wiggle 3s ease-in-out infinite; }
@keyframes wiggle { 0%,85%,100% { transform: rotate(0) } 88% { transform: rotate(-10deg) } 92% { transform: rotate(10deg) } 96% { transform: rotate(-5deg) } }
.me { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; display: grid; place-items: center;
  font-weight: 700; font-size: 20px; color: #fff; background: linear-gradient(160deg, #d58cf0, #9b59d0); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-name { font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-user { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 20px;
  background: var(--card); font-weight: 700; font-size: 17px; flex: none; }
.pill.tickets { background: linear-gradient(160deg, #e2560f, #b7400a); }
.pill .ico { width: 20px; height: 20px; }
.bump { animation: bump .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.18) } }

.fund { position: relative; overflow: hidden; border-radius: 26px; padding: 22px 22px 18px; min-height: 148px;
  background: linear-gradient(120deg, #f78a2c 0%, #ef6418 55%, #e2560f 100%); }
.fund-label { font-weight: 700; font-size: 18px; color: rgba(255,255,255,.75); }
.fund-value { display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; font-size: 40px; font-weight: 800; letter-spacing: 1px; }
.fund-value .ico { width: 28px; height: 28px; opacity: .85; }
.fund-rules { font-weight: 700; color: rgba(255,255,255,.75); font-size: 17px; }
.fund-coin { position: absolute; right: -18px; top: 14px; width: 170px; height: 170px; animation: coin 6s ease-in-out infinite; }
@keyframes coin { 0%,100% { transform: rotate(-8deg) translateY(0) } 50% { transform: rotate(4deg) translateY(-6px) } }
.fund::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%);
  transform: translateX(-100%); animation: sweep 5s ease-in-out infinite; pointer-events: none; }
@keyframes sweep { 0%,70% { transform: translateX(-100%) } 100% { transform: translateX(100%) } }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.btn { height: 56px; border-radius: 28px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 18px; transition: transform .12s ease, filter .2s, opacity .2s; user-select: none; }
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ico { width: 24px; height: 24px; }
.btn-blue { background: var(--blue); }
.btn-purple { background: linear-gradient(160deg, var(--purple-2), #7c4dff); }
.btn-orange { background: linear-gradient(160deg, var(--orange-2), var(--orange)); box-shadow: 0 8px 30px rgba(242,107,29,.35); }
.btn-green { background: var(--green); }
.btn-grey { background: var(--card-2); }
.btn-wide { width: 100%; }
.btn-sm { height: 42px; font-size: 17px; border-radius: 21px; }

.card { background: var(--card); border-radius: var(--radius); }
.feed { padding: 6px 16px; }
.feed-row { display: flex; align-items: center; gap: 14px; height: 68px; }
.feed-row.new { animation: feedIn .6s cubic-bezier(.2,.8,.2,1); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-20px); max-height: 0 } to { opacity: 1; transform: none; max-height: 68px } }
.feed-row .avatar { width: 44px; height: 44px; font-size: 18px; }
.feed-name { flex: 1; font-size: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plus { display: flex; align-items: center; gap: 6px; color: var(--orange-2); font-weight: 700; font-size: 18px; }
.plus .ico { width: 24px; height: 24px; }
.empty { padding: 22px 6px; text-align: center; color: var(--muted); }

h2 { font-size: 26px; font-weight: 800; margin: 28px 4px 14px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.gw { padding: 10px 10px 12px; border-radius: 24px; background: var(--card); display: flex; flex-direction: column; }
.gw-img { position: relative; aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #2b2b2f, #19191b); }
.gw-img.green { background: radial-gradient(circle at 50% 45%, #61c19c, #3d9c7a); }
.gw-img img { width: 100%; height: 100%; object-fit: cover; }
.gw-emoji { font-size: 74px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)); animation: bob 3.2s ease-in-out infinite; }
.gw:nth-child(2n) .gw-emoji { animation-delay: -1.6s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-6px) rotate(3deg) } }
.gw-badge { position: absolute; top: 9px; left: 9px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--purple-2), #7c4dff); }
.gw-badge .ico { width: 18px; height: 18px; }
.gw-title { font-weight: 800; font-size: 18px; margin: 12px 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-time { display: flex; align-items: center; gap: 6px; color: var(--muted); margin: 0 6px; font-size: 15px; font-variant-numeric: tabular-nums; }
.gw-time .ico { width: 16px; height: 16px; }
.gw-count { color: var(--muted); margin: 4px 6px 12px; font-size: 15px; }
.gw-count b { color: var(--text); font-weight: 600; }
.gw .btn { margin-top: auto; }
.gw-mine { text-align: center; color: var(--green); font-size: 13px; margin-top: 6px; font-weight: 600; }

/* ---------- nav + ticker ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: calc(14px + var(--safe-bottom)); z-index: 20; display: flex;
  flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.ticker { pointer-events: auto; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: 22px;
  background: rgba(30,30,32,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-weight: 700; white-space: nowrap; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.ticker.swap { animation: tick .5s cubic-bezier(.2,.8,.2,1); }
@keyframes tick { from { opacity: 0; transform: translateY(10px) scale(.95) } to { opacity: 1; transform: none } }
.ticker .stars { color: var(--muted); letter-spacing: 1px; }
.ticker .ico { width: 20px; height: 20px; }
.nav { pointer-events: auto; display: flex; gap: 6px; padding: 6px; border-radius: 40px;
  background: linear-gradient(90deg, rgba(36,44,40,.85), rgba(32,40,58,.85)); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.nav button { width: 128px; height: 64px; border-radius: 32px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: var(--muted); font-weight: 700; font-size: 15px; transition: background .25s, color .25s; }
.nav button .ico { width: 26px; height: 26px; }
.nav button.on { color: var(--orange-2); background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.nav.hidden-nav { display: none; }

/* ---------- sub pages ---------- */
.bar { display: flex; align-items: center; gap: 14px; min-height: 52px; margin-bottom: 18px; }
.bar h1 { flex: 1; margin: 0; font-size: 30px; font-weight: 800; }
.back { width: 40px; height: 40px; display: grid; place-items: center; margin-left: -8px; }
.back .ico { width: 26px; height: 26px; }
.big-title { font-size: 40px; font-weight: 800; margin: 6px 0 22px; }

.wheel-wrap { position: relative; width: min(92vw, 420px); aspect-ratio: 1; margin: 10px auto 30px; }
/* Safari does not stretch an absolutely placed svg between its insets: explicit sizes keep it centred */
.wheel-wrap .lights { position: absolute; top: -6%; left: -6%; width: 112%; height: 112%; }
.wheel-wrap .lights circle { animation: blink 1.2s steps(1) infinite; }
.wheel-wrap .lights circle:nth-child(2n) { animation-delay: -.6s; }
@keyframes blink { 0% { fill: #f5b13d } 50% { fill: #5a4d40 } }
.wheel-wrap.spinning .lights circle { animation-duration: .25s; }
/* the rim and glow are drawn in SVG: iOS clips a rotating element with border-radius/box-shadow to a square */
.wheel { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: visible; transition: transform 5s cubic-bezier(.12,.75,.12,1); }
.wheel-wrap .wheel-rim { position: absolute; top: -6%; left: -6%; width: 112%; height: 112%; filter: drop-shadow(0 0 18px rgba(242,107,29,.45)); }
.wheel-pointer { position: absolute; left: 50%; top: -4%; width: 44px; height: 44px; transform: translateX(-50%); z-index: 2;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.wheel-pointer.kick { animation: kick .15s ease-in-out; }
@keyframes kick { 50% { transform: translateX(-50%) rotate(-14deg) } }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle, #3a2414, #120c08); box-shadow: 0 0 0 4px var(--orange), 0 0 30px rgba(0,0,0,.6); z-index: 1; }
.stick-bottom { position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--safe-bottom)); max-width: 488px; margin: 0 auto; z-index: 21; }
.with-stick .dock { bottom: calc(86px + var(--safe-bottom)); }

.field { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 62px; border-radius: var(--radius); background: var(--card); margin-bottom: 14px; }
.field input { flex: 1; background: none; border: 0; outline: none; font-size: 18px; min-width: 0; }
.field .ico { width: 24px; height: 24px; opacity: .6; }
.amount-card { padding: 22px; border-radius: var(--radius); background: var(--card); margin-bottom: 14px; }
.amount-row { display: flex; align-items: center; gap: 12px; }
.amount-row .ico { width: 40px; height: 40px; }
.amount-row input { flex: 1; background: none; border: 0; outline: none; font-size: 44px; font-weight: 800; min-width: 0; width: 100%; }
.amount-sub { color: var(--muted); margin: 8px 0 0; font-size: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 22px; background: var(--card-2); font-weight: 700; font-size: 17px; margin-top: 14px; }
.chip .ico { width: 22px; height: 22px; }
.ex-label { color: var(--muted); font-weight: 600; font-size: 17px; margin-bottom: 10px; }
.ex-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ex-row .chip { margin-top: 0; }
.alert { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--card); font-weight: 600; margin-bottom: 14px; animation: rise .4s; }
.alert .x { width: 26px; height: 26px; border-radius: 50%; background: var(--red); display: grid; place-items: center; flex: none; font-weight: 800; }

.balance { padding: 22px; }
.balance-label { color: var(--muted); font-size: 16px; }
.balance-value { display: flex; align-items: baseline; gap: 12px; margin: 12px 0 14px; }
.balance-value .num { font-size: 50px; font-weight: 800; }
.balance-value .ico { width: 42px; height: 42px; align-self: center; }
.usd { color: var(--muted); font-size: 22px; font-weight: 600; }
.pending { display: flex; align-items: center; gap: 12px; padding: 20px 22px; }
.pending + .pending { margin-top: 10px; }
.pending .num { font-size: 30px; font-weight: 800; }
.pending .usd { font-size: 18px; }
.pending .ico { width: 36px; height: 36px; }
.pending .pos { margin-left: auto; font-weight: 800; font-size: 22px; }
.inv-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.inv-row .avatar { width: 50px; height: 50px; }
.inv-row .feed-name { font-size: 17px; }
.wait { color: var(--muted); font-size: 14px; font-weight: 600; }

/* ---------- sheets & modals ---------- */
.veil { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .3s; display: flex; align-items: flex-end; justify-content: center; }
.veil.center { align-items: center; padding: 16px; }
.veil.open { opacity: 1; }
.sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; background: #1c1c1e; border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(24px + var(--safe-bottom)); transform: translateY(100%); transition: transform .38s cubic-bezier(.2,.9,.25,1); }
.veil.open .sheet { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #48484a; margin: 0 auto 16px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-head b { font-size: 20px; }
.link { color: var(--blue); font-weight: 600; font-size: 18px; }
.modal { width: 100%; max-width: 440px; background: #1c1c1e; border-radius: 30px; padding: 26px 22px 22px; text-align: center; position: relative;
  transform: scale(.85); opacity: 0; transition: transform .35s cubic-bezier(.3,1.4,.5,1), opacity .25s; }
.veil.open .modal { transform: none; opacity: 1; }
.modal-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; }
.modal-x .ico { width: 18px; height: 18px; }
.modal h3 { font-size: 26px; margin: 16px 0 18px; font-weight: 800; }
.modal-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: linear-gradient(160deg, var(--purple-2), #6d3bea); }
.modal-icon .ico { width: 32px; height: 32px; }
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.day { aspect-ratio: .68; border-radius: 16px; background: var(--card-2); display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  color: var(--muted); font-weight: 700; opacity: .55; }
.day .ico { width: 28px; height: 28px; }
.day b { color: var(--text); font-size: 20px; }
.day.on { opacity: 1; background: #2a2340; box-shadow: inset 0 0 0 3px var(--purple-2); color: var(--purple-2); animation: glow 1.8s ease-in-out infinite; }
.day.taken { opacity: .9; }
@keyframes glow { 50% { box-shadow: inset 0 0 0 3px var(--purple-2), 0 0 22px rgba(167,123,255,.55) } }
.modal p { color: var(--muted); margin: 16px 0; }
.tag { display: inline-block; padding: 12px 22px; border-radius: 22px; background: var(--card-2); font-weight: 700; }
.queue { margin: 18px 0 14px; padding: 18px; border-radius: 22px; background: var(--card-2); }
.queue .num { font-size: 50px; font-weight: 800; }
.mono { color: var(--muted); font-weight: 600; }
.steps { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: var(--card-2); margin: 18px 0; }
.step { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-radius: 16px; background: #222224; font-weight: 700; }
.step.ok { background: #233528; }
.step .st { color: var(--green); display: flex; gap: 8px; align-items: center; }
.captcha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 4px; }
.captcha button { aspect-ratio: 1; border-radius: 18px; background: #222224; font-size: 34px; transition: transform .15s, background .2s; }
.captcha button:active { transform: scale(.9); }
.captcha button.bad { animation: shake .4s; background: #4a2020; }
@keyframes shake { 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
.target { font-size: 44px; margin: 6px 0 10px; }

.rules h4 { font-size: 22px; margin: 6px 0 20px; line-height: 1.25; }
.rule { display: flex; gap: 16px; margin-bottom: 20px; }
.rule .n { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; font-weight: 700; }
.rule b { display: block; font-size: 19px; margin-bottom: 6px; }
.rule span { color: var(--muted); }
.note { padding: 18px; border-radius: 20px; background: var(--card-2); }
.note b { display: block; font-size: 19px; margin-bottom: 8px; }
.note span { color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 10px; }
.stat { padding: 18px; border-radius: 20px; background: #262628; text-align: left; }
.stat .ico { width: 24px; height: 24px; margin-bottom: 14px; }
.stat span { color: var(--muted); font-weight: 600; display: block; min-height: 40px; }
.stat b { font-size: 32px; }
.profile-head { text-align: center; }
.profile-head .avatar { width: 92px; height: 92px; margin: 4px auto 12px; font-size: 36px; }
.profile-head .name { font-size: 26px; font-weight: 800; }
.win-emoji { font-size: 70px; animation: pop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(0) rotate(-30deg) } to { transform: none } }

.toast { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; z-index: 90; max-width: 488px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 18px; background: #2a2a2d; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); transform: translateY(-140%); transition: transform .4s cubic-bezier(.2,.9,.25,1); }
.toast.show { transform: none; }
.toast .x { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; background: var(--red); }
.toast.ok .x { background: var(--green); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,199,89,.6); animation: live 1.6s infinite; }
.live.off { background: var(--muted); animation: none; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(52,199,89,0) } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0) } }
.skeleton { background: linear-gradient(90deg, #1d1d1f 0, #29292c 50%, #1d1d1f 100%); background-size: 200% 100%; animation: shine 1.4s linear infinite; }
@media (max-width: 360px) { .nav button { width: 110px; } .fund-value { font-size: 34px; } .pill { padding: 0 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- polish & motion ---------- */
.btn { position: relative; overflow: hidden; }
.btn-blue, .btn-purple, .btn-orange, .btn-green { box-shadow: 0 8px 26px -8px var(--glow, rgba(10,132,255,.6)); }
.btn-blue { --glow: rgba(10,132,255,.7); background: linear-gradient(160deg, #3d9bff, #0a6cf0); }
.btn-purple { --glow: rgba(139,92,246,.7); }
.btn-green { --glow: rgba(52,199,89,.7); background: linear-gradient(160deg, #4ade80, #22b14c); }
.btn-orange { --glow: rgba(242,107,29,.7); }
.btn-blue::after, .btn-purple::after, .btn-orange::after, .btn-green::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
  animation: btnShine 4.5s ease-in-out infinite;
}
.actions .btn:nth-child(2)::after { animation-delay: 1.2s; }
@keyframes btnShine { 0%, 65% { left: -60% } 100% { left: 130% } }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.35); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0 } }

.screen.from-right { animation: fromRight .38s cubic-bezier(.2,.8,.2,1); }
.screen.from-left { animation: fromLeft .38s cubic-bezier(.2,.8,.2,1); }
@keyframes fromRight { from { opacity: 0; transform: translateX(28px) } to { opacity: 1; transform: none } }
@keyframes fromLeft { from { opacity: 0; transform: translateX(-28px) } to { opacity: 1; transform: none } }

.nav { position: relative; }
.nav .ind { position: absolute; top: 6px; left: 6px; width: 128px; height: 64px; border-radius: 32px; background: rgba(0,0,0,.5);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 24px rgba(242,107,29,.25); transition: transform .45s cubic-bezier(.3,1.3,.5,1); }
.nav button { position: relative; z-index: 1; }
.nav button.on { background: none; box-shadow: none; }
.nav button.on .ico { animation: navPop .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes navPop { 40% { transform: translateY(-4px) scale(1.15) } }
@media (max-width: 360px) { .nav .ind { width: 110px; } }

.fund { box-shadow: 0 20px 50px -18px rgba(242,107,29,.7); }
.fund .spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: 0; pointer-events: none;
  box-shadow: 0 0 10px 2px rgba(255,255,255,.8); animation: spark 3.6s ease-in-out infinite; }
@keyframes spark { 0% { opacity: 0; transform: translateY(10px) scale(.4) } 30% { opacity: .9 } 100% { opacity: 0; transform: translateY(-50px) scale(1) } }
.fund-value span { text-shadow: 0 2px 20px rgba(255,255,255,.35); font-variant-numeric: tabular-nums; }

.gw { transition: transform .2s ease; position: relative; }
.gw:active { transform: scale(.97); }
.gw.free::before { content: ""; position: absolute; inset: -1px; border-radius: 25px; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, #4ade80 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinBorder 4s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinBorder { to { --a: 360deg } }
.gw-img::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 110%, rgba(255,255,255,.12), transparent 60%); pointer-events: none; }
.gw-ends-soon .gw-time { color: var(--orange-2); }

.fly { position: fixed; z-index: 96; width: 26px; height: 26px; pointer-events: none; transition: transform .8s cubic-bezier(.5,-0.3,.6,1), opacity .8s; }

.loader-orbit { position: absolute; inset: -34px; animation: orbit 3.5s linear infinite; }
.loader-orbit i { position: absolute; width: 10px; height: 10px; border-radius: 50%; }
.loader-orbit i:nth-child(1) { top: 0; left: 50%; background: #ff8a3d; box-shadow: 0 0 12px #ff8a3d; }
.loader-orbit i:nth-child(2) { bottom: 10%; left: 6%; background: #a77bff; box-shadow: 0 0 12px #a77bff; }
.loader-orbit i:nth-child(3) { bottom: 10%; right: 6%; background: #4da3ff; box-shadow: 0 0 12px #4da3ff; }
@keyframes orbit { to { transform: rotate(360deg) } }
#loader.done .loader-logo { animation: burst .5s ease-in forwards; }
@keyframes burst { to { transform: scale(1.6); opacity: 0 } }
.loader-sub { color: var(--muted); font-size: 15px; margin-top: -14px; }

.wheel .seg-win { animation: segWin .5s ease-in-out 4 alternate; }
@keyframes segWin { to { filter: brightness(1.6) drop-shadow(0 0 6px #fff) } }
.wheel-wrap::before { content: ""; position: absolute; inset: -14%; pointer-events: none;
  background: radial-gradient(circle closest-side, rgba(242,107,29,.32), rgba(124,77,255,.18) 70%, transparent);
  animation: glow 3s ease-in-out infinite; }
.wheel-wrap.spinning::before { animation-duration: .6s; }
@keyframes glow { 50% { opacity: .55; transform: scale(.96) } }
.wheel-idle { animation: idle 6s ease-in-out infinite; }
@keyframes idle { 0%,100% { transform: rotate(var(--r, 0deg)) } 50% { transform: rotate(calc(var(--r, 0deg) + 4deg)) } }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 4px 14px; }
.section-head h2 { margin: 0; }
.section-head .live-tag { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 600; }
.feed-title { padding: 14px 0 2px; color: var(--muted); font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; }
.step .go { display: flex; gap: 8px; }
.step .go .btn { height: 36px; font-size: 15px; padding: 0 14px; border-radius: 18px; }
.step.wait-step { flex-wrap: wrap; gap: 10px; }
.counter { display: inline-block; min-width: 1ch; }
.wheel-wrap { animation: wheelIn .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes wheelIn { from { transform: scale(.82) } to { transform: none } }

.win-gem { width: 64px; height: 64px; filter: drop-shadow(0 8px 24px rgba(52,154,244,.55)); }

.rejected { margin-top: 18px; padding: 18px 20px; border: 1px solid rgba(255,90,90,.35);
  background: linear-gradient(160deg, rgba(255,77,77,.16), rgba(255,77,77,.04)); transition: opacity .25s, transform .25s; }
.rejected.leave { opacity: 0; transform: scale(.96); }
.rj-head { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.rj-ico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #ff5252; color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 0 16px rgba(255,82,82,.5); }
.rj-reason { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.25); line-height: 1.4; }
.rj-reason span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.rj-note { margin-top: 10px; color: var(--muted); font-size: 14px; }
.rj-ok { margin-top: 14px; background: rgba(255,255,255,.08); color: #fff; }

/* exchange direction switch */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: -8px 0 16px; border-radius: 18px; background: var(--card-2); }
.seg-btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
  border: 0; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 18px; transition: color .25s; }
.seg-btn.on { color: #fff; }
.seg-btn .ico { width: 24px; height: 24px; }
.seg-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 14px;
  background: rgba(255,255,255,.13); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 6px 18px -8px rgba(0,0,0,.6);
  transition: transform .35s cubic-bezier(.3,1.3,.5,1); }
.btn .cost { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 2px 7px; border-radius: 10px;
  background: rgba(0,0,0,.22); font-size: .92em; }
.seg-ind.right { transform: translateX(100%); }
.ex-swap { display: grid; place-items: center; width: 44px; height: 44px; margin: -14px auto; position: relative; z-index: 2;
  border-radius: 50%; background: var(--card-2); border: 4px solid var(--bg); }
.ex-swap .ico { width: 22px; height: 22px; }

/* paid giveaways: the price sits on the picture, so every button is the same */
.grid .btn-sm { width: 100%; padding: 0 10px; white-space: nowrap; }
.gw-price { position: absolute; top: 9px; right: 9px; height: 34px; padding: 0 10px; border-radius: 10px; display: inline-flex;
  align-items: center; gap: 4px; font-weight: 800; font-size: 16px; color: #fff;
  background: rgba(14,12,20,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gw-price .ico { width: 18px; height: 18px; }

.bonus { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; margin-top: 16px; padding: 14px 16px;
  border-radius: 18px; text-align: left; background: linear-gradient(150deg, rgba(64,163,248,.22), rgba(64,163,248,.06));
  border: 1px solid rgba(64,163,248,.35); animation: bonusIn .6s cubic-bezier(.3,1.5,.5,1); }
.bonus .ico { grid-row: span 2; width: 40px; height: 40px; }
.bonus span { font-size: 20px; font-weight: 800; }
.bonus small { color: var(--muted); font-size: 13px; }
@keyframes bonusIn { from { transform: scale(.7); opacity: 0 } }

/* top-up */
.topup-btn { margin-top: 14px; }
.topup-btn .ico { width: 22px; height: 22px; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px 12px; border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px; background: var(--card-2); color: #fff; font: inherit; transition: transform .15s, border-color .2s; }
.pack:active { transform: scale(.95); }
.pack .ico { width: 34px; height: 34px; margin-bottom: 4px; }
.pack b { font-size: 24px; line-height: 1.1; }
.pack span { color: var(--muted); font-size: 12px; font-weight: 700; }
.pack small { margin-top: 8px; padding: 4px 10px; border-radius: 10px; background: rgba(255,196,0,.14); color: #ffd25e; font-weight: 800; font-size: 13px; }
.pack.busy { opacity: .6; pointer-events: none; }

.gift-topup { margin-top: 18px; padding: 16px; border-radius: 20px; text-align: left;
  background: linear-gradient(150deg, rgba(124,77,255,.22), rgba(124,77,255,.05)); border: 1px solid rgba(124,77,255,.35); }
.gt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.gt-head b { display: block; font-size: 17px; }
.gt-head small { color: var(--muted); font-size: 13px; }
.gt-ico { font-size: 30px; }
.gift-topup ol { margin: 0 0 14px; padding-left: 20px; color: #ddd; font-size: 14px; line-height: 1.45; }
