:root {
  --wood-dark: #3a2413;
  --wood: #6b4423;
  --wood-light: #a8703c;
  --gold: #f6c445;
  --gold-deep: #b8860b;
  --red: #d02020;
  --green-led: #4dff77;
  --panel: #1a120a;
  --reel-bg: #fbfbf7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 60% 40% at 50% 8%, rgba(210,225,190,0.14), transparent 70%),
    radial-gradient(ellipse at 50% -8%, #223a3a 0%, #12232a 42%, #0a1116 72%, #05090c 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #fff;
}
/* faint pine-forest ridge along the bottom */
body::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 130px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='130' viewBox='0 0 240 130' preserveAspectRatio='xMidYMax slice'%3E%3Cg fill='%23040c09'%3E%3Cpath d='M20 130 L4 92 L12 92 L2 66 L10 66 L20 44 L30 66 L38 66 L28 92 L36 92 L20 130 Z'/%3E%3Cpath d='M62 130 L48 98 L55 98 L46 76 L53 76 L62 58 L71 76 L78 76 L69 98 L76 98 L62 130 Z'/%3E%3Cpath d='M108 130 L90 84 L99 84 L88 54 L97 54 L108 30 L119 54 L128 54 L117 84 L126 84 L108 130 Z'/%3E%3Cpath d='M158 130 L144 98 L151 98 L142 76 L149 76 L158 58 L167 76 L174 76 L165 98 L172 98 L158 130 Z'/%3E%3Cpath d='M206 130 L188 82 L197 82 L186 52 L195 52 L206 28 L217 52 L226 52 L215 82 L224 82 L206 130 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: auto 130px;
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;   /* stay behind the cabinet, never over the reels */
}

.cabinet {
  position: relative;
  width: 100%;
  max-width: 900px;
  background:
    repeating-linear-gradient(91deg,
      rgba(0,0,0,0.05) 0 2px,
      rgba(255,255,255,0.035) 2px 4px,
      rgba(0,0,0,0.04) 4px 9px),
    repeating-linear-gradient(90deg,
      rgba(60,30,10,0.10) 0 40px,
      rgba(120,70,30,0.10) 40px 82px),
    linear-gradient(180deg, #b17c44, #7a4e28 32%, #4a2f18 78%, #38230f);
  border: 5px solid #241407;
  border-radius: 18px;
  padding: 16px;
  box-shadow:
    0 0 0 4px #c9962e,
    0 0 0 6px #7a5410,
    0 0 0 8px #3a2610,
    0 24px 70px rgba(0,0,0,0.85),
    inset 0 3px 8px rgba(255,225,170,0.22),
    inset 0 -18px 40px rgba(0,0,0,0.55);
}

/* ---------- Top bar / logo ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  position: relative;
  margin-bottom: 12px;
}
.topbar-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; position: relative; }

/* Hamburger button + slide-down menu holding the secondary functions. */
.hamburger-btn {
  flex: 0 0 auto;
  background: #2a1c0e;
  color: var(--gold);
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  padding: 4px 11px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.hamburger-btn:hover { background: #3a2712; }
/* Shared menu: a fixed-position dropdown floated above the active view. Its
   top/right are set inline by the JS, anchored to whichever ☰ button opened it. */
.hamburger-menu {
  position: fixed;
  top: 54px;
  right: 12px;
  z-index: 300;
  display: grid;
  gap: 3px;
  min-width: 190px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 6px;
  background: #14100a;
  border: 2px solid var(--gold-deep);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.7);
}
.hm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: #e7d3a0;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.hm-item:hover { background: #2a1c0e; }
.hm-item.active { background: var(--gold); color: #2a1a08; }
.hm-emoji { font-size: 17px; width: 22px; text-align: center; flex: 0 0 auto; }

/* Combo streak counter — grows (scale) and reddens toward maroon as it climbs. */
.combo-counter {
  --combo-scale: 1;
  --combo-bg: hsl(0 75% 50%);
  display: none;
  transform-origin: right center;
  transform: scale(var(--combo-scale));
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--combo-bg);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(255,60,60,0.5);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  transition: transform .18s cubic-bezier(0.34,1.56,0.64,1), background .25s ease;
}
.combo-counter.show { display: inline-block; animation: comboPop .25s ease; }
@keyframes comboPop { 0% { transform: scale(calc(var(--combo-scale) * 1.35)); } 100% { transform: scale(var(--combo-scale)); } }
.logo {
  font-weight: 900;
  font-size: clamp(18px, 5vw, 48px);
  letter-spacing: 1px;
  text-shadow: 0 3px 0 #000, 0 0 18px rgba(246,196,69,0.6);
  display: flex;
  gap: 6px;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}
.logo-adventure {
  color: var(--gold);
  -webkit-text-stroke: 1.5px #4a2f00;
}
.logo-spins {
  color: var(--red);
  -webkit-text-stroke: 1.5px #2a0000;
}
.rules-btn {
  flex: 0 0 auto;
  background: var(--gold);
  color: #3a2413;
  border: 2px solid #7a5410;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: clamp(11px, 2.6vw, 15px);
  cursor: pointer;
}
.rules-btn:hover { background: #ffd968; }

/* ---------- Free spins banner ---------- */
.free-banner {
  background: linear-gradient(90deg, #7a1010, var(--red), #7a1010);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  margin-bottom: 10px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  gap: 18px;
  animation: pulse 1.2s infinite;
}
.free-banner .fb-count { color: var(--gold); }
.free-banner.gold {
  background: linear-gradient(90deg, #7a5410, #e0a828, #7a5410);
  border-color: #fff2b0;
}
.free-banner.gold .fb-title, .free-banner.gold .fb-count { color: #3a2405; }
@keyframes pulse { 50% { filter: brightness(1.35); } }

/* ---------- Screen / reels ---------- */
.screen {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  background:
    radial-gradient(ellipse at 50% 0%, #16202e, #080b12 80%);
  border: 3px solid #2a1c0c;
  border-radius: 12px;
  padding: 10px;
  box-shadow:
    0 0 0 3px #c9962e,
    0 0 0 5px #7a5410,
    inset 0 0 24px rgba(0,0,0,0.8);
}

.reels-wrap {
  position: relative;
  min-width: 0;
}
.reels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: #F0F1D8;               /* backdrop behind the icons */
  border-radius: 6px;
  padding: 2px;
  overflow: hidden;
}
.reel {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 0;
  /* only column separators between reels — no per-icon frames */
  border-right: 2px solid #d3d4b6;
}
.reel:last-child { border-right: none; }
.cell {
  aspect-ratio: 1 / 1;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.08s;
}
.cell .sym {
  width: 90%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cell .sym .art {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}
.sym-fallback { font-size: clamp(24px, 6vw, 44px); line-height: 1; }
.cell .sym .sym-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  /* No drop-shadow on uploaded PNGs: it read as a border/frame around the
     image (rectangular for opaque PNGs). The artwork sits flat on the reel. */
  -webkit-user-select: none;
  user-select: none;
}
/* Gold multiplier value overlaid on the gold coin */
.gold-mult {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  font-weight: 900;
  font-size: clamp(15px, 4vw, 30px);
  color: #4a2e05;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
  pointer-events: none;
  z-index: 2;
}

/* Idle animations ------------------------------------------------------- */
.art .breathe { transform-box: fill-box; transform-origin: 50% 90%;
  animation: breathe 3.4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
.art .float { transform-box: fill-box; transform-origin: 50% 60%;
  animation: floaty 3s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3px) rotate(1deg); }
}
.art .gem { transform-box: fill-box; transform-origin: 50% 50%;
  animation: gemglow 3.6s ease-in-out infinite; }
@keyframes gemglow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

/* Fire (wild) ----------------------------------------------------------- */
.art-wild .flame { transform-box: fill-box; transform-origin: 50% 100%; }
.art-wild .f1 { animation: flick1 0.42s ease-in-out infinite alternate; }
.art-wild .f2 { animation: flick2 0.3s ease-in-out infinite alternate; }
@keyframes flick1 {
  from { transform: scaleY(0.94) scaleX(1.03) skewX(-2deg); }
  to   { transform: scaleY(1.06) scaleX(0.97) skewX(3deg); }
}
@keyframes flick2 {
  from { transform: scaleY(0.9) translateX(-1px); opacity: 0.8; }
  to   { transform: scaleY(1.08) translateX(1px); opacity: 1; }
}
.art-wild .spark { animation: spark 1.4s ease-in-out infinite; }
.art-wild .s2 { animation-delay: 0.6s; }
@keyframes spark {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-16px); opacity: 0; }
}
.cell.spinning { animation: reelblur 0.28s linear infinite; }
@keyframes reelblur {
  0% { transform: translateY(-6%); filter: blur(1px); }
  100% { transform: translateY(6%); filter: blur(1px); }
}
.cell.land .sym { animation: land 0.34s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes land {
  0% { transform: translateY(-14%) scale(1.04, 0.9); }
  60% { transform: translateY(4%) scale(0.98, 1.04); }
  100% { transform: translateY(0) scale(1); }
}

.cell.win-cell {
  animation: winflash 0.7s ease-in-out infinite;
  z-index: 2;
}
.cell.win-cell .sym { animation: winbounce 0.7s ease-in-out infinite; }
@keyframes winflash {
  0%,100% { box-shadow: 0 0 0 rgba(246,196,69,0); }
  50% { box-shadow: 0 0 18px 5px var(--gold); }
}
@keyframes winbounce {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
/* shine sweep across a winning cell */
.cell.win-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.75) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 1.1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine {
  0% { transform: translateX(-120%); }
  60%, 100% { transform: translateX(120%); }
}
.cell.sticky {
  outline: 3px solid var(--green-led);
  outline-offset: -3px;
}

.line-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 3;
}

.win-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  background: rgba(10,5,0,0.85);
  border: 3px solid var(--gold);
  border-radius: 14px;
  padding: 18px 34px;
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(246,196,69,0.8);
  z-index: 5;
  animation: pop 0.35s ease forwards;
}
@keyframes pop { to { transform: translate(-50%, -50%) scale(1); } }

/* ---------- Meters ---------- */
.meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}
.meter {
  background: #05070d;
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.meter-label {
  display: block;
  font-size: 11px;
  color: #c9a24a;
  letter-spacing: 1px;
}
.meter-value {
  display: block;
  font-family: "Courier New", monospace;
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 900;
  color: var(--green-led);
  text-shadow: 0 0 8px rgba(77,255,119,0.6);
}
.meter.win .meter-value { color: var(--gold); text-shadow: 0 0 8px rgba(246,196,69,0.6); }

/* ---------- Controls ---------- */
.controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.btn {
  border: none;
  border-radius: 10px;
  padding: 14px 6px;
  font-weight: 800;
  font-size: clamp(12px, 2.6vw, 16px);
  cursor: pointer;
  color: #2a1a08;
  background: linear-gradient(180deg, #f0e0b0, #c8a04a);
  border: 2px solid #8a6a20;
  box-shadow: 0 3px 0 #6a5015;
  transition: transform 0.05s, box-shadow 0.05s;
  user-select: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 #6a5015; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.start-btn {
  background: linear-gradient(180deg, #7dff9a, #23a544);
  color: #06210f;
  border-color: #12622a;
  box-shadow: 0 3px 0 #0d4a20;
  grid-row: 1;
}
.start-btn.stop {
  background: linear-gradient(180deg, #ff9a7d, #c43a23);
  border-color: #7a2010;
  box-shadow: 0 3px 0 #5a1808;
  color: #260a06;
}
.auto-btn.active { background: linear-gradient(180deg, #ffd76a, #e0a020); }

.footer {
  text-align: center;
  font-size: 11px;
  color: #e7d3a0;
  margin-top: 10px;
  opacity: 0.8;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal-box {
  background: linear-gradient(180deg, #2a1c0e, #14100a);
  border: 3px solid var(--gold);
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  position: relative;
}
.modal-box h2 { color: var(--gold); margin-bottom: 12px; text-align: center; }
.modal-box p, .modal-box li { line-height: 1.5; margin-bottom: 8px; font-size: 14px; }
.modal-box ul { padding-left: 18px; margin-bottom: 14px; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-weight: 900;
  cursor: pointer;
}
.paytable {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.pt-item {
  background: #0a0d14;
  border: 1px solid var(--gold-deep);
  border-radius: 8px;
  padding: 10px;
}
.pt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 6px;
}
.pt-head .e { width: 34px; height: 34px; display: inline-flex; flex: 0 0 34px; }
.pt-head .e .art { width: 100%; height: 100%; }
.pt-row { display: flex; justify-content: space-between; font-size: 12px; color: #ddd; }

/* ---------- Mute + extra action buttons ---------- */
.icon-btn {
  flex: 0 0 auto;
  background: #2a1c0e;
  color: var(--gold);
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.icon-btn.active {
  background: var(--gold);
  color: #2a1a08;
  box-shadow: 0 0 10px rgba(246,196,69,0.75);
}
.extra-actions {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.xtra-btn {
  border: 2px solid #6a5015;
  border-radius: 10px;
  padding: 10px 6px;
  font-weight: 800;
  font-size: clamp(12px, 2.7vw, 15px);
  cursor: pointer;
  color: #2a1a08;
}
.buy-btn { background: linear-gradient(180deg, #ffd76a, #d89a20); box-shadow: 0 3px 0 #8a6410; }
.topup-btn { background: linear-gradient(180deg, #7dff9a, #23a544); color: #06210f; border-color: #12622a; box-shadow: 0 3px 0 #0d4a20; }
.withdraw-btn { background: linear-gradient(180deg, #ffd0a0, #d87a3a); color: #2a1406; border-color: #8a4a18; box-shadow: 0 3px 0 #6a3410; }
.xtra-btn:active { transform: translateY(3px); box-shadow: none; }
.xtra-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- FX canvas + big win banner ---------- */
.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
}
.bigwin-banner {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 6;
  animation: bwpop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.bw-title {
  display: block;
  font-size: clamp(22px, 6vw, 44px);
  font-weight: 900;
  color: var(--gold);
  -webkit-text-stroke: 1.5px #3a2600;
  text-shadow: 0 0 18px rgba(246,196,69,0.9);
  letter-spacing: 1px;
}
.bw-amount {
  display: block;
  font-size: clamp(20px, 5vw, 38px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 #000, 0 0 14px rgba(255,255,255,0.5);
}
@keyframes bwpop { 0% { transform: translate(-50%,-50%) scale(0.3); opacity: 0; } 100% { transform: translate(-50%,-50%) scale(1); opacity: 1; } }

/* ---------- Scatter anticipation ---------- */
.cell.anticipate {
  outline: 3px solid #ffd23b;
  outline-offset: -3px;
  animation: antipulse 0.35s ease-in-out infinite;
  z-index: 3;
}
@keyframes antipulse { 50% { outline-color: #ff7a18; box-shadow: 0 0 16px 3px rgba(255,150,20,0.7); } }

/* ---------- Autoplay modal ---------- */
.auto-box {
  background: linear-gradient(180deg, #2a1c0e, #14100a);
  border: 3px solid var(--gold);
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 22px;
  position: relative;
  text-align: center;
}
.auto-box h2 { color: var(--gold); margin-bottom: 6px; }
.auto-sub { font-size: 14px; margin-bottom: 12px; color: #e7d3a0; }
.auto-counts { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.auto-count {
  flex: 1 1 60px;
  padding: 12px 4px;
  border: 2px solid var(--gold-deep);
  border-radius: 10px;
  background: #0a0d14;
  color: var(--gold);
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
}
.auto-count.sel { background: var(--gold); color: #2a1a08; }
.auto-opt { display: flex; align-items: center; gap: 8px; text-align: left; font-size: 13px; margin-bottom: 8px; color: #e7d3a0; cursor: pointer; }
.auto-opt input { width: 18px; height: 18px; accent-color: var(--gold); }
.auto-start {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 2px solid #12622a;
  border-radius: 10px;
  background: linear-gradient(180deg, #7dff9a, #23a544);
  color: #06210f;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 #0d4a20;
}
.auto-start:active { transform: translateY(3px); box-shadow: none; }

/* ---------- RTP slider ---------- */
.rtp-control {
  background: #0a0d14;
  border: 2px solid var(--gold-deep);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.rtp-control label { display: block; font-size: 14px; margin-bottom: 8px; color: #e7d3a0; }
.rtp-control label b { color: var(--gold); font-size: 18px; }
.rtp-control input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}
.rtp-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #9a8a5a;
  margin-top: 2px;
}
.rtp-note { font-size: 12px !important; color: #c9b98a !important; margin-top: 8px !important; }

/* ---------- Gamble (double-or-nothing) ---------- */
.gamble-btn {
  width: 100%;
  margin: 0 0 8px;
  padding: 12px;
  border: 2px solid #7a1010;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff5a5a, #c41818);
  color: #fff;
  font-weight: 900;
  font-size: clamp(14px, 3.4vw, 18px);
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 3px 0 #7a0d0d;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease,
              border-color 0.25s ease, opacity 0.25s ease;
}
/* Only the active (win available) button pulses. */
.gamble-btn:not(:disabled) { animation: pulse 1.1s infinite; }
/* Inactive: always present (no reflow), just greyed out and non-interactive. */
.gamble-btn:disabled {
  cursor: default;
  animation: none;
  background: linear-gradient(180deg, #3a4150, #2a2f38);
  border-color: #2a2f3a;
  color: #7f8a99;
  box-shadow: 0 3px 0 #1a1d24;
  opacity: 0.85;
}
.gamble-btn:not(:disabled):active { transform: translateY(3px); box-shadow: 0 0 0 #7a0d0d; }
.gamble-btn span { color: #ffe08a; }
.gamble-btn:disabled span { color: #9aa3b2; }

.gamble-box {
  background: linear-gradient(180deg, #22304a, #101725);
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 22px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  /* The parlay modal is tall (colour + suit + rank + actions); on short phone
   * screens it must scroll inside itself instead of clipping off-screen. */
  max-height: 92vh;                    /* fallback for browsers without dvh */
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.gamble-box::-webkit-scrollbar { width: 6px; }
.gamble-box::-webkit-scrollbar-thumb { background: rgba(246,196,69,0.4); border-radius: 3px; }
.gamble-box h2 { color: var(--gold); margin-bottom: 12px; letter-spacing: 1px; }
.gamble-amounts {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.gamble-amounts .ga-col {
  flex: 1;
  min-width: 0;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(246,196,69,0.35);
  border-radius: 8px;
  padding: 6px 3px;
  font-weight: 900;
  font-size: clamp(11px, 2.9vw, 14px);
  color: var(--green-led);
}
.gamble-amounts .ga-col:nth-child(4) b { color: #7dd0ff; }
.gamble-amounts .ga-col:nth-child(2) b { color: #ffd76a; }
.gamble-amounts .ga-col:nth-child(3) b { color: #ff9a3b; }
.gamble-amounts .ga-label {
  display: block;
  font-size: 10px;
  color: #c9a24a;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-bottom: 2px;
}
.gamble-card {
  width: 110px;
  height: 150px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f6f6ee, #d9d7c4);
  border: 3px solid #b8b090;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 34px;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.2);
}
.gamble-card > span { line-height: 1.1; }
.gamble-card > span.red { color: #d02020; }
.gamble-card > span.black { color: #1a1a1a; }
.gamble-card.is-red { background: linear-gradient(145deg, #ffe9e9, #ffc9c9); border-color: #d06060; }
.gamble-card.is-black { background: linear-gradient(145deg, #eef1f6, #cfd4de); border-color: #6a7280; }
.gamble-card:not(.is-red):not(.is-black) > span { color: #8a8468; }
.gamble-card.flip { animation: cardflip 0.16s ease; }
@keyframes cardflip { 0% { transform: rotateY(90deg) scale(0.9); } 100% { transform: rotateY(0) scale(1); } }
.gamble-msg { min-height: 22px; margin-bottom: 12px; font-weight: 800; color: #e7d3a0; }
.gamble-msg.win { color: var(--green-led); }
.gamble-msg.lose { color: #ff6a6a; }
.gamble-choices { display: flex; gap: 10px; margin-bottom: 10px; }
.g-choice {
  flex: 1;
  padding: 14px 6px;
  border: none;
  border-radius: 10px;
  font-weight: 900;
  font-size: clamp(13px, 3vw, 17px);
  color: #fff;
  cursor: pointer;
}
.g-red { background: linear-gradient(180deg, #ff5a5a, #c41818); box-shadow: 0 3px 0 #7a0d0d; }
.g-black { background: linear-gradient(180deg, #4a4f5a, #1a1d24); box-shadow: 0 3px 0 #0a0c10; }
.g-choice:active { transform: translateY(3px); box-shadow: none; }
.g-choice:disabled { opacity: 0.5; cursor: not-allowed; }
.g-collect {
  width: 100%;
  padding: 12px;
  border: 2px solid #12622a;
  border-radius: 10px;
  background: linear-gradient(180deg, #7dff9a, #23a544);
  color: #06210f;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 #0d4a20;
}
.g-collect:active { transform: translateY(3px); box-shadow: none; }
.g-collect:disabled { opacity: 0.5; cursor: not-allowed; }

/* Gold multiplier reveal pop */
.gold-mult.reveal { animation: goldpop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes goldpop {
  0% { transform: translate(-50%, -46%) scale(1.6); }
  100% { transform: translate(-50%, -46%) scale(1); }
}

/* ---------- Gamble: history ladder + suit (×4) buttons ---------- */
.gamble-history {
  display: flex;
  gap: 7px;
  justify-content: flex-start;
  overflow-x: auto;
  min-height: 34px;
  margin-bottom: 10px;
  padding-bottom: 3px;
  scrollbar-width: thin;
}
.gamble-history:not(:has(.gh-item)) { justify-content: center; }   /* centre the empty label */
.gamble-history::-webkit-scrollbar { height: 5px; }
.gamble-history::-webkit-scrollbar-thumb { background: rgba(246,196,69,0.4); border-radius: 3px; }
/* Each ladder entry: the drawn card + a small caption naming the parlay (kötés)
 * and the value it was played for. */
.gh-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 40px;
}
.gh-meta {
  font-size: 9px;
  line-height: 1.15;
  color: #c9b98a;
  text-align: center;
  white-space: nowrap;
}
.gh-meta .win { color: var(--green-led); font-weight: 800; }
.gh-meta .lose { color: #ff6a6a; font-weight: 800; }
.gh-empty { color: #7a8090; font-size: 12px; align-self: center; }
.gh-card {
  width: 26px;
  height: 34px;
  border-radius: 5px;
  background: linear-gradient(145deg, #f6f6ee, #dcdac8);
  border: 1px solid #b8b090;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 11px;
  line-height: 1.05;
}
.gh-card i { font-style: normal; font-size: 12px; }
.gh-card.red { color: #d02020; }
.gh-card.black { color: #1a1a1a; }

.gamble-suits-label {
  font-size: 11px;
  color: #c9a24a;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.gamble-stat {
  font-size: 12px;
  color: #c9b98a;
  margin-bottom: 8px;
}
.gamble-stat b.pos { color: var(--green-led); }
.gamble-stat b.neg { color: #ff6a6a; }
.gamble-ranks {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 12px;
}
.g-rank {
  padding: 8px 2px;
  border: 2px solid #2a2f3a;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  color: #1a1a1a;
  background: linear-gradient(180deg, #f2f2ea, #d4d2c0);
  box-shadow: 0 2px 0 #9a9070;
}
.g-rank:active { transform: translateY(2px); box-shadow: none; }
.g-rank:disabled { opacity: 0.5; cursor: not-allowed; }
.meter-sub { display: block; font-size: 10px; color: #9a8a5a; margin-top: 2px; }
.meter-sub b { color: #c9a24a; }
.gamble-suits { display: flex; gap: 8px; margin-bottom: 12px; }
.g-suit {
  flex: 1;
  padding: 12px 4px;
  border: 2px solid #2a2f3a;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(180deg, #f2f2ea, #d4d2c0);
  box-shadow: 0 3px 0 #9a9070;
}
.g-suit.red { color: #d02020; }
.g-suit.black { color: #1a1a1a; }
.g-suit:active { transform: translateY(3px); box-shadow: none; }
.g-suit:disabled { opacity: 0.5; cursor: not-allowed; }
.g-choice small { font-size: 0.72em; opacity: 0.85; }

/* ---------- Gamble: parlay (summed multipliers) selection ---------- */
/* A picked colour / suit / rank is highlighted; the combined multiplier is
 * summed and a single HÚZÁS resolves all picks against one card. */
.g-choice.sel, .g-suit.sel, .g-rank.sel {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  filter: brightness(1.12);
}
.g-suit.sel, .g-rank.sel { background: linear-gradient(180deg, #fff7d6, #ffe38a); }
.gamble-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.g-draw {
  flex: 2;
  padding: 13px 8px;
  border: 2px solid #7a5a10;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd76a, #e0a020);
  color: #3a2600;
  font-weight: 900;
  font-size: clamp(14px, 3.2vw, 18px);
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 3px 0 #7a5a10;
}
.g-draw:active { transform: translateY(3px); box-shadow: none; }
.g-draw:disabled { opacity: 0.45; cursor: not-allowed; }
.gamble-actions .g-collect { flex: 1; width: auto; }

/* ---------- Cross-game gamble buttons (blackjack / roulette) ---------- */
.bj-gamble-btn, .rl-gamble-btn {
  display: block;
  margin: 8px auto 4px;
  padding: 10px 22px;
  border: 2px solid #7a5a10;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd76a, #e0a020);
  color: #3a2600;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 3px 0 #7a5a10;
}
.bj-gamble-btn:active, .rl-gamble-btn:active { transform: translateY(3px); box-shadow: none; }
.bj-gamble-btn:disabled, .rl-gamble-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: linear-gradient(180deg, #6a6250, #4a4638);
  color: #cbbf9a;
  box-shadow: 0 3px 0 #2a2620;
}

/* ---------- Round-history strip (slot / blackjack / roulette) ---------- */
.round-history { margin: 8px 0 2px; }
.rh-label { display: block; font-size: 10px; letter-spacing: 1px; color: #c9a24a; margin-bottom: 4px; text-transform: uppercase; }
.rh-strip {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
}
.rh-strip::-webkit-scrollbar { height: 5px; }
.rh-strip::-webkit-scrollbar-thumb { background: rgba(246,196,69,0.4); border-radius: 3px; }
.rh-chip {
  flex: 0 0 auto;
  min-width: 40px;
  text-align: center;
  padding: 3px 6px;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}
.rh-chip.win { color: #7dff9a; background: rgba(35,165,68,0.18); border-color: rgba(125,255,154,0.4); }
.rh-chip.loss { color: #ff8a8a; background: rgba(165,35,35,0.18); border-color: rgba(255,138,138,0.35); }
.rh-chip.zero { color: #8a8fa0; background: rgba(120,130,150,0.12); }
.rh-empty { font-size: 12px; color: #7a8090; }

/* ---------- Session history panel ---------- */
.history-panel {
  background: #05070d;
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 10px;
}
.hp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hp-cell { text-align: center; }
.hp-label { display: block; font-size: 10px; color: #c9a24a; letter-spacing: 1px; }
.hp-value {
  display: block;
  font-family: "Courier New", monospace;
  font-size: clamp(14px, 3.6vw, 20px);
  font-weight: 900;
  color: #cfe4ff;
}
.hp-value.net.pos { color: var(--green-led); text-shadow: 0 0 8px rgba(77,255,119,0.5); }
.hp-value.net.neg { color: #ff6a6a; text-shadow: 0 0 8px rgba(255,80,80,0.5); }
.hp-log {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
  min-height: 14px;
}
.hp-log-item {
  font-size: 10px;
  color: #7dff9a;
  background: rgba(35,165,68,0.18);
  border: 1px solid rgba(125,255,154,0.35);
  border-radius: 4px;
  padding: 1px 5px;
}
.hp-log-item.out {
  color: #ffb27d;
  background: rgba(216,122,58,0.18);
  border-color: rgba(255,178,125,0.4);
}

/* ---------- History panel actions (toplista / restart) ---------- */
.hp-actions { display: flex; gap: 8px; margin-top: 8px; }
.hp-btn {
  flex: 1;
  padding: 8px 6px;
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  background: #0f1420;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.hp-btn:hover { background: #17203040; }
.hp-btn.danger { color: #ff9a7d; border-color: #8a3a1a; }
.hp-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Leaderboard modal ---------- */
.board-box {
  background: linear-gradient(180deg, #2a1c0e, #14100a);
  border: 3px solid var(--gold);
  border-radius: 14px;
  max-width: 460px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  position: relative;
  text-align: center;
}
.board-box h2 { color: var(--gold); margin-bottom: 4px; }
.board-sub { font-size: 12px; color: #c9b98a; margin-bottom: 12px; }
.board-list { list-style: none; padding: 0; margin: 0 0 14px; text-align: left; }
.board-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #0a0d14;
  border: 1px solid #2a2f3a;
  margin-bottom: 5px;
  font-weight: 700;
}
.board-row.you { border-color: var(--gold); box-shadow: 0 0 10px rgba(246,196,69,0.35); }
.board-empty { list-style: none; padding: 22px 10px; text-align: center; color: #9aa3b2; font-weight: 700; }
.br-rank { flex: 0 0 34px; font-size: 15px; color: #c9a24a; text-align: center; }
.br-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e7d3a0; }
.br-res { flex: 0 0 auto; font-family: "Courier New", monospace; font-weight: 900; }
.br-res.pos { color: var(--green-led); }
.br-res.neg { color: #ff6a6a; }
.board-submit { border-top: 1px solid #3a2f18; padding-top: 12px; }
.board-your { font-size: 14px; color: #e7d3a0; margin-bottom: 8px; }
.board-your b.pos { color: var(--green-led); }
.board-your b.neg { color: #ff6a6a; }
.board-form { display: flex; gap: 8px; }
.board-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--gold-deep);
  background: #05070d;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.board-form button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 2px solid #12622a;
  border-radius: 8px;
  background: linear-gradient(180deg, #7dff9a, #23a544);
  color: #06210f;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 #0d4a20;
}
.board-form button:active { transform: translateY(3px); box-shadow: none; }
.board-msg { min-height: 18px; margin-top: 8px; font-weight: 800; color: var(--gold); font-size: 13px; }

/* ---------- Restart confirm modal ---------- */
.reset-box {
  background: linear-gradient(180deg, #2a1c0e, #14100a);
  border: 3px solid #d84a3a;
  border-radius: 14px;
  max-width: 380px;
  width: 100%;
  padding: 22px;
  text-align: center;
}
.reset-box h2 { color: #ff9a7d; margin-bottom: 10px; }
.reset-box p { font-size: 14px; line-height: 1.5; color: #e7d3a0; margin-bottom: 16px; }
.reset-choices { display: flex; gap: 10px; }
.reset-btn {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid #2a2f3a;
}
.reset-btn.cancel { background: linear-gradient(180deg, #4a4f5a, #1a1d24); color: #fff; }
.reset-btn.danger { background: linear-gradient(180deg, #ff6a4a, #c41818); color: #fff; border-color: #7a1010; box-shadow: 0 3px 0 #7a0d0d; }
.reset-btn:active { transform: translateY(3px); box-shadow: none; }

/* ---------- Gamble odds (last-10 chances) ---------- */
.gamble-odds {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(246,196,69,0.3);
  border-radius: 8px;
  padding: 7px 8px;
  margin-bottom: 10px;
  font-size: 12px;
}
.go-empty { color: #8a8468; }
.go-title { color: #c9a24a; font-size: 10px; letter-spacing: 0.5px; margin-bottom: 4px; }
.go-bars { display: flex; justify-content: center; gap: 16px; font-weight: 900; margin-bottom: 4px; }
.go-red { color: #ff6a6a; }
.go-black { color: #cfd4de; }
.go-bars i { font-style: normal; opacity: 0.7; font-weight: 400; }
.go-suits { display: flex; justify-content: center; gap: 8px; font-weight: 800; }
.go-suit.red { color: #ff6a6a; }
.go-suit.black { color: #cfd4de; }

/* ---------- Stage / panel split (landscape layout) ---------- */
/* In portrait these are plain blocks (children stack as before). The fx canvas
   sits inside the stage, so it needs a positioned ancestor. */
.stage { position: relative; }

.layout-control {
  background: #0a0d14;
  border: 2px solid var(--gold-deep);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.layout-control label { display: block; font-size: 14px; margin-bottom: 8px; color: #e7d3a0; }
.layout-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.layout-opt {
  flex: 1 1 auto;
  padding: 10px 8px;
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  background: #05070d;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.layout-opt.sel { background: var(--gold); color: #2a1a08; }

/* Landscape phone: game on one side, controls on the other. The body class
   (ls-left / ls-right / ls-off) chooses the side or turns the split off. */
@media (orientation: landscape) and (max-height: 600px) {
  body:not(.ls-off) .cabinet {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    max-width: 1000px;
  }
  body.ls-right .cabinet { flex-direction: row-reverse; }
  body:not(.ls-off) .cabinet > .stage {
    flex: 1 1 54%;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  body:not(.ls-off) .cabinet > .panel {
    flex: 1 1 46%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }
  /* tighten vertical rhythm so everything fits the short viewport */
  body:not(.ls-off) .topbar { margin-bottom: 6px; }
  body:not(.ls-off) .meters { margin: 8px 0 0; }
  body:not(.ls-off) .history-panel { margin-top: 8px; }
  body:not(.ls-off) .panel .footer { margin-top: auto; }
}

/* ---------------- Statistics modal ------------------------------------- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.stat-cell {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px; border-radius: 10px;
  background: #0a0d14; border: 1px solid #2a2f3a;
}
.sc-label { font-size: 11px; color: #9aa3b2; text-transform: uppercase; letter-spacing: .03em; }
.sc-value { font-size: 18px; font-weight: 900; color: var(--gold); font-family: "Courier New", monospace; }

/* ============================ BLACKJACK TABLE ========================== */
.bj-view {
  /* body is a flex container — without an explicit width this view would grow
   * to its content's max width and overflow (clipping the left buttons on
   * mobile). Lock it to the viewport. */
  width: 100%;
  max-width: 760px;
  box-sizing: border-box;
  overflow-x: hidden;
  margin: 0 auto;
  padding: 10px 12px 24px;
  color: #eaf3ea;
}
.bj-view * { box-sizing: border-box; }
.bj-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.bj-back {
  background: linear-gradient(180deg, #f6c445, #b8860b);
  color: #201400;
  border: none;
  border-radius: 9px;
  padding: 8px 10px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
.bj-title { flex: 1 1 90px; min-width: 0; text-align: center; color: var(--gold); font-size: clamp(16px, 4.5vw, 26px); letter-spacing: 1px; }
.bj-credit-box { flex: 0 1 auto; min-width: 0; background: #0a0d14; border: 1px solid var(--gold-deep); border-radius: 9px; padding: 8px 10px; font-weight: 800; white-space: nowrap; font-size: 13px; }
.bj-credit-box b { color: var(--green-led); font-family: "Courier New", monospace; }

.bj-felt {
  position: relative;
  background:
    radial-gradient(120% 100% at 50% 0%, #1f6b3a 0%, #17512c 55%, #0f3a20 100%);
  border: 6px solid #5a3a1a;
  border-radius: 22px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.45), 0 8px 24px rgba(0,0,0,0.5);
  padding: 16px 12px 18px;
  min-height: 320px;
}
.bj-dealer, .bj-player { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bj-hand-label { font-weight: 800; color: #d9ffe4; letter-spacing: 1px; font-size: 13px; }
.bj-hand-label span { color: var(--gold); }
.bj-cards { display: flex; gap: 6px; min-height: 92px; align-items: center; justify-content: center; flex-wrap: wrap; }

.bj-card {
  width: 62px; height: 88px;
  border-radius: 8px;
  background: #fbfbf5;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6px 7px;
  font-weight: 900;
  animation: bj-deal 0.22s ease;
}
@keyframes bj-deal { from { transform: translateY(-16px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
.bj-card .cr { font-size: 18px; line-height: 1; }
.bj-card .cs { font-size: 26px; text-align: right; line-height: 1; }
.bj-card.red { color: #d02020; }
.bj-card.black { color: #12100c; }
.bj-card.back {
  background: repeating-linear-gradient(45deg, #7a1010 0 8px, #a01818 8px 16px);
  border: 3px solid #f6c445;
}

.bj-msg { text-align: center; font-weight: 800; margin: 12px 0 4px; min-height: 20px; color: #fff; }
.bj-side-msg { display: flex; flex-direction: column; gap: 2px; align-items: center; margin-bottom: 6px; }
.bj-side-line { font-size: 12px; color: #d9ffe4; }
/* Round-end summary of all side bets, slightly highlighted. */
.bj-side-msg.summary {
  gap: 3px;
  padding: 7px 12px;
  margin: 4px auto 8px;
  border: 1px solid rgba(246,196,69,0.45);
  border-radius: 9px;
  background: rgba(0,0,0,0.28);
}
.bj-side-msg.summary.has-win { border-color: rgba(125,255,154,0.65); box-shadow: 0 0 10px rgba(125,255,154,0.2); }
.bj-side-head { font-size: 10px; letter-spacing: 1px; font-weight: 800; color: #c9a24a; text-transform: uppercase; }
.bj-side-line.win { color: #7dff9a; font-weight: 800; }

.bj-player { margin-top: 8px; gap: 12px; }
.bj-player .bj-hand { padding: 6px 8px; border-radius: 12px; border: 2px solid transparent; }
.bj-player .bj-hand.active { border-color: var(--gold); box-shadow: 0 0 16px rgba(246,196,69,0.4); background: rgba(0,0,0,0.15); }
.bj-hand-top { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; margin-bottom: 4px; flex-wrap: wrap; }
.bj-hand-idx { color: var(--gold); }
.bj-hand-val { color: #fff; }
.bj-hand-bet { color: #bfe8c9; }
.bj-outcome { background: #0a0d14; border: 1px solid var(--gold-deep); border-radius: 6px; padding: 1px 7px; color: var(--gold); }

.bj-spots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.bj-spot {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 6px;
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
  border: 2px dashed rgba(246,196,69,0.55);
  color: #eaf3ea;
  cursor: pointer;
  font: inherit;
}
.bj-spot:hover { border-style: solid; }
.bj-spot.main { border-color: var(--gold); background: rgba(246,196,69,0.12); }
.bj-spot-label { font-size: 10.5px; font-weight: 800; letter-spacing: .3px; text-align: center; color: #d9ffe4; }
.bj-spot b { font-size: 15px; color: var(--gold); font-family: "Courier New", monospace; }

.bj-controls { margin-top: 12px; }
.bj-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.bj-chip {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px dashed #fff;
  background: radial-gradient(circle at 50% 35%, #2a6cff, #14357a);
  color: #fff; font-weight: 900; font-size: 13px; cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
.bj-chip:nth-child(2) { background: radial-gradient(circle at 50% 35%, #ff5a5a, #a01818); }
.bj-chip:nth-child(3) { background: radial-gradient(circle at 50% 35%, #4dff77, #1a7a3a); color: #06210f; }
.bj-chip:nth-child(4) { background: radial-gradient(circle at 50% 35%, #2a2f38, #05070c); }
.bj-chip:nth-child(5) { background: radial-gradient(circle at 50% 35%, #f6c445, #b8860b); color: #201400; }
.bj-chip.active { outline: 3px solid var(--gold); transform: translateY(-3px); }

.bj-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 100%; }
.bj-btn {
  flex: 1 1 0; min-width: 62px; max-width: 200px;
  padding: 13px 8px;
  border: none; border-radius: 10px;
  background: linear-gradient(180deg, #3a4150, #262b34);
  color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .5px;
  cursor: pointer; box-shadow: 0 3px 0 #12151b;
}
.bj-btn:active { transform: translateY(3px); box-shadow: 0 0 0 #12151b; }
.bj-btn.primary { background: linear-gradient(180deg, #4dff77, #1a9a3f); color: #06210f; box-shadow: 0 3px 0 #0d5a24; }
.bj-btn.ghost { background: linear-gradient(180deg, #2a2f38, #1a1d24); }
.bj-btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.bj-ins-q { align-self: center; font-weight: 800; color: var(--gold); }
.bj-rules-note { margin-top: 12px; text-align: center; font-size: 11px; color: #9fb8a6; line-height: 1.5; }

@media (max-width: 460px) {
  .bj-card { width: 50px; height: 72px; padding: 4px 5px; }
  .bj-card .cs { font-size: 20px; }
  .bj-spot-label { font-size: 9.5px; }
  .bj-chip { width: 42px; height: 42px; font-size: 12px; }
}

/* ============================ ROULETTE TABLE ========================== */
.rl-view {
  width: 100%;
  max-width: 760px;
  box-sizing: border-box;
  overflow-x: hidden;
  margin: 0 auto;
  padding: 10px 12px 24px;
  color: #eaf3ea;
}
.rl-view * { box-sizing: border-box; }
.rl-topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.rl-back { flex: 0 1 auto; min-width: 0; white-space: nowrap; background: linear-gradient(180deg, #f6c445, #b8860b); color: #201400; border: none; border-radius: 9px; padding: 8px 10px; font-weight: 800; font-size: 13px; cursor: pointer; }
.rl-title { flex: 1 1 90px; min-width: 0; text-align: center; color: var(--gold); font-size: clamp(16px, 4.5vw, 26px); letter-spacing: 1px; }
.rl-credit-box { flex: 0 1 auto; min-width: 0; white-space: nowrap; background: #0a0d14; border: 1px solid var(--gold-deep); border-radius: 9px; padding: 8px 10px; font-weight: 800; font-size: 13px; }
.rl-credit-box b { color: var(--green-led); font-family: "Courier New", monospace; }

/* Spinning wheel */
.rl-wheelwrap { position: relative; width: 210px; max-width: 66vw; aspect-ratio: 1 / 1; margin: 4px auto 10px; }
.rl-wheel { width: 100%; height: 100%; }
.rl-wheel-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5)); }
.rl-rot { transform-box: fill-box; transform-origin: center; }
/* pointer at the top */
.rl-pointer {
  position: absolute; top: -3px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 15px solid var(--gold);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
/* result badge in the hub */
.rl-result {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 17px; color: #fff;
  border: 2px solid #d4af37; box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.rl-result.green { background: #1a7a3a; }
.rl-result.red { background: #c41818; }
.rl-result.black { background: #17130d; }
.rl-result.spinning { background: #241608; color: #d4af37; font-size: 20px; }
.rl-history { display: flex; gap: 4px; overflow-x: auto; justify-content: center; margin-bottom: 8px; }
.rl-hist { flex: 0 0 auto; min-width: 26px; text-align: center; padding: 3px 4px; border-radius: 6px; font-weight: 800; font-size: 12px; color: #fff; }
.rl-hist.green { background: #1a7a3a; }
.rl-hist.red { background: #c41818; }
.rl-hist.black { background: #17130d; border: 1px solid #333; }

.rl-msg { text-align: center; font-weight: 800; margin: 6px 0 8px; min-height: 20px; color: #fff; }

.rl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.rl-table { min-width: 560px; }
.rl-svg { width: 100%; min-width: 560px; max-width: 720px; height: auto; display: block; user-select: none; }
.rl-cell { cursor: pointer; }
.rl-cell:hover rect { filter: brightness(1.25); }
.rl-hot { cursor: pointer; }
.rl-hot:hover { fill: rgba(246,196,69,0.5); }
/* The rendered chips + winner highlight are purely visual and sit on top of the
 * betting cells — let clicks pass through so stacking a second chip on the same
 * spot (e.g. 2×5 on 14) still hits the cell beneath and accumulates. */
#rlChipLayer, #rlHi { pointer-events: none; }

.rl-controls { margin-top: 12px; }
.rl-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.rl-chip {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px dashed #fff; color: #fff; font-weight: 900; font-size: 13px; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #2a6cff, #14357a);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
.rl-chip:nth-child(2) { background: radial-gradient(circle at 50% 35%, #ff5a5a, #a01818); }
.rl-chip:nth-child(3) { background: radial-gradient(circle at 50% 35%, #4dff77, #1a7a3a); color: #06210f; }
.rl-chip:nth-child(4) { background: radial-gradient(circle at 50% 35%, #2a2f38, #05070c); }
.rl-chip:nth-child(5) { background: radial-gradient(circle at 50% 35%, #f6c445, #b8860b); color: #201400; }
.rl-chip.active { outline: 3px solid var(--gold); transform: translateY(-3px); }

.rl-stakebar { text-align: center; font-weight: 800; margin-bottom: 8px; color: #d9ffe4; }
.rl-stakebar b { color: var(--gold); font-family: "Courier New", monospace; }
.rl-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 100%; }
.rl-btn {
  flex: 1 1 0; min-width: 62px; max-width: 200px;
  padding: 13px 8px; border: none; border-radius: 10px;
  background: linear-gradient(180deg, #3a4150, #262b34);
  color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .5px;
  cursor: pointer; box-shadow: 0 3px 0 #12151b;
}
.rl-btn:active { transform: translateY(3px); box-shadow: 0 0 0 #12151b; }
.rl-btn.primary { background: linear-gradient(180deg, #4dff77, #1a9a3f); color: #06210f; box-shadow: 0 3px 0 #0d5a24; }
.rl-btn.ghost { background: linear-gradient(180deg, #2a2f38, #1a1d24); }
.rl-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.rl-note { margin-top: 12px; text-align: center; font-size: 11px; color: #9fb8a6; line-height: 1.5; }

.hidden { display: none !important; }

/* ===================== Lucky 7 — "Wild 27"-style 3x3 slot ================= */
.sv-view {
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  overflow-x: hidden;
  margin: 0 auto;
  padding: 12px 12px 22px;
  color: #f7e9c8;
  /* deep-red brick wall */
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(150,20,20,0.55), transparent 70%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.30) 0 30px, rgba(0,0,0,0.30) 30px, transparent 30px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 74px, rgba(0,0,0,0.35) 74px 78px),
    linear-gradient(180deg, #5a0d0d, #3a0808 55%, #240404);
  background-blend-mode: normal;
  border-radius: 14px;
}
.sv-view * { box-sizing: border-box; }

.sv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sv-icon-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(0,0,0,0.35); border: 2px solid rgba(255,220,150,0.55);
  color: #ffe9b0; font-size: 18px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.sv-icon-btn:hover { background: rgba(0,0,0,0.55); }
.sv-icon-btn.active { background: var(--gold); color: #3a2405; border-color: #fff2b0; }
.sv-logo {
  flex: 1 1 auto; text-align: center; white-space: nowrap;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(30px, 9vw, 52px); font-weight: 900; font-style: italic;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #fff6c8 0%, #ffd24d 42%, #b8790b 70%, #ffe98a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(255,90,40,0.7)) drop-shadow(0 2px 1px rgba(0,0,0,0.6));
}
.sv-logo span { color: #ff3b2f; -webkit-text-fill-color: #ff5030; filter: drop-shadow(0 0 6px rgba(255,40,20,0.9)); }
.sv-win-chip {
  flex: 0 0 auto; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,220,150,0.5);
  border-radius: 999px; padding: 6px 12px; font-weight: 900; font-family: "Courier New", monospace;
  color: var(--green-led); font-size: 13px; white-space: nowrap;
}

/* reels — three separate glowing golden columns on a dark inset */
.sv-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sv-reel {
  display: grid; grid-template-rows: repeat(3, 1fr); gap: 6px;
  padding: 7px; border-radius: 12px;
  background: radial-gradient(ellipse at 50% 30%, #1a0a0a, #0a0303);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 2px #ffb733, 0 0 14px rgba(255,150,30,0.7), inset 0 0 24px rgba(0,0,0,0.8);
}
.sv-cell {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 32%, rgba(70,20,20,0.55), rgba(15,4,4,0.85));
  border-radius: 9px;
  font-size: clamp(30px, 11vw, 60px);
  line-height: 1;
  overflow: hidden;
}
.sv-cell > span { display: flex; align-items: center; justify-content: center; font-weight: 900; }
/* glossy red 7 */
.sv-seven > span {
  color: #ff2a2a; font-family: "Arial Black", system-ui, sans-serif; font-style: italic;
  background: linear-gradient(160deg, #ff6a5a 0%, #e11414 45%, #8a0808 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,0.7)) drop-shadow(0 0 6px rgba(255,60,40,0.6));
}
/* gold BAR tile */
.sv-bar > span {
  color: #6a4700; font-size: 0.34em; font-weight: 900; letter-spacing: 1px;
  padding: 3px 7px; border-radius: 5px;
  background: linear-gradient(180deg, #ffe680, #f0b81e 55%, #b8790b);
  border: 2px solid #7a5200; -webkit-text-fill-color: #5a3d00;
  box-shadow: 0 2px 3px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.6);
}
.sv-pstar > span { color: #c85cff; text-shadow: 0 0 10px rgba(200,92,255,0.8), 0 2px 2px rgba(0,0,0,0.6); }
.sv-gstar > span { color: #46e05a; text-shadow: 0 0 10px rgba(70,224,90,0.8), 0 2px 2px rgba(0,0,0,0.6); }
.sv-fruit > span { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.55)); }
.sv-cell.sv-hit { animation: svHit 0.5s ease infinite alternate; box-shadow: 0 0 16px rgba(255,220,90,0.9), inset 0 0 0 2px var(--gold); border-radius: 9px; }
.sv-cell.sv-wild { box-shadow: 0 0 18px rgba(255,40,30,0.95), inset 0 0 0 2px #ff3b2f; }
@keyframes svHit { from { transform: scale(1); } to { transform: scale(1.07); } }

.sv-msg { text-align: center; min-height: 22px; margin: 12px 0; font-weight: 900; letter-spacing: 1px; color: #ffe9b0; text-shadow: 0 1px 2px #000; }
.sv-msg.win { color: var(--green-led); }
.sv-msg.lose { color: #ff8a8a; }
.sv-msg.bonus { color: #ffd24d; text-shadow: 0 0 12px rgba(255,150,30,0.9); }

/* main round controls: play(auto) · big green spin · turbo */
.sv-controls-main { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 6px 0 4px; }
.sv-round-btn {
  border-radius: 50%; background: rgba(0,0,0,0.25); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  border: 3px solid #fff; padding: 0;
}
.sv-round-btn.spin {
  width: 96px; height: 96px; border-color: #35e04a; color: #35e04a;
  box-shadow: 0 0 18px rgba(53,224,74,0.55);
}
.sv-round-btn.spin svg { width: 52px; height: 52px; fill: currentColor; }
.sv-round-btn.spin:active { transform: scale(0.94); }
.sv-round-btn.spin:disabled { opacity: 0.5; cursor: not-allowed; }
.sv-round-btn.auto, .sv-round-btn.turbo { width: 62px; height: 62px; border-color: rgba(255,255,255,0.85); font-size: 24px; }
.sv-round-btn.auto { color: #fff; }
.sv-round-btn.turbo { color: #ffd24d; }
.sv-round-btn.active { background: rgba(255,210,80,0.25); border-color: var(--gold); box-shadow: 0 0 14px rgba(246,196,69,0.7); }

/* bet stepper */
.sv-bet-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 10px 0; }
.sv-round-sm {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.25); color: #fff; font-size: 26px; font-weight: 900; cursor: pointer; line-height: 1;
}
.sv-round-sm:active { transform: scale(0.92); }
.sv-round-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.sv-bet-disp { text-align: center; min-width: 120px; }
.sv-bet-disp span { display: block; font-size: 11px; letter-spacing: 2px; color: #f3c98a; }
.sv-bet-disp b { font-size: clamp(20px, 6vw, 28px); font-family: "Courier New", monospace; color: #fff; }

.sv-gamble-btn {
  display: block; width: 100%; margin: 8px 0 4px;
  padding: 11px; border: 2px solid #7a5a10; border-radius: 10px;
  background: linear-gradient(180deg, #ffd76a, #e0a020); color: #3a2600;
  font-weight: 900; font-size: 15px; cursor: pointer; box-shadow: 0 3px 0 #7a5a10;
}
.sv-gamble-btn:active { transform: translateY(3px); box-shadow: none; }
.sv-gamble-btn:disabled { opacity: 0.4; cursor: not-allowed; background: linear-gradient(180deg, #6a6250, #4a4638); color: #cbbf9a; box-shadow: 0 3px 0 #2a2620; }

/* bottom bar: menu · balance · info */
.sv-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding: 8px 4px; border-top: 1px solid rgba(255,220,150,0.25);
}
.sv-balance { text-align: center; flex: 1 1 auto; }
.sv-balance span { display: block; font-size: 10px; letter-spacing: 2px; color: #f3c98a; }
.sv-balance b { font-size: clamp(16px, 5vw, 22px); font-family: "Courier New", monospace; color: var(--green-led); }

.sv-hist { margin-top: 12px; }
.sv-hist .rh-label { color: #f3c98a; }

.sv-paytable { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sv-paytable.hidden { display: none; }
.sv-pt-row { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,220,150,0.35); border-radius: 8px; padding: 6px 8px; font-size: 12px; color: #ffe9c8; }
.sv-pt-row b { color: #ffd24d; }
.sv-cell.mini { width: 26px; height: 26px; aspect-ratio: auto; flex: 0 0 auto; font-size: 16px; border-radius: 6px; background: radial-gradient(circle at 50% 32%, rgba(70,20,20,0.6), rgba(15,4,4,0.9)); }
.sv-cell.mini.sv-bar > span { font-size: 8px; padding: 1px 3px; border-width: 1px; }
.sv-pt-note { grid-column: 1 / -1; text-align: center; font-size: 11px; color: #ffd24d; margin-top: 2px; }

/* ============================ COIN FLIP ============================== */
.cf-view {
  padding: 14px 14px 22px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% -10%, #123a2a 0%, #0c2a20 45%, #071a14 100%);
  border: 2px solid #1f6f4d;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.55), 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
}
.cf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cf-icon-btn {
  flex: 0 0 auto; background: rgba(0,0,0,0.4); color: #ffe9a8;
  border: 2px solid #2f8f63; border-radius: 10px; padding: 6px 10px;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.cf-icon-btn:hover { background: rgba(0,0,0,0.6); }
.cf-logo {
  flex: 1 1 auto; text-align: center; font-size: clamp(18px, 5.2vw, 30px);
  font-weight: 900; letter-spacing: 1px; color: #ffd24d; white-space: nowrap;
  text-shadow: 0 2px 0 #7a5200, 0 0 16px rgba(255,210,77,0.5);
}
.cf-logo span { color: #7fe3b0; }

/* Stage + 3D coin */
.cf-stage { display: flex; justify-content: center; align-items: center; height: 190px; perspective: 900px; }
/* The drop-shadow lives on this wrapper, NOT on .cf-coin: a `filter` on a
   preserve-3d element flattens its 3D context, which breaks backface-visibility
   and let both FEJ and ÍRÁS show through at once. */
.cf-coin-wrap { filter: drop-shadow(0 14px 16px rgba(0,0,0,0.55)); }
.cf-coin-wrap.spinning { filter: drop-shadow(0 6px 22px rgba(255,210,77,0.4)); }
.cf-coin {
  position: relative; width: 140px; height: 140px;
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
  transform: rotateY(0deg);
}
.cf-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  font-weight: 900; font-size: 30px; letter-spacing: 1px; color: #5a3d00;
  border: 6px solid #b8860b;
  box-shadow: inset 0 0 18px rgba(120,80,0,0.55), inset 0 0 0 3px #ffe9a8;
}
/* Each face is pushed a hair toward its own front so the back face can never
   bleed through the front (needed on iOS/Safari, where an un-prefixed
   backface-visibility used to let both FEJ and ÍRÁS show at once). */
.cf-heads { background: radial-gradient(circle at 35% 30%, #ffe9a8, #f6c445 55%, #b8860b); transform: rotateY(0deg) translateZ(1px); }
.cf-tails { background: radial-gradient(circle at 35% 30%, #fff2c8, #e8b93a 55%, #9c7008); transform: rotateY(180deg) translateZ(1px); }

/* Eagle fly-in on the edge outcome */
.cf-eagle {
  position: fixed; left: -30vw; top: 22%; z-index: 250;
  font-size: 92px; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.6));
}
.cf-eagle.fly { animation: cf-eagle-fly 1.6s ease-in-out; }
@keyframes cf-eagle-fly {
  0%   { left: -30vw; top: 16%; opacity: 0; transform: scale(0.5) scaleX(-1); }
  12%  { opacity: 1; }
  50%  { top: 46%; transform: scale(1.45) scaleX(-1) rotate(4deg); }
  88%  { opacity: 1; }
  100% { left: 112vw; top: 26%; opacity: 0; transform: scale(0.6) scaleX(-1); }
}

.cf-msg {
  min-height: 22px; margin: 10px 0 4px; text-align: center;
  font-weight: 800; font-size: 15px; color: #d8f5e6;
}
.cf-msg.win { color: #7dffb0; text-shadow: 0 0 12px rgba(80,255,150,0.5); }
.cf-msg.lose { color: #ff9a9a; }
.cf-msg.edge { color: #ffd24d; text-shadow: 0 0 14px rgba(255,210,77,0.6); font-size: 16px; }

/* Side pick */
.cf-side-pick { display: flex; gap: 10px; justify-content: center; margin: 6px 0 12px; }
.cf-side-btn {
  flex: 1 1 0; max-width: 160px; padding: 12px 0;
  background: rgba(0,0,0,0.35); color: #ffe9a8;
  border: 2px solid #2f8f63; border-radius: 12px;
  font-weight: 900; font-size: 16px; letter-spacing: 1px; cursor: pointer;
}
.cf-side-btn:hover { background: rgba(0,0,0,0.5); }
.cf-side-btn.sel {
  background: linear-gradient(180deg, #ffe9a8, #f6c445);
  color: #4a3200; border-color: #fff2b0; box-shadow: 0 0 16px rgba(255,210,77,0.5);
}
.cf-side-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Bet row */
.cf-bet-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 12px; }
.cf-round-sm {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(0,0,0,0.4); color: #ffe9a8; border: 2px solid #2f8f63;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.cf-round-sm:hover { background: rgba(0,0,0,0.6); }
.cf-round-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.cf-bet-disp { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.cf-bet-disp span { font-size: 11px; color: #8fd8b4; letter-spacing: 1px; }
.cf-bet-disp b { font-size: 22px; color: #ffd24d; font-family: "Courier New", monospace; }

.cf-flip-btn {
  display: block; width: 100%; padding: 15px 0; margin-bottom: 12px;
  background: linear-gradient(180deg, #2fd07e, #159a55);
  color: #05230f; border: none; border-radius: 14px;
  font-weight: 900; font-size: 19px; letter-spacing: 2px; cursor: pointer;
  box-shadow: 0 6px 0 #0c6d3a, 0 8px 18px rgba(0,0,0,0.4);
}
.cf-flip-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #0c6d3a; }
.cf-flip-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.cf-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cf-balance { font-weight: 800; font-size: 13px; color: #d8f5e6; }
.cf-balance span { color: #8fd8b4; }
.cf-balance b { color: var(--green-led); font-family: "Courier New", monospace; }
.cf-test-btn {
  flex: 0 0 auto; background: rgba(120,20,20,0.5); color: #ffd9d9;
  border: 2px dashed #d97a7a; border-radius: 10px; padding: 7px 10px;
  font-weight: 800; font-size: 12px; cursor: pointer;
}
.cf-test-btn:hover { background: rgba(150,25,25,0.6); }
.cf-test-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cf-hist { margin-top: 12px; }
.cf-hist .rh-label { color: #8fd8b4; }

/* ============================ FRUIT STORM (tumbling 6x5) ============== */
.fs-view {
  padding: 14px 12px 22px; border-radius: 18px;
  background: radial-gradient(120% 90% at 50% -10%, #2a1f5c 0%, #1a1440 45%, #0d0a24 100%);
  border: 2px solid #6a4fd0; box-shadow: inset 0 0 60px rgba(0,0,0,0.55), 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
}
.fs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fs-icon-btn { flex: 0 0 auto; background: rgba(0,0,0,0.4); color: #d9c9ff; border: 2px solid #7a5fe0; border-radius: 10px; padding: 6px 10px; font-size: 18px; line-height: 1; cursor: pointer; }
.fs-icon-btn:hover { background: rgba(0,0,0,0.6); }
.fs-logo { flex: 1 1 auto; text-align: center; font-size: clamp(18px, 5.2vw, 30px); font-weight: 900; letter-spacing: 1px; color: #b9a6ff; white-space: nowrap; text-shadow: 0 0 16px rgba(140,110,255,0.6); }
.fs-logo span { color: #ffd24d; }
.fs-grid { display: grid; grid-template-columns: repeat(var(--fs-cols, 6), 1fr); gap: 5px; margin-bottom: 8px; }
.fs-cell {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(150,120,255,0.25);
  font-size: clamp(16px, 5vw, 26px);
}
.fs-cell span { line-height: 1; }
.fs-cell.win { animation: fs-pop .36s ease; box-shadow: 0 0 14px rgba(255,210,77,0.9); background: rgba(255,210,77,0.18); }
@keyframes fs-pop { 0% { transform: scale(1); } 45% { transform: scale(1.25); } 100% { transform: scale(1); } }
.fs-multi { text-align: center; min-height: 20px; margin-bottom: 4px; font-weight: 900; font-size: 15px; color: #ffd24d; opacity: 0; transition: opacity .2s; }
.fs-multi.show { opacity: 1; text-shadow: 0 0 12px rgba(255,210,77,0.7); }
.fs-msg { text-align: center; min-height: 22px; margin-bottom: 10px; font-weight: 800; font-size: 15px; color: #e5dcff; }
.fs-msg.win { color: #ffe08a; text-shadow: 0 0 12px rgba(255,210,77,0.5); }
.fs-msg.lose { color: #ff9a9a; }
.fs-bet-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fs-round-sm { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; background: rgba(0,0,0,0.4); color: #d9c9ff; border: 2px solid #7a5fe0; font-size: 22px; cursor: pointer; }
.fs-round-sm:hover { background: rgba(0,0,0,0.6); }
.fs-round-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.fs-bet-disp { display: flex; flex-direction: column; align-items: center; min-width: 84px; }
.fs-bet-disp span { font-size: 11px; color: #b9a6ff; letter-spacing: 1px; }
.fs-bet-disp b { font-size: 20px; color: #ffd24d; font-family: "Courier New", monospace; }
.fs-spin-btn { flex: 1 1 auto; padding: 14px 0; background: linear-gradient(180deg, #8b6bff, #5a3fd0); color: #fff; border: none; border-radius: 12px; font-weight: 900; font-size: 17px; letter-spacing: 1px; cursor: pointer; box-shadow: 0 5px 0 #3d2a9c; }
.fs-spin-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #3d2a9c; }
.fs-spin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.fs-gamble-btn { display: block; width: 100%; padding: 12px 0; margin-bottom: 12px; background: linear-gradient(180deg, #3a2b7a, #241a52); color: #ffe9a8; border: 2px solid #7a5fe0; border-radius: 12px; font-weight: 800; font-size: 15px; cursor: pointer; }
.fs-gamble-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.fs-bottom { display: flex; justify-content: center; }
.fs-balance { font-weight: 800; font-size: 13px; color: #e5dcff; }
.fs-balance span { color: #b9a6ff; }
.fs-balance b { color: var(--green-led); font-family: "Courier New", monospace; }
.fs-hist { margin-top: 12px; }
.fs-hist .rh-label { color: #b9a6ff; }

/* ============================ GOLD RUSH (Hold & Win 5x3) ============== */
.gr-view {
  padding: 14px 12px 22px; border-radius: 18px;
  background: radial-gradient(120% 90% at 50% -10%, #4a3410 0%, #2a1d06 45%, #140d02 100%);
  border: 2px solid #b8860b; box-shadow: inset 0 0 60px rgba(0,0,0,0.6), 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
}
.gr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gr-icon-btn { flex: 0 0 auto; background: rgba(0,0,0,0.45); color: #ffe9a8; border: 2px solid #b8860b; border-radius: 10px; padding: 6px 10px; font-size: 18px; line-height: 1; cursor: pointer; }
.gr-icon-btn:hover { background: rgba(0,0,0,0.65); }
.gr-logo { flex: 1 1 auto; text-align: center; font-size: clamp(18px, 5.2vw, 30px); font-weight: 900; letter-spacing: 1px; color: #ffd24d; white-space: nowrap; text-shadow: 0 2px 0 #6a4700, 0 0 16px rgba(255,210,77,0.5); }
.gr-logo span { color: #fff2c8; }
.gr-grid { display: grid; grid-template-columns: repeat(var(--gr-cols, 5), 1fr); gap: 6px; margin-bottom: 8px; }
.gr-cell {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,210,120,0.25);
  font-size: clamp(15px, 4.6vw, 24px); font-weight: 900; color: #ffe9c8;
}
.gr-cell span { line-height: 1; }
.gr-coin { background: radial-gradient(circle at 35% 30%, #ffe9a8, #f6c445 60%, #b8860b); color: #4a3200; border-color: #fff2b0; font-size: clamp(11px, 3.2vw, 15px); font-family: "Courier New", monospace; box-shadow: inset 0 0 8px rgba(120,80,0,0.5); }
.gr-coin.lock { box-shadow: 0 0 12px rgba(255,210,77,0.8), inset 0 0 8px rgba(120,80,0,0.5); }
.gr-coin.land { animation: gr-drop .4s ease; }
@keyframes gr-drop { 0% { transform: translateY(-40%) scale(0.6); opacity: 0.2; } 60% { transform: translateY(6%) scale(1.12); } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.gr-msg { text-align: center; min-height: 22px; margin-bottom: 10px; font-weight: 800; font-size: 15px; color: #ffe9c8; }
.gr-msg.win { color: #ffe08a; text-shadow: 0 0 12px rgba(255,210,77,0.5); }
.gr-msg.lose { color: #ff9a9a; }
.gr-msg.feature { color: #ffd24d; text-shadow: 0 0 14px rgba(255,210,77,0.7); font-size: 16px; }
.gr-bet-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gr-round-sm { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; background: rgba(0,0,0,0.45); color: #ffe9a8; border: 2px solid #b8860b; font-size: 22px; cursor: pointer; }
.gr-round-sm:hover { background: rgba(0,0,0,0.65); }
.gr-round-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.gr-bet-disp { display: flex; flex-direction: column; align-items: center; min-width: 84px; }
.gr-bet-disp span { font-size: 11px; color: #e8c98a; letter-spacing: 1px; }
.gr-bet-disp b { font-size: 20px; color: #ffd24d; font-family: "Courier New", monospace; }
.gr-spin-btn { flex: 1 1 auto; padding: 14px 0; background: linear-gradient(180deg, #f6c445, #b8860b); color: #2a1a00; border: none; border-radius: 12px; font-weight: 900; font-size: 17px; letter-spacing: 1px; cursor: pointer; box-shadow: 0 5px 0 #7a5700; }
.gr-spin-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #7a5700; }
.gr-spin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.gr-gamble-btn { display: block; width: 100%; padding: 12px 0; margin-bottom: 12px; background: linear-gradient(180deg, #3a2b10, #241a08); color: #ffe9a8; border: 2px solid #b8860b; border-radius: 12px; font-weight: 800; font-size: 15px; cursor: pointer; }
.gr-gamble-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gr-bottom { display: flex; justify-content: center; }
.gr-balance { font-weight: 800; font-size: 13px; color: #ffe9c8; }
.gr-balance span { color: #e8c98a; }
.gr-balance b { color: var(--green-led); font-family: "Courier New", monospace; }
.gr-hist { margin-top: 12px; }
.gr-hist .rh-label { color: #e8c98a; }
