/* play.css — what every table on page 2 shares: felt and rail, dealer tray and shoe, betting
   spots, clay chips and stacks, 3D cards and dice, casino buttons, banners. Each game adds
   its own css/games/<id>.css, scoped under .game-<id>. */

/* ---------- page layout ---------- */
.play-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .play-layout { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: thin; }
.tabs button { white-space: nowrap; }
.tabs button.on { background: var(--gold); color: #1b1404; border-color: var(--gold); font-weight: 700; }
.side .panel { margin-bottom: 12px; }
.side .stats { grid-template-columns: 1fr 1fr; }
.side .stat .v { font-size: 1.1rem; }
.bankroll { font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--gold); text-shadow: 0 0 18px rgba(229, 185, 78, .35); }
.play-money { display: inline-block; background: repeating-linear-gradient(45deg, #3a2c14 0 8px, #4a3818 8px 16px); color: var(--gold); font-weight: 800; letter-spacing: .12em; font-size: .72rem; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--gold2); }
.switches { display: flex; gap: 6px; flex-wrap: wrap; }
.switches button { font-size: .82rem; padding: 5px 10px; border-radius: 99px; color: var(--muted); }
.switches button.on { color: #1b1404; background: var(--gold); border-color: var(--gold); }
#chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
#chips .cz-chip { --chip: 46px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
#chips .cz-chip:hover { transform: translateY(-3px); }
#chips .cz-chip.on { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(229, 185, 78, .7), 0 3px 0 rgba(0, 0, 0, .5); }

/* ---------- the table ---------- */
.felt {
  --felt-a: #1a7a4c; --felt-b: #0f5132; --felt-c: #093822;
  position: relative; overflow: hidden; min-height: 460px; padding: 22px 20px 18px;
  border: 16px solid transparent; border-radius: 34px;
  background:
    radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1.2px) 0 0 / 5px 5px padding-box,
    radial-gradient(ellipse 80% 65% at 50% 30%, var(--felt-a) 0%, var(--felt-b) 55%, var(--felt-c) 100%) padding-box,
    linear-gradient(160deg, #6b4423, #3a2311 40%, #22140a 70%, #4b2f17) border-box;
  box-shadow: inset 0 0 0 2px rgba(229, 185, 78, .35), inset 0 0 80px rgba(0, 0, 0, .55), 0 14px 40px rgba(0, 0, 0, .55), 0 0 0 1px #000;
  color: #f1e6c4; user-select: none;
}
.felt::before { /* soft light over the table */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 240, 200, .12), transparent 70%);
}
.felt h3, .table-title { color: #f6e7b8; font-family: Georgia, "Times New Roman", serif; letter-spacing: .12em; text-transform: uppercase; text-align: center; margin: 0; font-size: 1.05rem; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
.table-sub { text-align: center; color: rgba(241, 230, 196, .7); font-size: .78rem; letter-spacing: .08em; margin-top: 2px; }
.felt-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; justify-content: center; margin: 10px 0; }

/* dealer's chip tray and card shoe */
.tray { position: relative; margin: -6px auto 8px; width: min(300px, 70%); height: 26px; border-radius: 0 0 14px 14px;
  background: linear-gradient(#1b120a, #3a2615); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .08); overflow: hidden; }
.tray::before { content: ""; position: absolute; inset: 5px 10px 4px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, #6a1b9a 0 10px, #222 10px 20px, #2e7d32 20px 30px, #c62828 30px 40px, #ddd 40px 50px, #1b120a 50px 53px);
  opacity: .85; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6); }
.shoe { position: absolute; right: 18px; top: 16px; width: 58px; height: 74px; border-radius: 8px 18px 8px 8px;
  background: linear-gradient(135deg, #2b2b2b, #0c0c0c); box-shadow: 0 6px 12px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .15); transform: rotate(-8deg); z-index: 2; }
.shoe::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 8px; height: 30px; border-radius: 4px;
  background: repeating-linear-gradient(45deg, #8e1b1b 0 4px, #b02a2a 4px 8px); border: 2px solid #fff; transform: skewX(-10deg); }
.shoe .left { position: absolute; bottom: -16px; left: -10px; right: -10px; text-align: center; font: 700 .6rem/1 var(--mono); color: rgba(241, 230, 196, .7); transform: rotate(8deg); white-space: nowrap; }

/* result line and big banners */
.msg { min-height: 1.7em; text-align: center; color: #fff; font-weight: 700; font-size: 1.08rem; margin: 6px 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.msg.win { color: #9ff0c4; }
.msg.lose { color: #ffc0b9; }
.cz-banner { position: absolute; left: 50%; top: 45%; z-index: 30; pointer-events: none; white-space: nowrap; }
.cz-banner span { display: block; padding: 10px 26px; border-radius: 14px; font: 900 clamp(1.6rem, 5vw, 2.8rem)/1 Georgia, serif; letter-spacing: .06em;
  color: transparent; background: linear-gradient(180deg, #fff6c9, #f0c24f 45%, #b9861f 55%, #ffe08a) text; -webkit-background-clip: text;
  filter: drop-shadow(0 3px 0 #5a3d07) drop-shadow(0 0 18px rgba(255, 210, 90, .65)); }
.cz-banner.big span { font-size: clamp(2.2rem, 7vw, 4rem); animation: shimmer 0.6s linear infinite alternate; }
.cz-banner.lose span { background: linear-gradient(#ffd3cd, #e5534b) text; -webkit-background-clip: text; filter: drop-shadow(0 2px 0 #4a0f0b) drop-shadow(0 0 12px rgba(229, 83, 75, .5)); font-size: clamp(1.3rem, 4vw, 2.1rem); }
.cz-banner.info span { background: linear-gradient(#ffffff, #cfe3d6) text; -webkit-background-clip: text; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .6)); font-size: clamp(1.2rem, 3.5vw, 1.8rem); }
@keyframes shimmer { to { filter: drop-shadow(0 3px 0 #5a3d07) drop-shadow(0 0 30px rgba(255, 230, 140, 1)); } }
.cz-shower { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

/* ---------- casino buttons ---------- */
.controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 3; }
.cbtn { min-width: 92px; padding: 10px 18px; border-radius: 99px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .82rem;
  color: #f6e7b8; border: 1px solid rgba(0, 0, 0, .5);
  background: linear-gradient(#3b4a43, #1d2622); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 3px 0 #0b100e, 0 6px 12px rgba(0, 0, 0, .4);
  transition: transform .08s, filter .15s; }
.cbtn:hover:not(:disabled) { filter: brightness(1.2); border-color: rgba(0, 0, 0, .5); }
.cbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 0 #0b100e; }
.cbtn.go { color: #2a1a00; background: linear-gradient(#ffe39a, #e5b94e 50%, #b98e2a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 #6d4d0c, 0 0 18px rgba(229, 185, 78, .45); }
.cbtn.red { color: #fff; background: linear-gradient(#ef6b62, #b3261e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 #5a120e; }
.cbtn.blue { color: #fff; background: linear-gradient(#5aa2f0, #1f5fb0); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 #0f2f5a; }
.cbtn:disabled { opacity: .4; cursor: not-allowed; }
.hint { color: rgba(241, 230, 196, .85); font-size: .88rem; text-align: center; min-height: 1.4em; position: relative; z-index: 2; }
.felt select { background: rgba(0, 0, 0, .35); color: #f6e7b8; border-color: rgba(241, 230, 196, .3); }
.felt label { color: rgba(241, 230, 196, .85); font-size: .85rem; }

/* ---------- betting spots ---------- */
.spots { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; position: relative; z-index: 2; }
.spot { position: relative; border: 2px solid rgba(241, 230, 196, .55); border-radius: 14px; padding: 8px 10px 6px; min-width: 96px; text-align: center; cursor: pointer;
  color: #f6e7b8; background: rgba(0, 0, 0, .1); transition: background .15s, box-shadow .2s, opacity .2s; }
.spot:hover { background: rgba(255, 255, 255, .06); }
.spot .nm { font: 700 .95rem/1.1 Georgia, serif; letter-spacing: .06em; text-transform: uppercase; }
.spot .py { font-size: .72rem; opacity: .8; margin-top: 2px; }
.spot .stack { height: 52px; display: flex; align-items: flex-end; justify-content: center; margin-top: 4px; pointer-events: none; }
.spot.win { box-shadow: 0 0 0 3px #4cc38a, 0 0 24px rgba(76, 195, 138, .8); animation: winpulse .7s ease-in-out 3; }
.spot.lose { opacity: .55; }
.spot.hit { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(229, 185, 78, .6); }
.spot.locked { cursor: default; }
@keyframes winpulse { 50% { box-shadow: 0 0 0 5px #4cc38a, 0 0 36px rgba(76, 195, 138, 1); } }

/* ---------- clay chips ---------- */
.cz-chip { --chip: 38px; --c: #c62828; --e: #f4f4f4; --t: #fff;
  position: relative; width: var(--chip); height: var(--chip); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle, var(--c) 0 55%, transparent 56%), repeating-conic-gradient(var(--c) 0 22.5deg, var(--e) 22.5deg 30deg, var(--c) 30deg 45deg);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .3), inset 0 2px 2px rgba(255, 255, 255, .25), 0 2px 0 rgba(0, 0, 0, .5), 0 3px 6px rgba(0, 0, 0, .35);
  font-size: calc(var(--chip) * .3); }
.cz-chip::after { content: ""; position: absolute; inset: 20%; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .6); }
.cz-chip span { position: relative; z-index: 1; font-weight: 900; font-family: var(--sans); color: var(--t); text-shadow: 0 1px 1px rgba(0, 0, 0, .55); }
.cz-chip.c1 { --c: #f2f2f2; --e: #2a62c9; --t: #1a3e80; }
.cz-chip.c1 span { text-shadow: none; }
.cz-chip.c1::after { border-color: rgba(42, 98, 201, .6); }
.cz-chip.c5 { --c: #c62828; }
.cz-chip.c25 { --c: #2e7d32; }
.cz-chip.c100 { --c: #1c1c1c; --e: #e5b94e; }
.cz-chip.c500 { --c: #6a1b9a; --e: #f6d26b; }
.cz-chip.c1000 { --c: #e6a817; --e: #6b3c00; --t: #3a2000; }
.cz-chip.c5000 { --c: #7a4a2a; --e: #fbe3a2; }
.cz-stack { --chip: 36px; position: relative; width: var(--chip); height: var(--chip); }
.cz-stack .cz-chip { position: absolute; left: 0; bottom: calc(var(--i) * 4px); --chip: inherit; width: var(--chip); height: var(--chip); }
.cz-stack.small { --chip: 24px; }
.cz-stack.small .cz-chip { bottom: calc(var(--i) * 3px); }
.cz-amt { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); font: 700 .68rem/1 var(--mono); color: #fff; background: rgba(0, 0, 0, .6); padding: 2px 5px; border-radius: 6px; white-space: nowrap; z-index: 2; }
.cz-stack.small .cz-amt { font-size: .58rem; padding: 1px 3px; top: calc(100% + 1px); }
.cz-fly { position: fixed; z-index: 65; pointer-events: none; }
.cz-fly .cz-stack { --chip: 36px; }

/* ---------- cards ---------- */
.cards { display: flex; gap: 7px; justify-content: center; perspective: 1000px; min-height: var(--ch, 92px); }
.card3d { --cw: 64px; --ch: 92px; position: relative; width: var(--cw); height: var(--ch); flex: none; transform-style: preserve-3d; transition: transform .42s cubic-bezier(.3, .7, .3, 1), box-shadow .2s, opacity .2s; }
.card3d.down { transform: rotateY(180deg); }
.card3d .cf { position: absolute; inset: 0; border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
.card3d .front { background: linear-gradient(160deg, #ffffff, #f0eee4); color: #161616; overflow: hidden; }
.card3d.red .front { color: #c41e1e; }
.card3d .ix { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .95; font-weight: 800; font-family: Georgia, serif; }
.card3d .ix.tl { top: 4px; left: 5px; }
.card3d .ix.br { bottom: 4px; right: 5px; transform: rotate(180deg); }
.card3d .ix b { font-size: calc(var(--cw) * .27); letter-spacing: -.04em; }
.card3d .ix i { font-style: normal; font-size: calc(var(--cw) * .22); }
.card3d .pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--cw) * .62); }
.card3d .pip.face { inset: 20% 18%; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1.5px solid currentColor; border-radius: 5px;
  background: linear-gradient(160deg, rgba(229, 185, 78, .25), rgba(229, 185, 78, .05)); }
.card3d .pip.face em { font-style: normal; font: 700 calc(var(--cw) * .5)/1 Georgia, serif; }
.card3d .pip.face i { font-style: normal; font-size: calc(var(--cw) * .26); }
.card3d .back { transform: rotateY(180deg); border: 4px solid #fff;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .2) 0 18%, transparent 19%), repeating-linear-gradient(45deg, #8e1b1b 0 4px, #b52b2b 4px 8px), #8e1b1b; }
.card3d.best .front { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(229, 185, 78, .8); }
.card3d.dim { opacity: .45; }
.card3d.squeeze { animation: squeeze .5s ease-in-out; }
@keyframes squeeze { 40% { transform: rotateY(180deg) rotateX(-22deg) translateY(-6px); } }
@media (max-width: 560px) { .card3d { --cw: 48px; --ch: 70px; } .cards { gap: 4px; } }

/* ---------- dice ---------- */
.die3d { --d: 44px; width: var(--d); height: var(--d); perspective: 500px; flex: none; }
.die3d .cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.die3d .dface { position: absolute; inset: 0; border-radius: 18%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 15%;
  background: radial-gradient(circle at 30% 25%, #ffffff, #e9e6dc); box-shadow: inset 0 0 6px rgba(0, 0, 0, .25); backface-visibility: hidden; }
.die3d .dface i { width: 72%; height: 72%; border-radius: 50%; place-self: center; background: radial-gradient(circle at 35% 35%, #444, #050505); }
.die3d .dface s { display: block; }
.die3d .f1 { transform: translateZ(calc(var(--d) / 2)); }
.die3d .f6 { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.die3d .f3 { transform: rotateY(90deg) translateZ(calc(var(--d) / 2)); }
.die3d .f4 { transform: rotateY(-90deg) translateZ(calc(var(--d) / 2)); }
.die3d .f2 { transform: rotateX(90deg) translateZ(calc(var(--d) / 2)); }
.die3d .f5 { transform: rotateX(-90deg) translateZ(calc(var(--d) / 2)); }
.die3d.red .dface { background: radial-gradient(circle at 30% 25%, #f4625a, #a3140f); box-shadow: inset 0 0 6px rgba(0, 0, 0, .35); }
.die3d.red .dface i { background: radial-gradient(circle at 35% 35%, #fff, #ddd); }
.die3d .f1 i { background: radial-gradient(circle at 35% 35%, #ff5a4d, #8e0f0a); }
.die3d.red .f1 i { background: radial-gradient(circle at 35% 35%, #fff, #ddd); }

/* ---------- history beads ---------- */
.history { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; justify-content: center; }
.history span { font-family: var(--mono); font-size: .72rem; min-width: 22px; text-align: center; padding: 3px 5px; border-radius: 6px; background: rgba(0, 0, 0, .35); color: #fff; }
.history span.red { background: #b71c1c; }
.history span.black { background: #111; }
.history span.green { background: #1b5e20; }
.history span:last-child { box-shadow: 0 0 0 2px var(--gold); }

@media (max-width: 560px) {
  .felt { padding: 16px 8px 14px; border-width: 9px; border-radius: 22px; min-height: 380px; }
  .shoe { width: 42px; height: 56px; right: 8px; top: 8px; }
  .spot { min-width: 76px; padding: 6px; }
  .cbtn { min-width: 72px; padding: 9px 12px; }
}
