/* ============================================================
   sheckles — fake-currency casino
   ============================================================ */

:root {
  --bg: #0f1923;
  --bg-2: #131f2b;
  --panel: #1a2c38;
  --panel-2: #213743;
  --panel-3: #2a4553;
  --line: #2f4553;
  --line-2: #3d5b6b;

  --text: #ffffff;
  --text-2: #b1bad3;
  --text-3: #7f8fa4;

  --green: #00e701;
  --green-dim: #0f7a1a;
  --red: #ff4d67;
  --gold: #ffc93c;
  --purple: #a06bff;
  --blue: #3d9bff;
  --cyan: #22d3ee;
  --pink: #ff5fa2;
  --orange: #ff8a3d;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --r: 6px;
  --r-lg: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 6px; }

/* ---------- top bar ------------------------------------------------------ */

.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 0 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(145deg, var(--green), #00a800);
  display: grid; place-items: center;
  box-shadow: 0 0 18px rgba(0, 231, 1, .35);
  color: #06240a;
}
.brand-mark svg { width: 17px; height: 17px; stroke-width: 2.6; }

/* wallet */
.wallet { display: flex; align-items: stretch; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.wallet-amt { display: flex; align-items: center; gap: 8px; padding: 0 14px; font-family: var(--mono); font-weight: 700; font-size: 15px; }
.wallet-amt i { width: 15px; height: 15px; border-radius: 50%; background: linear-gradient(145deg, var(--gold), #d99a00); box-shadow: inset 0 -1px 2px rgba(0,0,0,.4); flex: none; }
.wallet-faucet { padding: 0 14px; background: var(--green); color: #04220a; font-weight: 700; font-size: 12px; display: grid; place-items: center; transition: filter .15s; }
.wallet-faucet:hover { filter: brightness(1.12); }
.wallet-faucet:disabled { background: var(--panel-3); color: var(--text-3); cursor: not-allowed; }

.spacer { flex: 1; }

.search-wrap { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 36px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); min-width: 180px; }
.search-wrap svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }
#search { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 13px; }
#search::placeholder { color: var(--text-3); }

.who { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; background: var(--panel-2); border-radius: var(--r); font-size: 13px; font-weight: 600; transition: background .15s; }
.who:hover { background: var(--panel-3); }
.who-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---------- layout ------------------------------------------------------- */

.view { max-width: 1320px; margin: 0 auto; padding: 20px 16px 70px; }

/* ---------- stat strip --------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--panel); border-radius: var(--r-lg); padding: 13px 16px; border: 1px solid var(--line); }
.stat span { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.stat b { font-family: var(--mono); font-size: 19px; font-weight: 700; }
.stat.up b { color: var(--green); }
.stat.down b { color: var(--red); }

/* ---------- category tabs ------------------------------------------------ */

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { padding: 8px 16px; border-radius: 100px; background: var(--panel); font-size: 12.5px; font-weight: 700; color: var(--text-2); transition: .15s; border: 1px solid transparent; }
.pill:hover { background: var(--panel-2); color: var(--text); }
.pill.on { background: var(--green); color: #04220a; }

/* ---------- game grid ---------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }

.card {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--tile, var(--panel));
  aspect-ratio: 4 / 5;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px;
  text-align: left;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 80% 10%, rgba(255,255,255,.22), transparent 60%);
}
.card-art { position: absolute; right: -14px; top: -6px; width: 108px; height: 108px; opacity: .9; color: rgba(255,255,255,.92); }
.card-art svg { stroke-width: 1.6; }
.card h3 { position: relative; font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.card .card-tag { position: relative; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.card .pvp { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.45); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; padding: 3px 7px; border-radius: 4px; }

.empty { grid-column: 1/-1; padding: 60px 0; text-align: center; color: var(--text-3); }

/* ---------- game view ---------------------------------------------------- */

.game-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.btn-back { width: 38px; height: 38px; border-radius: var(--r); background: var(--panel); display: grid; place-items: center; }
.btn-back:hover { background: var(--panel-2); }
.btn-back svg { width: 18px; height: 18px; }
.game-head h2 { font-size: 20px; }
.game-head p { margin: 0; font-size: 12px; color: var(--text-3); }

.table { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.panel { background: var(--panel); border-radius: var(--r-lg); padding: 16px; border: 1px solid var(--line); }
.board { background: var(--panel-2); border-radius: var(--r-lg); padding: 20px; min-height: 460px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; border: 1px solid var(--line); position: relative; overflow: hidden; }

/* bet controls */
.field { margin-bottom: 12px; }
.field label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.amount { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.amount input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 10px 12px; font-family: var(--mono); font-weight: 700; }
.amount button { padding: 0 11px; font-size: 11px; font-weight: 800; color: var(--text-2); border-left: 1px solid var(--line); }
.amount button:hover { background: var(--panel-2); color: var(--text); }

.inp { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; outline: none; font-family: var(--mono); font-weight: 700; }
.inp:focus { border-color: var(--line-2); }
select.inp { font-family: var(--sans); font-weight: 600; }

.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.seg button.on { background: var(--panel-3); color: var(--text); }

.btn-bet {
  width: 100%; padding: 14px; border-radius: var(--r);
  background: var(--green); color: #04220a;
  font-size: 15px; font-weight: 800;
  transition: filter .15s, transform .1s;
  box-shadow: 0 4px 14px rgba(0,231,1,.25);
}
.btn-bet:hover:not(:disabled) { filter: brightness(1.1); }
.btn-bet:active:not(:disabled) { transform: scale(.985); }
.btn-bet:disabled { background: var(--panel-3); color: var(--text-3); box-shadow: none; cursor: not-allowed; }
.btn-alt { width: 100%; padding: 12px; border-radius: var(--r); background: var(--panel-3); font-weight: 800; margin-top: 8px; }
.btn-alt:hover { background: var(--line-2); }
.btn-cash { background: var(--gold); color: #2a1c00; }

.hint { font-size: 11.5px; color: var(--text-3); margin-top: 10px; text-align: center; }
.err { color: var(--red); font-size: 12px; font-weight: 600; margin-top: 8px; text-align: center; min-height: 16px; }

/* result banner */
.result { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); padding: 8px 18px; border-radius: 100px; font-weight: 800; font-size: 14px; animation: pop .25s ease; }
.result.win { background: rgba(0,231,1,.15); color: var(--green); border: 1px solid rgba(0,231,1,.4); }
.result.lose { background: rgba(255,77,103,.12); color: var(--red); border: 1px solid rgba(255,77,103,.35); }
@keyframes pop { from { transform: translateX(-50%) scale(.8); opacity: 0; } }

.bigmult { font-family: var(--mono); font-size: 60px; font-weight: 800; letter-spacing: -.03em; }
.bigmult.win { color: var(--green); text-shadow: 0 0 30px rgba(0,231,1,.4); }
.bigmult.lose { color: var(--red); }

/* ---------- feed --------------------------------------------------------- */

.feed { margin-top: 24px; }
.feed h3 { font-size: 14px; margin-bottom: 10px; }
.feed-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--r-lg); overflow: hidden; font-size: 12.5px; }
.feed-table th { text-align: left; padding: 10px 14px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); background: var(--panel-2); }
.feed-table td { padding: 9px 14px; border-top: 1px solid var(--line); font-family: var(--mono); }
.feed-table td:first-child, .feed-table td:nth-child(2) { font-family: var(--sans); font-weight: 600; }
.feed-table .up { color: var(--green); }
.feed-table .down { color: var(--text-3); }

/* ---------- lobbies ------------------------------------------------------ */

.lobby-list { display: flex; flex-direction: column; gap: 8px; }
.lobby-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px; background: var(--panel-2); border-radius: var(--r); padding: 12px 14px; }
.lobby-row b { font-size: 13px; }
.lobby-row span { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.btn-join { padding: 7px 16px; border-radius: var(--r); background: var(--green); color: #04220a; font-weight: 800; font-size: 12px; }
.btn-join:hover { filter: brightness(1.1); }
.btn-small { padding: 7px 14px; border-radius: var(--r); background: var(--panel-3); font-weight: 700; font-size: 12px; }
.btn-small:hover { background: var(--line-2); }

.seats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.seat { width: 92px; padding: 12px 8px; border-radius: var(--r); background: var(--panel); border: 1px dashed var(--line-2); text-align: center; font-size: 12px; }
.seat.filled { border-style: solid; background: var(--panel-3); font-weight: 700; }
.seat.bot { color: var(--purple); }
.seat.winner { background: rgba(0,231,1,.16); border-color: var(--green); color: var(--green); }
.seat small { display: block; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }

/* ---------- fairness ----------------------------------------------------- */

.fair { margin-top: 12px; font-size: 11px; color: var(--text-3); word-break: break-all; line-height: 1.7; }
.fair b { color: var(--text-2); font-weight: 700; }
.fair code { font-family: var(--mono); font-size: 10px; }

/* ---------- modal -------------------------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(4, 10, 15, .8); }
.modal-card { width: min(420px, calc(100% - 32px)); padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.modal-card h3 { font-size: 17px; }
.modal-card p { margin: 8px 0 16px; font-size: 13px; color: var(--text-2); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ---------- per-game boards ---------------------------------------------- */

.mines-grid { display: grid; grid-template-columns: repeat(5, 62px); gap: 8px; }
.mine-cell { width: 62px; height: 62px; border-radius: var(--r); background: var(--panel-3); display: grid; place-items: center; font-size: 22px; transition: transform .12s, background .15s; box-shadow: 0 3px 0 rgba(0,0,0,.28); }
.mine-cell:hover:not(:disabled) { background: var(--line-2); transform: translateY(-2px); }
.mine-cell:disabled { cursor: default; }
.mine-cell.gem { background: rgba(0,231,1,.15); box-shadow: inset 0 0 0 1px rgba(0,231,1,.4); }
.mine-cell.bomb { background: rgba(255,77,103,.2); box-shadow: inset 0 0 0 1px rgba(255,77,103,.5); }
.mine-cell.dim { opacity: .35; }

.tower { display: flex; flex-direction: column-reverse; gap: 5px; }
.tower-row { display: flex; gap: 5px; }
.tower-cell { width: 76px; height: 34px; border-radius: 5px; background: var(--panel-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.tower-row.active .tower-cell:hover { background: var(--line-2); }
.tower-cell.good { background: rgba(0,231,1,.2); color: var(--green); }
.tower-cell.bad { background: rgba(255,77,103,.22); color: var(--red); }
.tower-row.done { opacity: .5; }

.card-face { width: 92px; height: 130px; border-radius: 8px; background: #f6f7fb; color: #10151c; display: grid; place-items: center; font-size: 30px; font-weight: 800; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.card-face.red { color: #d32f45; }
.card-face.back { background: linear-gradient(135deg, #26506e, #16283a); color: transparent; }
.hand { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hand .card-face { width: 66px; height: 94px; font-size: 21px; }
.hand-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }

.wheel-wrap { position: relative; width: 300px; height: 300px; }
.roulette-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; width: 100%; max-width: 420px; }

/* the felt: zero down the left, 3x12 of numbers, columns on the right,
   dozens and even-money bets stacked underneath — as on a real layout */
.felt {
  display: grid;
  grid-template-columns: 38px repeat(12, minmax(0, 1fr)) 46px;
  grid-template-rows: repeat(3, 38px) 32px 32px;
  gap: 3px;
  padding: 8px;
  width: min(640px, 100%);
  background: repeating-linear-gradient(135deg, #0d5c34 0 12px, #0c5531 12px 24px);
  border: 7px solid #6b4d1c;
  border-radius: 10px;
  box-shadow: inset 0 0 40px rgba(0,0,0,.45), 0 10px 26px rgba(0,0,0,.45);
}
.rt {
  position: relative;
  border-radius: 3px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 12.5px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  transition: filter .12s, transform .12s;
  line-height: 1;
}
.rt:hover { filter: brightness(1.4); transform: translateY(-1px); }
.rt.red { background: #c0304a; }
.rt.black { background: #17232d; }
.rt.green { background: #0f7a1a; }
.rt.outside { background: rgba(255,255,255,.07); font-size: 10.5px; letter-spacing: .04em; }
.rt.outside.red { background: #c0304a; } .rt.outside.black { background: #17232d; }
.rt.hit { outline: 3px solid var(--gold); outline-offset: -1px; z-index: 3; animation: popIn .3s ease; }

.rt-chip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  min-width: 27px; height: 27px; padding: 0 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #c98a00);
  border: 2px dashed rgba(255,255,255,.65);
  color: #2a1c00; font-size: 9px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 3px 7px rgba(0,0,0,.55);
  z-index: 2; pointer-events: none;
  animation: popIn .2s cubic-bezier(.2,.9,.3,1);
}

@media (max-width: 700px) {
  .felt { grid-template-columns: 26px repeat(12, minmax(0, 1fr)) 32px; grid-template-rows: repeat(3, 28px) 26px 26px; }
  .rt { font-size: 10px; }
  .rt.outside { font-size: 8px; }
  .rt-chip { min-width: 20px; height: 20px; font-size: 7.5px; }
}
.chip-btn { padding: 10px 6px; border-radius: 5px; background: var(--panel-3); font-size: 12px; font-weight: 700; text-align: center; }
.chip-btn:hover { background: var(--line-2); }
.chip-btn.red { background: #c0304a; } .chip-btn.black { background: #16222c; }
.chip-btn.green { background: var(--green-dim); }
.chip-btn.on { outline: 2px solid var(--gold); }
.chip-btn b { display: block; font-family: var(--mono); font-size: 10px; color: var(--gold); }

.keno-grid { display: grid; grid-template-columns: repeat(8, 46px); gap: 6px; }
.keno-cell { height: 42px; border-radius: 5px; background: var(--panel-3); font-family: var(--mono); font-weight: 700; font-size: 13px; }
.keno-cell.pick { background: var(--purple); }
.keno-cell.hit { background: var(--green); color: #04220a; }
.keno-cell.miss { background: var(--panel); color: var(--text-3); }

canvas.board-canvas { border-radius: var(--r); background: var(--bg); max-width: 100%; }

/* ---------- crates ------------------------------------------------------- */

.crate-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.crate {
  width: 116px; padding: 12px 8px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .15s, border-color .15s, background .15s;
}
.crate:hover { transform: translateY(-3px); background: var(--panel-2); }
.crate.on { border-color: var(--accent); background: var(--panel-3); box-shadow: 0 0 20px -6px var(--accent); }
.crate-top {
  width: 52px; height: 40px; border-radius: 5px;
  background: linear-gradient(160deg, var(--accent), rgba(0,0,0,.5));
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.35), 0 4px 10px rgba(0,0,0,.4);
  position: relative;
}
.crate-top::after { content: ""; position: absolute; left: 0; right: 0; top: 45%; height: 5px; background: rgba(0,0,0,.45); }
.crate b { font-size: 11.5px; text-align: center; line-height: 1.2; }
.crate span { font-size: 11px; color: var(--gold); font-weight: 700; }

.reel-frame {
  position: relative; width: 100%; max-width: 620px; height: 108px;
  overflow: hidden; border-radius: var(--r-lg);
  background: var(--bg); border: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.reel-strip { display: flex; gap: 8px; padding: 10px 0; height: 100%; will-change: transform; }
.reel-cell {
  width: 108px; flex: none; border-radius: var(--r);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, transparent), var(--panel));
  border-bottom: 3px solid var(--c);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px;
}
.reel-cell b { font-size: 10.5px; text-align: center; line-height: 1.15; }
.reel-cell span { font-size: 10.5px; color: var(--gold); font-weight: 700; }
.reel-mark { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--gold); box-shadow: 0 0 12px var(--gold); transform: translateX(-50%); z-index: 2; }

.pulls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; min-height: 10px; }
.pull { padding: 8px 12px; border-radius: var(--r); background: var(--panel-2); border-bottom: 3px solid var(--c); text-align: center; }
.pull b { display: block; font-size: 11.5px; }
.pull span { font-size: 11px; color: var(--gold); font-weight: 700; }

.odds { margin-top: 12px; display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; }
.odd { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center; font-size: 11px; padding: 4px 2px; }
.odd .dot { width: 8px; height: 8px; border-radius: 50%; }
.odd b { font-weight: 600; color: var(--text-2); }
.odd .num { color: var(--gold); font-weight: 700; }
.odd .pct { color: var(--text-3); min-width: 46px; text-align: right; }

/* ---------- battles ------------------------------------------------------ */

.battle-grid { display: grid; gap: 8px; width: 100%; }
.battle-player { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.battle-player.win { border-color: var(--green); background: rgba(0,231,1,.08); }
.battle-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.battle-head .num { color: var(--gold); }
.battle-pulls { display: flex; gap: 5px; flex-wrap: wrap; }
.battle-pull { padding: 5px 8px; border-radius: 4px; background: var(--panel-2); border-bottom: 2px solid var(--c); font-size: 10px; }
.battle-pull span { display: block; color: var(--gold); font-weight: 700; }
.case-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.case-pick button { padding: 6px 10px; border-radius: var(--r); background: var(--panel-2); font-size: 11px; font-weight: 700; border: 1px solid var(--line); }
.case-pick button.on { border-color: var(--gold); color: var(--gold); }
.chosen-cases { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.chosen-cases span { font-size: 10.5px; padding: 4px 8px; border-radius: 4px; background: var(--panel-3); }

/* ---------- animation ---------------------------------------------------- */

@keyframes dealIn {
  from { opacity: 0; transform: translate(60px, -70px) rotate(14deg) scale(.85); }
  to   { opacity: 1; transform: none; }
}
@keyframes flipIn {
  0%   { transform: rotateY(90deg) scale(.9); opacity: .4; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 rgba(0,231,1,0); }
  50% { box-shadow: 0 0 26px rgba(0,231,1,.6); }
}
@keyframes floatUp {
  from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to   { opacity: 0; transform: translate(-50%, -54px) scale(1.25); }
}
@keyframes sheen { from { background-position: -220% 0; } to { background-position: 220% 0; } }

.anim-flip { animation: flipIn .3s cubic-bezier(.2,.9,.3,1) both; }
.anim-pop { animation: popIn .26s cubic-bezier(.2,.9,.3,1) both; }
.anim-shake { animation: shake .42s ease; }
.anim-glow { animation: glowPulse .9s ease 2; }

/* floating "+123.45" that drifts off the board on a win */
.float-win {
  position: absolute; left: 50%; top: 42%;
  font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--green);
  text-shadow: 0 0 18px rgba(0,231,1,.55);
  pointer-events: none;
  animation: floatUp 1.25s ease-out forwards;
}
.float-win.neg { color: var(--red); text-shadow: none; }

/* big verdict stamped across the table */
.verdict {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  font-size: clamp(38px, 8vw, 68px); font-weight: 900; letter-spacing: -.03em;
  pointer-events: none; z-index: 6; white-space: nowrap;
  animation: stamp .42s cubic-bezier(.2,.9,.3,1) both;
}
.verdict.bad { color: var(--red); text-shadow: 0 0 34px rgba(255,77,103,.55), 0 6px 18px rgba(0,0,0,.7); }
.verdict.good { color: var(--green); text-shadow: 0 0 34px rgba(0,231,1,.5), 0 6px 18px rgba(0,0,0,.7); }
.verdict.flat { color: var(--text-2); text-shadow: 0 6px 18px rgba(0,0,0,.7); }
@keyframes stamp {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(2.1) rotate(-9deg); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(.94) rotate(2deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
}

/* the balance flashes when it moves */
.wallet-amt.bump { animation: popIn .3s ease; }
.wallet-amt.up span { color: var(--green); transition: color .5s; }
.wallet-amt.down span { color: var(--red); transition: color .5s; }

/* big-win shimmer across the multiplier */
.bigmult.shimmer {
  background: linear-gradient(100deg, var(--green) 30%, #fff 50%, var(--green) 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: sheen 1.1s linear 2;
}

.mine-cell.gem { animation: popIn .24s cubic-bezier(.2,.9,.3,1); }
.tower-cell.good, .tower-cell.bad { animation: popIn .2s ease; }
.keno-cell.hit { animation: popIn .3s cubic-bezier(.2,.9,.3,1) both; }
.card-face { transition: transform .18s; }

.mute { width: 36px; height: 36px; border-radius: var(--r); background: var(--panel-2); display: grid; place-items: center; }
.mute:hover { background: var(--panel-3); }
.mute svg { width: 17px; height: 17px; }

@media (prefers-reduced-motion: reduce) {
  .anim-flip, .anim-pop, .anim-shake, .anim-glow, .float-win, .bigmult.shimmer { animation: none !important; }
}

@media (max-width: 900px) {
  .table { grid-template-columns: 1fr; }
  .mines-grid { grid-template-columns: repeat(5, 54px); }
  .mine-cell { width: 54px; height: 54px; }
}
