/* ═══════════════════════════════════════
   GAMES PAGE - TBU
═══════════════════════════════════════ */

:root {
  --gold: #e01020;
  --gold-glow: rgba(224,16,32,0.3);
  --felt-dark: #070707;
  --glass-bg: rgba(10, 5, 5, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* ── HERO ── */
.games-bg-blur {
  position: absolute;
  inset: 0;
  background: var(--bg) url('../img/games-hero-bg.jpg') center center / cover no-repeat;
  filter: blur(14px) brightness(0.35);
  transform: scale(1.08);
  z-index: 0;
}

/* ── GAMES GRID ── */
.games-grid-container {
  padding: 4rem 2rem 10rem;
  position: relative;
  z-index: 10;
}

.games-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* ── GAME CARD BASE ── */
.game-card {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(12, 5, 5, 0.98), rgba(5, 0, 0, 0.92));
  border: 1px solid var(--glass-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.02);
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(224,16,32,0.2);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.05);
}

.game-card-bg {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  opacity: 0.12;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
  top: -200px;
  right: -150px;
}

.game-card:hover .game-card-bg {
  opacity: 0.25;
}

.blur-red    { background: radial-gradient(circle, #e01020 0%, transparent 65%); }
.blur-gold   { background: radial-gradient(circle, #e01020 0%, transparent 65%); }
.blur-purple { background: radial-gradient(circle, #e01020 0%, transparent 65%); }
.blur-blue   { background: radial-gradient(circle, #e01020 0%, transparent 65%); }
.blur-silver { background: radial-gradient(circle, #e01020 0%, transparent 65%); }

.game-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── HEADER ── */
.game-header {
  padding: 2.5rem 2.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.game-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.game-num {
  font-family: var(--font-heading);
  color: var(--red);
  font-size: 1.2rem;
  opacity: 0.8;
}

.game-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.05em;
}

.game-rule {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

/* ── TABLE AREA ── */
.game-table {
  padding: 2rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dealer-msg {
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
  min-height: 1.4em;
}

.dealer-msg::before {
  content: '✦';
  color: var(--red);
  margin-right: 0.5rem;
  font-size: 0.8rem;
  font-style: normal;
}

.game-score-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.score-pill {
  background: rgba(255,255,255,0.05);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}

.score-val {
  color: var(--red);
  margin-left: 0.4rem;
}

.game-felt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 1.5rem 0;
  position: relative;
}

/* ── RESULT TEXT ── */
.game-result-container {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.game-result, .poker-rank, .roulette-result {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}

.result-win  { color: #5ad585; text-shadow: 0 0 15px rgba(90,213,133,0.4); }
.result-lose { color: var(--red); }
.result-bust { color: var(--red); }
.result-bj   { color: var(--red); text-shadow: 0 0 15px rgba(224,16,32,0.4); }
.result-push { color: #fff; }

/* ── CONTROLS ── */
.game-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.stretch-ctrl { width: 100%; }

.ctrl-group {
  display: flex;
  gap: 0.5rem;
}

.noct-btn {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.noct-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
}

.noc-solid {
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  box-shadow: 0 4px 15px rgba(224,16,32,0.3);
}

.noc-solid:hover:not(:disabled) {
  background: #c00d1b;
  border-color: #c00d1b;
  box-shadow: 0 6px 20px rgba(224,16,32,0.5);
  transform: translateY(-2px);
}

.noc-outline {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(224,16,32,0.3);
}

.noc-outline:hover:not(:disabled) {
  background: rgba(224,16,32,0.08);
  border-color: var(--red);
  transform: translateY(-2px);
}

.noc-ghost {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1);
}

.noc-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.full-width { width: 100%; }

/* ═══════════════════════════════════════
   PLAYING CARDS
═══════════════════════════════════════ */
.bj-zones {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.bj-zone {
  display: flex;
  justify-content: center;
}

.bj-hand, .poker-hand {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  min-height: 110px;
  flex-wrap: wrap;
}

.card {
  width: 76px;
  height: 108px;
  position: relative;
  transition: opacity 0.3s, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  border-radius: 6px;
  animation: dealIn 0.4s forwards;
  flex-shrink: 0;
}

.card:hover { transform: translateY(-10px) scale(1.05); z-index: 10; box-shadow: 0 15px 30px rgba(0,0,0,0.5); }

@keyframes dealIn {
  from { opacity: 0; transform: translateY(-40px) rotateX(20deg) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

.card-inner {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.card.flipped .card-inner { transform: rotateY(180deg); }

.card-back, .card-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 6px;
}

.card-back {
  background: linear-gradient(135deg, #160208, #0a0205);
  border: 1px solid rgba(224,16,32,0.6);
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(224,16,32,0.1) 5px, rgba(224,16,32,0.1) 6px),
    repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(224,16,32,0.1) 5px, rgba(224,16,32,0.1) 6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back::after {
  content: '✦';
  color: rgba(224,16,32,0.5);
  font-size: 20px;
}

.card-front {
  background: #fbfbfb;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.card-front.red-suit   { color: #d0002b; }
.card-front.black-suit { color: #111; }
.card-front.royal      { background: linear-gradient(135deg, #fbfbfb 0%, #e6d8ce 100%); }

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.card-corner.card-br { transform: rotate(180deg); margin-top: auto; align-self: flex-end; }

.card-rank { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 800; }
.card-suit-sym { font-size: 11px; }
.card-center-sym { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 28px; }

/* ═══════════════════════════════════════
   ROULETTE
═══════════════════════════════════════ */
.roulette-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

.roulette-wheel-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.roulette-pointer {
  color: var(--red);
  font-size: 1.5rem;
  position: absolute;
  top: -15px;
  filter: drop-shadow(0 0 5px var(--red));
  z-index: 10;
}

#roulette-wheel {
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(255,255,255,0.05),
    0 0 0 8px rgba(0,0,0,0.8),
    0 20px 50px rgba(0,0,0,0.7);
}

.roulette-side { width: 100%; }

.roulette-history-board {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.roulette-history-board span {
  font-size: 0.65rem;
  font-family: var(--font-heading);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.roulette-past { display: flex; gap: 0.5rem; min-height: 38px; }

.roulette-past-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.2), 0 5px 15px rgba(0,0,0,0.5);
}

.num-red   { background: linear-gradient(135deg, #ff3366, #990022); }
.num-black { background: linear-gradient(135deg, #444, #111); }
.num-green { background: linear-gradient(135deg, #33cc66, #006622); border-color: var(--red); }

.roulette-controls { flex-direction: column; gap: 1.5rem; }
.bet-row { display: flex; gap: 1rem; }

.noct-chip {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.noct-chip::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}

.noct-chip:hover { transform: scale(1.1) translateY(-2px); }

.noct-chip.selected {
  border-style: solid;
  border-color: var(--red);
  transform: scale(1.15) translateY(-5px);
  box-shadow: 0 10px 25px rgba(224,16,32,0.3);
}

.rb-red   { background: radial-gradient(circle at 30% 30%, #e6204a, #80001a); }
.rb-green { background: radial-gradient(circle at 30% 30%, #20e65b, #00661e); }
.rb-black { background: radial-gradient(circle at 30% 30%, #333, #0a0a0a); }

.chip-val { font-family: var(--font-heading); font-size: 0.7rem; color: #fff; letter-spacing: 0.05em; z-index: 2; }

/* ═══════════════════════════════════════
   BINGO
═══════════════════════════════════════ */
.bingo-felt-area { flex-direction: column; gap: 1.5rem; }

.bingo-display-board {
  text-align: center;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1rem 2rem;
  min-width: 150px;
}

.bingo-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
}

.bingo-called-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--red);
  text-shadow: 0 0 20px rgba(224,16,32,0.4);
  min-height: 3rem;
  line-height: 1;
}

.bingo-board-wrapper {
  background: rgba(255,255,255,0.02);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.bingo-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 260px;
}

.bingo-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 4px;
  color: rgba(255,255,255,0.6);
  transition: all 0.3s ease;
}

.bingo-header { background: transparent; border-color: transparent; color: var(--red); font-size: 1.1rem; box-shadow: none; }

.bingo-cell.called {
  background: rgba(224,16,32,0.2);
  border-color: rgba(224,16,32,0.5);
  color: #fff;
  transform: scale(0.95);
  box-shadow: inset 0 0 10px rgba(224,16,32,0.3);
}

.bingo-cell.bingo-win {
  background: rgba(224,16,32,0.3);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 15px rgba(224,16,32,0.4);
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0%   { box-shadow: 0 0 15px rgba(224,16,32,0.4); }
  50%  { box-shadow: 0 0 25px rgba(224,16,32,0.8); }
  100% { box-shadow: 0 0 15px rgba(224,16,32,0.4); }
}

/* ═══════════════════════════════════════
   SCRATCH CARD
═══════════════════════════════════════ */
.scratch-ticket-container {
  position: relative;
  width: 340px;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  border: 2px solid rgba(255,255,255,0.05);
}

.scratch-underlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a0505, #0a0202);
  gap: 0.5rem;
}

.scratch-trophy { font-size: 2rem; color: var(--red); opacity: 0.5; }

.scratch-prize-value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0 0.5rem;
  text-shadow: 0 0 20px rgba(224,16,32,0.5);
}

.scratch-prize-value.long { font-size: 0.8rem; letter-spacing: 0.04em; }

#scratch-canvas { position: absolute; inset: 0; cursor: crosshair; z-index: 5; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .game-header { padding: 2rem; }
  .game-table  { padding: 1.5rem 2rem 2rem; }
}

@media (max-width: 480px) {
  .games-grid-container { padding: 2rem 1rem 5rem; }
  .game-card   { border-radius: 16px; }
  .game-header { padding: 1.5rem; }
  .game-table  { padding: 1rem 1.5rem 1.5rem; }
  .scratch-ticket-container { width: 280px; height: 160px; }
  #scratch-canvas { width: 280px; height: 160px; }
}
