/* Table & club games: shared felt table shell, cards, chips, then each game. */

.table-game { height: 100%; display: flex; flex-direction: column; background: radial-gradient(1000px 600px at 50% 10%, #1f6b45, #0d3a25 70%); }
.table-controls { display: flex; align-items: center; gap: 14px; padding: 10px 16px 14px; flex-wrap: wrap; background: linear-gradient(#0000, #0007); }
.table-controls .ctl-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-controls .btn-spin { min-width: 170px; }
.chips { display: flex; gap: 8px; }
.chip {
  width: 62px; height: 62px; border-radius: 50%; border: 5px dashed #fff; font-weight: 900; font-size: 15px; color: #fff;
  background: #2563eb; box-shadow: 0 3px 0 #0006, inset 0 0 0 4px #0003; padding: 0; transition: transform .08s;
}
.chip[data-value="1"] { background: #6b7280; }
.chip[data-value="5"] { background: #dc2626; }
.chip[data-value="10"] { background: #2563eb; }
.chip[data-value="25"] { background: #16a34a; }
.chip[data-value="50"] { background: #f97316; }
.chip[data-value="100"] { background: #111; }
.chip:active:not(:disabled) { transform: scale(.94); }
.chip:disabled { opacity: .4; }
.chip.active { outline: 4px solid var(--gold); outline-offset: 2px; }

/* cards */
.card {
  width: 96px; height: 136px; border-radius: 10px; background: #fff; color: #111; position: relative; flex: none;
  box-shadow: 0 6px 16px #0008, 0 0 0 1px #0003; perspective: 600px;
}
.card.small { width: 72px; height: 102px; }
.card.red { color: #d61c1c; }
.card-face, .card-back { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; }
.card-face { background: #fff; }
.card-back { background: repeating-linear-gradient(45deg, #7e22ce 0 7px, #5b21b6 7px 14px); border: 5px solid #fff; display: none; }
.card.face-down .card-back { display: block; }
.card.face-down .card-face { display: none; }
.card.flipping { animation: cardflip .4s ease-out; }
@keyframes cardflip { from { transform: rotateY(90deg); } to { transform: none; } }
.card.dealt { animation: deal .28s ease-out; }
@keyframes deal { from { transform: translate(-60px, -80px) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.card .corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 900; font-size: 22px; }
.card .corner.tl { top: 8px; left: 8px; }
.card .corner.br { bottom: 8px; right: 8px; transform: rotate(180deg); }
.card .pip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 48px; }

/* ---------- blackjack ---------- */
.bj-table { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 16px; overflow: hidden; }
.hand-label { font-size: 14px; letter-spacing: .14em; font-weight: 800; color: #b9f5d3; text-align: center; margin-bottom: 6px; }
.hand-cards { display: flex; gap: 10px; justify-content: center; min-height: 140px; }
.hand-total { text-align: center; font-weight: 900; font-size: 24px; color: #fff; margin-top: 6px; min-height: 30px; }
.bj-message { font-size: 26px; font-weight: 900; color: var(--gold); text-align: center; min-height: 34px; text-shadow: 0 2px 6px #000a; }
.bj-hands { display: flex; gap: 40px; justify-content: center; }
.hand { padding: 10px 14px; border-radius: 16px; border: 3px solid transparent; }
.hand.active { border-color: var(--gold); background: #0003; }
.hand-bet { text-align: center; color: #b9f5d3; font-weight: 700; font-size: 16px; }
.bj-bet { font-size: 26px; font-weight: 900; min-width: 90px; text-align: center; }

/* ---------- video poker ---------- */
.vp-top { display: flex; justify-content: center; padding: 10px 16px 0; }
.vp-paytable { border-collapse: collapse; background: #0007; border: 2px solid var(--gold-3); font-size: 15px; }
.vp-paytable th, .vp-paytable td { padding: 3px 12px; text-align: right; border-right: 1px solid #ffffff22; white-space: nowrap; }
.vp-paytable th:first-child, .vp-paytable td:first-child { text-align: left; font-weight: 800; }
.vp-paytable th { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.vp-paytable td.cur { background: #f5c54233; color: var(--gold); font-weight: 800; }
.vp-paytable tr.win td { background: #f5c542; color: #2a1d00; font-weight: 900; }
.vp-cards { flex: 1; display: flex; gap: 16px; align-items: center; justify-content: center; padding: 8px 16px; min-height: 0; }
.pcard { position: relative; border-radius: 12px; padding: 6px; border: 4px solid transparent; transition: transform .1s; }
.pcard .card { width: 118px; height: 168px; }
.pcard .card .pip { font-size: 60px; }
.pcard .card .corner { font-size: 26px; }
.pcard.held { border-color: var(--gold); transform: translateY(-10px); }
.held-tag { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); background: var(--gold); color: #2a1d00; font-weight: 900; font-size: 14px; padding: 2px 10px; border-radius: 10px; display: none; }
.pcard.held .held-tag { display: block; }
.vp-message { text-align: center; font-size: 24px; font-weight: 900; color: var(--gold); min-height: 32px; padding: 0 16px 6px; text-shadow: 0 2px 6px #000a; }
.vpoker .seg button { min-height: 44px; padding: 0 12px; }

/* ---------- roulette ---------- */
.rl-main { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 10px 14px; }
.rl-left { flex: 0 0 34%; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.rl-wheel-box { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.rl-result { font-size: 24px; font-weight: 900; color: #fff; text-align: center; min-height: 32px; padding: 4px 14px; border-radius: 10px; background: #0005; }
.rl-result.red { background: #c8102e; }
.rl-result.black { background: #161616; }
.rl-result.green { background: #1f8a4c; }
.rl-history { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.hist { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; }
.hist.red { background: #c8102e; } .hist.black { background: #161616; } .hist.green { background: #1f8a4c; }
.rl-table { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rl-grid { flex: 1; display: grid; grid-template-columns: 1.1fr repeat(12, 1fr) 1fr; grid-template-rows: repeat(3, 1fr); gap: 4px; min-height: 0; }
.rl-grid .zero { grid-column: 1; grid-row: 1 / span 3; }
.rl-dozens, .rl-evens { display: grid; gap: 4px; height: 52px; }
.rl-dozens { grid-template-columns: 1.1fr repeat(3, 4fr) 1fr; }
.rl-evens { grid-template-columns: 1.1fr repeat(6, 2fr) 1fr; }
.rl-dozens > :first-child { grid-column: 2; } .rl-evens > :first-child { grid-column: 2; }
.bet-spot {
  position: relative; border: 2px solid #ffffff66; border-radius: 8px; color: #fff; font-weight: 900; font-size: 18px; padding: 0; min-height: 44px;
  background: #1f6b45; display: flex; align-items: center; justify-content: center;
}
.bet-spot.red { background: #c8102e; } .bet-spot.black { background: #161616; } .bet-spot.green { background: #1f8a4c; }
.bet-spot.outside { background: #14513a; font-size: 16px; }
.bet-spot.outside.red { background: #c8102e; } .bet-spot.outside.black { background: #161616; }
.bet-spot:active { filter: brightness(1.25); }
.bet-spot.placed { box-shadow: inset 0 0 0 3px var(--gold); }
.bet-spot.winner { box-shadow: 0 0 0 4px #fff, 0 0 20px #fff; z-index: 2; animation: pulse .5s ease-in-out infinite alternate; }
.spot-chip {
  position: absolute; right: -6px; top: -8px; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; background: var(--gold); color: #2a1d00;
  font-size: 13px; font-weight: 900; display: none; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px #000a;
}
.bet-spot.placed .spot-chip { display: inline-flex; }
.rl-chip.active { outline: 4px solid var(--gold); outline-offset: 2px; }

/* ---------- keno ---------- */
.keno-main { flex: 1; min-height: 0; display: flex; gap: 14px; padding: 10px 14px; }
.keno-grid { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(8, 1fr); gap: 5px; min-height: 0; }
.kn {
  border-radius: 10px; border: 2px solid #ffffff33; background: #0f4a30; color: #fff; font-weight: 800; font-size: 20px; padding: 0; min-height: 0;
  transition: transform .08s, background .12s;
}
.kn:active { transform: scale(.94); }
.kn.picked { background: var(--gold); color: #2a1d00; border-color: #fff; }
.kn.drawn { background: #e2e8f0; color: #111; }
.kn.drawn.picked, .kn.hit { background: #ef4444; color: #fff; border-color: #fff; animation: pulse .4s ease-in-out infinite alternate; box-shadow: 0 0 16px #ef4444; }
.keno-side { flex: 0 0 280px; display: flex; flex-direction: column; gap: 10px; }
.kn-picks { font-weight: 900; font-size: 22px; color: #fff; }
.kn-pays { background: #0007; border-radius: 12px; padding: 10px 12px; }
.kn-pays-title { font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin-bottom: 4px; }
.kn-pay-row { display: flex; justify-content: space-between; font-size: 17px; padding: 3px 4px; border-radius: 6px; }
.kn-pay-row.win { background: var(--gold); color: #2a1d00; font-weight: 900; }
.kn-message { font-size: 22px; font-weight: 900; color: var(--gold); min-height: 60px; text-shadow: 0 2px 6px #000a; }

/* ---------- scratchies ---------- */
.sc-main { flex: 1; min-height: 0; display: flex; gap: 20px; padding: 12px 16px; align-items: stretch; }
.sc-side { flex: 0 0 300px; display: flex; flex-direction: column; gap: 12px; }
.sc-title { font-size: 22px; font-weight: 900; color: #fff; }
.sc-message { font-size: 24px; font-weight: 900; color: var(--gold); min-height: 70px; text-shadow: 0 2px 6px #000a; }
.sc-prizes { background: #0007; border-radius: 12px; padding: 10px 12px; }
.sc-prize-list { font-weight: 700; color: #fff; font-size: 17px; }
.sc-card {
  flex: 1; position: relative; max-width: min(100%, calc((100vh - 240px) * 1.3)); margin: 0 auto; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #f5c542, #d9a520); box-shadow: 0 16px 40px #000a; border: 4px solid #fff3;
}
.sc-panels { position: absolute; inset: 14px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 10px; }
.sc-panel { background: #fff; color: #2a1d00; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: clamp(20px, 3.4vw, 40px); }
.sc-panel.blank { background: #fff8; color: #a0781a; }
.sc-panel.win { background: #16a34a; color: #fff; animation: pulse .5s ease-in-out infinite alternate; box-shadow: 0 0 20px #16a34a; }
.scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .3s; }

@media (orientation: portrait), (max-width: 900px) {
  .rl-main { flex-direction: column; }
  .rl-left { flex: 0 0 auto; }
  .rl-wheel-box { height: 220px; flex: none; }
  .keno-main, .sc-main { flex-direction: column; }
  .keno-side, .sc-side { flex: 0 0 auto; }
  .sc-card { width: 100%; max-width: none; min-height: 320px; }
  .pcard .card { width: 92px; height: 132px; }
  .table-controls .ctl-actions { margin-left: 0; width: 100%; justify-content: space-between; }
}
