/* --- 1. Global Reset & Basics --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --main-grey: #466373;
  --border: rgba(173, 209, 226, 0.18);
  --gold: #f4ce69;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #081e2c;
  color: #ecf0f1;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button, select {
  font-family: 'Montserrat', sans-serif;
}

/* The phone-only orientation guard sits above every game popup. */
.phone-landscape, .phone-landscape body { overflow: hidden; }
.rotate-device-dialog {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: #081e2c;
  color: #ecf0f1;
  overflow-y: auto;
}
.rotate-device-dialog[open] { display: flex; }
.rotate-device-dialog::backdrop { background: #081e2c; }
.rotate-device-popup {
  margin: auto;
  width: min(100%, 480px);
  padding: 20px;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: #0b293b;
  text-align: center;
}
.rotate-device-icon { width: 72px; height: 72px; color: var(--gold); }
.rotate-device-popup h2 { margin: 8px 0 12px; color: #f1c40f; font-size: 22px; line-height: 1.25; }
.rotate-device-popup p { font-size: 16px; line-height: 1.5; }

/* Fullscreen Overlay Canvas for High-Performance Particles */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 999;
}

/* --- 2. Layout Structure --- */
.game-container {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  grid-template-columns: minmax(284px, 29%) minmax(0, 1fr);
  grid-template-rows: auto minmax(84px, 18dvh) minmax(0, 1fr) auto;
  background: radial-gradient(ellipse at 70% 40%, #13516b, #0b2c40 72%);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}

/* Top Header Stats Bar */
.game-top-bar {
  grid-column: 1 / -1;
  grid-row: 1;
  background: #0b2535;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 48px repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  padding: 12px 24px;
}

/* Menu Button */
.menu-btn {
  background: #14364a;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.menu-btn:active {
  transform: scale(0.96);
}
.menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Flexible header readouts */
.top-stat {
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  text-align: center;
  min-height: 48px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ts-label {
  color: #aaa;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 2px;
}
.ts-value {
  color: #f1c40f;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.game-board { display: contents; }
.bet-panel { display: contents; }

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  grid-column: 1;
  grid-row: 3;
  margin: 12px 0 20px 24px;
  align-self: stretch;
  justify-content: center;
  overflow-y: auto;
}

.info-carousel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.carousel-dots { display: none; }

.area-frame {
  position: relative;
}

/* --- LOGO STYLING --- */
.logo-area {
  grid-column: 1;
  grid-row: 2;
  margin: 16px 0 0 24px;
  min-height: 64px;
  container-type: size;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
}

.sidebar-logo {
  position: absolute;
  inset: 8px 0;
  margin: auto;
  width: 100%;
  height: calc(100% - 16px);
  max-width: min(480px, calc(100% - 24px));
  object-fit: contain;
  filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.6));
}

/* --- 3. PAYTABLE & STATS STYLES --- */
.paytable-area {
  background: rgba(5, 26, 40, 0.65);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  width: 100%;
  min-width: 0;
}

.panel-heading {
  text-align: center;
  font-size: 20px;
  color: #f1c40f;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--main-grey);
  padding-bottom: 4px;
  font-weight: 700;
}

.payout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}

.payout-table th {
  text-align: left;
  padding: 5px 8px;
  background-color: rgba(0, 0, 0, 0.4);
  color: #bbb;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 700;
}

.payout-table th:last-child, .payout-table td:last-child {
  text-align: center;
  width: 140px;
}

.payout-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
  transition: all 0.2s ease;
}

.payout-table tbody tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.2);
}
.payout-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.4);
}

.prize-name {
  display: block;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1px;
  font-size: 17px;
}
.prize-desc {
  display: block;
  font-size: 14px;
  color: #aaa;
  font-weight: 400;
  line-height: 1.1;
}
.prize-value {
  font-weight: 800;
  color: #f1c40f;
  font-size: 22px;
  text-shadow: 1px 1px 0px #000;
}
.stat-value {
  font-weight: 800;
  color: #fff;
  font-size: 21px;
}

/* Paytable Win Highlight: Yellow Frame with No Fill */
.row-active-win {
  background-color: transparent !important;
  outline: 2px solid #f1c40f !important;
  outline-offset: -2px !important;
  box-shadow: 0 0 10px #f1c40f, inset 0 0 8px #f1c40f !important;
}

/* --- 4. REALIGNED 5-COLUMN CONTROL BAR STYLES --- */
.bet-control-bar {
  grid-column: 1 / -1;
  grid-row: 4;
  --footer-gap: clamp(10px, 1.4vw, 20px);
  --action-height: 64px;
  --bet-box-height: calc(2 * var(--action-height) + var(--footer-gap));
  background: #0b2535;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(148px, 1.8fr) minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--footer-gap);
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  width: 100%;
  min-width: 0;
}

.stacked-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 0;
}

.action-btn {
  background: linear-gradient(to bottom, #4ca1af, #2c3e50);
  border: 1px solid #4ca1af;
  border-radius: 8px;
  height: 56px;
  width: 140px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.1s;
  box-shadow: 0 3px 0 #1a252f;
  padding: 4px;
  text-align: center;
}
.action-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.main-bet-box:disabled { cursor: default; pointer-events: none; }
.action-btn.disabled, .nav-btn.disabled {
  opacity: 0.4 !important;
  pointer-events: none !important;
  filter: grayscale(80%);
}

.action-label {
  font-size: 15px;
  font-weight: 800;
  color: #ddd;
  text-transform: uppercase;
  line-height: 1;
}

.btn-deal {
  background: linear-gradient(to bottom, #2ecc71, #27ae60);
  border: 1px solid #7FFF00;
  box-shadow: 0 3px 0 #1e8449;
}

.btn-rebet {
  background: linear-gradient(to bottom, #f39c12, #d35400);
  border-color: #f1c40f;
  box-shadow: 0 3px 0 #a04000;
}

.action-icon {
  width: 22px;
  height: 22px;
  fill: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  flex-shrink: 0;
}

/* --- ENLARGED CHIP SELECTOR --- */
.chip-selector-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.nav-btn {
  width: 52px;
  height: 70px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  background: transparent;
  margin: 0;
  padding: 0;
}
.nav-btn svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.5));
}
.nav-btn path {
  fill: #f1c40f;
  stroke: #f1c40f;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.nav-btn span {
  position: relative;
  z-index: 2;
  font-weight: 900;
  color: #000;
  line-height: 1;
  top: -1px;
  width: 100%;
  text-anchor: middle;
  text-align: center;
}

.btn-prev-icon span {
  font-size: 44px;
  transform: translateX(5px);
  display: block;
}

.btn-next-icon span {
  font-size: 38px;
  transform: translateX(-5px);
  display: block;
}

.chip-wrapper {
  perspective: 800px;
}
.chip {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 5px 10px rgba(0,0,0,0.65);
  transform-style: preserve-3d;
}

/* --- Chip 3D Rotation Animations --- */
@keyframes flipRight {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

@keyframes flipLeft {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(-90deg); }
  100% { transform: rotateY(0deg); }
}

.chip.flip-right {
  animation: flipRight 0.2s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.chip.flip-left {
  animation: flipLeft 0.2s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.chip-outer {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  border: 5px dashed rgba(255,255,255,0.4);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.5);
}
.chip-inner {
  width: 70%;
  height: 70%;
  background-color: #fff;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.1);
}
.chip-value {
  color: #000;
  font-weight: 800;
  font-size: 24px;
}
.chip-value.chip-val-sm {
  font-size: 15px;
}

.readout-box {
  background-color: rgba(0,0,0,0.5);
  border: 1px solid var(--main-grey);
  border-radius: 6px;
  padding: 4px 8px;
  text-align: center;
  height: 56px;
  width: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ro-label {
  color: #aaa;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 2px;
}
.ro-val {
  color: #f1c40f;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.main-bet-box {
  width: 175px;
  height: 118px;
  background-color: #2c3e50;
  border: 2px solid #f1c40f;
  border-radius: 10px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-bet-box:active {
  transform: scale(0.98);
}
.bet-box-label {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 800;
  font-size: 18px;
  text-align: center;
  pointer-events: none;
}

.stacked-chip {
  position: absolute;
  width: min(124px, calc(var(--bet-box-height) * 0.9));
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0px 5px 10px rgba(0,0,0,0.65);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: inline-size;
}

/* --- 5. PLAYOUT AREA STYLES --- */
.playout-area {
  grid-column: 2;
  grid-row: 2 / 4;
  margin: 16px 24px 20px 20px;
  background: radial-gradient(ellipse, rgba(40, 133, 150, 0.12), transparent 70%);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  min-width: 0;
  min-height: 0;
  container-type: size;
}

/* Always keep a true 16:10 box inside the play area (95% width / ~94% height cap) */
.cards-layout-container {
  width: min(95cqw, 150cqh);
  aspect-ratio: 16 / 10;
  height: auto;
  position: relative;
  margin: auto;
  perspective: 1000px;
}

.paylines-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.pl-line {
  stroke: var(--main-grey);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  fill: none;
  transition: all 0.2s ease;
}

/* Default Payline Badge Fill: #0b6ba1 */
.pl-circle {
  fill: #0b6ba1;
  stroke: var(--main-grey);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0px 3px 3px rgba(0,0,0,0.5));
  transition: all 0.2s ease;
  r: 4.3;
}
.pl-text {
  font-size: 3px;
  fill: #fff;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  transition: all 0.2s ease;
}

.payline-group.line-disabled .pl-line {
  stroke: #3a5c72;
  opacity: 0.35;
}

/* Inactive badges retain the same background and border as selected lines. */
.payline-group.line-disabled .pl-text {
  fill: #8c979e;
}

.payline-active .pl-line {
  stroke: #f1c40f !important;
  filter: drop-shadow(0 0 6px #f1c40f);
  opacity: 1 !important;
}
.payline-active .pl-circle {
  stroke: #fff !important;
  fill: #f1c40f !important;
  opacity: 1 !important;
}
.payline-active .pl-text {
  fill: #000 !important;
  font-size: 3.2px;
  font-weight: 800;
  opacity: 1 !important;
}

.card-slot {
  position: absolute;
  z-index: 2;
  width: 14.45%;
  height: 35.7%;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease;
  perspective: 800px;
  container-type: size;
}

/* Disabled / Unselected Payline Slots (Greyed Out) */
.card-slot.slot-disabled {
  opacity: 0.35 !important;
  filter: grayscale(80%) !important;
}

/* --- 3D CARD FLIP STYLES --- */
.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* Flipped state reveals card front */
.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
}

/* Card Back (PNG Image) */
.card-face-back {
  background-color: #022b42;
  background-image: url('../assets/images/CardBack.png');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Card Front (HTML layout) */
.card-face-front {
  background-color: #fff;
  transform: rotateY(180deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  color: #000;
  font-family: 'Montserrat', sans-serif;
}

.card-win-glow {
  outline: 3px solid #f1c40f !important;
  outline-offset: -1px !important;
  box-shadow: 0 0 15px #f1c40f, 0 0 6px #f1c40f !important;
  z-index: 5 !important;
  opacity: 1 !important;
  filter: none !important;
  border-radius: 6px;
}

.slot-6 { top: 50%; left: calc(14% + 13px); }
.slot-3 { top: 27%; left: 38%; }
.slot-4 { top: 27%; left: 62%; }
.slot-5 { top: 50%; left: calc(86% - 13px); }
.slot-1 { top: 73%; left: 38%; }
.slot-2 { top: 73%; left: 62%; }

.playing-card {
  width: 100%;
  height: 100%;
  position: relative;
}

.playing-card.red {
  color: #c0392b;
}
.playing-card.black {
  color: #000;
}

.card-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.9;
  font-weight: 800;
}
.card-corner-tl {
  top: 4%;
  left: 6%;
}
.card-corner-br {
  bottom: 4%;
  right: 6%;
  transform: rotate(180deg);
}

.corner-rank {
  font-size: 20cqw;
  font-weight: 800;
  letter-spacing: -1px;
  text-align: center;
}
.corner-suit {
  font-size: 17cqw;
  line-height: 1;
  text-align: center;
}

.card-suit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42cqw;
  line-height: 1;
}

.win-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
  max-width: 360px;
  background-color: #f1c40f;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.9);
  z-index: 500;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.win-heading {
  color: #000;
  font-size: clamp(18px, 5.2vmin, 48px);
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
  line-height: 1;
}
.win-amount-box {
  background-color: #000;
  border-radius: 6px;
  padding: 4px 12px;
  width: 90%;
  text-align: center;
}
.win-amount-text {
  color: #fff;
  font-size: clamp(14px, 3.8vmin, 36px);
  font-weight: 700;
}

/* --- MENU POP-UP MODAL STYLES --- */
.menu-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
}
.menu-popup {
  width: 90%;
  max-width: 500px;
  background-color: #022b42;
  border: 2px solid #f1c40f;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(241, 196, 15, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.3s ease-out;
}
.menu-popup-header {
  background-color: rgba(0,0,0,0.4);
  padding: 12px 16px;
  border-bottom: 1px solid #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-popup-title {
  font-size: 22px;
  font-weight: 800;
  color: #f1c40f;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.close-menu-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}
.menu-popup-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.menu-setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.setting-label {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.menu-dropdown {
  background-color: #2c3e50;
  color: #f1c40f;
  border: 1px solid #f1c40f;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

/* Dual Toggle Buttons Styling */
.toggle-btn {
  background-color: #2ecc71;
  border: 1px solid #7FFF00;
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  width: 105px;
  text-align: center;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.toggle-btn.off {
  background-color: #e74c3c;
  border-color: #ff6b6b;
  color: #ffffff;
}

/* Menu Actions Container (Side-by-Side) */
.menu-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.info-btn-menu {
  background: linear-gradient(to bottom, #f39c12, #d35400);
  border: 1px solid #f1c40f;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #a04000;
  flex: 1;
  text-align: center;
}

.save-exit-btn-menu {
  background: linear-gradient(to bottom, #2ecc71, #27ae60);
  border: 1px solid #7FFF00;
  color: #ffffff;
  font-weight: 800;
  font-size: 17px;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #1e8449;
  flex: 1;
  text-align: center;
}

/* --- GAME RULES & COMPLIANCE MODAL --- */
.rules-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
}
.rules-popup {
  width: 92%;
  max-width: 900px;
  max-height: 85vh;
  background-color: #022b42;
  border: 2px solid #f1c40f;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(0,0,0,0.9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.3s ease-out;
}
.rules-content-scroll {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Summary Compliance Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
}
.info-table td {
  padding: 7px 12px;
  border: 1px solid #555;
  font-size: 17.5px;
  font-weight: 600;
}
.info-table td:first-child {
  background-color: rgba(0,0,0,0.4);
  color: #f1c40f;
  font-weight: 800;
  width: 45%;
}

.rules-section-title {
  font-size: 19px;
  font-weight: 800;
  color: #f1c40f;
  text-transform: uppercase;
  border-bottom: 1px solid #555;
  padding-bottom: 3px;
  margin-top: 4px;
}

.rules-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
.rules-list li {
  position: relative;
  padding-left: 18px;
  font-size: 17px;
  color: #ddd;
  line-height: 1.45;
  margin-bottom: 6px;
  font-weight: 500;
  text-align: left;
}
.rules-para {
  font-size: 16px;
  color: #ddd;
  line-height: 1.45;
  margin-bottom: 8px;
}
.rules-list li::before {
  content: "•";
  color: #f1c40f;
  font-weight: bold;
  font-size: 21px;
  position: absolute;
  left: 0;
  top: -1px;
}

.legal-notice-box {
  background-color: rgba(0,0,0,0.4);
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
  margin-top: 6px;
  text-align: center;
}
.legal-notice-title {
  font-size: 16px;
  font-weight: 800;
  color: #f1c40f;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.legal-notice-text {
  font-size: 15px;
  color: #aaa;
  line-height: 1.35;
  font-weight: 500;
}

/* Error Popup Modal */
.error-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
}
.error-popup {
  width: 90%;
  max-width: 380px;
  background-color: #2c3e50;
  border: 2px solid #e74c3c;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.error-header {
  width: 100%;
  background-color: #e74c3c;
  color: #fff;
  padding: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.error-body {
  padding: 16px;
  text-align: center;
  color: #ecf0f1;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}
.error-btn {
  background: linear-gradient(to bottom, #e74c3c, #c0392b);
  border: 1px solid #ff6b6b;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  padding: 8px 24px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 16px;
  box-shadow: 0 3px 0 #962d22;
}

/* Enable Sound Prompt Modal */
.sound-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sound-popup {
  width: 90%;
  max-width: 380px;
  background-color: #022b42;
  border: 2px solid #f1c40f;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(241, 196, 15, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  animation: modalPopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}
.sound-header {
  font-size: 28px;
  font-weight: 900;
  color: #f1c40f;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.sound-body {
  font-size: 18px;
  font-weight: 600;
  color: #ecf0f1;
  margin-bottom: 20px;
  line-height: 1.4;
}
.sound-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
}
.sound-choice-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.sound-choice-btn:active {
  transform: scale(0.92);
}
.sound-choice-btn svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.btn-enable-sound {
  background: linear-gradient(to bottom, #2ecc71, #27ae60);
  border-color: #7FFF00;
}
.btn-disable-sound {
  background: linear-gradient(to bottom, #e74c3c, #c0392b);
  border-color: #ff6b6b;
}

@keyframes popIn {
  from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes modalPopIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* --- Responsive sizing and visual hierarchy --- */
button { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
/* Rapid taps on the bet controls must never start a text selection. */
.nav-btn span, .chip-selector-container, .chip-wrapper, .chip, .chip-value,
.main-bet-box, .stacked-chip, .stacked-chip-val, .readout-box, .game-top-bar {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.ts-label, .ro-label { color: #a8bdc9; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.ts-value, .ro-val {
  color: #f1c40f;
  font-size: clamp(14px, 1.6vw, 22px);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat-win-pos .ts-value { color: #8ce2bc; }
.panel-heading {
  text-align: left;
  font-size: 13px;
  color: #f1c40f;
  border-color: var(--border);
  padding-bottom: 9px;
  margin-bottom: 5px;
  line-height: 1.4;
}
.payout-table { table-layout: fixed; }
.payout-table th { font-size: 10px; color: #a8bdc9; }
.payout-table th, .payout-table td { padding: 7px 6px; overflow-wrap: anywhere; }
.payout-table th:last-child, .payout-table td:last-child { width: 28%; }
.payout-table tbody tr:nth-child(odd) { background: rgba(255,255,255,0.025); }
.payout-table tbody tr:nth-child(even) { background: transparent; }
.prize-name { font-size: 12px; line-height: 1.4; }
.paytable-panel .prize-desc { display: none; }
.prize-desc { font-size: 10px; color: #a8bdc9; line-height: 1.4; margin-top: 3px; }
.prize-value, .stat-value { font-size: 16px; }
.prize-value { color: #f1c40f; }
.action-btn, .readout-box, .main-bet-box { width: 100%; min-width: 0; }
.action-btn {
  background: #183e53;
  border-color: #416275;
  border-radius: 10px;
  box-shadow: 0 3px 0 #061b28;
  min-height: var(--action-height);
  height: var(--action-height);
  padding: 8px;
}
.action-label { font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.action-icon { width: 20px; height: 20px; }
.btn-deal { background: linear-gradient(135deg, #23825a, #146343); border-color: #69c799; }
.btn-rebet { background: #745120; border-color: #c19853; }
#btnClear { background: linear-gradient(135deg, #247da8, #185575); border-color: #6db6d8; }
#btnUndo { background: linear-gradient(135deg, #7953a1, #543775); border-color: #b293d0; }
.action-label { color: #fff; }
.readout-box { background: #081e2c; border-color: var(--border); height: auto; min-height: 48px; }
.bet-actions, .deal-actions { gap: var(--footer-gap); }
.readouts-col { height: var(--bet-box-height); gap: var(--footer-gap); }
.readouts-col .readout-box { flex: 1; }
.main-bet-box {
  height: var(--bet-box-height);
  padding: 8px;
  background: rgba(244, 206, 105, 0.07);
  border: 1px solid var(--gold);
  border-radius: 14px;
  overflow: visible;
  isolation: isolate;
}
.bet-box-label { color: #f1c40f; font-size: 13px; line-height: 1.3; }
.main-bet-box.has-chips .bet-box-label { opacity: 0; }
.nav-btn {
  width: 100%;
  max-width: min(70px, calc(var(--bet-box-height) * 2 / 3));
  height: auto;
  min-height: 44px;
  aspect-ratio: 5 / 6;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.nav-btn svg { display: block; }
.nav-btn path { fill: #f1c40f; stroke: #f1c40f; }
.nav-btn.disabled { filter: none; }
.nav-btn.disabled svg { filter: none; }
.nav-btn span { color: #081e2c; font-size: clamp(21px, 9.6cqw, 37px); top: 0; }
.btn-prev-icon span { transform: translateX(12%); }
.btn-next-icon span { transform: translateX(-12%); }
.chip-selector-container {
  display: grid;
  grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr);
  gap: clamp(4px, 2%, 10px);
  justify-items: center;
  width: 100%;
  max-width: 340px;
  justify-self: center;
  container-type: inline-size;
}
.chip-wrapper { width: min(124px, calc(var(--bet-box-height) * 0.9)); }
.chip { width: 100%; height: auto; aspect-ratio: 1; }
.chip-value { font-size: clamp(13px, 8cqw, 30px); }
.chip-value.chip-val-sm { font-size: clamp(9px, 5cqw, 18px); }
.stacked-chip-val { font-size: 24cqw; }
.stacked-chip-val.chip-val-sm { font-size: 15cqw; }
.pl-line { stroke: #527a8c; stroke-width: 1px; }
.pl-circle { fill: #123e56; stroke: #73929f; stroke-width: 1px; }
.win-amount-text { overflow-wrap: anywhere; }

/* Every dialog fits the visible viewport, including browser bars and notches. */
.menu-modal-overlay, .rules-modal-overlay, .error-modal-overlay, .sound-modal-overlay {
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}
.menu-popup, .rules-popup, .error-popup, .sound-popup {
  width: 100%;
  max-height: 100%;
  min-height: 0;
  border-width: 1px;
  border-color: #9f8952;
  background: #0b293b;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.menu-popup-header { flex-shrink: 0; padding: 8px 14px; gap: 10px; }
.menu-popup-title { font-size: 18px; overflow-wrap: anywhere; }
.close-menu-btn { width: 44px; height: 44px; flex-shrink: 0; }
.menu-popup-body, .rules-content-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.menu-setting-row { gap: 12px; flex-wrap: wrap; }
.setting-label { font-size: 14px; flex: 1 1 110px; }
.menu-dropdown { min-height: 44px; font-size: 16px; max-width: 100%; min-width: 0; }
.toggle-btn { min-height: 44px; width: auto; min-width: 105px; max-width: 100%; overflow-wrap: anywhere; }
.menu-actions-row > button { min-height: 48px; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.info-table { table-layout: fixed; }
.info-table td { font-size: 14px; padding: 8px; overflow-wrap: anywhere; }
.rules-section-title { font-size: 16px; overflow-wrap: anywhere; }
.rules-list li, .rules-para { font-size: 14px; }
.sound-popup, .error-popup { overflow-y: auto; }
.sound-popup > *, .error-popup > * { flex-shrink: 0; }
.sound-header { font-size: 24px; }
.sound-body { font-size: 16px; }
.error-body { font-size: 16px; overflow-wrap: anywhere; }

/* Tablets and phones share a fluid layout in either orientation. */
@media (max-width: 1000px), (orientation: portrait) {
  .game-container { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, 2fr) auto; }
  .game-top-bar { padding: 8px 12px; gap: 8px; }
  .bet-panel { display: flex; flex-direction: column; grid-column: 1; grid-row: 4; min-width: 0; background: #0b2535; border-top: 1px solid var(--border); }
  .left-panel { margin: 10px 12px 0; gap: 0; align-self: stretch; }
  .logo-area { grid-column: 1; grid-row: 2; margin: 0 12px; min-height: 0; }
  .playout-area { grid-column: 1; grid-row: 3; padding: 20px; margin: 0 12px 10px; }
  .info-carousel {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .info-carousel::-webkit-scrollbar { display: none; }
  .info-carousel > section { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
  .carousel-dots { display: flex; justify-content: center; }
  .carousel-dot { display: grid; place-items: center; width: 44px; height: 36px; border: 0; background: transparent; cursor: pointer; }
  .carousel-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #577180; }
  .carousel-dot[aria-current="true"]::after { background: var(--gold); }
  .cards-layout-container { max-width: 680px; }
  .paytable-panel, .stats-panel { align-self: stretch; }
  .bet-control-bar {
    --footer-gap: clamp(8px, 1.8vw, 16px);
    --bet-box-height: clamp(80px, 15vw, 128px);
    position: relative;
    grid-template-columns: minmax(0, 1fr) minmax(148px, 1.6fr) minmax(0, 1fr);
    grid-template-areas: 'readouts chips place';
    gap: var(--footer-gap);
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .readouts-col { grid-area: readouts; gap: 6px; }
  .readout-box { min-height: 36px; padding: 3px 6px; }
  .chip-selector-container { grid-area: chips; }
  .main-bet-box { grid-area: place; }
  .bet-actions, .deal-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: calc((100% - var(--footer-gap)) / 2);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--footer-gap);
  }
  .deal-actions { justify-self: end; }
  .ro-label { font-size: 10px; }
  .ro-val { font-size: 15px; }
  .win-popup { width: 52.5%; max-width: 252px; padding: 8px; border-radius: 9px; }
  .win-heading { font-size: clamp(13px, 3.6vmin, 34px); margin-bottom: 3px; }
  .win-amount-box { padding: 6px 8px; }
  .win-amount-text { font-size: clamp(10px, 2.7vmin, 25px); }
}

@media (max-width: 540px) {
  .game-top-bar { grid-template-columns: 44px repeat(3, minmax(0, 1fr)); gap: 5px; padding: 8px; }
  .menu-btn { width: 44px; height: 48px; }
  .top-stat { padding: 5px 3px; }
  .ts-label { font-size: 8px; letter-spacing: 0; }
  .ts-value { font-size: clamp(13.2px, 3vw, 16px); line-height: 1.35; }
  .left-panel { margin: 8px 8px 0; }
  .playout-area { padding: 16px 12px; border-radius: 14px; margin: 0 8px 8px; }
  .paytable-area { padding: 10px; }
  .stats-panel .payout-table td { padding-top: 7px; padding-bottom: 7px; }
  .bet-control-bar {
    --action-height: 64px;
    --footer-gap: 8px;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .chip-outer { border-width: 4px; }
  .bet-box-label { font-size: 11px; }
  .action-btn { padding: 6px 3px; }
  .action-label { font-size: 10px; }
  .ro-label { font-size: 8px; letter-spacing: 0; }
  .ro-val { font-size: 12px; }
  .main-bet-box { border-radius: 10px; }
}

/* Every orientation fits the game in the viewport: the logo and card rows
   shrink to absorb the shortage instead of letting the page scroll. */
.game-container { height: 100vh; height: 100dvh; overflow: hidden; }

/* Portrait (phone) reorders the action row to Clear | Deal | Rebet | Undo so the
   two dealing buttons sit under the thumb. Both wrappers span the full row as a
   4-column grid and claim opposite columns; they only pass through pointer
   events so the empty half of each wrapper never blocks the other's buttons. */
@media (orientation: portrait) {
  .bet-actions, .deal-actions {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-self: stretch;
    pointer-events: none;
  }
  .bet-actions > .action-btn, .deal-actions > .action-btn { pointer-events: auto; }
  #btnClear { grid-column: 1; }
  #btnDeal { grid-column: 2; }
  #btnRebet { grid-column: 3; }
  #btnUndo { grid-column: 4; }
  /* Card rank, pip and centre symbol read ~25% larger on phones. */
  .corner-rank { font-size: 25cqw; }
  .corner-suit { font-size: 21.3cqw; }
  .card-suit-center { font-size: 52.5cqw; }
}

/* Short phones (e.g. 360x740, 375x667) drop the logo and compact the
   paytable and control bar so the bet controls fit the viewport. */
@media (max-width: 540px) and (max-height: 800px) {
  .game-container { grid-template-rows: auto 0 minmax(0, 1fr) auto; }
  .logo-area { display: none; }
  .game-top-bar { padding: 4px 8px; }
  .menu-btn { height: 40px; }
  .top-stat { min-height: 40px; padding: 4px 3px; }
  .playout-area { padding: 8px 12px; margin: 6px 8px; }
  .cards-layout-container { max-width: 300px; }
  .left-panel { margin-top: 6px; }
  .paytable-area { padding: 6px 10px; }
  .panel-heading { padding-bottom: 4px; margin-bottom: 3px; }
  .payout-table th, .payout-table td { padding-top: 3px; padding-bottom: 3px; }
  .carousel-dot { height: 22px; width: 36px; }
  .bet-control-bar {
    --action-height: 48px;
    --bet-box-height: 64px;
    --footer-gap: 6px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .readout-box { min-height: 28px; padding: 2px 6px; }
  .stacked-chip-val { font-size: 24cqw; }
  .stacked-chip-val.chip-val-sm { font-size: 15cqw; }
}

/* Larger wager chips remain centred in the fixed bet box in landscape. */
@media (orientation: landscape) {
  .paytable-panel .prize-desc { display: block; }
  .stacked-chip-val { font-size: 24cqw; }
  .stacked-chip-val.chip-val-sm { font-size: 15cqw; }
}

/* Landscape windows that are short for their width compact the side panels so
   both stay fully visible instead of scrolling inside the column. */
@media (orientation: landscape) and (max-height: 900px) {
  .paytable-panel .prize-desc { display: none; }
  .paytable-area { padding: 8px 10px; }
  .panel-heading { font-size: 12px; padding-bottom: 5px; margin-bottom: 3px; }
  .payout-table th, .payout-table td { padding-top: 4px; padding-bottom: 4px; }
  .left-panel { gap: 8px; margin-bottom: 12px; }
}

@media (orientation: landscape) and (max-height: 800px) {
  .paytable-area { padding: 6px 10px; }
  .payout-table th, .payout-table td { padding-top: 3px; padding-bottom: 3px; }
  .prize-name { font-size: 11px; }
  .prize-value, .stat-value { font-size: 14px; }
  .left-panel { gap: 6px; margin-bottom: 10px; }
  .logo-area { margin-top: 8px; }
}

@media (orientation: landscape) and (max-height: 740px) {
  .game-container { grid-template-rows: auto minmax(56px, 10dvh) minmax(0, 1fr) auto; }
  .left-panel { margin-bottom: 8px; }
}

@media (orientation: landscape) and (max-height: 660px) {
  .logo-area { display: none; }
  .game-container { grid-template-rows: auto 0 minmax(0, 1fr) auto; }
  .bet-control-bar { --action-height: 52px; }
}

/* Very short windows retain ordinary page scrolling. */
@media (max-height: 500px) and (orientation: landscape) {
  .bet-control-bar { position: static; }
  .cards-layout-container { max-width: 520px; }
  .stacked-chip-val { font-size: 24cqw; }
  .stacked-chip-val.chip-val-sm { font-size: 15cqw; }
}

/* Short landscape screens join the paytable and betting controls side by side. */
@media (min-width: 541px) and (max-width: 1000px) and (max-height: 500px) {
  .bet-panel { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 32vw, 300px); align-items: end; }
  .left-panel { grid-column: 1; grid-row: 1; margin: 8px 8px 0; align-self: end; }
  .playout-area { padding: 14px 12px; }
  .cards-layout-container { max-width: min(520px, calc((100dvh - 116px) * 1.6)); }
  .bet-control-bar {
    --footer-gap: 8px;
    --action-height: 60px;
    --bet-box-height: 64px;
    grid-column: 2;
    grid-row: 1;
    border-top: 0;
    grid-template-columns: minmax(148px, 1.8fr) minmax(64px, 1fr);
    grid-template-areas: 'readouts readouts' 'chips place' 'clear clear' 'deal deal';
    gap: var(--footer-gap);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .readouts-col { flex-direction: row; height: auto; }
  .readout-box { flex: 1; }
  .bet-actions { grid-area: clear; width: 100%; }
  .deal-actions { grid-area: deal; width: 100%; }
  .main-bet-box { padding: 4px; }
  .bet-box-label { font-size: 9px; overflow-wrap: anywhere; }
  .action-btn { padding: 5px; }
  .action-label { font-size: 10px; }
  .ro-label { font-size: 8px; }
  .ro-val { font-size: 12px; }
}

/* Ambient light and tactile feedback stay inside the existing layout. */
.playout-area { isolation: isolate; }
.playout-area::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(ellipse at 25% 20%, rgba(46, 213, 200, .15), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(238, 47, 154, .13), transparent 50%);
  animation: table-light 8s ease-in-out infinite alternate;
}
.card-face-back::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.32) 48%, transparent 70%);
  transform: translateX(-140%);
  animation: card-sheen 7s ease-in-out infinite;
}
.slot-1 .card-face-back::after, .slot-4 .card-face-back::after { animation-delay: .2s; }
.slot-2 .card-face-back::after, .slot-5 .card-face-back::after { animation-delay: .4s; }
.slot-3 .card-face-back::after, .slot-6 .card-face-back::after { animation-delay: .6s; }
.card-inner.flipped .card-face-back::after { animation: none; }
.cards-layout-container.is-dealing .pl-line { opacity: .45; }
.cards-layout-container.is-dealing .payline-active .pl-line { opacity: 1; }
.payline-active .pl-line { stroke-dasharray: 10 5; animation: winning-line 1.1s linear infinite; }
.win-popup {
  border: 1px solid #f1c40f;
  background: #f1c40f;
  box-shadow: 0 12px 50px #0009;
}
.win-heading { letter-spacing: .05em; }
.win-amount-box { background: #102a36; padding-block: 8px; }
.win-amount-text { font-variant-numeric: tabular-nums; }
.btn-deal { position: relative; overflow: hidden; }
.btn-deal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, #ffffff20 50%, transparent 80%);
  transform: translateX(-140%);
  animation: card-sheen 6s ease-in-out infinite;
  pointer-events: none;
}
.btn-deal:disabled::after { animation: none; }
@media (hover: hover) and (pointer: fine) {
  .action-btn:not(:disabled):hover, .nav-btn:not(:disabled):hover, .menu-btn:hover {
    border-color: var(--gold);
    filter: brightness(1.15);
    translate: 0 -2px;
  }
  .main-bet-box:not(:disabled):hover { background: #f4ce6920; box-shadow: 0 0 20px #f4ce6926; }
}
@keyframes table-light { from { opacity: .35; } to { opacity: 1; } }
@keyframes card-sheen { 0%, 72% { transform: translateX(-140%); } 100% { transform: translateX(140%); } }
@keyframes winning-line { to { stroke-dashoffset: -30; } }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
html:not(.win-effects-enabled) .win-popup,
html:not(.win-effects-enabled) .payline-active .pl-line { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  /* Retain the requested, brief gameplay flip; decorative motion stays off. */
  .card-inner { transition-duration: 0.28s !important; }
  .playout-area::before, .card-face-back::after, .btn-deal::after, .payline-active .pl-line { animation: none !important; }
  /* A player's explicit win-effects choice overrides only celebration motion. */
  .win-effects-enabled .win-popup { animation-duration: 0.3s !important; }
  .win-effects-enabled .payline-active .pl-line { animation: winning-line 1.1s linear infinite !important; }
}
