:root {
  --bg: #1b2131;
  --bg-deep: #161b28;
  --panel: #222a3c;
  --panel-2: #1e2535;
  --side: #232b3d;
  --line: #2d364b;
  --text: #d4dbe8;
  --muted: #8691a9;
  --yellow: #f7c331;
  --yellow-2: #e9b21d;
  --blue: #1fa2e0;
  --red: #d9625a;
  --black: #2e3546;
  --green: #3f8f5a;
  --ct: #5b8bd6;
  --t: #e2a93b;
  --top-h: 66px;
  --side-w: 250px;
  --chat-w: 330px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.4 Lato, system-ui, sans-serif;
  display: grid;
  grid-template: var(--top-h) 1fr / var(--side-w) 1fr var(--chat-w);
  grid-template-areas: "top top top" "side main chat";
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top {
  grid-area: top; display: flex; align-items: center; gap: 8px;
  background: var(--panel); border-bottom: 1px solid var(--line); padding-right: 0;
  position: relative; z-index: 5;
}
.logo { width: var(--side-w); display: flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; }
.logo img { height: 54px; width: auto; display: block; }
.modal-logo { display: block; width: 220px; max-width: 70%; margin: 4px auto 20px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3cc0ff, var(--blue)); color: #fff; font-size: 20px;
  transform: rotate(-8deg); box-shadow: 0 3px 0 #0f6e9e;
}
.logo-text { font-weight: 900; font-size: 26px; letter-spacing: 1px; color: #fff; line-height: 1; position: relative; }
.logo-text small { position: absolute; right: -6px; bottom: -11px; font-size: 11px; font-style: italic; color: var(--blue); letter-spacing: 0; font-weight: 700; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 18px; padding: 10px; }
.icon-btn:hover { color: #fff; }
.online { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.online b { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4cd964; box-shadow: 0 0 6px #4cd964; display: inline-block; }
.play-money { background: var(--blue); color: #fff; font-weight: 900; font-size: 12px; padding: 5px 9px; border-radius: 3px; margin-left: 12px; letter-spacing: .5px; }
.spacer { flex: 1; }
.chat-toggle { display: none; }
#account { display: flex; align-items: center; height: 100%; }
.acc-user { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 100%; cursor: pointer; position: relative; }
.acc-user .name { font-size: 15px; }
.acc-balance {
  background: var(--yellow); color: #3a2d05; font-weight: 900; height: 100%; padding: 0 18px;
  display: flex; align-items: center; gap: 10px; font-size: 16px; min-width: 120px; justify-content: center;
}
.acc-balance.flash-up { animation: flashUp .8s; }
.acc-balance.flash-down { animation: flashDown .8s; }
@keyframes flashUp { 30% { background: #7be07b; } }
@keyframes flashDown { 30% { background: #f08a7e; } }
.acc-menu {
  position: absolute; top: 100%; right: 0; background: var(--panel); border: 1px solid var(--line);
  min-width: 220px; padding: 12px; display: none; box-shadow: 0 10px 30px #0008; cursor: default;
}
.acc-user.open .acc-menu { display: block; }
.acc-menu .row { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; padding: 4px 0; }
.acc-menu .row b { color: var(--text); }
.acc-menu button { margin-top: 10px; width: 100%; }
.signin-btn { margin-right: 14px; }

/* ---------- sidebar ---------- */
.side { grid-area: side; background: var(--side); overflow-y: auto; padding: 6px 0 20px; z-index: 4; }
.side a { display: flex; align-items: center; gap: 16px; padding: 13px 26px; color: #b8c1d4; font-size: 17px; position: relative; }
.side a i:first-child { width: 22px; text-align: center; font-size: 18px; }
.side a:hover { background: #283146; color: #fff; }
.side a.on { background: #2a3248; color: #fff; }
.side a.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--yellow); }
.side .chev { margin-left: auto; font-size: 12px; color: var(--muted); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.c-orange { color: #f39a2b; } .c-red { color: #e0574f; } .c-green { color: #3fbf6f; } .c-pink { color: #e05a9a; }
.c-yellow { color: #f7c331; } .c-blue { color: #3a8fe8; } .c-purple { color: #9b6bf2; } .c-grey { color: #a8b0c2; }

/* ---------- main ---------- */
main { grid-area: main; overflow-y: auto; overflow-x: hidden; background: var(--bg-deep); }
.panel { background: var(--bg); border-bottom: 1px solid #141926; }
.panel-title {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 900; font-size: 17px;
  color: #fff; background: var(--panel-2); text-transform: uppercase; letter-spacing: .3px;
}
.panel-title .right { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); text-transform: none; }
.panel-body { padding: 14px; }

.game-head { position: relative; height: 78px; background: #1a2030; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.game-head .bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: repeating-linear-gradient(-45deg, #1d9ad6 0 18px, #29aef0 18px 36px);
  background-size: 51px 51px; animation: stripes 1s linear infinite;
}
@keyframes stripes { to { background-position: 51px 0; } }
.game-head .timer {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 1;
  background: #1b2131; color: #fff; font-size: 26px; padding: 6px 14px; border-radius: 5px; min-width: 78px; text-align: center;
}
.game-head .pot {
  position: relative; z-index: 1; font-size: 40px; font-weight: 700; color: var(--yellow);
  background: #1b2131; padding: 2px 14px; border-radius: 6px;
}
.game-head .sub { position: absolute; right: 16px; z-index: 1; color: #fff; font-size: 13px; background: #1b2131cc; padding: 4px 10px; border-radius: 4px; }

/* avatars */
.av {
  display: inline-grid; place-items: center; flex-shrink: 0; font-weight: 900; color: #fff;
  text-shadow: 0 1px 2px #0006; overflow: hidden; position: relative; user-select: none;
}
.av.sm { width: 26px; height: 26px; font-size: 11px; border-radius: 3px; }
.av.md { width: 36px; height: 36px; font-size: 14px; border-radius: 4px; }
.av.pic { background: #0b0e15; }
.av.pic img { width: 100%; height: 100%; display: block; }
.pic-box { max-width: 460px; }
.pic-box h3 { margin: 0 0 14px; color: #fff; }
.pic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pic-opt { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; overflow: hidden; aspect-ratio: 1; }
.pic-opt img { width: 100%; height: 100%; display: block; }
.pic-opt:hover { border-color: #ffffff66; transform: scale(1.05); }
.pic-opt.on { border-color: var(--yellow); }
.pic-actions { display: flex; gap: 8px; margin-top: 14px; }
.pic-actions button { flex: 1; }
.acc-menu button + button { margin-top: 6px; }
.lvl { display: inline-block; min-width: 22px; padding: 1px 4px; font-size: 10px; font-weight: 900; text-align: center; border-radius: 2px; background: #3a4359; color: #cdd5e5; }

/* buttons */
.btn-yellow { background: var(--yellow); color: #3a2d05; border: 0; font-weight: 900; padding: 10px 18px; border-radius: 3px; letter-spacing: .5px; }
.btn-yellow:hover { background: #ffd04a; }
.btn-dark { background: #2c3449; border: 0; padding: 8px 14px; border-radius: 3px; color: #d6deec; font-weight: 700; }
.btn-dark:hover { background: #374058; }
.btn-red { background: var(--red); border: 0; padding: 8px 14px; border-radius: 3px; color: #fff; font-weight: 700; }
.wide { width: 100%; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* amount input with quick buttons */
.amount-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.quick { display: flex; gap: 4px; flex-wrap: wrap; }
.quick button { flex: 1; background: #1a2030; border: 0; color: #c2cadb; font-size: 12px; font-weight: 700; padding: 6px 8px; border-radius: 2px; min-width: 40px; }
.quick button:hover { background: #2c3449; color: #fff; }
.amount-input { background: #141926; border: 1px solid #252d40; border-radius: 3px; padding: 12px; text-align: center; font-size: 17px; width: 100%; outline: none; }
.amount-input:focus { border-color: #3b4560; }

/* ---------- jackpot ---------- */
.jp-stage { position: relative; padding: 14px 70px; min-height: 160px; display: flex; align-items: center; }
.jp-players { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; flex: 1; }
@media (min-width: 1201px) {
  body.side-hidden { grid-template-columns: 0 1fr var(--chat-w); }
  body.side-hidden .side { display: none; }
}
@media (min-width: 861px) and (max-width: 1200px) {
  body.side-hidden { grid-template-columns: 0 1fr; }
  body.side-hidden .side { display: none; }
}
.jp-player { width: 116px; flex-shrink: 0; position: relative; }
.jp-player .av { width: 116px; height: 116px; border-radius: 3px; font-size: 38px; }
.jp-player .pct { position: absolute; left: 0; right: 0; bottom: 0; background: #3f9a5a; color: #fff; font-weight: 900; font-size: 13px; text-align: center; padding: 2px 0; }
.jp-player .nm { font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.jp-empty { color: var(--muted); padding: 40px 0; text-align: center; flex: 1; }
.jp-bet {
  display: flex; align-items: center; gap: 0; background: var(--yellow); border-radius: 40px; height: 64px;
  box-shadow: 0 4px 0 #b88d14; overflow: hidden; flex-shrink: 0;
}
.jp-bet input { width: 110px; background: transparent; border: 0; outline: none; text-align: center; font-size: 22px; font-weight: 700; color: #3a2d05; }
.jp-bet input::placeholder { color: #7c6417; }
.jp-bet button { background: var(--yellow-2); border: 0; height: 100%; padding: 0 22px; font-size: 22px; font-weight: 900; color: #7c5e0b; }
.jp-bet button:hover { color: #3a2d05; }
.jp-betrow { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 6px 14px 16px; flex-wrap: wrap; }
.jp-betrow .quick { max-width: 330px; }
.bets-list .bet { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px dashed #252d40; animation: slideIn .35s; }
.bets-list .bet b { color: #fff; }
.bets-list .bet .amt { color: var(--yellow); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } }

.strip-wrap { position: relative; overflow: hidden; height: 156px; flex: 1; background: #141926; }
.strip { display: flex; height: 100%; will-change: transform; }
.strip .tile { width: 156px; height: 156px; flex-shrink: 0; border-right: 2px solid #141926; }
.strip .tile .av { width: 100%; height: 100%; font-size: 46px; border-radius: 0; }
.strip-wrap::after {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1px;
  background: var(--yellow); box-shadow: 0 0 10px var(--yellow); z-index: 2;
}
.strip .tile.win .av { outline: 3px solid var(--yellow); outline-offset: -3px; }

.details { max-width: 440px; margin: 20px auto; border: 1px dashed #36405a; padding: 20px; }
.details .who { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 22px; color: #fff; margin-bottom: 14px; }
.details .head { background: #26304a; padding: 10px 14px; font-weight: 900; color: #fff; }
.details table { width: 100%; border-collapse: collapse; }
.details td { padding: 9px 14px; color: #c7cfdf; }
.details td:last-child { text-align: center; background: #171c29; color: #fff; font-weight: 700; font-family: Lato; word-break: break-all; }
.details td.y { color: var(--yellow); }
.details .mono { font-size: 11px; font-weight: 400; }

.winners { display: flex; gap: 10px; padding: 14px; overflow-x: auto; }
.winner-card { width: 104px; flex-shrink: 0; text-align: center; }
.winner-card .av { width: 104px; height: 66px; font-size: 26px; border-radius: 3px 3px 0 0; }
.winner-card .val { background: #3f9a5a; color: #fff; font-size: 11px; font-weight: 900; padding: 3px 0; line-height: 1.3; border-radius: 0 0 3px 3px; }
.winner-card .nm { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }

/* ---------- roulette ---------- */
.rl-wrap { position: relative; overflow: hidden; height: 100px; background: #141926; }
.rl-strip { display: flex; height: 100%; will-change: transform; }
.rl-tile { width: 78px; flex-shrink: 0; height: 100%; display: flex; justify-content: center; padding-top: 12px; font-size: 20px; font-weight: 700; color: #fff; }
.rl-tile.red { background: var(--red); }
.rl-tile.black { background: var(--black); }
.rl-tile.green { background: var(--green); }
.rl-wrap::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--yellow); box-shadow: 0 0 10px #000; z-index: 2; }
.rl-place { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 30px; align-items: center; padding: 18px 26px; }
.rl-colors { display: flex; gap: 10px; }
.rl-colors button { width: 140px; height: 60px; border: 0; border-radius: 3px; font-weight: 900; color: #fff; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.rl-colors button small { font-weight: 400; font-size: 11px; opacity: .85; }
.rl-colors .red { background: var(--red); } .rl-colors .red:hover { background: #e7766e; }
.rl-colors .black { background: #3a4256; } .rl-colors .black:hover { background: #4a5368; }
.rl-colors .green { background: #3f8f5a; } .rl-colors .green:hover { background: #4ea56b; }
.rl-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 14px; }
.rl-col-head { display: flex; align-items: center; padding: 14px; font-size: 20px; font-weight: 700; color: #fff; border-radius: 2px; }
.rl-col-head.red { background: var(--red); } .rl-col-head.black { background: var(--black); } .rl-col-head.green { background: var(--green); }
.rl-col-head span { margin-left: auto; font-size: 13px; opacity: .8; }
.rl-total { text-align: center; padding: 16px; font-weight: 700; color: #fff; }
.rl-total b { color: var(--yellow); font-weight: 400; }
.rl-col.win .rl-col-head { box-shadow: 0 0 0 3px var(--yellow); }
.rl-col.lose { opacity: .45; }
.rl-bet { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px dashed #252d40; }
.rl-bet .nm { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.badge { background: var(--yellow); color: #3a2d05; font-size: 11px; font-weight: 900; padding: 2px 6px; border-radius: 2px; }
.history { display: flex; gap: 8px; padding: 14px; flex-wrap: wrap; }
.ball { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.ball.red { background: var(--red); } .ball.black { background: var(--black); } .ball.green { background: var(--green); }
.ball.new { animation: pop .5s; }
@keyframes pop { from { transform: scale(0); } }

/* ---------- coin flip ---------- */
.cf-create { display: grid; grid-template-columns: minmax(200px, 1fr) auto auto; gap: 20px; align-items: center; padding: 18px 26px; }
.side-pick { display: flex; gap: 8px; }
.side-pick button { width: 64px; height: 64px; border-radius: 50%; border: 3px solid transparent; padding: 0; background: none; opacity: .45; }
.side-pick button.on { opacity: 1; border-color: var(--yellow); }
.coin-face { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; }
.coin-face.ct { background: radial-gradient(circle at 35% 30%, #5d6b86, #323b51 60%, #1d2333); box-shadow: inset 0 0 0 4px #9fb0cc88; color: #c9d4e8; }
.coin-face.t { background: radial-gradient(circle at 35% 30%, #f6dc9a, #d7ac55 55%, #8c6420); box-shadow: inset 0 0 0 4px #fff0c288; color: #3d2c0b; }
.coin-face i { font-size: .9em; }
.side-pick .coin-face { font-size: 18px; }
.cf-row { display: grid; grid-template-columns: 1fr 60px 1fr 130px 200px; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #252d40; }
.cf-row:hover { background: #1e2537; }
.cf-p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cf-p .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cf-p .mini { width: 22px; height: 22px; font-size: 9px; flex-shrink: 0; }
.cf-vs { text-align: center; color: var(--muted); font-weight: 900; }
.cf-waiting { color: var(--muted); font-style: italic; }
.cf-amt { color: var(--yellow); font-weight: 700; text-align: right; }
.cf-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cf-row.done { opacity: .55; }
.cf-row .won { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.cf-empty { padding: 30px; text-align: center; color: var(--muted); }

.cf-game { display: grid; grid-template-columns: 1fr minmax(260px, 420px) 1fr; gap: 20px; padding: 30px 20px; align-items: start; }
.cf-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cf-side .av { width: 150px; height: 150px; font-size: 48px; border-radius: 4px; }
.cf-side.win .av { box-shadow: 0 0 0 4px var(--yellow); }
.cf-side.lose { opacity: .45; }
.cf-side .nm { color: #fff; font-weight: 700; text-align: center; }
.cf-side .sidecoin { width: 40px; height: 40px; margin-top: -32px; position: relative; font-size: 13px; }
.cf-side .betbox { background: #222a3c; padding: 8px 26px; text-align: center; font-weight: 900; color: #fff; border-radius: 3px; }
.cf-side .betbox div { color: var(--muted); font-weight: 400; font-size: 13px; border-top: 2px solid var(--yellow); margin-top: 6px; padding-top: 4px; }
.cf-center { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.coin-stage { width: 230px; height: 230px; perspective: 900px; display: grid; place-items: center; position: relative; }
.coin { width: 230px; height: 230px; position: relative; transform-style: preserve-3d; }
.coin .coin-face { position: absolute; inset: 0; backface-visibility: hidden; font-size: 70px; box-shadow: 0 0 0 6px #ffffff22, 0 10px 40px #0008; }
.coin .coin-face.t { transform: rotateY(180deg); }
.coin { transition: opacity .35s; }
.coin.spinning { opacity: .45; }
.coin.gone { opacity: 0; }
.coin-result { position: absolute; inset: 0; display: none; }
.coin-result.show { display: block; animation: coinPop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.coin-result .coin-face { width: 100%; height: 100%; font-size: 80px; box-shadow: 0 0 0 6px #ffffff22, 0 0 50px #f7c33155, 0 10px 40px #0008; }
@keyframes coinPop { from { opacity: 0; transform: scale(.55); } }
.pop-in { animation: popIn .45s .9s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.jp-stage.drawing { padding: 0; }
.rl-total b.plus { color: #5fd18a; }
.rl-total b.minus { color: #ef6f66; }
.btn-green { background: #3f9a5a; border: 0; padding: 8px 14px; border-radius: 3px; color: #fff; font-weight: 900; }
.btn-green:hover { background: #4cb36c; }
.coin-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 80px; font-weight: 900; color: #fff; text-shadow: 0 4px 20px #000; z-index: 3; pointer-events: none; }
.cf-info { width: 100%; }
.cf-info .blk { background: #222a3c; margin-bottom: 10px; text-align: center; }
.cf-info .blk h4 { margin: 0; padding: 9px; font-size: 13px; letter-spacing: .5px; color: #fff; border-bottom: 2px solid var(--yellow); }
.cf-info .blk p { margin: 0; padding: 10px; font-size: 13px; color: #c7cfdf; word-break: break-all; }
.cf-info .blk.white h4 { border-color: #c7cfdf; }
.backlink { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; color: #fff; font-size: 14px; }

.cf-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: #141926; }
.cf-top .cf-create { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
.cf-top .cf-create > .btn-yellow { grid-column: 1 / -1; height: 46px !important; }
.cf-chart { display: block; width: 100%; height: 120px; background: #283044; }
.cf-chart-labels { display: flex; justify-content: space-between; padding: 8px 8px 0; background: #283044; font-size: 10px; color: #8a95ad; }
.cf-chart polyline { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.cf-chart .t { stroke: #e2b34a; } .cf-chart .ct { stroke: #5b9bd5; }
.cf-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }
.cf-totals div { background: #3a4a63; padding: 10px 16px; }
.cf-totals span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #c9d3e6; }
.cf-totals b { display: block; font-size: 26px; font-weight: 400; color: #fff; }
.dot-t, .dot-ct { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-t { background: #e2b34a; } .dot-ct { background: #5b9bd5; }

/* ---------- crash ---------- */
.crash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 100%; }
.cr-graph { display: flex; flex-direction: column; background: #161b28; border-right: 1px solid #141926; min-width: 0; }
.cr-top { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 11px; color: #8691a9; }
.cr-top span { background: #222a3c; padding: 3px 8px; border-radius: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 60%; }
.cr-canvas-wrap { position: relative; flex: 1; min-height: 380px; }
#crCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cr-mult { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-size: 54px; font-weight: 900; color: #fff; white-space: nowrap; text-shadow: 0 4px 20px #000a; pointer-events: none; }
.cr-mult.count { font-size: 64px; font-family: Georgia, serif; font-weight: 700; }
.cr-mult.crashed { color: #ef6f66; font-size: 38px; letter-spacing: .5px; animation: shake .45s; }
@keyframes shake { 20% { transform: translate(-52%, -50%); } 40% { transform: translate(-48%, -50%); } 60% { transform: translate(-51%, -50%); } 80% { transform: translate(-49%, -50%); } }
.cr-burst { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; }
.cr-burst i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #f7c331; box-shadow: 0 0 8px #f7c331; opacity: 0; animation: burst var(--d) ease-out forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.4); } }
.cr-hist { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; }
.cr-hist span { background: #c9524a; color: #fff; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 2px; flex-shrink: 0; }
.cr-hist span.hi { background: #3f9a5a; }
.cr-side { background: var(--bg); min-width: 0; }
.cr-form { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cr-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-inputs label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.cr-inputs .amount-input { padding: 9px; font-size: 15px; text-align: left; }
.cr-row { display: flex; gap: 10px; align-items: center; }
.cr-row #crQuick { flex: 1; min-width: 0; }
.toggle { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.toggle input { display: none; }
.toggle span { width: 38px; height: 20px; border-radius: 10px; background: #e6ebf3; position: relative; transition: background .2s; }
.toggle span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #9aa5bb; transition: transform .2s, background .2s; }
.toggle input:checked + span { background: #1fa2e0; }
.toggle input:checked + span::after { transform: translateX(18px); background: #fff; }
.cr-action { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 86px; justify-content: center; }
.btn-blue { background: #1fa2e0; border: 0; color: #fff; font-weight: 900; padding: 10px 18px; border-radius: 3px; }
.btn-blue:hover:not(:disabled) { background: #36b4f0; }
.big { width: 100%; padding: 13px 18px; font-size: 15px; }
.cr-info { background: #1a2030; padding: 4px 12px; font-size: 12px; color: #c7cfdf; border-radius: 2px; }
.cr-info b { color: var(--yellow); }
.cr-done { color: #5fd18a; font-weight: 700; padding: 12px; text-align: center; }
.cr-bets { width: 100%; border-collapse: collapse; font-size: 14px; }
.cr-bets th { text-align: left; color: #fff; padding: 10px 14px; font-weight: 700; border-bottom: 1px solid #252d40; }
.cr-bets td { padding: 7px 14px; border-bottom: 1px solid #1f2637; }
.cr-bets th:not(:first-child), .cr-bets td:not(:first-child) { text-align: right; }
.cr-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cr-user span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 130px; }
.cr-user em { font-style: normal; font-size: 11px; color: #5fd18a; }
.cr-bets tr.cashed .cr-user span { color: #5fd18a; }
.cr-bets td.win { color: #5fd18a; } .cr-bets td.lose { color: #ef6f66; }
.muted { color: var(--muted); } .center { text-align: center !important; }

/* ---------- taxi ---------- */
.side a.sub { padding: 9px 26px 9px 44px; font-size: 15px; }
.taxi { position: relative; min-height: 640px; background: #0b0e15 url(/taxi-bg.svg) center / cover no-repeat; display: flex; flex-direction: column; align-items: center; padding: 26px 16px 40px; overflow: hidden; }
.taxi-board { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 480px; background: #101318ee; border: 1px solid #2b2f38; border-radius: 4px; padding: 10px 14px 14px; gap: 12px; box-shadow: 0 10px 30px #0009; }
.taxi-board div { display: flex; flex-direction: column; gap: 6px; }
.taxi-board div:last-child { text-align: right; }
.taxi-board label { font-size: 11px; font-weight: 900; color: #c9cfdb; letter-spacing: .5px; }
.digits { font-family: 'Share Tech Mono', ui-monospace, monospace; font-size: 34px; line-height: 1; color: #ff4b3e; text-shadow: 0 0 10px #ff2a1a99; background: #1b1d22; padding: 6px 10px; border-radius: 3px; box-shadow: inset 0 2px 8px #000c; }
.taxi-board.shake { animation: boardShake .5s; }
@keyframes boardShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.taxi-hash { font-size: 10px; color: #b9c0cc; margin: 8px 0 18px; text-shadow: 0 1px 3px #000; width: 100%; max-width: 480px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { min-width: 0; }
.taxi-grid { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.seat-row { display: flex; gap: 22px; }
.seat { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #14171dee; color: #8a6f62; font-size: 24px; display: grid; place-items: center; box-shadow: 0 4px 12px #0008; cursor: default; transition: transform .15s, background .2s; }
.seat .fa-user { color: #b0694f; }
.seat span { font-size: 15px; font-weight: 700; color: #8c93a1; }
.seat.active { background: #f7c331; cursor: pointer; animation: seatGlow 1.2s ease-in-out infinite; }
.seat.active .fa-user { color: #6e3d1d; }
.seat.active:hover { transform: scale(1.1); }
@keyframes seatGlow { 50% { box-shadow: 0 0 0 5px #f7c33144, 0 4px 12px #0008; } }
.seat.driving { animation: none; transform: scale(.9); }
.seat.driving::after { content: "\f1ba"; font: var(--fa-font-solid); position: absolute; font-size: 22px; color: #3a2d05; animation: drive .45s ease-in; }
.seat { position: relative; }
@keyframes drive { from { transform: translateY(-60px) scale(.6); opacity: 0; } }
.seat.picked span { color: var(--yellow); font-size: 16px; }
.seat.picked { box-shadow: 0 0 0 2px var(--yellow), 0 4px 12px #0008; }
.seat.robber { color: #ef5b4f; }
.seat.robber.picked { background: #5a1b17; box-shadow: 0 0 0 2px #ef5b4f, 0 0 24px #ef5b4f88; }
.seat.faded { opacity: .55; }
.seat.pop { animation: seatPop .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes seatPop { from { transform: scale(.5); } }
.taxi-modal { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: min(640px, calc(100% - 32px)); background: #1d2333f2; border: 1px solid #2d364b; box-shadow: 0 20px 60px #000c; z-index: 2; }
.taxi-modal-body { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 14px; }
.taxi-diffs { display: flex; flex-direction: column; gap: 8px; }
.diff-btns { display: flex; gap: 6px; }
.diff-btns button { width: 66px; height: 46px; border: 2px solid transparent; border-radius: 2px; font-size: 20px; font-weight: 700; color: #ffffff55; }
.diff-btns .e { background: #4f9e58; } .diff-btns .m { background: #6f6bc9; } .diff-btns .h { background: #c95b50; }
.diff-btns button.on { color: #fff; border-color: #ffffffaa; }
.diff-info { display: flex; gap: 6px; }
.diff-info span { flex: 1; background: #161b28; font-size: 12px; font-weight: 900; color: #6f7a93; padding: 7px 8px; text-align: center; white-space: nowrap; }
.diff-info b { color: var(--yellow); }
.taxi-bet { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.taxi-bet-row { display: flex; }
.taxi-bet-row input { flex: 1; min-width: 0; background: #fff; color: #333; border: 0; padding: 12px; font-size: 16px; outline: none; }
.taxi-bet-row button { border-radius: 0; padding: 0 24px; }
.diff-tag { font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 2px; color: #fff; }
.diff-tag.e { background: #4f9e58; } .diff-tag.m { background: #6f6bc9; } .diff-tag.h { background: #c95b50; }

/* ---------- misc pages ---------- */
.soon { display: grid; place-items: center; text-align: center; padding: 100px 20px; color: var(--muted); }
.soon i { font-size: 60px; margin-bottom: 20px; color: #39425a; }
.soon h2 { color: #fff; margin: 0 0 8px; }
.free-card { max-width: 480px; margin: 40px auto; background: var(--panel); padding: 30px; text-align: center; border-radius: 4px; }
.free-card h2 { margin: 0 0 6px; color: #fff; }
.free-card .big { font-size: 46px; color: var(--yellow); font-weight: 900; margin: 18px 0; }
.free-card p { color: var(--muted); }
.top-table { width: 100%; border-collapse: collapse; }
.top-table td { padding: 8px 14px; border-bottom: 1px solid #252d40; }
.top-table td:last-child { text-align: right; color: var(--yellow); }

/* ---------- chat ---------- */
.chat { grid-area: chat; background: var(--panel-2); display: flex; flex-direction: column; border-left: 1px solid #141926; min-height: 0; z-index: 4; }
.chat-head { padding: 14px; font-weight: 900; color: #fff; background: #161b28; display: flex; align-items: center; gap: 8px; }
.chat-online { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 10px; min-height: 0; }
.msg { padding: 8px 0 4px; }
.msg-head { display: flex; align-items: center; gap: 8px; background: #232b3e; padding: 5px 8px; border-radius: 2px; }
.msg-head .nm { font-size: 14px; color: #e6ebf4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.msg.me .msg-head { background: #1f6e93; }
.msg.admin .msg-head .nm { color: var(--yellow); }
.msg-text { padding: 8px 4px 2px; font-size: 15px; color: #c7cfdf; word-wrap: break-word; }
.msg-text .mention { font-weight: 900; color: #fff; }
.chat-form { padding: 10px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #141926; }
.chat-form textarea { background: #1a2030; border: 1px solid #252d40; border-radius: 2px; resize: none; height: 70px; padding: 10px; outline: none; }
.chat-form button { align-self: flex-end; padding: 8px 14px; }

/* ---------- toasts / modal ---------- */
.toasts { position: fixed; top: 76px; right: calc(var(--chat-w) + 14px); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: 320px; }
.toast { background: #d9625a; color: #fff; padding: 12px 14px; border-radius: 2px; box-shadow: 0 8px 20px #0006; animation: slideIn .3s; font-size: 14px; }
.toast.success { background: #3f9a5a; }
.toast.info { background: #2a87c0; }
.toast b.t { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; }
.modal { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal-box { background: var(--panel); width: 100%; max-width: 380px; padding: 24px; border-radius: 4px; position: relative; }
.modal-x { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 18px; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; }
.tabs button { flex: 1; background: #1a2030; border: 0; padding: 10px; font-weight: 700; color: var(--muted); }
.tabs button.on { background: #2c3449; color: #fff; box-shadow: inset 0 -2px 0 var(--yellow); }
#authForm label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
#authForm input { display: block; width: 100%; margin-top: 5px; background: #141926; border: 1px solid #2a3248; padding: 10px; border-radius: 3px; outline: none; }
.form-error { color: #ff8a80; min-height: 20px; font-size: 13px; margin-bottom: 6px; }
.fine { color: var(--muted); font-size: 12px; text-align: center; margin: 12px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  body { grid-template-columns: var(--side-w) 1fr; grid-template-areas: "top top" "side main"; }
  .chat { position: fixed; top: var(--top-h); right: 0; bottom: 0; width: var(--chat-w); transform: translateX(100%); transition: transform .2s; }
  body.chat-open .chat { transform: none; box-shadow: -10px 0 30px #0008; }
  .chat-toggle { display: block; }
  .toasts { right: 14px; }
}
@media (max-width: 860px) {
  :root { --top-h: 56px; }
  body { grid-template-columns: 1fr; grid-template-areas: "top" "main"; }
  .logo { width: auto; padding: 0 6px 0 12px; }
  .logo img { height: 30px; }
  .top { gap: 0; min-width: 0; }
  .top .icon-btn { padding: 8px; font-size: 16px; }
  .acc-user { padding: 0 8px; }
  .signin-btn { margin-right: 8px; padding: 8px 12px; }
  .logo-text { font-size: 20px; }
  .logo-mark { width: 32px; height: 32px; font-size: 16px; }
  .side { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: var(--side-w); transform: translateX(-100%); transition: transform .2s; }
  body.side-open .side { transform: none; box-shadow: 10px 0 30px #0008; }
  .online, .play-money { display: none; }
  .acc-user .name, .acc-user .lvl { display: none; }
  .acc-balance { min-width: 0; padding: 0 12px; font-size: 14px; }
  .chat { width: 100%; }
  .jp-stage { padding: 12px; }
  .jp-player, .jp-player .av { width: 84px; } .jp-player .av { height: 84px; font-size: 28px; }
  .rl-place, .cf-create { grid-template-columns: 1fr; padding: 14px 16px; gap: 14px; }
  .rl-colors button { flex: 1; width: auto; }
  .rl-cols { grid-template-columns: 1fr; }
  .cf-row { grid-template-columns: 1fr 30px 1fr; }
  .cf-amt { grid-column: 1 / 2; text-align: left; }
  .cf-actions { grid-column: 2 / 4; }
  .cf-top { grid-template-columns: 1fr; }
  .seat { width: 50px; height: 50px; font-size: 19px; } .seat span { font-size: 12px; }
  .seat-row { gap: 12px; }
  .digits { font-size: 26px; }
  .taxi-modal-body { grid-template-columns: 1fr; }
  .diff-btns button { flex: 1; width: auto; }
  .crash { grid-template-columns: 1fr; }
  .cr-canvas-wrap { min-height: 280px; }
  .cr-mult { font-size: 40px; } .cr-mult.crashed { font-size: 26px; }
  .cf-game { grid-template-columns: 1fr 1fr; padding: 20px 12px; }
  .cf-center { grid-column: 1 / 3; grid-row: 2; }
  .cf-side .av { width: 100px; height: 100px; font-size: 32px; }
  .game-head .pot { font-size: 30px; }
  .game-head .timer { font-size: 20px; min-width: 60px; left: 10px; }
  .game-head .sub { display: none; }
}
