/* ─── GAME LAYOUT ─────────────────────────────────────────── */
.game-wrapper {
  min-height: 100vh;
  padding-top: 70px;
  position: relative;
  z-index: 1;
}

.game-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.game-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.game-title-group { display: flex; align-items: center; gap: 14px; }

.game-title-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.game-title-group h1 {
  font-size: 1.4rem;
  margin: 0;
}

.game-title-group span {
  font-size: 0.8rem;
  color: var(--teal);
  display: block;
  margin-top: 2px;
}

.game-info-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.game-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.game-back-btn:hover {
  color: var(--text-primary);
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
}

/* ─── BALANCE ─────────────────────────────────────────────── */
.balance-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(240,180,41,0.08);
  border: 1px solid rgba(240,180,41,0.2);
  border-radius: 50px;
  padding: 8px 18px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
}

.balance-icon { font-size: 1.1rem; }

/* ─── GAME AREA ─────────────────────────────────────────────── */
.game-area {
  display: grid;
  gap: 24px;
}

.game-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.game-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
}

/* ─── SLOTS ─────────────────────────────────────────────────── */
.slots-container {
  width: 100%;
  max-width: 680px;
}

.slots-title {
  text-align: center;
  margin-bottom: 32px;
}

.slots-title h2 {
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.slots-machine {
  background: linear-gradient(180deg, #0d1b3e, #071328);
  border: 2px solid var(--gold);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-gold), inset 0 0 60px rgba(0,0,0,0.5);
  position: relative;
}

.slots-machine::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--gold), transparent, var(--teal));
  opacity: 0.2;
  pointer-events: none;
}

.slots-reels {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.slot-reel-wrap {
  background: rgba(0,0,0,0.4);
  border-radius: var(--radius);
  border: 2px solid rgba(240,180,41,0.3);
  overflow: hidden;
  width: 130px;
  height: 130px;
  position: relative;
}

.slot-reel {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0s;
}

.slot-symbol {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  flex-shrink: 0;
}

.slot-reel-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
  z-index: 2;
}

.slot-reel-line {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(240,180,41,0.5), transparent);
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
}

.slots-win-display {
  text-align: center;
  min-height: 36px;
  margin-bottom: 16px;
}

.slots-win-msg {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slots-win-msg.show {
  opacity: 1;
  transform: scale(1);
}

.slots-win-msg.jackpot { color: var(--gold); text-shadow: 0 0 20px rgba(240,180,41,0.8); }
.slots-win-msg.big { color: var(--teal); text-shadow: 0 0 20px rgba(0,201,177,0.6); }
.slots-win-msg.normal { color: var(--text-primary); }
.slots-win-msg.loss { color: var(--text-muted); }

.slots-bet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bet-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.bet-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bet-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.bet-btn:hover { background: rgba(240,180,41,0.1); border-color: var(--gold); color: var(--gold); }

.bet-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 48px;
  text-align: center;
}

.slots-spin-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold), #e8a020);
  color: #0a0e1a;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  transition: var(--transition);
  letter-spacing: 1px;
}

.slots-spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240,180,41,0.5);
}

.slots-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@keyframes reel-spin {
  from { transform: translateY(0); }
  to { transform: translateY(-100px); }
}

.spinning .slot-reel {
  animation: reel-blur 0.08s linear infinite;
}

@keyframes reel-blur {
  0% { filter: blur(0); }
  50% { filter: blur(3px); }
  100% { filter: blur(0); }
}

.slots-paytable {
  margin-top: 20px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius);
  padding: 16px;
}

.paytable-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.paytable-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.paytable-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 4px 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}

.paytable-multiplier { color: var(--gold); font-weight: 700; margin-left: auto; }

/* ─── ROULETTE ─────────────────────────────────────────────── */
.roulette-layout {
  width: 100%;
  max-width: 760px;
}

.roulette-wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.roulette-wheel-outer {
  position: relative;
  width: 280px; height: 280px;
  margin-bottom: 20px;
}

.roulette-canvas {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: var(--shadow-gold), 0 0 60px rgba(240,180,41,0.1);
}

.roulette-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid var(--gold);
  filter: drop-shadow(0 0 8px rgba(240,180,41,0.8));
  z-index: 10;
}

.roulette-result {
  text-align: center;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.roulette-result-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  min-width: 60px;
  text-align: center;
}

.roulette-result-num.red { color: #ff4757; text-shadow: 0 0 20px rgba(255,71,87,0.5); }
.roulette-result-num.black { color: #e8eaf6; }
.roulette-result-num.green { color: var(--teal); text-shadow: 0 0 20px rgba(0,201,177,0.5); }

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

.roulette-betting-board {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.board-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.bet-type-grid {
  display: grid;
  gap: 6px;
}

.bet-type-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.bet-type-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.bet-chip {
  padding: 10px 8px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
}

.bet-chip:hover { background: rgba(255,255,255,0.09); color: var(--text-primary); }
.bet-chip.selected { background: rgba(240,180,41,0.15); border-color: var(--gold); color: var(--gold); }
.bet-chip.red-chip { color: #ff6b7a; border-color: rgba(255,71,87,0.3); }
.bet-chip.red-chip.selected { background: rgba(255,71,87,0.15); border-color: #ff4757; color: #ff6b7a; }
.bet-chip.black-chip.selected { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
.bet-chip.green-chip { color: var(--teal); border-color: rgba(0,201,177,0.3); }
.bet-chip.green-chip.selected { background: rgba(0,201,177,0.15); border-color: var(--teal); }

.bet-chip .chip-multiplier {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.bet-chip.selected .chip-multiplier { color: inherit; opacity: 0.7; }

.roulette-spin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.roulette-spin-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #00c9b1, #008f7e);
  color: #030712;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.roulette-spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
}

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

.roulette-win-toast {
  text-align: center;
  min-height: 32px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  transition: var(--transition);
}

/* ─── BLACKJACK ─────────────────────────────────────────────── */
.blackjack-container {
  width: 100%;
  max-width: 720px;
}

.bj-table {
  background: radial-gradient(ellipse at center, #0d2d1a, #071a0e);
  border: 3px solid var(--gold);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 20px;
  min-height: 340px;
  position: relative;
  box-shadow: var(--shadow-gold), inset 0 0 60px rgba(0,0,0,0.4);
}

.bj-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(240,180,41,0.5);
  margin-bottom: 12px;
  font-family: 'Orbitron', sans-serif;
}

.bj-hand {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  min-height: 100px;
  align-items: flex-start;
}

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

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

.card-el {
  width: 66px;
  height: 98px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  position: relative;
  border: 1.5px solid rgba(255,255,255,0.2);
  animation: card-deal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  user-select: none;
}

@keyframes card-deal {
  from { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.card-el.red {
  background: linear-gradient(135deg, #fff8f8, #ffe8e8);
  color: #cc2222;
}

.card-el.black {
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  color: #111;
}

.card-el.hidden {
  background: linear-gradient(135deg, #1a3a7a, #0d2050);
  color: transparent;
  border: 1.5px solid rgba(240,180,41,0.3);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(240,180,41,0.05) 0px, rgba(240,180,41,0.05) 2px,
    transparent 2px, transparent 8px
  );
}

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

.card-val {
  font-size: 0.9rem;
  position: absolute;
  top: 5px; left: 7px;
  font-weight: 900;
  line-height: 1;
}

.bj-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.bj-btn {
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1.5px solid;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.bj-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.bj-btn-hit { background: rgba(0,201,177,0.1); border-color: var(--teal); color: var(--teal); }
.bj-btn-hit:hover:not(:disabled) { background: rgba(0,201,177,0.2); }

.bj-btn-stand { background: rgba(240,180,41,0.1); border-color: var(--gold); color: var(--gold); }
.bj-btn-stand:hover:not(:disabled) { background: rgba(240,180,41,0.2); }

.bj-btn-double { background: rgba(30,144,255,0.1); border-color: var(--blue); color: var(--blue-light); }
.bj-btn-double:hover:not(:disabled) { background: rgba(30,144,255,0.2); }

.bj-btn-deal {
  background: linear-gradient(135deg, var(--gold), #e8a020);
  border-color: var(--gold);
  color: #0a0e1a;
}

.bj-btn-deal:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(240,180,41,0.4); }

.bj-message {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  min-height: 32px;
  padding: 8px;
  border-radius: var(--radius);
}

.bj-message.win { color: var(--gold); background: rgba(240,180,41,0.08); }
.bj-message.lose { color: var(--error); background: rgba(255,71,87,0.08); }
.bj-message.push { color: var(--text-muted); background: rgba(255,255,255,0.04); }
.bj-message.info { color: var(--teal); background: rgba(0,201,177,0.08); }

/* ─── HISTORY PANEL ─────────────────────────────────────────── */
.history-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 0.82rem;
  border-left: 3px solid;
}

.history-item.win { border-left-color: var(--gold); }
.history-item.lose { border-left-color: var(--error); }
.history-item.push { border-left-color: var(--text-muted); }

.history-result-win { color: var(--gold); font-weight: 600; }
.history-result-lose { color: var(--error); font-weight: 600; }
.history-result-push { color: var(--text-muted); font-weight: 600; }

/* ─── GAME RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .slots-reels { gap: 8px; }
  .slot-reel-wrap { width: 100px; height: 100px; }
  .slot-symbol { width: 100px; height: 100px; font-size: 2.8rem; }
  .bj-controls { grid-template-columns: repeat(2, 1fr); }
  .roulette-wheel-outer { width: 220px; height: 220px; }
  .paytable-grid { grid-template-columns: repeat(2, 1fr); }
  .game-main { padding: 20px; }
}
