/* ==========================================================
   LuckyBrainrot — v10
   Centered mobile-first UI · dark Web3 · green accent
   ========================================================== */
:root {
  --bg: #060907;
  --bg-soft: #0a100c;
  --surface: #0f1812;
  --surface-2: #152219;
  --surface-3: #1a2a20;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #edf8f1;
  --muted: #8ea398;
  --accent: #2ce982;
  --accent-2: #0fbf63;
  --accent-soft: rgba(44, 233, 130, 0.12);
  --danger: #ff6372;
  --danger-soft: rgba(255, 99, 114, 0.12);
  --gold: #ffd166;
  --radius: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
  color-scheme: dark;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(44, 233, 130, 0.13), transparent 66%),
    radial-gradient(760px 420px at 100% 108%, rgba(15, 191, 99, 0.08), transparent 68%),
    var(--bg);
}

body.menu-open,
body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}
button:not(:disabled) { cursor: pointer; }

a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
b { font-weight: 700; }
:focus-visible { outline: 2px solid rgba(44, 233, 130, 0.6); outline-offset: 2px; }
::selection { background: rgba(44, 233, 130, 0.28); color: var(--text); }
::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- Boot ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  background:
    radial-gradient(520px 380px at 50% 30%, rgba(44, 233, 130, 0.14), transparent 70%),
    var(--bg);
}
.boot-logo {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 0 46px rgba(44, 233, 130, 0.28);
}
.boot-title { font-size: 22px; font-weight: 800; letter-spacing: 0.4px; }
.boot-status { max-width: 300px; color: var(--muted); font-size: 13.5px; text-align: center; }
.boot-dev { width: 100%; max-width: 290px; display: flex; flex-direction: column; gap: 8px; }
.boot-dev input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.boot-dev input:focus { border-color: rgba(44, 233, 130, 0.5); }
.boot-dev .muted { font-size: 11px; text-align: center; }

/* ---------- App shell ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 100dvh;
  margin-inline: auto;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
}
@media (min-width: 640px) {
  .app {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 260px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.055), 0 34px 90px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
  padding: calc(9px + env(safe-area-inset-top)) 16px 9px;
  background: rgba(6, 9, 7, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px;
  border-radius: 12px;
  text-align: left;
}
.brand:active { transform: scale(0.985); }
.brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(44, 233, 130, 0.28);
  box-shadow: 0 0 18px rgba(44, 233, 130, 0.14);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 34vw;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(44, 233, 130, 0.32);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 800;
  transition: border-color 0.15s, background 0.15s;
}
.balance-chip:active { background: rgba(44, 233, 130, 0.18); }
.balance-chip .coin {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(44, 233, 130, 0.2);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
}
.balance-chip #balance-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(44, 233, 130, 0.42);
  background: radial-gradient(circle at 32% 20%, rgba(44, 233, 130, 0.34), rgba(10, 18, 13, 0.98));
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
}
.profile-chip:active { transform: scale(0.93); }
.profile-chip:hover { border-color: rgba(44, 233, 130, 0.65); box-shadow: 0 0 20px rgba(44, 233, 130, 0.2); }

.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.15s, background 0.15s;
}
.menu-btn span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.22s ease, opacity 0.18s ease;
}
.menu-btn.is-open { border-color: rgba(44, 233, 130, 0.4); background: var(--accent-soft); }
.menu-btn.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0.25); }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Content & tabs ---------- */
.content { width: 100%; padding: 16px; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 15px;
  width: 100%;
  min-width: 0;
  animation: tabIn 0.22s ease-out;
}
@keyframes tabIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 2px 2px 0;
}
.section-head > div { min-width: 0; }
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.2px; }
.section-head .hint { padding-bottom: 2px; text-align: right; }
.eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

/* ---------- Common ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.hint { color: var(--muted); font-size: 11.5px; line-height: 1.35; }

.row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.row.between { justify-content: space-between; width: 100%; }
.row-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.card, .panel {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 34, 25, 0.92), rgba(13, 21, 16, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.card { box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03); }
.panel { padding: 14px; border-radius: 18px; }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; width: 100%; }
.card-head h3 { font-size: 15px; font-weight: 800; line-height: 1.25; }
.card-head .hint { padding-top: 2px; white-space: nowrap; }
.panel-title { color: #d5e8dc; font-size: 12.5px; font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 12px 17px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  transition: transform 0.1s, filter 0.15s, opacity 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.primary {
  background: linear-gradient(180deg, #35f291, var(--accent-2));
  color: #03150a;
  box-shadow: 0 12px 28px rgba(44, 233, 130, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}
.btn.primary:active { filter: brightness(0.96); }
.btn.ghost { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.03); color: var(--text); }
.btn.danger { border-color: rgba(255, 99, 114, 0.32); background: var(--danger-soft); color: var(--danger); }
.btn.wide { width: 100%; }
.btn.small { min-height: 36px; padding: 8px 12px; border-radius: 10px; font-size: 12px; }

.link {
  padding: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 35px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chip.active {
  color: var(--accent);
  border-color: rgba(44, 233, 130, 0.45);
  background: var(--accent-soft);
}
.chip:disabled { opacity: 0.35; pointer-events: none; }

.input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: rgba(44, 233, 130, 0.5); }
.input::placeholder { color: #61776a; }
select.input {
  appearance: none;
  color-scheme: dark;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select.input option { background: #0d1511; color: var(--text); }
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px #0b120e inset;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.green { background: var(--accent-soft); color: var(--accent); }
.badge.gold { background: rgba(255, 209, 102, 0.12); color: var(--gold); }

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}
.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 12px rgba(44, 233, 130, 0.35);
  transition: width 0.45s ease;
}

.warning {
  padding: 12px;
  border: 1px solid rgba(255, 209, 102, 0.32);
  border-radius: 12px;
  background: rgba(255, 209, 102, 0.075);
  color: #ffe3a6;
  font-size: 12px;
  line-height: 1.45;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.hscroll {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scroll-snap-type: x proximity;
}
.hscroll > * { scroll-snap-align: start; }
.is-locked { pointer-events: none; opacity: 0.55; }

.empty-note {
  width: 100%;
  padding: 18px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:active { color: var(--accent); border-color: rgba(44, 233, 130, 0.4); }

/* ---------- Cases ---------- */
.topdrop {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.topdrop-title {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 2px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
}
.topdrop-card {
  position: relative;
  flex: 0 1 calc((100% - 16px) / 3);
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(255, 209, 102, 0.17);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.075), rgba(16, 25, 19, 0.92));
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.topdrop-card img { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; }
.topdrop-rank {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(4, 8, 6, 0.8);
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  backdrop-filter: blur(4px);
}
.topdrop-name { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topdrop-price { color: var(--gold); font-size: 10.5px; font-weight: 800; }
.topdrop-empty {
  flex: 1 0 100%;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

#cases-grid { align-items: stretch; }
.case-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(180deg, #142019, #0c130f);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  transition: transform 0.14s, border-color 0.16s, box-shadow 0.16s;
}
.case-card:active { transform: scale(0.975); }
@media (hover: hover) {
  .case-card:hover { border-color: rgba(44, 233, 130, 0.3); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
}
.case-img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; background: #0b130e; }
.case-body { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px 11px; }
.case-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.case-meta .price { color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.case-meta .muted { font-size: 9.5px; white-space: nowrap; }
.case-free-tag {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #03150a;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  box-shadow: 0 4px 14px rgba(44, 233, 130, 0.3);
}
.case-card.locked { opacity: 0.85; }
.case-cooldown {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  padding: 3px 7px;
  border: 1px solid rgba(44, 233, 130, 0.35);
  border-radius: 999px;
  background: rgba(4, 8, 6, 0.78);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(2px);
}

/* ---------- Feed ---------- */
.feed { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.feed-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}
.feed-row img { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; }
.feed-main { flex: 1; min-width: 0; }
.feed-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-sub { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-price { flex: 0 0 auto; color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }

/* ---------- Tap ---------- */
.tap-card {
  position: relative;
  align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(90% 62% at 50% 0%, rgba(44, 233, 130, 0.13), transparent 72%),
    linear-gradient(180deg, rgba(21, 34, 25, 0.95), rgba(12, 20, 15, 0.96));
}
.tap-card > .row { align-items: flex-start; }
.tap-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 340px;
  min-height: 112px;
  margin: 4px auto 0;
  padding: 16px;
  border: 1px solid rgba(44, 233, 130, 0.46);
  border-radius: 25px;
  background:
    radial-gradient(120% 160% at 50% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(180deg, #38f797, #0fbf63 55%, #099548);
  color: #03150a;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 18px 42px rgba(15, 191, 99, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: transform 0.12s, filter 0.18s;
}
.tap-btn .tap-glow {
  position: absolute;
  inset: -45%;
  z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(255, 255, 255, 0.38) 82%, transparent 92%);
  opacity: 0.32;
  animation: tapSpin 6s linear infinite;
}
.tap-btn .tap-text {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tap-btn .tap-reward { font-size: 11.5px; font-weight: 900; letter-spacing: 0.7px; opacity: 0.78; }
.tap-btn:active { transform: scale(0.965); filter: brightness(0.97); }
.tap-btn:disabled { opacity: 0.5; pointer-events: none; filter: grayscale(0.4); }
.tap-btn:disabled .tap-glow { animation: none; }
@keyframes tapSpin { to { transform: rotate(360deg); } }
.tap-float {
  position: absolute;
  z-index: 4;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  animation: floatUp 0.75s ease-out forwards;
}
@keyframes floatUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-48px); }
}
.tap-stats { gap: 9px; }
.tap-stats b { color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- Pick cards ---------- */
.pick-card {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 96px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.pick-card:active { transform: scale(0.97); }
.pick-card img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.pick-card.active { border-color: rgba(44, 233, 130, 0.55); background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(44, 233, 130, 0.12); }
.pick-name {
  width: 100%;
  height: 2.4em;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}
.pick-price { color: var(--accent); font-size: 10.5px; font-weight: 800; }

/* ---------- Upgrade wheel ---------- */
.upgrade-desk {
  align-items: center;
  gap: 14px;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(44, 233, 130, 0.12), transparent 64%),
    linear-gradient(180deg, rgba(21, 34, 25, 0.96), rgba(10, 17, 13, 0.98));
}
.upgrade-versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
}
.uv-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  text-align: center;
}
.uv-media {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 2px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}
.uv-media img { width: 100%; height: 100%; object-fit: cover; }
.uv-media.has-item { border-color: rgba(44, 233, 130, 0.38); box-shadow: 0 0 18px rgba(44, 233, 130, 0.12); }
.uv-placeholder { color: #557064; font-size: 26px; font-weight: 800; }
.uv-slot b {
  width: 100%;
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.uv-slot > span { color: var(--accent); font-size: 10.5px; font-weight: 700; }
.uv-arrow { color: var(--muted); font-size: 20px; font-weight: 300; }

.wheel-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding-top: 2px; }
.wheel {
  position: relative;
  display: grid;
  place-items: center;
  width: min(64vw, 252px);
  aspect-ratio: 1;
  scroll-margin-block: 90px;
  border-radius: 50%;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.42));
  transition: filter 0.3s;
}
.wheel::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(44, 233, 130, 0.24);
  box-shadow: 0 0 0 6px rgba(44, 233, 130, 0.035), inset 0 0 24px rgba(0, 0, 0, 0.5);
}
.wheel-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(44, 233, 130, 0.92) 0deg 180deg, rgba(255, 99, 114, 0.7) 180deg 360deg);
  transform: rotate(0deg);
  will-change: transform;
}
.wheel-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.12) 0deg 1.2deg, transparent 1.2deg 9deg);
  mix-blend-mode: soft-light;
}
.wheel-center {
  position: absolute;
  inset: 22%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #18291f, #0a120d 76%);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.55), 0 5px 18px rgba(0, 0, 0, 0.4);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.wheel-center b { color: var(--text); font-size: clamp(22px, 8vw, 30px); font-weight: 900; line-height: 1.05; }
.wheel-center span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  border-top: 17px solid #f4fff8;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}
.wheel-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 10.5px; }
.wheel-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.dot.ok { background: var(--accent); box-shadow: 0 0 8px rgba(44, 233, 130, 0.6); }
.dot.bad { background: var(--danger); box-shadow: 0 0 8px rgba(255, 99, 114, 0.5); }
.wheel-caption { min-height: 17px; color: var(--muted); font-size: 11.5px; text-align: center; }
.wheel.is-spinning { filter: drop-shadow(0 0 30px rgba(44, 233, 130, 0.32)); }
.wheel.win .wheel-center { border-color: rgba(44, 233, 130, 0.7); box-shadow: 0 0 34px rgba(44, 233, 130, 0.38), inset 0 0 20px rgba(44, 233, 130, 0.12); }
.wheel.lose .wheel-center { border-color: rgba(255, 99, 114, 0.68); box-shadow: 0 0 34px rgba(255, 99, 114, 0.3), inset 0 0 20px rgba(255, 99, 114, 0.1); }
.wheel.win .wheel-center b { color: var(--accent); }
.wheel.lose .wheel-center b { color: var(--danger); }
.upgrade-cta { min-height: 52px; font-size: 15px; letter-spacing: 0.2px; }
.upgrade-cta:not(:disabled) { animation: ctaPulse 2.6s ease-in-out infinite; }
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(44, 233, 130, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.34); }
  50% { box-shadow: 0 12px 34px rgba(44, 233, 130, 0.33), inset 0 1px 0 rgba(255, 255, 255, 0.34); }
}

/* ---------- Fuse ---------- */
.fuse-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-height: 330px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fuse-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.fuse-item img { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; }
.fuse-item > div { min-width: 0; }
.fuse-item.active { border-color: rgba(44, 233, 130, 0.52); background: var(--accent-soft); }
.fi-name { font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-price { color: var(--accent); font-size: 9.5px; font-weight: 700; }
.fuse-summary { padding-top: 4px; }
.fuse-summary b { color: var(--accent); }

/* ---------- Mines ---------- */
#mines-setup { display: flex; flex-direction: column; gap: 12px; }
#mines-setup > .panel { display: flex; flex-direction: column; gap: 10px; }
#mines-active { display: flex; flex-direction: column; gap: 12px; }
.mines-head { gap: 7px; }
.mines-multiplier { color: var(--accent); font-size: 24px; font-weight: 900; line-height: 1.1; }
.mines-payout { font-size: 18px; font-weight: 800; }
.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}
.mine-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: linear-gradient(180deg, #1a2a21, #101a14);
  color: var(--muted);
  font-size: 17px;
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
  user-select: none;
}
.mine-cell:active { transform: scale(0.93); }
.mine-cell.safe { border-color: rgba(44, 233, 130, 0.5); background: var(--accent-soft); color: var(--accent); }
.mine-cell.mine { border-color: rgba(255, 99, 114, 0.45); background: var(--danger-soft); color: var(--danger); }
.mine-cell.disabled { pointer-events: none; opacity: 0.78; }

/* ---------- Profile ---------- */
.profile-hero {
  align-items: center;
  gap: 10px;
  padding: 22px 16px 18px;
  text-align: center;
  background:
    radial-gradient(80% 80% at 50% 0%, rgba(44, 233, 130, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(21, 34, 25, 0.96), rgba(12, 20, 15, 0.97));
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  border: 1px solid rgba(44, 233, 130, 0.42);
  border-radius: 24px;
  background: linear-gradient(135deg, #214331, #0e1a13);
  color: var(--accent);
  font-size: 29px;
  font-weight: 800;
  box-shadow: 0 0 30px rgba(44, 233, 130, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.profile-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-username { color: var(--accent); font-size: 12px; font-weight: 600; }
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.profile-topup { width: 100%; margin-top: 4px; }

.dashboard-card {
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(44, 233, 130, 0.1), transparent 64%),
    linear-gradient(180deg, rgba(21, 34, 25, 0.96), rgba(12, 20, 15, 0.97));
}
.wager-pill {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(44, 233, 130, 0.3);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
}
.balance-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: 100%; }
.balance-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}
.balance-tile span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.3px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.balance-tile b {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.balance-total { border-color: rgba(44, 233, 130, 0.28); background: var(--accent-soft); }
.balance-total b { color: var(--accent); }
.wager-block { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.wager-labels {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}
.wager-labels span:last-child { text-align: right; }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: 100%; }
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 80px;
  padding: 9px 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.18);
  text-align: center;
}
.stat-icon { font-size: 15px; line-height: 1; opacity: 0.9; }
.stat b {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-label {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-card {
  border-color: rgba(44, 233, 130, 0.2);
  background:
    radial-gradient(95% 90% at 100% 0%, rgba(44, 233, 130, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(21, 34, 25, 0.96), rgba(12, 20, 15, 0.97));
}
.ref-link {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 11px 12px;
  border: 1px dashed rgba(44, 233, 130, 0.32);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--accent);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}
.ref-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; width: 100%; }
.ref-actions .btn { min-width: 0; padding-inline: 8px; }
.ref-earned {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
.ref-earned b { color: var(--gold); }

.inv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.inv-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}
.inv-row img { width: 39px; height: 39px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; }
.inv-main { flex: 1; min-width: 0; }
.inv-name { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-sub { color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.18);
}
.shop-item img { width: 100%; aspect-ratio: 1; border-radius: 9px; object-fit: cover; }
.shop-name { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-item .row { flex-wrap: nowrap; gap: 4px; }
.shop-item .row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-item .btn { flex: 0 0 auto; min-height: 30px; padding: 5px 7px; font-size: 10px; border-radius: 8px; }

.history { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 11px;
}
.history-row > div { min-width: 0; }
.history-row .hs { color: var(--muted); font-size: 9.5px; }
.history-row > span { flex: 0 0 auto; white-space: nowrap; }
.status-pending { color: var(--gold); }
.status-approved, .status-paid { color: var(--accent); }
.status-rejected, .status-expired { color: var(--danger); }

/* ---------- Case detail ---------- */
.case-detail {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.case-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 3, 0.78);
  backdrop-filter: blur(4px);
}
.case-detail-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 94dvh;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #0b120e;
  box-shadow: var(--shadow);
  animation: sheetUp 0.24s ease-out;
}
.case-detail-head {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 14, 0.94);
  backdrop-filter: blur(12px);
}
.case-detail-title { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.case-detail-scroll {
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow-y: auto;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}
.case-hero {
  position: relative;
  aspect-ratio: 16 / 8.5;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #0e1611;
}
.case-hero img { width: 100%; height: 100%; object-fit: cover; }
.case-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 8, 6, 0.02) 18%, rgba(4, 8, 6, 0.9)); }
.case-hero-info { position: absolute; right: 14px; bottom: 12px; left: 14px; display: flex; flex-direction: column; gap: 3px; }
.case-hero-name { font-size: 18px; font-weight: 800; }
.case-hero-sub { color: #b9cec2; font-size: 11.5px; }

.drop-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}
.drop-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}
.drop-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  object-fit: cover;
}
.drop-main { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.drop-name { overflow: hidden; font-size: 11.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.drop-bar { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.drop-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.drop-meta { display: flex; flex: 0 0 auto; flex-direction: column; gap: 2px; text-align: right; }
.drop-price { color: var(--accent); font-size: 11px; font-weight: 800; }
.drop-chance { color: var(--muted); font-size: 9.5px; }

.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 5px;
  width: 100%;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}
.seg {
  min-width: 0;
  padding: 9px 6px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.seg.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(44, 233, 130, 0.35); }
.seg:disabled { opacity: 0.35; pointer-events: none; }
.case-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.case-total b { color: var(--accent); font-size: 15px; }

/* ---------- Case overlay ---------- */
.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 20px 16px;
  background: rgba(3, 7, 5, 0.93);
  backdrop-filter: blur(7px);
}
.case-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  font-size: 14px;
  font-weight: 700;
}
.case-window {
  position: relative;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 17px;
  background: linear-gradient(180deg, #131f18, #0b130e);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}
.case-window::before,
.case-window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 52px;
  pointer-events: none;
}
.case-window::before { left: 0; background: linear-gradient(90deg, #0b130e, transparent); }
.case-window::after { right: 0; background: linear-gradient(270deg, #0b130e, transparent); }
.case-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 2px;
  transform: translateX(-50%);
  background: var(--accent);
  box-shadow: 0 0 14px rgba(44, 233, 130, 0.8);
}
.case-strip { display: flex; gap: 8px; padding: 12px; will-change: transform; }
.case-item {
  display: flex;
  flex: 0 0 84px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 84px;
  height: 108px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.case-item img { width: 62px; height: 62px; border-radius: 9px; object-fit: cover; }
.case-item span { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.case-item.coins { color: var(--accent); font-size: 15px; font-weight: 900; }
.case-item.winner { border-color: var(--accent); box-shadow: 0 0 22px rgba(44, 233, 130, 0.35); }

.multi-overlay { justify-content: flex-start; gap: 16px; padding-top: 10vh; }
.multi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}
.multi-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1.15;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #141f18, #0d1511);
  opacity: 0.85;
  transform: scale(0.96);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.multi-card.revealed {
  border-color: rgba(44, 233, 130, 0.5);
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 24px rgba(44, 233, 130, 0.22);
}
.multi-back { color: rgba(44, 233, 130, 0.55); font-size: 30px; font-weight: 900; }
.multi-card.revealed .multi-back { display: none; }
.multi-front { display: none; flex-direction: column; align-items: center; gap: 5px; padding: 10px; text-align: center; }
.multi-card.revealed .multi-front { display: flex; animation: popIn 0.25s ease-out; }
.multi-front img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; }
.multi-front span { font-size: 10.5px; line-height: 1.2; }
.multi-front b { color: var(--accent); font-size: 11.5px; }
.multi-front.coins { color: var(--accent); font-size: 21px; font-weight: 800; }

.multi-result-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
}
.multi-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 11.5px;
  text-align: left;
}
.multi-result-row img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.multi-result-row .mrr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-result-row b { color: var(--accent); white-space: nowrap; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 5, 3, 0.82); backdrop-filter: blur(5px); }
.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: linear-gradient(180deg, #111c15, #0b120e);
  box-shadow: var(--shadow);
  animation: popIn 0.2s ease-out;
}
@keyframes popIn {
  from { opacity: 0.5; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}
.result-badge {
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-align: center;
  text-transform: uppercase;
}
.result-badge.win { border: 1px solid rgba(44, 233, 130, 0.3); background: var(--accent-soft); color: var(--accent); }
.result-badge.lose { border: 1px solid rgba(255, 99, 114, 0.3); background: var(--danger-soft); color: var(--danger); }
.modal-img {
  width: 132px;
  height: 132px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.25);
}
.modal-title { font-size: 18px; font-weight: 800; line-height: 1.25; text-align: center; }
.modal-price { color: var(--accent); font-size: 22px; font-weight: 900; }
.modal-text { color: var(--muted); font-size: 11.5px; line-height: 1.45; text-align: center; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 7px; width: 100%; margin-top: 2px; }
.modal-actions .btn { flex: 1 1 130px; }

/* ---------- Sheets ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop { position: absolute; inset: 0; background: rgba(2, 5, 3, 0.75); backdrop-filter: blur(4px); }
.sheet-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: #0d1611;
  animation: sheetUp 0.22s ease-out;
}
@keyframes sheetUp {
  from { opacity: 0.6; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-head h3 { font-size: 16px; font-weight: 800; }
.pay-slot { display: flex; flex-direction: column; gap: 8px; }
.pay-slot:empty { display: none; }
#topup-crypto,
#topup-stars,
#topup-roblox,
#mines-balance-bet,
#mines-item-bet {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
}
.switch-row input { display: none; }
.switch-row i {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.2s;
}
.switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #7d9188;
  transition: transform 0.2s, background 0.2s;
}
.switch-row input:checked + i { background: rgba(44, 233, 130, 0.32); }
.switch-row input:checked + i::after { transform: translateX(19px); background: var(--accent); }

.check-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11.5px; }
.check-row input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); }

/* ---------- Drawer ---------- */
body.menu-open { overflow: hidden; }
.drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition: visibility 0s linear 0.3s;
}
.drawer.open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 3, 0.76);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.26s ease;
}
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: min(88vw, 360px);
  overflow-y: auto;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, #0e1912 0%, #070c09 100%);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(103%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overscroll-behavior: contain;
}
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-brand img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(44, 233, 130, 0.3);
  border-radius: 13px;
  object-fit: cover;
}
.drawer-brand b { display: block; font-size: 14px; font-weight: 800; }
.drawer-brand span { color: var(--muted); font-size: 10.5px; }
.drawer-balance {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(44, 233, 130, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(100% 160% at 100% 0%, rgba(44, 233, 130, 0.16), transparent 65%),
    rgba(0, 0, 0, 0.2);
}
.drawer-balance b { color: var(--accent); font-size: 21px; line-height: 1.2; font-weight: 900; }
.drawer-nav { display: flex; flex-direction: column; gap: 3px; }
.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.drawer-item:active { transform: scale(0.99); }
.drawer-item > span:nth-child(2) { flex: 1; min-width: 0; }
.drawer-item .di {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 15px;
}
.drawer-item .darrow { margin-left: auto; color: var(--muted); font-size: 17px; line-height: 1; }
.drawer-item.active { background: var(--accent-soft); color: var(--accent); }
.drawer-item.active .di { border-color: rgba(44, 233, 130, 0.3); background: rgba(44, 233, 130, 0.16); }
.drawer-item.active .darrow { color: var(--accent); }
.drawer-sep { height: 1px; margin: 6px 2px; background: var(--border); }
.drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.drawer-support {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.drawer-support .di {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(44, 233, 130, 0.1);
  font-size: 15px;
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(520px, calc(100% - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 11px 14px;
  border: 1px solid rgba(44, 233, 130, 0.35);
  border-radius: 13px;
  background: rgba(16, 28, 21, 0.97);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  animation: toastIn 0.2s ease-out;
}
.toast.error { border-color: rgba(255, 99, 114, 0.45); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Streamer mode: blur personal data and risky words, not images ---------- */
/* Изображения кейсов и брейнротов в streamer-режиме не скрываются. */
.streamer-blur-term {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(5, 12, 8, 0.28);
}
.streamer-blur-term,
.streamer-personal-blur {
  filter: blur(5px);
  -webkit-filter: blur(5px);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
  transition: filter 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.streamer-blur-term:hover,
.streamer-blur-term.is-revealed {
  background: transparent;
  filter: none;
  -webkit-filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.streamer-personal-blur:hover,
.streamer-personal-blur.is-revealed {
  filter: none;
  -webkit-filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
@media (hover: none) {
  .streamer-blur-term:hover,
  .streamer-personal-blur:hover {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
  .streamer-blur-term.is-revealed {
    background: transparent;
  }
  .streamer-blur-term.is-revealed,
  .streamer-personal-blur.is-revealed {
    filter: none;
    -webkit-filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- Legal footer ---------- */
.app-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 16px 0;
  padding: 14px 2px 0;
  border-top: 1px solid var(--border);
}
.footer-brand { color: var(--muted); font-size: 10.5px; letter-spacing: 0.2px; }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  font-size: 10.5px;
  line-height: 1.35;
}
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--accent); text-decoration: underline; }
.app-footer .legal-links { gap: 5px 14px; }

/* ---------- Bonuses / Trophy road / Roblox trade ---------- */
.bonus-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.bonus-input-row .btn { min-height: 44px; white-space: nowrap; }
.cashback-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 12px;
}
.cashback-stats b { color: var(--text); }

.level-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.level-orb {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(44, 233, 130, 0.35);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(44, 233, 130, 0.35), rgba(10, 20, 14, 0.95));
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(44, 233, 130, 0.16);
}
.level-hero-main { min-width: 0; }
.level-hero-main h3 { font-size: 20px; font-weight: 800; }
.level-xp { color: var(--muted); font-size: 12px; margin-top: 3px; }
.level-progress { grid-column: 1 / -1; }
.level-rewards { display: flex; flex-direction: column; gap: 8px; }
.level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.level-row.available { border-color: rgba(44, 233, 130, 0.35); background: rgba(44, 233, 130, 0.06); }
.level-row.claimed { opacity: 0.62; }
.level-row-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
}
.level-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.level-row-main b { font-size: 12.5px; }
.level-row-main span { color: var(--muted); font-size: 10.5px; }
.level-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.level-status.done { color: var(--accent); }

.trade-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}
.trade-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  min-width: 0;
}
.trade-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(44, 233, 130, 0.2);
}
.trade-item img { width: 100%; height: 70px; object-fit: contain; border-radius: 9px; background: rgba(0, 0, 0, 0.15); }
.trade-item-name { width: 100%; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.trade-item-price { color: var(--muted); font-size: 10px; }
.game-history-title { font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.badge.danger { color: var(--danger); background: var(--danger-soft); }

/* ---------- Responsive ---------- */
@media (min-width: 520px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fuse-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-hero { padding: 26px 20px 20px; }
  .profile-topup { width: auto; min-width: 210px; }
}

@media (max-width: 380px) {
  .bonus-input-row { grid-template-columns: minmax(0, 1fr); }
  .bonus-input-row .btn { width: 100%; }
  .level-orb { width: 56px; height: 56px; font-size: 20px; }
  .level-row { padding: 9px 10px; }
  .level-row .btn { padding: 8px 10px; font-size: 11px; }
  .trade-item img { height: 58px; }
  .topbar { gap: 6px; padding-right: 12px; padding-left: 12px; }
  .brand { gap: 7px; }
  .brand-logo { width: 35px; height: 35px; border-radius: 11px; }
  .brand-name { font-size: 13.5px; }
  .brand-sub { display: none; }
  .topbar-right { gap: 5px; }
  .balance-chip { max-width: 30vw; min-height: 35px; padding: 6px 9px; font-size: 12.5px; }
  .profile-chip, .menu-btn { width: 35px; height: 35px; }
  .content { padding: 12px; }
  .card { padding: 14px; border-radius: 18px; }
  .panel { padding: 12px; }
  .section-head h2 { font-size: 18px; }
  .app-footer { margin-inline: 12px; }
  .balance-tile b { font-size: 11.5px; }
  .stat b { font-size: 13px; }
  .stat-label { font-size: 9px; }
  .profile-name { font-size: 18px; }
  .modal-img { width: 116px; height: 116px; }
}

@media (max-width: 349px) {
  .brand-text { display: none; }
}

@media (max-width: 329px) {
  .brand-name { display: none; }
  .balance-chip { max-width: 33vw; }
  .profile-meta { gap: 4px; font-size: 9.5px; }
  .balance-tile { padding: 9px 5px; }
  .balance-tile span { font-size: 8px; }
  .stat { min-height: 74px; }
}

@media (min-width: 640px) {
  .sheet { align-items: center; padding: 20px; }
  .sheet-body { border-bottom: 1px solid var(--border); border-radius: 22px; }
  .case-detail { align-items: center; padding: 20px; }
  .case-detail-panel { border-bottom: 1px solid var(--border); border-radius: 24px; max-height: 90dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .tab,
  .toast,
  .sheet-body,
  .case-detail-panel,
  .modal-card,
  .multi-card,
  .tap-btn .tap-glow,
  .upgrade-cta {
    animation: none !important;
  }
  .tap-btn,
  .multi-card,
  .case-card,
  .btn,
  .chip {
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto !important; }
}