/* ─── GAME LAYOUT ─── */
.game-page {
  min-height: 100vh;
  padding-top: 72px;
  background: var(--bg);
}

.game-stage {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 5% 80px;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.game-title {
  font-size: 1.6rem;
  color: var(--text);
}

.game-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.balance-display {
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  text-align: center;
}

.balance-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
}

.balance-amount {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.coin-icon { font-size: 1rem; }

/* ─── BLACKJACK ─── */
.bj-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
}

.bj-zone {
  margin-bottom: 28px;
}

.bj-zone-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}

.cards-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 100px;
  align-items: center;
}

.playing-card {
  width: 68px;
  height: 100px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  animation: cardDeal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.playing-card.red { color: #d32f2f; }

.playing-card .card-top {
  position: absolute;
  top: 5px; left: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.playing-card .card-suit {
  font-size: 1.8rem;
}

.playing-card .card-bottom {
  position: absolute;
  bottom: 5px; right: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  transform: rotate(180deg);
  line-height: 1;
}

.playing-card.hidden {
  background: linear-gradient(135deg, #1a2744, #0d1b2a);
  font-size: 2rem;
  color: var(--gold);
}

@keyframes cardDeal {
  from { opacity: 0; transform: translateY(-20px) rotate(-5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

.bj-score {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.bj-score span {
  color: var(--gold);
  font-weight: 700;
}

.bj-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 24px 0;
}

.bj-controls {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bet-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bet-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.bet-chip {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Cinzel', serif;
}

.chip-10 { background: rgba(64,145,108,0.15); border-color: var(--green-light); color: var(--green-light); }
.chip-25 { background: rgba(200,146,42,0.15); border-color: var(--gold); color: var(--gold); }
.chip-50 { background: rgba(192,57,43,0.15); border-color: #c0392b; color: #c0392b; }
.chip-100 { background: rgba(26,74,138,0.15); border-color: #1a4a8a; color: #5a9fd4; }

.bet-chip:hover { transform: scale(1.1) translateY(-2px); }
.bet-chip.selected { transform: scale(1.1); box-shadow: 0 0 16px currentColor; }

.current-bet {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold);
  min-width: 80px;
  text-align: center;
}

.action-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-game {
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.btn-deal {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--bg);
}

.btn-hit { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); }
.btn-stand { background: var(--green-muted); color: var(--green-light); border: 1px solid var(--green); }
.btn-double { background: rgba(200,146,42,0.1); color: var(--gold); border: 1px solid var(--border-gold); }

.btn-game:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-game:disabled { opacity: 0.3; pointer-events: none; }

.bj-message {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.msg-win { background: rgba(64,145,108,0.15); color: var(--success); border: 1px solid rgba(64,145,108,0.3); }
.msg-lose { background: rgba(192,57,43,0.1); color: #e74c3c; border: 1px solid rgba(192,57,43,0.2); }
.msg-push { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.msg-info { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.msg-blackjack { background: rgba(200,146,42,0.15); color: var(--gold); border: 1px solid var(--border-gold); }

/* ─── SLOTS ─── */
.slots-machine {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
}

.slots-title-area {
  margin-bottom: 32px;
}

.slots-title-area h2 {
  font-size: 1.8rem;
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
  margin-bottom: 4px;
}

.reels-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.reel-window {
  width: 110px;
  height: 140px;
  background: var(--bg);
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.reel-inner {
  position: absolute;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.reel-symbol {
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.reel-symbol span {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-family: 'Cinzel', serif;
}

.reel-window::before,
.reel-window::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 30px;
  z-index: 2;
  pointer-events: none;
}

.reel-window::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg), transparent);
}

.reel-window::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg), transparent);
}

.slots-win-line {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: translateY(-50%);
  z-index: 3;
  opacity: 0.4;
}

.slots-result {
  min-height: 48px;
  margin-bottom: 24px;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
}

.slots-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.bet-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bet-selector label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bet-selector select {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  appearance: none;
  -webkit-appearance: none;
}

.btn-spin {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--bg);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  padding: 16px 48px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-spin:hover { transform: translateY(-2px); box-shadow: 0 6px 30px var(--gold-glow); }
.btn-spin:disabled { opacity: 0.4; pointer-events: none; }
.btn-spin.spinning { animation: pulse 0.4s ease-in-out infinite alternate; }

@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.02); } }

.paytable {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 32px;
  text-align: left;
}

.paytable h4 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.paytable-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.paytable-row:last-child { border-bottom: none; }
.paytable-row .symbols { font-size: 1.1rem; letter-spacing: 4px; }
.paytable-row .payout { color: var(--gold); font-family: 'Cinzel', serif; font-weight: 700; }

.reel-window.highlight { border-color: var(--gold); box-shadow: 0 0 20px var(--gold-glow); }

/* ─── DICE GAME ─── */
.dice-arena {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
}

.dice-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 28px 0;
  flex-wrap: wrap;
}

.dice-box {
  width: 80px;
  height: 80px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.dice-box:hover { border-color: var(--border-gold); }

.dice-box.held {
  background: rgba(200,146,42,0.1);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(200,146,42,0.2);
}

.dice-box .hold-badge {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--bg);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.dice-box.rolling { animation: diceRoll 0.5s ease; }

@keyframes diceRoll {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.1); }
  75% { transform: rotate(-15deg) scale(0.9); }
  100% { transform: rotate(0deg) scale(1); }
}

.dice-target-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.dice-target-section h4 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.target-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.target-opt {
  flex: 1;
  min-width: 100px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.target-opt:hover { border-color: var(--border-gold); }

.target-opt.selected {
  background: rgba(200,146,42,0.1);
  border-color: var(--gold);
}

.target-opt .target-name {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--text);
  margin-bottom: 4px;
}

.target-opt .target-odds {
  font-size: 0.7rem;
  color: var(--gold);
}

.dice-score-track {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.score-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  text-align: center;
}

.score-item .score-val {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--gold);
}

.score-item .score-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.rolls-left {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
}

.rolls-dots {
  display: inline-flex;
  gap: 5px;
  margin-left: 8px;
}

.roll-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  transition: background var(--transition);
}

.roll-dot.used { background: var(--border); }

.dice-message {
  text-align: center;
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* ─── WIN ANIMATION ─── */
.win-flash {
  animation: winFlash 0.6s ease;
}

@keyframes winFlash {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 40px rgba(64,145,108,0.5); }
}

/* ─── GAMES BACK LINK ─── */
.game-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
  margin-bottom: 32px;
}

.game-back:hover { color: var(--gold); }

/* ─── RESPONSIVE GAME ─── */
@media (max-width: 600px) {
  .bj-table { padding: 20px 16px; }
  .bj-controls { padding: 16px; flex-direction: column; align-items: stretch; }
  .reels-container { gap: 8px; }
  .reel-window { width: 90px; height: 120px; }
  .reel-symbol { height: 120px; font-size: 2.4rem; }
  .dice-box { width: 64px; height: 64px; font-size: 2.2rem; }
}
