/* ===== PokéRoyale styles =====
 * Casino felt + Pokémon TCG. Dark forest green table, warm gold brass rails,
 * ruby/jade/sky/volt suit accents (= fire/grass/water/electric Pokémon types).
 */

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; line-height: 1.5; letter-spacing: 0.005em; }

::selection { background: #ffd700; color: #0a0a1a; }

/* Felt-textured backdrop with brass-rail vignette */
.royale-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 215, 0, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a1a 0%, #050510 100%);
  background-attachment: fixed;
}

/* ============================================================
 * LOGO SPADE — large ♠ as the brand mark next to wordmark
 * ============================================================ */
.logo-spade {
  display: inline-block;
  font-size: 28px;
  line-height: 1;
  color: #ffd700;
  text-shadow: 0 0 0 2px #000, 2px 2px 0 #c79400, 3px 3px 0 #000;
  filter: drop-shadow(0 2px 0 #000);
}

/* ============================================================
 * SHINY SPRITES (Showdown animated transparent GIFs)
 * ============================================================ */
.shiny-sprite {
  display: inline-block;
  image-rendering: pixelated;
  vertical-align: middle;
  object-fit: contain;
  animation: shinyBob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.5));
}
.shiny-sprite.sm { width: 32px; height: 32px; }
.shiny-sprite.md { width: 48px; height: 48px; }
.shiny-sprite.lg { width: 72px; height: 72px; }
.shiny-sprite.delay-1 { animation-delay: 0.4s; }
.shiny-sprite.delay-2 { animation-delay: 0.8s; }
@keyframes shinyBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* ============================================================
 * BUTTONS — casino chip + brass rail aesthetic
 *
 * .royale-btn-gold   primary / call to action
 * .royale-btn-ruby   destructive / fold / BUY
 * .royale-btn-jade   raise / win
 * .royale-btn-ghost  secondary / neutral
 * Modifier: .royale-btn-lg for hero CTAs
 * ============================================================ */
.royale-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid #000;
  cursor: pointer;
  user-select: none;
  transition: transform 60ms ease, filter 60ms ease;
  white-space: nowrap;
  position: relative;
}
.royale-btn:hover { filter: brightness(1.08); }
.royale-btn:active { transform: translate(1px, 1px); }
.royale-btn-lg { padding: 10px 18px; font-size: 13px; }
.royale-btn-gold {
  background: linear-gradient(180deg, #ffe066 0%, #ffd700 50%, #c79400 100%);
  color: #1a0f00;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.royale-btn-ruby {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 50%, #8b1414 100%);
  color: #fff8e0;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.royale-btn-jade {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 50%, #0a5a2a 100%);
  color: #fff8e0;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.royale-btn-ghost {
  background: transparent;
  color: #ffd700;
  border-color: #a87f3a;
  box-shadow: 0 3px 0 #000;
}
.royale-btn-ghost:hover { background: rgba(255, 215, 0, 0.08); }
.royale-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* ============================================================
 * ROYALE-TAG — small gold pill section markers
 * ============================================================ */
.royale-tag {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #ffe066 0%, #c79400 100%);
  color: #1a0f00;
  border: 2px solid #000;
  padding: 3px 8px 2px;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 #000;
  white-space: nowrap;
}

/* LIVE pulse */
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-pulse { animation: live-pulse 1.4s ease-in-out infinite; }
.live-pill {
  background: #dc2626;
  color: #fff8e0;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 7px 2px;
  border: 2px solid #000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 #000;
}

.tabular-nums { font-variant-numeric: tabular-nums; }

/* ============================================================
 * POKER FELT — the table itself
 *
 * Outer wood rail (border1 brass) wraps an inner dark-felt oval.
 * Three seat rows: opponent (top), community (middle), you (bottom).
 * On mobile collapses to a flat vertical stack but keeps the felt.
 * ============================================================ */

.royale-felt-wrap {
  padding: 20px;
  background:
    radial-gradient(ellipse at center, #1a0f00 0%, #050510 100%);
}
.royale-felt {
  background:
    radial-gradient(ellipse at center, #0e6238 0%, #0a4d2a 40%, #063a1f 100%);
  border: 6px solid #a87f3a;
  border-radius: 100px / 60px;
  padding: 24px 18px;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px #5c3e15,
    0 0 0 4px #000,
    0 8px 32px rgba(0, 0, 0, 0.7);
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 18px;
}

.royale-seat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.seat-top    { flex-direction: row-reverse; }
.seat-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #5c3e15;
  padding: 6px 10px;
  box-shadow: 0 2px 0 #000;
  min-width: 0;
}
.seat-cards {
  display: flex;
  gap: 6px;
}

.royale-community {
  text-align: center;
  padding: 8px;
  border-radius: 60px / 30px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 215, 0, 0.25);
}

/* ============================================================
 * POKER CARD — Pokémon TCG inspired
 *
 * Each card is a 56x76 panel with type-colored border, rank in
 * the top corner, large suit/Pokemon icon in the middle.
 * Suits: ruby ♥ (fire), sky ♦ (water), jade ♣ (grass), volt ♠ (electric).
 *
 * Variants:
 *   .card-back    — face-down with pokeball pattern
 *   .placeholder  — empty slot, dashed border, dim
 *   .reveal       — dealt-in animation
 * ============================================================ */

.poker-card {
  width: 56px;
  height: 78px;
  background: #fff8e0;
  border: 3px solid #000;
  border-radius: 5px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 26px;
  color: #000;
  box-shadow: 0 3px 0 #000, inset 0 0 0 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
.poker-card .rank-top {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 12px;
  line-height: 1;
}
.poker-card .rank-bot {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 12px;
  line-height: 1;
  transform: rotate(180deg);
}
.poker-card .suit-big { font-size: 30px; }
.poker-card.suit-ruby { color: #dc2626; border-color: #8b1414; }
.poker-card.suit-sky  { color: #2563eb; border-color: #1d3a8a; }
.poker-card.suit-jade { color: #16a34a; border-color: #0a5a2a; }
.poker-card.suit-volt { color: #b8860b; border-color: #5a4310; }

.poker-card.card-back {
  background:
    repeating-linear-gradient(45deg, #dc2626 0 6px, #b91c1c 6px 12px),
    #dc2626;
  color: #fff;
  font-size: 18px;
  border-color: #000;
}
.poker-card.card-back::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid #fff8e0;
  border-radius: 3px;
}
.poker-card.card-back::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  background: radial-gradient(circle, #fff8e0 0 40%, transparent 42%),
              linear-gradient(0deg, #fff8e0 0 40%, #1a1a1a 40% 60%, #fff8e0 60% 100%);
  border: 2px solid #fff8e0;
  border-radius: 50%;
}

.poker-card.placeholder {
  background: rgba(0, 0, 0, 0.35);
  border-style: dashed;
  border-color: rgba(255, 215, 0, 0.3);
  color: rgba(255, 215, 0, 0.3);
  font-size: 20px;
  box-shadow: none;
}

@keyframes cardDeal {
  0%   { transform: translateY(-200px) rotate(-180deg) scale(0.5); opacity: 0; }
  60%  { transform: translateY(8px) rotate(8deg) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
}
.poker-card.reveal { animation: cardDeal 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* highlight winning cards */
.poker-card.winner {
  box-shadow:
    0 0 0 3px #ffd700,
    0 0 12px #ffd700,
    0 3px 0 #000;
  animation: winnerPulse 1.2s ease-in-out infinite;
}
@keyframes winnerPulse {
  0%, 100% { box-shadow: 0 0 0 3px #ffd700, 0 0 12px #ffd700, 0 3px 0 #000; }
  50%      { box-shadow: 0 0 0 3px #ffe066, 0 0 24px #ffd700, 0 3px 0 #000; }
}

/* ============================================================
 * BUY CTA backdrop — felt card pattern
 * ============================================================ */
.royale-buy {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #0e6238 0%, #063a1f 100%);
  border-top: 2px solid #a87f3a;
}

/* ============================================================
 * MOBILE
 * ============================================================ */
@media (max-width: 640px) {
  .royale-felt { padding: 14px 8px; gap: 12px; border-radius: 60px / 50px; }
  .royale-felt-wrap { padding: 10px; }
  .poker-card { width: 44px; height: 62px; font-size: 20px; }
  .poker-card .suit-big { font-size: 22px; }
  .seat-info { padding: 4px 6px; gap: 6px; }
  .royale-seat { gap: 8px; }
  .seat-cards { gap: 4px; }
  .royale-btn { padding: 5px 10px; font-size: 11px; }
  .royale-btn-lg { padding: 8px 14px; font-size: 12px; }
}

/* Mobile: stack seats vertically with you at the bottom */
@media (max-width: 480px) {
  .royale-seat { flex-direction: column-reverse; align-items: stretch; }
  .seat-top    { flex-direction: column; }
  .seat-info { justify-content: center; }
  .seat-cards { justify-content: center; }
}

/* FAQ */
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary .faq-chev { transform: rotate(90deg); }
.faq-chev { transition: transform 160ms ease; display: inline-block; }

/* ============================================================
 * CASINO FLOOR — tab bar + shared bankroll
 * ============================================================ */
.casino-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
}
.casino-tab {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff8e0;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid #5c3e15;
  padding: 7px 13px;
  cursor: pointer;
  box-shadow: 0 2px 0 #000;
  transition: transform 60ms ease, filter 60ms ease;
  white-space: nowrap;
}
.casino-tab:hover { filter: brightness(1.12); border-color: #a87f3a; }
.casino-tab:active { transform: translateY(1px); }
.casino-tab.is-active {
  background: linear-gradient(180deg, #ffe066 0%, #ffd700 50%, #c79400 100%);
  color: #1a0f00;
  border-color: #000;
}
.bankroll-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid #a87f3a;
  padding: 5px 10px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5), 0 2px 0 #000;
  font-size: 13px;
  white-space: nowrap;
}
.bankroll-pill .br-label { color: rgba(255, 248, 224, 0.55); text-transform: uppercase; font-size: 10px; letter-spacing: 0.12em; }
.bankroll-pill strong { color: #ffd700; font-family: 'Cinzel', serif; font-weight: 900; }

/* game section header strip */
.game-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid #5c3e15;
  background: #050510;
}
.game-sub { color: rgba(255, 248, 224, 0.6); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.game-note { margin-left: auto; color: rgba(255, 248, 224, 0.45); font-size: 11px; }

/* result banner shared by every game */
.game-banner {
  min-height: 26px;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  color: #fff8e0;
}
.game-banner.win  { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, 0.5); }
.game-banner.loss { color: #f87171; }
.game-banner.push { color: #ffd700; }
.game-banner.jackpot { animation: winnerPulse 0.8s ease-in-out infinite; }

/* per-game action bars + logs */
.casino-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-top: 1px solid #5c3e15;
  background: #050510;
}
.casino-log {
  font-family: 'Inter', monospace;
  font-size: 12px;
  color: rgba(255, 248, 224, 0.62);
  max-height: 92px;
  overflow-y: auto;
  padding: 6px 16px 10px;
  background: #0f1d10;
  border-top: 1px solid #5c3e15;
}
.casino-logrow.win  { color: #4ade80; }
.casino-logrow.loss { color: #f87171; }

/* ============================================================
 * CHIPS — denomination buttons
 * ============================================================ */
.chip-row { display: inline-flex; gap: 6px; }
.chip {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.55);
  font-weight: 900;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 0 #000, inset 0 0 0 4px rgba(0, 0, 0, 0.25);
  transition: transform 60ms ease, filter 60ms ease;
  font-variant-numeric: tabular-nums;
}
.chip:hover { filter: brightness(1.12); }
.chip:active { transform: translateY(1px); }
.chip.is-active { transform: scale(1.12); outline: 2px solid #ffd700; outline-offset: 1px; }
.chip-10  { background: radial-gradient(circle, #2563eb 60%, #1d3a8a); }
.chip-25  { background: radial-gradient(circle, #16a34a 60%, #0a5a2a); }
.chip-50  { background: radial-gradient(circle, #dc2626 60%, #8b1414); }
.chip-100 { background: radial-gradient(circle, #1a1a1a 58%, #000); border-color: #ffd700; color: #ffd700; }

/* ============================================================
 * DICE (craps) — pip faces
 * ============================================================ */
.die {
  width: 64px;
  height: 64px;
  background: #fff8e0;
  border: 3px solid #000;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 8px;
  box-shadow: 0 4px 0 #000, inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}
.die .pip { border-radius: 50%; }
.die .pip.on { background: radial-gradient(circle at 35% 30%, #dc2626, #8b1414); box-shadow: inset 0 0 2px #000; }
.die.rolling { animation: diceShake 0.2s linear infinite; }
@keyframes diceShake {
  0%, 100% { transform: rotate(-7deg) translateY(0); }
  50%      { transform: rotate(7deg) translateY(-3px); }
}
.craps-dice { display: flex; gap: 16px; justify-content: center; }

.craps-bets { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cr-betcell {
  border: 2px solid #a87f3a;
  background: rgba(0, 0, 0, 0.4);
  color: #fff8e0;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
  min-width: 110px;
  box-shadow: 0 2px 0 #000;
}
.cr-betcell:hover { background: rgba(255, 215, 0, 0.08); }
.cr-betcell .cr-betname { font-family: 'Cinzel', serif; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.cr-betcell .cr-betamt { color: #ffd700; font-weight: 900; font-size: 16px; }
.cr-betcell.locked { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
 * ROULETTE — board + ball
 * ============================================================ */
.rl-ball {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 32px;
  color: #fff;
  border: 4px solid #000;
  box-shadow: 0 0 0 4px #a87f3a, 0 6px 18px rgba(0, 0, 0, 0.6);
}
.r-red   { background: linear-gradient(180deg, #dc2626, #8b1414); }
.r-black { background: linear-gradient(180deg, #2a2a2a, #050505); }
.r-green { background: linear-gradient(180deg, #16a34a, #0a5a2a); }

.rl-board { display: flex; gap: 4px; align-items: stretch; justify-content: center; flex-wrap: wrap; }
#rlNumbers { display: flex; gap: 2px; align-items: stretch; }
.rl-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}
.rl-cell {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #fff;
  border: 1px solid #000; cursor: pointer;
  position: relative;
  font-variant-numeric: tabular-nums;
}
.rl-cell.rl-zero { width: 34px; height: auto; font-size: 16px; }
.rl-cell:hover, .rl-out:hover { outline: 2px solid #ffd700; outline-offset: -2px; z-index: 2; }
.rl-out {
  flex: 1;
  min-width: 70px;
  padding: 8px 6px;
  font-weight: 800; font-size: 12px; color: #fff8e0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #5c3e15;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rl-outside { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 4px; max-width: 420px; margin-inline: auto; }
.has-chip::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ffd700 55%, #c79400);
  border: 2px solid #000;
  box-shadow: 0 0 6px #ffd700;
}
.rl-out.has-chip::after { position: static; display: inline-block; margin-left: 6px; transform: none; }
.rl-chiptag {
  display: inline-block;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid #a87f3a;
  color: #ffd700;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  margin: 2px;
}

/* ============================================================
 * SLOTS — reels
 * ============================================================ */
.slots-window {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(ellipse at center, #1a0f00, #050510);
  border: 6px solid #a87f3a;
  border-radius: 14px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 0 0 4px #000;
  max-width: 360px;
  margin: 0 auto;
}
.sl-reel {
  width: 84px;
  background: #fff8e0;
  border: 3px solid #000;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, 0.25), inset 0 -6px 10px rgba(0, 0, 0, 0.25);
}
.sl-cell { font-size: 38px; line-height: 1; padding: 6px 0; }
.sl-cell.dim { opacity: 0.28; font-size: 30px; }
.sl-cell.mid { background: rgba(255, 215, 0, 0.18); width: 100%; text-align: center; border-block: 2px solid rgba(255, 215, 0, 0.4); }
.sl-reel.locked { animation: slLock 0.16s ease; }
@keyframes slLock { 0% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
.sl-paytable {
  font-size: 12px;
  color: rgba(255, 248, 224, 0.75);
  max-width: 260px;
  margin: 0 auto;
}
.sl-payrow { display: flex; justify-content: space-between; padding: 3px 8px; border-bottom: 1px solid #1f2e1a; }
.sl-paysym { letter-spacing: 1px; }
.sl-payx { color: #ffd700; font-weight: 800; }

/* ============================================================
 * TOAST
 * ============================================================ */
.casino-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 60px);
  background: #0f1d10;
  border: 2px solid #a87f3a;
  color: #fff8e0;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  padding: 10px 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: transform 200ms ease, opacity 200ms ease;
  z-index: 100;
}
.casino-toast.show { transform: translate(-50%, 0); opacity: 1; }
.casino-toast.toast-win  { border-color: #16a34a; color: #4ade80; }
.casino-toast.toast-loss { border-color: #8b1414; color: #f87171; }

@media (max-width: 640px) {
  .die { width: 52px; height: 52px; padding: 6px; }
  .rl-cell { width: 24px; height: 26px; font-size: 10px; }
  .rl-zero { width: 30px; }
  .sl-reel { width: 64px; }
  .sl-cell { font-size: 30px; }
  .sl-cell.dim { font-size: 22px; }
}
