body.casino-polished {
  background:
    linear-gradient(180deg, rgba(255, 51, 102, 0.07), rgba(10, 6, 8, 0) 360px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 72px),
    var(--bg, #0a0608);
  overflow-x: hidden;
}

body.casino-polished .main {
  align-items: flex-start;
}

body.casino-polished .wrap {
  position: relative;
}

body.casino-polished .page-title {
  line-height: 1;
  text-shadow: 0 10px 38px rgba(255, 51, 102, 0.22);
}

body.casino-polished .casino-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--txt2, #c9a0b0);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--bdr, #2a1820);
  background: rgba(255,255,255,0.035);
  border-radius: 999px;
  padding: 8px 12px;
  transition: all 150ms ease;
}

body.casino-polished .casino-back:hover {
  color: var(--txt, #fff);
  border-color: rgba(255, 51, 102, 0.45);
  background: rgba(255, 51, 102, 0.1);
}

body.casino-polished .balance-bar {
  border-color: rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015)),
    var(--card, #1a0f15);
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
}

body.casino-polished .balance-bar span {
  font-variant-numeric: tabular-nums;
}

body.casino-polished .balance-bar.balance-pop {
  animation: casinoBalancePop 280ms ease;
}

@keyframes casinoBalancePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

body.casino-polished .coin-wrap,
body.casino-polished .table,
body.casino-polished .spinner-wrap,
body.casino-polished .game,
body.casino-polished .panel,
body.casino-polished .pool-display,
body.casino-polished .chart-wrap,
body.casino-polished .number-card,
body.casino-polished .track,
body.casino-polished .odds {
  box-shadow: 0 18px 50px rgba(0,0,0,0.22);
}

body.casino-polished .table,
body.casino-polished .spinner-wrap,
body.casino-polished .game,
body.casino-polished .panel,
body.casino-polished .pool-display,
body.casino-polished .chart-wrap,
body.casino-polished .number-card,
body.casino-polished .track,
body.casino-polished .odds,
body.casino-polished .crate-btn,
body.casino-polished .side-btn,
body.casino-polished .result-box {
  border-color: rgba(255,255,255,0.09);
}

body.casino-polished .bet-input,
body.casino-polished input[type="number"],
body.casino-polished input[type="text"],
body.casino-polished select {
  min-height: 44px;
  border-color: rgba(255,255,255,0.09);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

body.casino-polished .bet-input:focus,
body.casino-polished input[type="number"]:focus,
body.casino-polished input[type="text"]:focus,
body.casino-polished select:focus {
  border-color: var(--gold, #ffd700);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

body.casino-polished .bq,
body.casino-polished .tab,
body.casino-polished .type-btn {
  min-height: 34px;
}

body.casino-polished .bq:hover,
body.casino-polished .crate-btn:hover,
body.casino-polished .side-btn:hover {
  transform: translateY(-1px);
}

body.casino-polished .flip-btn,
body.casino-polished .spin-btn,
body.casino-polished .abtn,
body.casino-polished .play-btn,
body.casino-polished .cashout-btn,
body.casino-polished .guess-btn,
body.casino-polished .join-btn,
body.casino-polished .sell-btn,
body.casino-polished .buy-btn,
body.casino-polished .btn {
  min-height: 46px;
  border-radius: 9px;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease, background 150ms ease;
}

body.casino-polished button:disabled {
  filter: grayscale(0.2);
}

body.casino-polished .result-msg,
body.casino-polished .result-box,
body.casino-polished #msg,
body.casino-polished #resultMsg {
  overflow-wrap: anywhere;
}

body.casino-polished .card,
body.casino-polished .spin-item,
body.casino-polished .choice,
body.casino-polished .crate-btn,
body.casino-polished .side-btn {
  transform-origin: center;
}

body.casino-polished .card {
  user-select: none;
}

body.casino-polished .casino-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(18px);
  min-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(18, 10, 15, 0.96);
  color: var(--txt, #fff);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 3000;
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.casino-polished .casino-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 700px) {
  body.casino-polished .main {
    padding-top: calc(var(--hh, 70px) + 26px);
  }

  body.casino-polished .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.casino-polished .side-select,
  body.casino-polished .action-btns,
  body.casino-polished .bet-row {
    gap: 8px;
  }

  body.casino-polished .flip-btn,
  body.casino-polished .spin-btn,
  body.casino-polished .abtn,
  body.casino-polished .play-btn,
  body.casino-polished .cashout-btn,
  body.casino-polished .guess-btn,
  body.casino-polished .join-btn,
  body.casino-polished .sell-btn,
  body.casino-polished .buy-btn,
  body.casino-polished .btn {
    width: 100%;
  }
}

/* =========================================================================
   RUINS CASINO — neon arcade enhancements
   ========================================================================= */

/* Atmospheric body: spotlight + diagonal chip-mesh + scan lines */
body.casino-polished {
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, var(--rx-accent-soft, rgba(255,51,102,0.18)), transparent 60%),
    radial-gradient(ellipse 40% 35% at 90% 80%, rgba(255, 215, 0, 0.06), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 32px),
    linear-gradient(180deg, var(--bg2, #120a0f), var(--bg, #0a0608)) !important;
}

/* Subtle horizontal scan lines on the main content area */
body.casino-polished .main::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 4px);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}

/* Page title: heavy display + neon glow + chromatic offset */
body.casino-polished .page-title {
  font-family: 'Bebas Neue', 'Rajdhani', Impact, sans-serif !important;
  letter-spacing: 0.06em !important;
  text-shadow:
    0 0 32px var(--rx-accent-glow, rgba(255, 51, 102, 0.5)),
    1px 0 0 rgba(255, 215, 0, 0.15),
   -1px 0 0 rgba(6, 215, 244, 0.12),
    0 2px 0 rgba(0,0,0,0.5) !important;
}

/* Balance bar — high-contrast jackpot vibe */
body.casino-polished .balance-bar {
  background:
    linear-gradient(135deg, rgba(255, 215, 0, 0.08), transparent 50%),
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015)),
    var(--card, #1a0f15) !important;
  border-color: rgba(255, 215, 0, 0.22) !important;
  box-shadow:
    0 18px 44px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 0 30px rgba(255, 215, 0, 0.08) !important;
  position: relative;
  overflow: hidden;
}
body.casino-polished .balance-bar::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 215, 0, 0.14), transparent);
  animation: rxBalanceGleam 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rxBalanceGleam {
  0%, 100% { left: -100%; }
  50%      { left: 200%; }
}
body.casino-polished .balance-bar span {
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
}

/* Game cards: layered radial accent + decorative corner glyphs */
body.casino-polished .game,
body.casino-polished .game-card {
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, var(--rx-accent-soft, rgba(255,51,102,0.12)), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 50%),
    var(--card, #1a0f15) !important;
  overflow: hidden;
}
body.casino-polished .game::after,
body.casino-polished .game-card::after {
  content: '◢';
  position: absolute;
  top: 10px; right: 14px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  color: var(--rx-accent, #ff3366);
  opacity: 0.35;
  transition: opacity 280ms ease, transform 280ms ease;
  pointer-events: none;
}
body.casino-polished .game:hover::after,
body.casino-polished .game-card:hover::after {
  opacity: 0.85;
  transform: rotate(90deg);
}

/* Primary action buttons: gradient neon + animated glow */
body.casino-polished .flip-btn,
body.casino-polished .spin-btn,
body.casino-polished .play-btn,
body.casino-polished .cashout-btn,
body.casino-polished .guess-btn,
body.casino-polished .join-btn {
  background: linear-gradient(135deg, var(--rx-accent, #ff3366), color-mix(in srgb, var(--rx-accent, #ff3366) 55%, #000)) !important;
  border: 1px solid var(--rx-accent, #ff3366) !important;
  box-shadow:
    0 12px 32px var(--rx-accent-glow, rgba(255, 51, 102, 0.4)),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.2) !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
body.casino-polished .flip-btn:not(:disabled):hover,
body.casino-polished .spin-btn:not(:disabled):hover,
body.casino-polished .play-btn:not(:disabled):hover,
body.casino-polished .cashout-btn:not(:disabled):hover,
body.casino-polished .guess-btn:not(:disabled):hover,
body.casino-polished .join-btn:not(:disabled):hover {
  box-shadow:
    0 18px 46px var(--rx-accent-glow, rgba(255, 51, 102, 0.55)),
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 0 60px var(--rx-accent-glow, rgba(255, 51, 102, 0.4)) !important;
}

/* Result box / message: heavier display, dramatic backdrop */
body.casino-polished .result-msg,
body.casino-polished .result-box,
body.casino-polished #msg,
body.casino-polished #resultMsg {
  font-family: 'Bebas Neue', 'Rajdhani', sans-serif !important;
  letter-spacing: 0.05em !important;
  font-size: 1.15em;
}

/* Pool/jackpot displays: prize-vault aesthetic */
body.casino-polished .pool-display,
body.casino-polished .number-card,
body.casino-polished .odds {
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(255, 215, 0, 0.08), transparent 60%),
    var(--card, #1a0f15) !important;
  border-color: rgba(255, 215, 0, 0.2) !important;
}

/* Toast: glassy refinement */
body.casino-polished .casino-toast {
  background: rgba(18, 10, 15, 0.86) !important;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--rx-accent-soft, rgba(255,51,102,0.3)) !important;
  box-shadow:
    0 22px 50px rgba(0,0,0,0.5),
    0 0 30px var(--rx-accent-soft, rgba(255,51,102,0.18)) !important;
}

/* Back link: cleaner pill with arrow shift */
body.casino-polished .casino-back {
  transition: all 220ms cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}
body.casino-polished .casino-back:hover {
  transform: translateX(-3px);
  box-shadow: 0 8px 20px var(--rx-accent-soft, rgba(255, 51, 102, 0.18));
}

/* Card flip / spin item: subtle 3D depth */
body.casino-polished .card,
body.casino-polished .spin-item,
body.casino-polished .choice {
  box-shadow:
    0 12px 28px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
