:root {
  --bg: #0d0c12;
  --card: #17161f;
  --card-2: #1d1b27;
  --line: #2a2836;
  --text: #f4f3f8;
  --muted: #8f8ca0;
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --gold: #e8c66a;
  --orange: #f59e0b;
  --green: #84cc16;
  --radius: 16px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  max-width: 520px;
  margin: 0 auto;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, .logo { font-family: Oswald, Impact, sans-serif; letter-spacing: .02em; }
.coin { width: 18px; height: 18px; flex: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(13, 12, 18, .88);
  backdrop-filter: blur(10px);
}
.logo { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; }
.logo-flame { width: 18px; height: 18px; fill: var(--accent); }
.logo-accent { color: var(--accent-2); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.icon-btn, .balance {
  height: 38px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn { width: 38px; }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; }
.balance { padding: 0 12px; gap: 6px; font-weight: 700; font-size: 15px; border-radius: 999px; }
.balance.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.12); } }

main { padding: 0 12px calc(var(--nav-h) + 24px + var(--safe-b)); }

/* ---------- live drops ---------- */
.live { display: flex; gap: 8px; align-items: stretch; margin: 6px -12px 12px 0; }
.online {
  flex: none; width: 70px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .35);
}
.online b { font-size: 18px; display: flex; align-items: center; gap: 5px; }
.online b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; animation: pulse 1.6s infinite; }
.online span { font-size: 9px; font-weight: 700; color: #22c55e; letter-spacing: .06em; }
@keyframes pulse { 50% { opacity: .35; } }
.feed { display: flex; gap: 6px; overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.drop {
  flex: none; width: 92px; padding: 6px 6px 7px; border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, var(--card)) 0%, var(--card) 100%);
  border-bottom: 2px solid var(--c);
}
.drop.enter { animation: slideIn .45s ease; }
@keyframes slideIn { from { width: 0; padding: 0; opacity: 0; } }
.drop svg { display: block; width: 44px; height: 38px; margin: 0 auto 2px; }
.drop b, .drop small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop b { font-size: 10.5px; }
.drop small { font-size: 9.5px; color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 150px; padding: 18px 14px; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 85% 20%, #4c2a85 0%, #251a3d 45%, #16131f 100%);
  border: 1px solid #3a2c5c;
}
.hero h1 { margin: 0 0 14px; font-size: 22px; line-height: 1.12; position: relative; z-index: 1; }
.hero-stats { display: flex; gap: 8px; position: relative; z-index: 1; }
.stat { padding: 6px 10px; border-radius: 10px; background: rgba(13, 12, 18, .55); border: 1px solid rgba(255, 255, 255, .08); }
.stat b { display: block; font-size: 15px; }
.stat span { font-size: 10px; color: var(--muted); }
.hero-art { position: absolute; right: -10px; top: -6px; width: 170px; height: 170px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); transform: rotate(-8deg); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.step {
  display: flex; align-items: center; gap: 8px; padding: 10px 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  font-size: 11.5px; font-weight: 600; line-height: 1.25;
}
.step i {
  font-style: normal; flex: none; width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center; font-size: 12px; background: var(--accent);
}

/* ---------- promo rows ---------- */
.promo {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; margin-bottom: 10px; border-radius: var(--radius);
}
.promo-crash { background: linear-gradient(90deg, #3a2414 0%, #1d1712 70%); border: 1px solid #6b4422; }
.promo-tasks { background: linear-gradient(90deg, #2a1f3f 0%, #1a1724 70%); border: 1px solid #8a6d1a; }
.promo-art { width: 66px; height: 54px; flex: none; }
.promo-art svg { width: 100%; height: 100%; }
.promo-body { flex: 1; min-width: 0; }
.promo-body small { display: block; font-size: 10px; font-weight: 700; color: var(--orange); letter-spacing: .06em; }
.promo-body b { display: block; font-size: 17px; margin: 1px 0 2px; }
.promo-tasks .promo-body b { font-size: 15px; }
.promo-body span { font-size: 12px; color: var(--muted); }
.chev { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.promo:active, .case:active, .bp:active { transform: scale(.98); }

/* ---------- section titles ---------- */
.section-title { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; font-size: 20px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bp-title span { background: linear-gradient(90deg, #7dd3fc, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bp-title::after { background: linear-gradient(90deg, #7dd3fc, transparent); }

/* ---------- battle pass carousel ---------- */
.carousel {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -12px; padding: 0 12px; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.bp {
  position: relative; flex: none; width: 86%; height: 200px; scroll-snap-align: center;
  border-radius: var(--radius); overflow: hidden; text-align: left;
  background:
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(0, 0, 0, .18) 26px 52px),
    linear-gradient(135deg, var(--from), var(--to));
  border: 1px solid rgba(255, 255, 255, .1);
}
.bp h3 { position: absolute; left: 14px; top: 12px; right: 14px; margin: 0; font: 700 24px/1.05 Oswald, sans-serif; text-transform: uppercase; z-index: 1; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.bp-art img { width: 100%; height: 100%; object-fit: contain; }
.bp-art { position: absolute; right: -6px; bottom: -14px; width: 190px; height: 190px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); }
.bp-tags { position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.tag-new { background: #ec4899; }
.tag-bp { background: #bae6fd; color: #0c4a6e; }
.bp-price {
  position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; background: rgba(13, 12, 18, .75);
}
.dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.dots i.on { width: 16px; background: #7dd3fc; }

/* ---------- cases grid ---------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.case {
  position: relative; display: flex; flex-direction: column; text-align: left;
  padding: 10px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; min-height: 20px; }
.case-head b { font-size: 13px; }
.badge { flex: none; padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; color: #111; }
.badge-free { background: var(--green); }
.badge-top { background: #f59e0b; }
.badge-new { background: #ec4899; color: #fff; }
.case-art {
  position: relative; aspect-ratio: 1 / 1; margin: 6px 0 10px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a) 35%, transparent), transparent 75%);
}
.case-art svg, .case-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); transition: transform .25s; }
.case:hover .case-art svg, .case:hover .case-art img { transform: scale(1.05) rotate(-2deg); }
.case-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: #2b2342; border: 1px solid #4b3d72;
}
.case-btn.free { background: #2a3a14; border-color: #5b8a1f; color: #a3e635; }
.case-btn.poor { opacity: .55; }

/* ---------- footer ---------- */
.foot { text-align: center; padding: 30px 6px 10px; margin-top: 24px; border-top: 1px solid var(--line); }
.logo-sm { justify-content: center; font-size: 20px; }
.foot p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px 0; }
.foot-links a { color: var(--accent-2); font-weight: 600; }
.foot small { color: #55526a; font-size: 11px; }

/* ---------- placeholder tabs ---------- */
.soon { text-align: center; padding-top: 30vh; color: var(--muted); }
.soon h2 { color: var(--text); font-size: 26px; margin: 0 0 6px; }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(8px + var(--safe-b)); width: calc(100% - 16px); max-width: 504px; height: var(--nav-h);
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 5px;
  border-radius: 18px; background: rgba(23, 22, 31, .94); border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bottom-nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 13px; color: var(--muted); font-size: 10.5px; font-weight: 600;
}
.bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav .nav-hot { color: var(--orange); }
.bottom-nav button.active { color: var(--text); background: #2b2342; }
.bottom-nav button.active svg { stroke: var(--accent-2); }
.bottom-nav .dot { position: absolute; top: 5px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: #22c55e; border: 2px solid #2b2342; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 40; left: 50%; bottom: calc(var(--nav-h) + 22px + var(--safe-b));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 12px; width: max-content; max-width: 90vw; text-align: center;
  background: #2b2342; border: 1px solid #4b3d72; font-weight: 600; font-size: 13px;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 360px) {
  .hero h1 { font-size: 19px; }
  .hero-art { width: 130px; height: 130px; }
  .step { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}

/* ---------- server link ---------- */
.conn {
  position: sticky; top: 58px; z-index: 19; margin: 0 12px 8px; padding: 9px 12px;
  border-radius: 12px; text-align: center; font-size: 12.5px; font-weight: 600;
  background: #3a2a10; border: 1px solid #8a6d1a; color: #fde68a;
}
.conn.fatal { background: #3b1414; border-color: #7f1d1d; color: #fecaca; }
.feed-empty {
  flex: 1; display: flex; align-items: center; padding: 0 12px; min-height: 64px;
  border-radius: 12px; background: var(--card); color: var(--muted); font-size: 12px;
}
