/* ============================================================
   ASIAN BIG WINNER — games.css
   Modal games: Poker · Roulette · Daily Draw
   ============================================================ */

/* === SVG GAME ICONS === */
.game-icon-svg {
  width: 64px; height: 64px;
  display: block; margin-bottom: 16px;
}

/* === MODAL OVERLAY === */
.game-modal {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(10,18,28,0.92);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.game-modal.open {
  opacity: 1; pointer-events: all;
}
.modal-box {
  background: #111e2b;
  border: 1px solid #2a3a4a;
  border-radius: 14px;
  width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: #2a3a4a; border: none; color: #aaa;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: #FF7700; color: #fff; }
.modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 28px; color: #FF7700;
  text-transform: uppercase; margin-bottom: 4px;
}
.modal-subtitle { font-size: 13px; color: #666; margin-bottom: 24px; }

/* BC balance bar */
.bc-bar {
  display: flex; align-items: center; gap: 10px;
  background: #0E1A26; border-radius: 6px; padding: 10px 16px;
  margin-bottom: 20px;
}
.bc-bar-label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 1px; }
.bc-bar-val {
  font-family: 'Space Mono', monospace;
  font-size: 18px; color: #FFCC00; font-weight: 700;
  margin-left: auto;
}
.bc-bar-icon { width: 20px; height: 20px; }

/* Message box */
.game-msg {
  text-align: center; padding: 10px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 600; min-height: 40px;
  margin-bottom: 16px; transition: all 0.3s;
}
.game-msg.win { background: rgba(27,94,32,0.2); color: #4caf50; border: 1px solid #2a5a2a; }
.game-msg.lose { background: rgba(204,34,0,0.15); color: #ff6b6b; border: 1px solid #5a1a1a; }
.game-msg.info { background: rgba(26,58,138,0.2); color: #7aa8ff; border: 1px solid #1a3a6a; }
.game-msg.empty { background: transparent; border: none; }

/* === POKER === */
.poker-table {
  background: radial-gradient(ellipse at center, #1a4a2a 0%, #0d2a18 100%);
  border: 3px solid #2a6a3a; border-radius: 60px;
  padding: 28px 24px; margin-bottom: 20px;
  position: relative;
}
.poker-label {
  font-size: 11px; color: #4a8a5a; text-transform: uppercase;
  letter-spacing: 1px; text-align: center; margin-bottom: 10px;
}
.cards-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.playing-card {
  width: 52px; height: 76px; background: #FDF8F0;
  border-radius: 6px; border: 1px solid #ccc;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; position: relative;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  font-family: 'Georgia', serif;
  transition: transform 0.2s;
}
.playing-card.face-down {
  background: linear-gradient(135deg, #1A3A8A 25%, #1a2a5a 75%);
  border-color: #2a4a9a;
}
.playing-card.face-down::after {
  content: '';
  position: absolute; inset: 4px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 3px;
  background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255,255,255,0.04) 4px, rgba(255,255,255,0.04) 8px);
}
.card-rank { font-size: 15px; font-weight: 700; line-height: 1; }
.card-suit { font-size: 20px; line-height: 1; margin-top: 2px; }
.card-rank.red, .card-suit.red { color: #CC2200; }
.card-rank.black, .card-suit.black { color: #1A2A3A; }
.card-rank-tl { position: absolute; top: 4px; left: 6px; font-size: 11px; font-weight: 700; line-height: 1.1; }
.card-rank-br { position: absolute; bottom: 4px; right: 6px; font-size: 11px; font-weight: 700; line-height: 1.1; transform: rotate(180deg); }

.poker-hand-rank {
  text-align: center; font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px; font-weight: 700; color: #FFCC00;
  margin: 8px 0; min-height: 28px; letter-spacing: 1px;
}
.poker-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.poker-bet-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.bet-chip {
  background: #1A2A3A; border: 2px solid #FF7700; color: #FF7700;
  border-radius: 50%; width: 44px; height: 44px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-family: 'Space Mono', monospace;
}
.bet-chip.active { background: #FF7700; color: #fff; }
.bet-chip:hover { transform: scale(1.1); }

/* === ROULETTE === */
.roulette-wrap { display: flex; flex-direction: column; align-items: center; }
.roulette-wheel-svg { display: block; margin: 0 auto 20px; }
.roulette-ball {
  transition: transform 0.05s linear;
  transform-origin: 130px 130px;
}
.roulette-bet-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-bottom: 16px; width: 100%;
}
.r-bet-btn {
  border: 1px solid #2a3a4a; border-radius: 6px;
  padding: 10px 4px; font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: center; transition: all 0.15s;
  background: #0E1A26; color: #ccc;
}
.r-bet-btn:hover { border-color: #FF7700; color: #FF7700; }
.r-bet-btn.active { background: #FF7700; color: #fff; border-color: #FF7700; }
.r-bet-btn.red-btn { color: #ff6b6b; border-color: #5a2a2a; }
.r-bet-btn.red-btn.active { background: #CC2200; border-color: #CC2200; color: #fff; }
.r-bet-btn.black-btn { color: #aaa; }
.r-bet-btn.black-btn.active { background: #333; border-color: #555; color: #fff; }
.r-bet-btn.green-btn { color: #4caf50; border-color: #1a3a1a; }
.r-bet-btn.green-btn.active { background: #1B5E20; border-color: #1B5E20; color: #fff; }
.roulette-result-num {
  font-family: 'Space Mono', monospace;
  font-size: 48px; font-weight: 700; text-align: center;
  min-height: 60px; margin: 8px 0; transition: all 0.3s;
}
.result-red { color: #CC2200; }
.result-black { color: #ccc; }
.result-green { color: #1B5E20; }

/* === DAILY DRAW === */
.draw-numbers-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px; margin-bottom: 20px;
}
.draw-num-btn {
  aspect-ratio: 1; border-radius: 50%;
  background: #0E1A26; border: 2px solid #2a3a4a;
  color: #aaa; font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: 'Space Mono', monospace;
}
.draw-num-btn:hover { border-color: #FF7700; color: #FF7700; }
.draw-num-btn.selected { background: #FF7700; border-color: #FF7700; color: #fff; }
.draw-num-btn.matched { background: #1B5E20; border-color: #4caf50; color: #fff; box-shadow: 0 0 12px rgba(76,175,80,0.4); }
.draw-num-btn.drawn { border-color: #FFCC00; color: #FFCC00; }
.draw-selected-info {
  text-align: center; font-size: 13px; color: #888;
  margin-bottom: 12px; min-height: 20px;
}
.draw-result-balls { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.draw-ball {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #FFCC00, #FF7700);
  color: #1A2A3A; font-family: 'Space Mono', monospace;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255,119,0,0.3);
  opacity: 0; transform: scale(0.5);
  transition: all 0.4s;
}
.draw-ball.revealed { opacity: 1; transform: scale(1); }
.draw-payout-table {
  width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px;
}
.draw-payout-table th { color: #666; font-weight: 500; padding: 6px 10px; text-align: left; border-bottom: 1px solid #1a2a3a; }
.draw-payout-table td { padding: 6px 10px; color: #aaa; border-bottom: 1px solid #1a2a3a; }
.draw-payout-table td:last-child { color: #FFCC00; font-family: 'Space Mono', monospace; font-weight: 700; text-align: right; }
.draw-payout-table tr.highlight td { color: #fff; background: rgba(255,119,0,0.1); }

/* === SHARED GAME BUTTONS === */
.game-btn {
  height: 48px; border: none; border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer; transition: opacity 0.2s, transform 0.15s;
  text-transform: uppercase;
}
.game-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.game-btn:active { transform: translateY(0); }
.game-btn-primary {
  background: linear-gradient(135deg, #FF7700, #FFAA00);
  color: #fff; width: 100%;
}
.game-btn-secondary {
  background: #1a2a3a; color: #aaa; border: 1px solid #2a3a4a;
  width: 100%; margin-top: 8px;
}
.game-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* === PLAY BUTTON on game card === */
.play-game-btn {
  display: none; /* shown after unlock */
  width: 100%; margin-top: 16px; padding: 10px;
  background: linear-gradient(135deg, #FF7700, #FFAA00);
  color: #fff; border: none; border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer; text-transform: uppercase;
  transition: opacity 0.2s;
}
.play-game-btn:hover { opacity: 0.9; }
.play-game-btn.visible { display: block; }

@media (max-width: 540px) {
  .modal-box { padding: 20px 16px; }
  .draw-numbers-grid { grid-template-columns: repeat(5, 1fr); }
  .roulette-bet-grid { grid-template-columns: repeat(3, 1fr); }
}
