:root {
  --bg: #04050a;
  --bg-2: #07080f;
  --panel: #0b0d16;
  --panel-2: #10131e;
  --hair: rgba(255, 255, 255, 0.06);
  --hair-2: rgba(255, 255, 255, 0.1);
  --text: #eef1f8;
  --text-2: #a9b0c2;
  --muted: #6a7188;
  --accent: #22e8ff;
  --accent-ink: #02131a;
  --violet: #9d5cff;
  --pink: #ff2ec4;
  --win: #3dffa8;
  --loss: #ff406e;
  --warn: #ffc56b;
  --spark: var(--accent);
  --radius: 14px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.app {
  display: grid;
  grid-template-columns: 312px 1fr;
  grid-template-rows: 60px 1fr;
  height: 100vh;
  height: 100dvh;
}

/* ───────── Top bar ───────── */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--hair);
  background: linear-gradient(180deg, #090c13, #070a0f);
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.logo { width: 22px; height: 22px; color: #cfd8e6; }
.divider { width: 1px; height: 24px; background: var(--hair-2); }
.spacer { flex: 1; }

.coin {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #0a0a0a; line-height: 1;
}
.coin.emoji { background: rgba(255, 255, 255, 0.07); font-size: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* Coin picker */
.picker { position: relative; }
.picker-btn {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px 0 7px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--hair);
  transition: border-color .15s, box-shadow .15s;
}
.picker-btn:hover, .picker-btn[aria-expanded="true"] { border-color: rgba(34, 232, 255, 0.4); box-shadow: 0 0 16px rgba(34, 232, 255, 0.12); }
.picker-btn .coin { width: 22px; height: 22px; font-size: 12px; }
.picker-btn .coin.emoji { font-size: 14px; }
.picker-sym { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.picker-name { font-size: 12px; color: var(--muted); }
.chev { width: 12px; height: 12px; color: var(--muted); }
.picker-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
  width: 440px; max-height: min(620px, calc(100vh - 90px));
  display: flex; flex-direction: column;
  border-radius: 16px;
  background: rgba(10, 12, 20, 0.97);
  border: 1px solid var(--hair-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 232, 255, 0.06);
  backdrop-filter: blur(16px);
  animation: rise .18s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.picker-pop[hidden] { display: none; }
.picker-search {
  display: flex; align-items: center; gap: 9px;
  margin: 10px; padding: 0 10px; height: 38px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair);
  color: var(--muted);
}
.picker-search:focus-within { border-color: rgba(34, 232, 255, 0.45); }
.picker-search svg { width: 15px; height: 15px; flex: none; }
.picker-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 500 13.5px var(--font); }
.picker-search input::placeholder { color: var(--muted); }
.picker-search kbd, .picker-foot { font: 500 10.5px var(--mono); color: var(--muted); }
.picker-search kbd { padding: 2px 5px; border-radius: 4px; border: 1px solid var(--hair-2); }
.picker-list { overflow-y: auto; padding: 0 6px 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.pk-group {
  padding: 10px 10px 6px;
  font: 600 10.5px var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.pk-row {
  width: 100%;
  display: grid; grid-template-columns: 26px 1fr 64px 108px 64px; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 10px; text-align: left;
  transition: background .1s;
}
.pk-row:hover, .pk-row.hl { background: rgba(255, 255, 255, 0.045); }
.pk-row.current { background: rgba(34, 232, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(34, 232, 255, 0.25); }
.pk-row .coin { width: 26px; height: 26px; font-size: 13px; }
.pk-row .coin.emoji { font-size: 15px; }
.pk-name, .pk-px { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pk-name b { font-size: 13px; font-weight: 600; }
.pk-name small, .pk-px small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-px { text-align: right; }
.pk-px b { font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.pk-px small { font-family: var(--mono); font-size: 10px; }
.pk-spark { width: 64px; height: 20px; }
.pk-spark path { fill: none; stroke: var(--muted); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pk-spark.up path { stroke: var(--win); filter: drop-shadow(0 0 3px rgba(61, 255, 168, 0.5)); }
.pk-spark.down path { stroke: var(--loss); filter: drop-shadow(0 0 3px rgba(255, 64, 110, 0.5)); }
.pk-chg {
  justify-self: end;
  font: 600 11.5px var(--mono); padding: 3px 6px; border-radius: 6px;
  color: var(--muted); background: rgba(255, 255, 255, 0.04);
}
.pk-chg.up { color: var(--win); background: rgba(61, 255, 168, 0.08); }
.pk-chg.down { color: var(--loss); background: rgba(255, 64, 110, 0.08); }
.picker-foot { padding: 9px 16px; border-top: 1px solid var(--hair); }

/* One-tap memecoin strip */
.quick { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--panel); border: 1px solid var(--hair); }
.quick-btn {
  width: 30px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 15px;
  filter: grayscale(0.55); opacity: 0.75;
  transition: filter .15s, opacity .15s, background .15s, transform .15s;
}
.quick-btn:hover { filter: none; opacity: 1; transform: translateY(-1px); }
.quick-btn.active { filter: none; opacity: 1; background: rgba(255, 46, 196, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 46, 196, 0.5), 0 0 12px rgba(255, 46, 196, 0.25); }
.src-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--win); box-shadow: 0 0 6px var(--win); }

.ticker { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ticker-price {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em;
  transition: color .5s;
}
.ticker-price.up { color: var(--win); transition: none; }
.ticker-price.down { color: var(--loss); transition: none; }
.ticker-change {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
}
.ticker-change.up { color: var(--win); background: rgba(46, 240, 166, 0.08); }
.ticker-change.down { color: var(--loss); background: rgba(255, 93, 122, 0.08); }

.seg { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--panel); border: 1px solid var(--hair); }
.seg button {
  display: flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 12px; border-radius: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  transition: color .15s, background .15s;
}
.seg button:hover { color: var(--text-2); }
.seg button.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--hair-2); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); position: relative; }
.status-dot.live { background: var(--win); box-shadow: 0 0 0 3px rgba(46, 240, 166, 0.15); }
.status-dot.connecting { background: var(--warn); animation: blink 1s ease-in-out infinite; }
.status-dot.down { background: var(--loss); }
@keyframes blink { 50% { opacity: .35; } }

.icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-2); border: 1px solid var(--hair);
  background: var(--panel);
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--hair-2); }
.icon-btn svg { width: 17px; height: 17px; }

/* ───────── Sidebar ───────── */
.side {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--hair);
  background: var(--bg-2);
  min-height: 0;
}
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.008));
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}
.account { padding: 16px 16px 14px; }
.account-head { display: flex; justify-content: space-between; align-items: center; }
.eyebrow { font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }
.ghost-btn {
  font-size: 11.5px; color: var(--muted);
  padding: 3px 8px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.ghost-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.ghost-btn.confirm { color: var(--loss); background: rgba(255, 93, 122, 0.1); }
.balance {
  margin-top: 6px;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 600; letter-spacing: -0.035em;
}
.pnl { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pnl span { font-family: var(--font); color: var(--muted); margin-left: 2px; }
.pnl.up { color: var(--win); }
.pnl.down { color: var(--loss); }
.spark { display: block; width: 100%; height: 54px; margin: 12px 0 12px; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair);
  padding-top: 12px;
}
.stats div { display: flex; flex-direction: column; gap: 3px; }
.stats div + div { padding-left: 12px; border-left: 1px solid var(--hair); }
.stats span { font-size: 11px; color: var(--muted); }
.stats b { font-family: var(--mono); font-size: 14px; font-weight: 600; }

.positions { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--hair); }
.tabs button {
  flex: 1; height: 32px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: color .15s, background .15s;
}
.tabs button:hover { color: var(--text-2); }
.tabs button.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.count {
  font-family: var(--mono); font-size: 10.5px;
  min-width: 18px; height: 17px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); color: var(--text-2);
}
.tabs button.active .count { background: rgba(76, 224, 255, 0.14); color: var(--accent); }

.list { flex: 1; overflow-y: auto; padding: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.empty b { display: block; color: var(--text-2); font-weight: 500; margin-bottom: 2px; }

.pos {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; gap: 3px 10px;
  padding: 10px 11px; border-radius: 10px;
  overflow: hidden;
  animation: rise .28s cubic-bezier(.2, .8, .2, 1);
}
.pos + .pos { margin-top: 2px; }
.pos:hover { background: rgba(255, 255, 255, 0.025); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.pos-band { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.pos-band .coin { width: 16px; height: 16px; font-size: 9px; }
.pos-band .coin.emoji { font-size: 10.5px; }
.pos.other { cursor: pointer; }
.pos.other:hover { background: rgba(34, 232, 255, 0.05); }
.pos-sub { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pos-right { text-align: right; }
.pos-mult { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.pos-mult svg { width: 10px; height: 10px; opacity: .8; }
.pos-val { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.pos.win .pos-val { color: var(--win); }
.pos.loss .pos-val { color: var(--text-2); }
.pos.win::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px;
  background: var(--win); box-shadow: 0 0 8px var(--win);
}
.pos.live .pos-sub.when { color: var(--accent); }
.pos-bar { grid-column: 1 / -1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.05); margin-top: 6px; overflow: hidden; }
.pos-bar i { display: block; height: 100%; width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--violet), var(--accent)); border-radius: 2px; }

/* ───────── Stage ───────── */
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }
#chart { position: absolute; inset: 0; display: block; touch-action: manipulation; }

.hud {
  position: absolute; top: 14px; left: 16px; right: 100px;
  display: flex; align-items: center; gap: 14px;
  pointer-events: none;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; color: var(--text-2);
  height: 24px; padding: 0 9px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(11, 15, 23, 0.72); border: 1px solid var(--hair);
  backdrop-filter: blur(8px);
}
.chip b { font-family: var(--mono); font-weight: 500; color: var(--text); }
.legend {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
}
.legend i {
  width: 72px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--violet) 50%, var(--pink));
  box-shadow: 0 0 10px rgba(157, 92, 255, 0.5);
}
.chip.hot {
  color: #fff;
  border-color: rgba(255, 46, 196, 0.55);
  box-shadow: 0 0 14px rgba(255, 46, 196, 0.3);
}
.chip.hot em {
  font: 700 9.5px var(--mono); font-style: normal; letter-spacing: 0.08em;
  color: var(--pink); text-shadow: 0 0 8px var(--pink);
  animation: blink .6s ease-in-out infinite;
}
.pink { color: var(--pink) !important; }

/* Combo badge */
.combo {
  position: absolute; top: 50px; left: calc(50% - 43px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; z-index: 2;
}
.combo[hidden] { display: none; }
.combo-row {
  display: flex; align-items: baseline; gap: 9px;
  padding: 7px 14px 8px; border-radius: 13px;
  background: rgba(12, 6, 22, 0.78);
  border: 1px solid rgba(255, 46, 196, 0.55);
  box-shadow: 0 0 24px rgba(255, 46, 196, 0.3), inset 0 0 14px rgba(255, 46, 196, 0.12);
  backdrop-filter: blur(8px);
}
.combo-mult { font: 800 22px/1 var(--mono); color: #fff; text-shadow: 0 0 10px var(--pink), 0 0 24px var(--pink); }
.combo-label { font: 700 11px var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--pink); }
.combo-streak { font: 500 11px var(--mono); color: var(--text-2); }
.combo-pips { display: flex; gap: 3px; }
.combo-pips i { width: 15px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.combo-pips i.on { background: linear-gradient(90deg, var(--accent), var(--pink)); box-shadow: 0 0 8px rgba(255, 46, 196, 0.7); }
.combo.bump .combo-row { animation: bump .5s cubic-bezier(.2, 1.6, .3, 1); }
.combo.max .combo-row { animation: max-glow 1.2s ease-in-out infinite; }
.combo.max.bump .combo-row { animation: bump .5s cubic-bezier(.2, 1.6, .3, 1), max-glow 1.2s ease-in-out .5s infinite; }
.combo.lost .combo-row { border-color: rgba(255, 64, 110, 0.7); box-shadow: 0 0 24px rgba(255, 64, 110, 0.35); animation: shake-x .5s ease; }
.combo.lost .combo-mult { color: var(--loss); text-decoration: line-through; text-shadow: 0 0 12px var(--loss); }
.combo.lost .combo-label { color: var(--loss); }
.combo.lost .combo-pips { opacity: 0; transition: opacity .3s; }
@keyframes bump { from { transform: scale(1.4); } }
@keyframes shake-x { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes max-glow { 50% { box-shadow: 0 0 40px rgba(255, 46, 196, 0.6), 0 0 70px rgba(34, 232, 255, 0.25), inset 0 0 18px rgba(255, 46, 196, 0.25); } }

/* Jackpot takeover */
.jackpot {
  position: absolute; inset: 0 86px 30px 0;
  display: grid; place-items: center;
  overflow: hidden; pointer-events: none; z-index: 4;
}
.jackpot[hidden] { display: none; }
.jackpot::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(4, 5, 10, 0.72) 0%, rgba(4, 5, 10, 0.35) 35%, transparent 65%);
  animation: jp-fade 3s ease forwards;
}
.jp-rays {
  position: absolute; left: 50%; top: 50%; width: 1600px; height: 1600px;
  background: repeating-conic-gradient(rgba(255, 46, 196, 0.14) 0deg 5deg, transparent 5deg 15deg, rgba(34, 232, 255, 0.1) 15deg 20deg, transparent 20deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: jp-spin 8s linear infinite, jp-fade 3s ease forwards;
}
.jp-inner { position: relative; text-align: center; animation: jp-in .6s cubic-bezier(.2, 1.5, .3, 1), jp-out .5s ease 2.5s forwards; }
.jp-title {
  position: relative;
  font: 800 clamp(44px, 7vw, 84px)/1 var(--font); letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6), 0 0 30px var(--pink), 0 0 60px var(--pink), 0 0 90px rgba(157, 92, 255, 0.8);
}
.jp-title::before, .jp-title::after {
  content: attr(data-text); position: absolute; inset: 0;
  text-shadow: none; mix-blend-mode: screen;
}
.jp-title::before { color: var(--accent); animation: glitch-a 1.1s steps(2) infinite; }
.jp-title::after { color: var(--pink); animation: glitch-b .9s steps(2) infinite; }
.jp-mult {
  margin-top: 10px;
  font: 700 clamp(26px, 3.4vw, 40px)/1 var(--mono); color: #fff; letter-spacing: 0.02em;
  text-shadow: 0 0 14px var(--accent), 0 0 34px var(--accent);
}
.jp-amount {
  margin-top: 10px;
  font: 700 clamp(22px, 2.8vw, 32px)/1 var(--mono); color: var(--win);
  text-shadow: 0 0 14px var(--win), 0 0 30px rgba(61, 255, 168, 0.6);
  font-variant-numeric: tabular-nums;
}
.jp-sub { margin-top: 12px; font: 500 11.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.jackpot.mega .jp-title { animation: jp-hue 1.2s linear infinite; }
.jackpot.mega .jp-rays { animation: jp-spin 4s linear infinite, jp-fade 3.6s ease forwards; }
.jackpot.mega .jp-inner { animation: jp-in .7s cubic-bezier(.2, 1.5, .3, 1), jp-out .6s ease 3s forwards; }
@keyframes jp-in { from { transform: scale(2.6); opacity: 0; filter: blur(12px); } 60% { opacity: 1; filter: blur(0); } }
@keyframes jp-out { to { transform: scale(.9) translateY(-20px); opacity: 0; } }
@keyframes jp-fade { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes jp-spin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes jp-hue { to { filter: hue-rotate(360deg); } }
@keyframes glitch-a {
  0% { clip-path: inset(10% 0 70% 0); transform: translate(-4px, 0); }
  50% { clip-path: inset(60% 0 10% 0); transform: translate(3px, 0); }
  100% { clip-path: inset(30% 0 45% 0); transform: translate(-2px, 0); }
}
@keyframes glitch-b {
  0% { clip-path: inset(65% 0 5% 0); transform: translate(4px, 0); }
  50% { clip-path: inset(5% 0 75% 0); transform: translate(-3px, 0); }
  100% { clip-path: inset(40% 0 35% 0); transform: translate(2px, 0); }
}
.stage.jp-hit #chart { animation: canvas-hit .7s ease; }
.stage.jp-mega #chart { animation: canvas-mega 1.2s ease; }
@keyframes canvas-hit { 0% { filter: brightness(2.2) saturate(1.8); } 100% { filter: none; } }
@keyframes canvas-mega { 0% { filter: brightness(2.6) saturate(2) hue-rotate(0); } 50% { filter: brightness(1.4) saturate(1.6) hue-rotate(180deg); } 100% { filter: none; } }

/* Beat button */
.music {
  display: flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 12px 0 11px; border-radius: 10px;
  border: 1px solid var(--hair); background: var(--panel);
  color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: color .15s, border-color .15s, box-shadow .2s;
}
.music:hover { color: var(--text); border-color: var(--hair-2); }
.music.on {
  color: var(--text);
  border-color: rgba(255, 46, 196, 0.5);
  box-shadow: 0 0 16px rgba(255, 46, 196, 0.22), inset 0 0 10px rgba(255, 46, 196, 0.08);
}
.music b {
  display: inline-block; min-width: 3ch; text-align: right;
  font-family: var(--mono); font-weight: 600; color: var(--pink);
  text-shadow: 0 0 8px rgba(255, 46, 196, 0.7);
}
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; opacity: .6; transform-origin: bottom; transform: scaleY(.25); }
.music.on .eq i { background: linear-gradient(180deg, var(--pink), var(--accent)); opacity: 1; box-shadow: 0 0 6px rgba(255, 46, 196, 0.5); }

.tip {
  position: absolute; left: 0; top: 0;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(9, 10, 18, 0.96);
  border: 1px solid rgba(34, 232, 255, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 20px rgba(34, 232, 255, 0.08);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s;
  font-size: 12px;
}
.tip.show { opacity: 1; }
.tip-row { display: flex; justify-content: space-between; gap: 18px; line-height: 1.75; }
.tip-row span { color: var(--muted); }
.tip-row b { font-family: var(--mono); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.tip-row b.hl { color: var(--accent); font-weight: 600; }
.tip-head { font-family: var(--mono); font-size: 11px; color: var(--text-2); padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--hair); }

.toasts {
  position: absolute; top: 14px; right: 100px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 10px;
  border-radius: 11px;
  background: rgba(12, 16, 25, 0.9);
  border: 1px solid var(--hair-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  font-size: 12.5px;
  animation: toast-in .35s cubic-bezier(.2, .9, .2, 1.1);
}
.toast.out { animation: toast-out .3s ease forwards; }
.toast-ic {
  width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.06); color: var(--text-2);
}
.toast-ic svg { width: 13px; height: 13px; }
.toast.win { border-color: rgba(46, 240, 166, 0.3); }
.toast.win .toast-ic { background: rgba(46, 240, 166, 0.14); color: var(--win); }
.toast.warn .toast-ic { background: rgba(255, 197, 107, 0.12); color: var(--warn); }
.toast b { font-family: var(--mono); font-weight: 600; }
.toast.win b { color: var(--win); text-shadow: 0 0 12px rgba(61, 255, 168, 0.6); }
.toast.win { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 24px rgba(61, 255, 168, 0.15); }
.toast-streak {
  margin-left: 8px; padding: 2px 6px; border-radius: 5px;
  font: 600 10.5px var(--mono); text-transform: uppercase;
  color: var(--pink); background: rgba(255, 46, 196, 0.12);
}
.toast small { color: var(--muted); font-family: var(--mono); font-size: 11.5px; margin-left: 4px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(10px); } }

.dock {
  position: absolute; left: 50%; bottom: 46px; transform: translateX(calc(-50% - 43px));
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 14px;
  border-radius: 14px;
  background: rgba(11, 15, 23, 0.82);
  border: 1px solid var(--hair-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}
.dock-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stakes { display: flex; gap: 3px; }
.stake {
  position: relative;
  height: 32px; min-width: 52px; padding: 0 12px;
  border-radius: 9px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--text-2);
  transition: color .15s, background .15s, box-shadow .15s;
}
.stake:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.stake.active {
  color: var(--accent-ink);
  background: linear-gradient(135deg, #3cecff, #b56bff);
  box-shadow: 0 0 0 1px rgba(34, 232, 255, 0.45), 0 0 22px rgba(34, 232, 255, 0.35), 0 0 34px rgba(181, 107, 255, 0.25);
  font-weight: 700;
}
.stake kbd {
  position: absolute; top: -7px; right: -3px;
  font: 500 9px/1 var(--mono);
  padding: 2px 4px; border-radius: 4px;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--hair-2);
  opacity: 0; transition: opacity .15s;
}
.dock:hover .stake kbd { opacity: 1; }

/* ───────── Wallet & real money ───────── */
.wallet-btn {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--accent-ink);
  background: linear-gradient(135deg, #3cecff, #b56bff);
  box-shadow: 0 0 18px rgba(34, 232, 255, 0.25);
  transition: box-shadow .15s, transform .12s;
}
.wallet-btn:hover { box-shadow: 0 0 26px rgba(34, 232, 255, 0.4); }
.wallet-btn[hidden] { display: none; }
.wallet-btn.on {
  color: var(--text); background: var(--panel);
  border: 1px solid rgba(61, 255, 168, 0.35); box-shadow: 0 0 14px rgba(61, 255, 168, 0.12);
  font-weight: 500; padding: 0 12px;
}
.wallet-btn.on b { font-family: var(--mono); font-weight: 600; color: var(--win); }
.wallet-addr { font-family: var(--mono); color: var(--text-2); }
.wallet-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--win); box-shadow: 0 0 8px var(--win); }

.play-seg { display: flex; gap: 3px; padding: 3px; margin: -4px -4px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--hair); }
.play-seg[hidden] { display: none; }
.play-seg button { flex: 1; height: 28px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); transition: color .15s, background .15s; }
.play-seg button.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--hair-2); }
.play-seg button[data-play="real"].active { color: var(--win); box-shadow: inset 0 0 0 1px rgba(61, 255, 168, 0.4), 0 0 12px rgba(61, 255, 168, 0.12); }
body.real .account { border-color: rgba(61, 255, 168, 0.22); box-shadow: 0 0 24px rgba(61, 255, 168, 0.05); }
body.real .balance { color: #eafff6; text-shadow: 0 0 18px rgba(61, 255, 168, 0.25); }

.cash-actions { display: flex; gap: 8px; margin-top: 14px; }
.cash-actions[hidden] { display: none; }
.cash-btn {
  flex: 1; height: 34px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hair-2);
  transition: background .15s, border-color .15s;
}
.cash-btn:hover { background: rgba(255, 255, 255, 0.08); }
.cash-btn.primary { color: var(--accent-ink); border: 0; background: linear-gradient(135deg, #3cecff, #b56bff); }

.pos.pending { opacity: 0.6; }

.modal-card { position: relative; }
.modal-x {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  font-size: 18px; line-height: 1; color: var(--muted);
}
.modal-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.wallet-list { display: grid; gap: 8px; margin-top: 4px; }
.wallet-opt {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 14px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair-2);
  transition: border-color .15s, background .15s;
}
.wallet-opt:hover { border-color: rgba(34, 232, 255, 0.5); background: rgba(34, 232, 255, 0.06); }
.wallet-opt small { margin-left: auto; font: 500 11px var(--mono); color: var(--win); }
.wallet-opt.off { opacity: .6; }
.wallet-opt.off small { color: var(--muted); }
.wallet-ic { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.wallet-ic.phantom { background: linear-gradient(135deg, #ab9ff2, #534bb1); }
.wallet-ic.solflare { background: linear-gradient(135deg, #fc7227, #ffc10b); }
.wallet-ic.backpack { background: linear-gradient(135deg, #e33e3f, #a52a2a); }

.cashier-card { width: min(420px, 100%); }
.cashier-head { display: flex; align-items: center; gap: 10px; }
.net-badge {
  font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 7px; border-radius: 6px; color: var(--win); background: rgba(61, 255, 168, 0.1);
}
.net-badge.test { color: var(--warn); background: rgba(255, 197, 107, 0.1); }
.cashier-bal { margin: 4px 0 14px; font: 600 32px var(--mono); letter-spacing: -0.03em; }
.cash-tabs { padding: 0; margin-bottom: 14px; border-bottom: 0; }
.cash-body { display: grid; gap: 12px; min-height: 230px; align-content: start; }
.cash-body .fine { margin: 0; }
.cash-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.cash-row b { font-family: var(--mono); color: var(--text); font-weight: 500; }
.amount {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 8px 8px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair-2);
}
.amount:focus-within { border-color: rgba(34, 232, 255, 0.5); }
.amount > span { font: 600 20px var(--mono); color: var(--muted); }
.amount input { flex: 1; min-width: 80px; background: none; border: 0; outline: 0; color: var(--text); font: 600 22px var(--mono); }
.amount-quick { display: flex; gap: 4px; }
.amount-quick button { height: 28px; padding: 0 9px; border-radius: 7px; font: 500 12px var(--mono); color: var(--text-2); background: rgba(255, 255, 255, 0.06); }
.amount-quick button:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.primary-btn:disabled { opacity: .5; cursor: progress; }
.faucet { justify-self: center; color: var(--warn); }
.cash-status { font-size: 12.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); color: var(--text-2); }
.cash-status.ok { color: var(--win); background: rgba(61, 255, 168, 0.08); }
.cash-status.err { color: var(--loss); background: rgba(255, 64, 110, 0.08); }
.cash-status a, .act-row a { color: var(--accent); }
.activity { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.act-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--hair); font-size: 13px; }
.act-row small { display: block; font-size: 11px; color: var(--muted); }
.act-right { text-align: right; }
.act-right b { font-family: var(--mono); }
.act-right b.up { color: var(--win); }
.st-failed { color: var(--loss) !important; }
.cash-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 12px; color: var(--muted); }
.cash-foot b { font-family: var(--mono); color: var(--text-2); font-weight: 500; }

/* ───────── Live pot ───────── */
.pot-pill {
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 12px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(61, 255, 168, 0.08), rgba(255, 197, 107, 0.1));
  border: 1px solid rgba(255, 197, 107, 0.35);
  box-shadow: 0 0 18px rgba(255, 197, 107, 0.12);
  white-space: nowrap;
  transition: box-shadow .2s, border-color .2s;
}
.pot-pill:hover { border-color: rgba(255, 197, 107, 0.6); box-shadow: 0 0 24px rgba(255, 197, 107, 0.22); }
.pot-pill[hidden] { display: none; }
.pot-part { display: flex; align-items: baseline; gap: 6px; }
.pot-lbl { font: 600 10px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pot-part b { font: 600 13px var(--mono); color: var(--win); font-variant-numeric: tabular-nums; }
.pot-part.jp b { color: #ffd56b; text-shadow: 0 0 10px rgba(255, 197, 107, 0.6); }
.pot-sep { width: 1px; height: 16px; background: var(--hair-2); }
.pot-pill.bump { animation: pot-bump .9s ease; }
@keyframes pot-bump { 25% { box-shadow: 0 0 36px rgba(255, 197, 107, 0.6); transform: scale(1.04); } }

.pot-card { width: min(440px, 100%); }
.pot-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pot-box {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px; border-radius: 14px;
  background: rgba(61, 255, 168, 0.06); border: 1px solid rgba(61, 255, 168, 0.25);
}
.pot-box span { font: 600 10.5px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pot-box b { font: 700 24px var(--mono); letter-spacing: -0.02em; color: var(--win); text-shadow: 0 0 16px rgba(61, 255, 168, 0.35); }
.pot-box small { font-size: 11.5px; color: var(--muted); }
.pot-box.jp { background: rgba(255, 197, 107, 0.07); border-color: rgba(255, 197, 107, 0.35); }
.pot-box.jp b { color: #ffd56b; text-shadow: 0 0 18px rgba(255, 197, 107, 0.5); }
.pot-rows { display: grid; gap: 2px; margin-bottom: 14px; }
.pot-rows .cash-row { padding: 6px 2px; border-bottom: 1px solid var(--hair); }
.pot-feed { display: grid; gap: 6px; }
.pot-feed .act-row { padding: 8px 2px; }
.pot-feed .split { font: 500 11px var(--mono); color: var(--muted); }
#pm-proof { margin: 14px 0 0; }
#pm-proof a { color: var(--accent); }

@media (max-width: 1240px) { .pot-part:not(.jp), .pot-sep { display: none; } }

.gold { color: #ffd56b !important; text-shadow: 0 0 10px rgba(255, 197, 107, 0.45); }
.toast-streak.gold { color: #ffd56b; background: rgba(255, 197, 107, 0.12); }
.tip-row b.gold { font-weight: 600; }
.jp-bonus {
  margin-top: 8px;
  font: 600 clamp(14px, 1.6vw, 18px)/1 var(--mono); letter-spacing: 0.02em;
  color: #ffd56b; text-shadow: 0 0 12px rgba(255, 197, 107, 0.7), 0 0 26px rgba(255, 197, 107, 0.35);
}

/* ───────── Intro modal ───────── */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(3, 5, 8, 0.66);
  backdrop-filter: blur(6px);
  animation: fade .25s ease;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: min(440px, 100%);
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, #0f1420, #0a0e16);
  border: 1px solid var(--hair-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: rise .35s cubic-bezier(.2, .8, .2, 1);
}
.modal-grid { display: grid; grid-template-columns: repeat(3, 22px); gap: 4px; margin-bottom: 18px; }
.modal-grid i { height: 22px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--hair); }
.modal-grid i.hot { background: rgba(124, 108, 255, 0.18); }
.modal-grid i.on { background: rgba(76, 224, 255, 0.22); box-shadow: inset 0 0 0 1px var(--accent), 0 0 16px rgba(76, 224, 255, 0.35); }
.modal h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.modal ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.modal li { counter-increment: s; position: relative; padding-left: 32px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.modal li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 21px; height: 21px; border-radius: 6px;
  display: grid; place-items: center;
  font: 600 11px var(--mono); color: var(--accent);
  background: rgba(76, 224, 255, 0.1);
}
.modal li b { color: var(--text); font-weight: 500; }
.fine { margin: 16px 0 18px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.primary-btn {
  width: 100%; height: 42px; border-radius: 11px;
  font-weight: 700; color: var(--accent-ink);
  background: linear-gradient(135deg, #3cecff, #b56bff);
  box-shadow: 0 0 24px rgba(34, 232, 255, 0.3), 0 0 40px rgba(181, 107, 255, 0.2);
  transition: transform .12s, box-shadow .15s;
}
.primary-btn:hover { box-shadow: 0 0 30px rgba(34, 232, 255, 0.45), 0 0 50px rgba(181, 107, 255, 0.3); }
.primary-btn:active { transform: translateY(1px); }

/* ───────── Small screens ───────── */
@media (max-width: 1360px) {
  .quick { display: none; }
}
@media (max-width: 1100px) {
  .ticker-change, .picker-name { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr 34vh; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .brand span, .divider, .legend { display: none; }
  .spacer { display: none; }
  .ticker { order: 5; width: 100%; }
  .side { grid-row: 3; border-right: 0; border-top: 1px solid var(--hair); padding: 10px 16px; flex-direction: row; overflow-x: auto; }
  .account { flex: none; width: 260px; }
  .positions { flex: 1; min-width: 260px; }
  .spark { height: 36px; margin: 8px 0; }
  .balance { font-size: 24px; }
  .dock { bottom: 40px; transform: translateX(-50%); padding-left: 10px; }
  .dock-label { display: none; }
  .stake { min-width: 0; padding: 0 9px; }
  .hud, .toasts { right: 16px; }
  .toasts { top: 50px; }
  .combo { left: calc(50% - 43px); top: 84px; }
  .picker-pop { width: calc(100vw - 32px); }
  .pk-row { grid-template-columns: 26px 1fr 96px 60px; }
  .pk-spark { display: none; }
  .music-label { display: none; }
  .jackpot { inset: 0 86px 30px 0; }
}
