/* ===== GAMES COMMON ===== */
.game-page {
  min-height: 100vh;
  background: var(--bg-primary);
  padding-top: 80px;
}

.game-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: var(--space-5) 0;
}

.game-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.game-title-block h1 {
  font-size: 1.5rem;
  color: #fff;
}

.game-title-block p {
  font-size: 0.875rem;
  color: var(--neutral-500);
}

.game-coins {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(232,160,32,0.1);
  border: 1px solid rgba(232,160,32,0.25);
  padding: 10px 20px;
  border-radius: var(--radius-md);
}

.game-coins-icon {
  font-size: 1.25rem;
}

.game-coins-value {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.game-coins-label {
  font-size: 0.75rem;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-arena {
  padding: var(--space-10) 0;
}

.game-container {
  max-width: 900px;
  margin: 0 auto;
}

/* ===== POKER GAME ===== */
.poker-table {
  background: radial-gradient(ellipse at center, #1a5c2e 0%, #0e3a1c 100%);
  border: 8px solid #8B5E3C;
  border-radius: 50% / 30%;
  padding: var(--space-10) var(--space-12);
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  box-shadow: 0 0 60px rgba(0,0,0,0.7), inset 0 0 40px rgba(0,0,0,0.3);
}

.poker-dealer-area {
  text-align: center;
}

.poker-dealer-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-3);
}

.poker-community-cards {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--space-6) 0;
}

.poker-pot {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.poker-player-area {
  width: 100%;
  text-align: center;
}

.poker-player-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-3);
}

.poker-hand {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* CARDS */
.playing-card {
  width: 70px;
  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;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  transition: transform var(--transition-base);
  user-select: none;
}

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

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

.playing-card.face-down {
  background: linear-gradient(135deg, #1a2e5c, #2a3e7c);
  border: 2px solid #3a4e8c;
}

.playing-card.face-down::after {
  content: '🂠';
  font-size: 2.5rem;
  color: rgba(255,255,255,0.3);
}

.playing-card.selected {
  transform: translateY(-12px);
  box-shadow: 0 12px 24px rgba(232,160,32,0.4);
  border: 2px solid var(--primary);
}

.card-rank {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 900;
}

.card-suit {
  font-size: 1.5rem;
  line-height: 1;
}

.poker-controls {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.poker-bet-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.bet-input-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 16px;
}

.bet-input-group label {
  font-size: 0.875rem;
  color: var(--neutral-500);
  white-space: nowrap;
}

.bet-input-group input {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-accent);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  width: 80px;
  text-align: center;
}

.poker-message {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  min-height: 32px;
  font-family: var(--font-heading);
  background: rgba(0,0,0,0.3);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.poker-message.win {
  color: var(--success);
}

.poker-message.lose {
  color: var(--accent);
}

.poker-hand-rank {
  font-size: 0.875rem;
  color: var(--primary-light);
  text-align: center;
  margin-bottom: var(--space-3);
  min-height: 24px;
  font-style: italic;
}

/* ===== BLACKJACK GAME ===== */
.blackjack-table {
  background: radial-gradient(ellipse at center, #1a3a6c 0%, #0e2040 100%);
  border: 8px solid #8B5E3C;
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  box-shadow: 0 0 60px rgba(0,0,0,0.7), inset 0 0 40px rgba(0,0,0,0.3);
}

.bj-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.bj-area-label {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bj-score {
  font-family: var(--font-accent);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  min-width: 60px;
  text-align: center;
}

.bj-score.bust {
  color: var(--accent);
}

.bj-score.blackjack {
  color: var(--primary);
}

.bj-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: var(--space-2) 0;
}

.bj-controls {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.bj-bet-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.bj-chip {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 3px solid;
  transition: all var(--transition-base);
  user-select: none;
}

.bj-chip:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.bj-chip.c10 { background: #e74c3c; border-color: #c0392b; color: #fff; }
.bj-chip.c25 { background: #27ae60; border-color: #229954; color: #fff; }
.bj-chip.c50 { background: #2980b9; border-color: #1f6391; color: #fff; }
.bj-chip.c100 { background: var(--primary); border-color: var(--primary-dark); color: #fff; }

.bj-current-bet {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

.bj-current-bet-label {
  font-size: 0.75rem;
  color: var(--neutral-500);
  text-align: center;
  margin-bottom: var(--space-2);
}

.bj-message {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  min-height: 36px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.3);
  margin-bottom: var(--space-4);
}

.bj-message.win { color: var(--success); }
.bj-message.lose { color: var(--accent); }
.bj-message.push { color: var(--primary); }

/* ===== ROULETTE GAME ===== */
.roulette-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.roulette-wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.roulette-wheel-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
}

.roulette-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  border: 8px solid #8B5E3C;
  box-shadow: 0 0 40px rgba(0,0,0,0.6), inset 0 0 20px rgba(0,0,0,0.4);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 1.0);
}

.roulette-ball {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #f0f0f0;
  border-radius: 50%;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 10;
  transition: all 4s cubic-bezier(0.17, 0.67, 0.12, 1.0);
}

.roulette-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #c0a060, #8b7040);
  border-radius: 50%;
  border: 4px solid #8B5E3C;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-weight: 700;
}

.roulette-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 20px solid var(--primary);
  z-index: 20;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.roulette-result-number {
  font-family: var(--font-accent);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(232,160,32,0.5);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roulette-bets-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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

.roulette-bet-btn {
  padding: var(--space-3) var(--space-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #e8e8e0;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  font-family: var(--font-body);
}

.roulette-bet-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(232,160,32,0.1);
  color: var(--primary);
}

.roulette-bet-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--secondary);
}

.roulette-bet-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.roulette-bet-btn.red-bet { border-left: 3px solid #e74c3c; }
.roulette-bet-btn.black-bet { border-left: 3px solid #555; }
.roulette-bet-btn.green-bet { border-left: 3px solid #27ae60; }

.roulette-chip-selector {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.roulette-amount {
  font-family: var(--font-accent);
  font-size: 1.125rem;
  color: var(--primary);
  font-weight: 700;
}

.roulette-message {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  min-height: 32px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.3);
  margin-top: var(--space-4);
}

.roulette-message.win { color: var(--success); }
.roulette-message.lose { color: var(--accent); }

/* ===== CANVAS WHEEL ===== */
#rouletteCanvas {
  border-radius: 50%;
  display: block;
}

.roulette-spin-btn {
  font-size: 1.125rem;
  padding: 14px 36px;
  width: 100%;
}

@media (max-width: 768px) {
  .roulette-layout {
    grid-template-columns: 1fr;
  }
  .roulette-wheel-wrapper {
    width: 240px;
    height: 240px;
  }
  .poker-table {
    padding: var(--space-6);
  }
  .blackjack-table {
    padding: var(--space-6);
  }
  .playing-card {
    width: 56px;
    height: 80px;
    font-size: 1.125rem;
  }
}
