/* ============================================================
   ThamesValleyJourney — Game Styles
   ============================================================ */

/* ── Game Layout ──────────────────────────────────────────── */
.game-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary-900) 0%, var(--primary-800) 60%, #0a2a1e 100%);
  padding-top: 70px;
  display: flex;
  flex-direction: column;
}

.game-header {
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.game-header-top {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-2);
}

.game-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,.65);
  font-size: .85rem;
  transition: color var(--t-fast);
}
.game-back:hover { color: var(--white); }

.game-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.game-title-row h1 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.game-balance {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  padding: var(--sp-2) var(--sp-5);
  color: var(--accent-300);
  font-weight: 700;
  font-size: 1rem;
}

.game-arena {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--sp-6) var(--sp-12);
}

.game-panel {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  backdrop-filter: blur(8px);
}

/* ── Message Bar ──────────────────────────────────────────── */
.game-message {
  text-align: center;
  min-height: 36px;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: var(--sp-6);
  transition: all var(--t-fast);
  color: var(--accent-200);
}

.game-message.win  { background: rgba(45,122,61,.25); color: #7de8a0; border: 1px solid rgba(45,160,80,.35); }
.game-message.lose { background: rgba(184,50,50,.2);  color: #f0a0a0; border: 1px solid rgba(184,50,50,.3); }
.game-message.push { background: rgba(200,144,42,.2); color: var(--accent-200); border: 1px solid rgba(200,144,42,.3); }

/* ── Controls ─────────────────────────────────────────────── */
.game-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}

.bet-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.bet-label {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
}

.bet-input {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-4);
  font-size: .95rem;
  font-weight: 600;
  width: 90px;
  text-align: center;
  -moz-appearance: textfield;
}
.bet-input::-webkit-outer-spin-button,
.bet-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bet-input:focus { outline: none; border-color: var(--accent-400); }

.bet-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  border-radius: var(--radius-sm);
  width: 32px; height: 32px;
  font-size: 1.1rem;
  transition: background var(--t-fast);
  display: flex; align-items: center; justify-content: center;
}
.bet-btn:hover { background: rgba(255,255,255,.22); }

/* ── ============ SLOTS GAME ============ ─────────────────── */

.slots-reels {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  margin: var(--sp-8) 0;
}

.reel-wrapper {
  width: 110px;
  height: 330px;
  background: rgba(0,0,0,.35);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.reel-wrapper::before,
.reel-wrapper::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  z-index: 3;
  pointer-events: none;
}
.reel-wrapper::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(5,24,40,.9), transparent);
}
.reel-wrapper::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(5,24,40,.9), transparent);
}

.reel-payline {
  position: absolute;
  top: 50%; left: -8px; right: -8px;
  height: 110px;
  margin-top: -55px;
  border-top: 2px solid rgba(200,144,42,.5);
  border-bottom: 2px solid rgba(200,144,42,.5);
  z-index: 4;
  pointer-events: none;
  border-radius: var(--radius-sm);
}

.reel-strip {
  display: flex;
  flex-direction: column;
  transition: transform .6s cubic-bezier(.17,.67,.25,.99);
}

.reel-symbol {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  user-select: none;
  flex-shrink: 0;
}

.reel-symbol.highlight {
  animation: symbolPop .35s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes symbolPop {
  from { transform: scale(.8); opacity: .6; }
  to   { transform: scale(1); opacity: 1; }
}

.slots-btn-spin {
  min-width: 160px;
  padding: var(--sp-4) var(--sp-8);
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(200,144,42,.4);
  transition: all var(--t-normal);
  letter-spacing: .04em;
}

.slots-btn-spin:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,144,42,.55);
}

.slots-paytable {
  margin-top: var(--sp-8);
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--sp-6);
}

.slots-paytable h4 {
  color: rgba(255,255,255,.6);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--font-body);
  margin-bottom: var(--sp-4);
  text-align: center;
}

.paytable-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

.pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-size: .82rem;
}

.pay-row .symbols { font-size: 1rem; letter-spacing: 2px; }
.pay-row .multiplier { color: var(--accent-300); font-weight: 700; }

/* ── ============ BLACKJACK GAME ============ ──────────────── */

.bj-table {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.bj-hand-zone { position: relative; }

.bj-hand-label {
  font-size: .75rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: var(--sp-3);
}

.bj-score {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(0,0,0,.3);
  border-radius: var(--radius-full);
  padding: 2px var(--sp-3);
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  font-weight: 600;
  margin-left: var(--sp-3);
}

.bj-cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  min-height: 150px;
  align-items: flex-start;
}

.playing-card {
  width: 90px;
  height: 130px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  position: relative;
  animation: dealCard .3s cubic-bezier(.34,1.56,.64,1) both;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
}

@keyframes dealCard {
  from { opacity: 0; transform: translateY(-30px) scale(.85) rotate(-5deg); }
  to   { opacity: 1; transform: none; }
}

.playing-card .card-rank {
  font-size: 1.4rem;
  line-height: 1;
}

.playing-card .card-suit {
  font-size: 1.8rem;
  line-height: 1;
  margin-top: 2px;
}

.playing-card.red { color: #d44040; }
.playing-card.black { color: #1a1a1a; }

.playing-card .corner-top {
  position: absolute;
  top: var(--sp-2); left: var(--sp-2);
  font-size: .72rem;
  line-height: 1.1;
  text-align: left;
}

.playing-card .corner-bot {
  position: absolute;
  bottom: var(--sp-2); right: var(--sp-2);
  font-size: .72rem;
  line-height: 1.1;
  text-align: right;
  transform: rotate(180deg);
}

.playing-card.hidden {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  color: transparent;
}

.playing-card.hidden::after {
  content: '🏰';
  position: absolute;
  font-size: 2rem;
}

.bj-divider {
  border: none;
  border-top: 1px dashed rgba(255,255,255,.12);
  margin: var(--sp-2) 0;
}

.bj-action-btns {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

.bj-btn {
  padding: var(--sp-3) var(--sp-8);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--t-fast);
  min-width: 110px;
}

.bj-btn-hit   { background: var(--secondary-400); color: var(--white); }
.bj-btn-hit:hover:not(:disabled) { background: var(--secondary-300); transform: translateY(-1px); }

.bj-btn-stand { background: var(--error-500); color: var(--white); }
.bj-btn-stand:hover:not(:disabled) { background: var(--error-400); transform: translateY(-1px); }

.bj-btn-double { background: var(--accent-500); color: var(--white); }
.bj-btn-double:hover:not(:disabled) { background: var(--accent-400); transform: translateY(-1px); }

.bj-btn-new   { background: var(--primary-500); color: var(--white); }
.bj-btn-new:hover:not(:disabled) { background: var(--primary-400); transform: translateY(-1px); }

/* ── ============ ROULETTE GAME ============ ───────────────── */

.roulette-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: var(--sp-6);
  align-items: start;
}

.roulette-wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
  grid-column: 1 / -1;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: var(--sp-2);
}

.wheel-container {
  position: relative;
  width: 260px;
  height: 260px;
}

.wheel-svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.4));
  transition: transform 4s cubic-bezier(.17,.67,.08,1);
}

.wheel-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 22px solid var(--accent-400);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
  z-index: 2;
}

.wheel-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px;
  background: radial-gradient(circle, var(--accent-300), var(--accent-600));
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.last-numbers {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: center;
}

.last-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  animation: popIn .25s cubic-bezier(.34,1.56,.64,1) both;
}
.last-num.red-num  { background: #d44040; color: var(--white); }
.last-num.black-num{ background: #1a1a1a; color: var(--white); border: 1px solid rgba(255,255,255,.2); }
.last-num.zero-num { background: var(--secondary-500); color: var(--white); }

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.roulette-betting {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.roulette-betting-title {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  text-align: center;
}

.bet-options {
  display: grid;
  gap: var(--sp-2);
}

.bet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: all var(--t-fast);
  color: var(--white);
  font-size: .9rem;
}

.bet-option:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); }
.bet-option.selected { background: rgba(200,144,42,.2); border-color: var(--accent-400); }

.bet-option .bet-payout {
  font-size: .78rem;
  color: var(--accent-300);
  font-weight: 600;
}

.roulette-number-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  max-width: 320px;
  margin: 0 auto;
}

.num-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
}
.num-cell.red-cell  { background: rgba(212,64,64,.35); color: #f09090; }
.num-cell.black-cell{ background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.num-cell.zero-cell { background: rgba(45,122,107,.4); color: #90e0d0; grid-column: 1 / -1; aspect-ratio: auto; padding: 4px; }
.num-cell:hover { transform: scale(1.15); border-color: rgba(255,255,255,.4); }
.num-cell.selected-num { border-color: var(--accent-400); box-shadow: 0 0 0 2px rgba(200,144,42,.4); }

.selected-bets-display {
  background: rgba(0,0,0,.2);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  min-height: 60px;
}

.selected-bets-display .empty-state {
  text-align: center;
  color: rgba(255,255,255,.3);
  font-size: .82rem;
  padding: var(--sp-3) 0;
}

.bet-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(200,144,42,.2);
  border: 1px solid var(--accent-500);
  border-radius: var(--radius-full);
  padding: 2px var(--sp-3);
  font-size: .78rem;
  color: var(--accent-200);
  margin: 2px;
}

.btn-clear-bets {
  background: rgba(184,50,50,.2);
  border: 1px solid rgba(184,50,50,.3);
  color: #f09090;
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-4);
  font-size: .82rem;
  transition: all var(--t-fast);
}
.btn-clear-bets:hover { background: rgba(184,50,50,.3); }

.btn-spin-roulette {
  width: 100%;
  padding: var(--sp-4);
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(200,144,42,.4);
  transition: all var(--t-normal);
}
.btn-spin-roulette:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,144,42,.55);
}

/* ── Responsive Games ─────────────────────────────────────── */
@media (max-width: 768px) {
  .roulette-layout { grid-template-columns: 1fr; }
  .slots-reels { gap: var(--sp-2); }
  .reel-wrapper { width: 88px; }
  .reel-symbol  { width: 88px; height: 88px; font-size: 2.6rem; }
  .reel-wrapper { height: 264px; }
  .paytable-grid { grid-template-columns: repeat(2, 1fr); }
  .bj-cards { gap: var(--sp-2); }
  .playing-card { width: 72px; height: 104px; }
}

@media (max-width: 480px) {
  .game-panel { padding: var(--sp-5); }
  .slots-reels { gap: var(--sp-1); }
  .reel-wrapper { width: 72px; }
  .reel-symbol  { width: 72px; height: 72px; font-size: 2rem; }
  .reel-wrapper { height: 216px; }
  .playing-card { width: 58px; height: 84px; font-size: .8rem; }
  .playing-card .card-rank { font-size: 1rem; }
  .playing-card .card-suit { font-size: 1.4rem; }
}
