/* ==============================================================================
 * Texas Hold'em Arena - PWA, 10-Max Casino, Shot Clock, Auto-Login & Theme
 * ============================================================================== */

:root {
  --bg-deep: #07090e;
  --table-felt: #0c3821;
  --table-felt-edge: #061c11;
  --table-rail: #2a1e13;
  --table-border: #4a3622;

  --accent-gold: #f59e0b;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;

  --card-bg: #ffffff;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  --card-red: #dc2626;
  --card-black: #0f172a;

  --font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: #f8fafc;
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 20%, #111726 0%, var(--bg-deep) 100%);
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

/* PWA Install Banner */
.pwa-install-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%);
  border-bottom: 1.5px solid #ec4899;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 40;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-icon {
  font-size: 20px;
}

.pwa-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.pwa-text strong {
  font-size: 11.5px;
  color: #fce7f3;
}

.pwa-text span {
  font-size: 9.5px;
  color: #cbd5e1;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-pwa-install {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.btn-pwa-dismiss {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
}

/* Header */
.game-header {
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 13, 20, 0.94);
  backdrop-filter: blur(10px);
  z-index: 25;
}

/* Game Mode Switcher Tabs */
.mode-switch-tabs {
  display: flex;
  background: rgba(10, 13, 20, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  gap: 8px;
}

.mode-tab {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(244, 63, 94, 0.3));
  border-color: #ec4899;
  color: #fce7f3;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}

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

.suit-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.6));
}

.brand-text h1 {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-text .subtitle {
  font-size: 9.5px;
  color: #94a3b8;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #0284c7;
  color: #38bdf8;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-btn:active { transform: scale(0.95); }

.pwa-header-btn {
  background: rgba(236, 72, 153, 0.18);
  border-color: #ec4899;
  color: #f472b6;
}

.ledger-toggle-btn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #d97706;
  color: #fbbf24;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ledger-toggle-btn:active { transform: scale(0.95); }

/* Multi-play Simulator Bar */
.multi-sim-bar {
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.multi-sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-badge {
  color: #38bdf8;
  font-size: 10px;
  font-weight: 800;
}

.room-status-tag {
  color: #a5b4fc;
  font-size: 9.5px;
  font-weight: 700;
}

.sim-buttons-row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sim-btn {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-btn:hover {
  background: #334155;
  border-color: #38bdf8;
}

.sim-btn-reset {
  border-color: #f59e0b;
  color: #fef08a;
}

/* Live Ticker Board (상단 실시간 전광판) */
.live-ticker-board {
  background: rgba(8, 11, 18, 0.95);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.ticker-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  border-radius: 4px;
  padding: 1px 5px;
}

.ticker-dot {
  width: 5px;
  height: 5px;
  background: #ef4444;
  border-radius: 50%;
  animation: blinkLive 1s infinite alternate;
}

@keyframes blinkLive {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.ticker-title {
  font-size: 8.5px;
  font-weight: 900;
  color: #f87171;
  letter-spacing: 0.5px;
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-message {
  font-size: 10.5px;
  color: #fef08a;
  display: inline-block;
  animation: fadeTickerMsg 0.4s ease-out;
}

@keyframes fadeTickerMsg {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ticker-quick-rank {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* Tournament Blind & Hand Status Strip */
.tournament-status-strip {
  background: rgba(8, 12, 22, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 10px;
}

.tourney-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.t-label {
  color: #94a3b8;
  font-size: 9px;
}

.t-val {
  font-weight: 800;
}

.text-gold { color: #f59e0b; }
.text-cyan { color: #38bdf8; }

.tourney-divider {
  color: rgba(255, 255, 255, 0.15);
}

/* Dealer Voice Bar */
.dealer-host-bar {
  padding: 5px 12px;
  background: rgba(18, 24, 38, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dealer-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid #ec4899;
  border-radius: 12px;
  padding: 1px 6px;
}

.dealer-avatar {
  font-size: 10px;
  font-weight: 900;
  color: #ec4899;
}

.dealer-title {
  font-size: 9.5px;
  font-weight: 800;
  color: #f472b6;
}

.dealer-announcement {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  color: #fef08a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Table Area */
.table-container {
  flex: 1;
  padding: 4px 6px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.poker-table-10max,
.poker-table-6max {
  width: 100%;
  height: 480px;
  background: radial-gradient(ellipse at center, var(--table-felt) 0%, var(--table-felt-edge) 82%);
  border: 7px solid var(--table-border);
  border-radius: 100px;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.85), 0 10px 30px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: visible;
}

/* Seats Container */
.seats-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Seat Node Generic */
.seat-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  transition: all 0.25s ease;
}

/*
 * 10 Seats Positioning Around Oval Table:
 * Seat 0: Hero (Bottom Center)
 * Seat 1: 악어 (Bottom Left)
 * Seat 2: 늑대 (Middle Left)
 * Seat 3: 독사 (Upper Left)
 * Seat 4: 황금돼지 (Top Left)
 * Seat 5: 바위 (Top Center)
 * Seat 6: 곰 (Top Right)
 * Seat 7: 매 (Upper Right)
 * Seat 8: 사자 (Middle Right)
 * Seat 9: 여우 (Bottom Right)
 */
.seat-pos-5 { top: 6px; left: 50%; transform: translateX(-50%); }
.seat-pos-4 { top: 26px; left: 14px; }
.seat-pos-6 { top: 26px; right: 14px; }
.seat-pos-3 { top: 106px; left: 2px; }
.seat-pos-7 { top: 106px; right: 2px; }
.seat-pos-2 { bottom: 110px; left: 2px; }
.seat-pos-8 { bottom: 110px; right: 2px; }
.seat-pos-1 { bottom: 30px; left: 12px; }
.seat-pos-9 { bottom: 30px; right: 12px; }
.seat-hero  { bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 22; }

/* Turn Indicator */
.seat-turn-indicator {
  font-size: 8.5px;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.25);
  border: 1px solid #38bdf8;
  border-radius: 8px;
  padding: 1px 5px;
  margin-bottom: 2px;
  animation: pulseTurn 0.8s infinite alternate ease-in-out;
}

@keyframes pulseTurn {
  from { opacity: 0.7; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1.05); }
}

/* Waiting Tag */
.seat-waiting-tag {
  font-size: 8px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 1px 4px;
  margin-bottom: 2px;
}

/* Active Turn Highlighting */
.is-active-turn .seat-badge {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.95), inset 0 0 8px rgba(56, 189, 248, 0.4) !important;
}

.is-active-turn .seat-turn-indicator {
  display: block !important;
}

/* Folded State */
.is-folded .seat-badge {
  opacity: 0.4;
  filter: grayscale(70%);
}

.is-folded .seat-cards {
  opacity: 0.25;
}

/* Seat Badge */
.seat-badge {
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 2px 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  max-width: 88px;
}

.seat-avatar {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seat-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.seat-title-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.seat-name {
  font-size: 9.5px;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48px;
}

.seat-chips-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.seat-chips {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-gold);
}

.seat-profit {
  font-size: 8px;
  font-weight: 700;
}

.profit-plus { color: #34d399; }
.profit-minus { color: #f87171; }
.profit-neutral { color: #94a3b8; }

/* Position Badges */
.pos-badge {
  font-size: 7.5px;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 3px;
  letter-spacing: 0.2px;
}

.pos-btn { background: #d97706; color: #000; }
.pos-sb { background: #2563eb; color: #fff; }
.pos-bb { background: #dc2626; color: #fff; }
.pos-utg { background: #475569; color: #f1f5f9; }
.pos-mp { background: #64748b; color: #f1f5f9; }
.pos-co { background: #7c3aed; color: #fff; }
.pos-hj { background: #0284c7; color: #fff; }

.last-tag {
  background: #dc2626;
  color: #fff;
  font-size: 7px;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 3px;
  animation: pulseLast 1s infinite alternate;
}

@keyframes pulseLast {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* Seat Cards */
.seat-cards {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.mini-card {
  width: 13px;
  height: 18px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.card-back {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e1b4b 100%);
  border: 1px solid #3b82f6;
}

/* Action Tag & Bet Chip */
.action-tag {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 8px;
  margin-top: 2px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.action-fold { background: #475569; color: #cbd5e1; }
.action-check { background: #0284c7; color: #e0f2fe; }
.action-call { background: #16a34a; color: #dcfce7; }
.action-raise { background: #dc2626; color: #fee2e2; }
.action-allin { background: #db2777; color: #fce7f3; animation: pulseTurn 0.6s infinite alternate; }

.table-bet-chip {
  position: absolute;
  top: -12px;
  font-size: 8.5px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.85);
  color: #fef08a;
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  padding: 1px 5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Reaction Speech Bubble Pop */
.seat-reaction-bubble {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  border: 1.5px solid #ec4899;
  border-radius: 12px;
  padding: 2px 6px;
  white-space: nowrap;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.6);
  animation: popBubble 2.5s forwards ease-out;
}

@keyframes popBubble {
  0% { transform: translate(-50%, 8px) scale(0.5); opacity: 0; }
  15% { transform: translate(-50%, -4px) scale(1.15); opacity: 1; }
  80% { transform: translate(-50%, -6px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -14px) scale(0.8); opacity: 0; }
}

/* Hero Seat Specifics */
.seat-hero .hero-badge {
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
  max-width: 140px;
  padding: 3px 8px;
}

.hero-avatar {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 900;
  width: 24px;
  height: 24px;
}

.hero-name {
  font-size: 11px;
  color: #fef08a;
  max-width: 100px;
}

.hero-hand-cards {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.hero-hand-cards .card {
  width: 38px;
  height: 54px;
  border-radius: 6px;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 3px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.hero-hand-cards .card.red-suit { color: var(--card-red); }
.hero-hand-cards .card.black-suit { color: var(--card-black); }

/* 4-Color Deck (포커스타즈 / WSOP 국제 표준 4색 덱: ♠ 블랙 / ♥ 레드 / ♦ 블루 / ♣ 그린) */
.card.suit-spades, .mini-card.suit-spades { color: #0f172a !important; }
.card.suit-hearts, .mini-card.suit-hearts { color: #e11d48 !important; }
.card.suit-diamonds, .mini-card.suit-diamonds { color: #2563eb !important; }
.card.suit-clubs, .mini-card.suit-clubs { color: #16a34a !important; }

.hero-rank-tag {
  font-size: 9px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid #0284c7;
  border-radius: 8px;
  padding: 1px 6px;
  margin-top: 2px;
}

/* Center Board */
.center-board {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 5;
}

.pot-box {
  background: rgba(0, 0, 0, 0.65);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  border-radius: 12px;
  padding: 2px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pot-title {
  font-size: 8.5px;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.pot-num {
  font-size: 13.5px;
  font-weight: 900;
  color: #fbbf24;
}

.community-cards-tray {
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.community-cards {
  display: flex;
  gap: 4px;
}

.community-cards .card {
  width: 32px;
  height: 48px;
  border-radius: 5px;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 3px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.community-cards .card.red-suit { color: var(--card-red); }
.community-cards .card.black-suit { color: var(--card-black); }

.card.empty-slot {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-label {
  font-size: 7px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
}

.card-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.card-center-suit {
  align-self: center;
  font-size: 14px;
  line-height: 1;
}

.round-indicator-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.round-indicator {
  font-size: 8.5px;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid #0284c7;
  border-radius: 8px;
  padding: 1px 6px;
}

.turn-order-hint {
  font-size: 8px;
  color: #94a3b8;
  font-weight: 700;
}

/* Coach Intelligence Strip */
.coach-strip {
  margin: 4px 8px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.coach-strip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coach-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #f472b6;
}

.pot-odds-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #38bdf8;
}

.coach-strip-msg {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

/* Footer & Action Controls */
.action-footer {
  padding: 6px 8px 10px;
  background: rgba(10, 13, 20, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 30;
}

/* Shot Clock Strip */
.shot-clock-strip {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #ef4444;
  border-radius: 8px;
  padding: 3px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shot-clock-info {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  font-weight: 800;
}

.shot-clock-label { color: #f87171; }
.shot-clock-sec { color: #fef08a; }

.shot-clock-track {
  width: 100%;
  height: 4px;
  background: #334155;
  border-radius: 4px;
  overflow: hidden;
}

.shot-clock-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 60%, #ef4444 100%);
  width: 100%;
  transition: width 0.9s linear;
}

/* Pre-Action Reservation Strip */
.pre-action-strip {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.pre-action-label {
  color: #38bdf8;
  font-weight: 800;
  font-size: 9.5px;
}

.pre-action-options {
  display: flex;
  gap: 12px;
}

.pre-opt {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e1;
  font-weight: 700;
  cursor: pointer;
}

.pre-opt input {
  accent-color: #38bdf8;
  cursor: pointer;
}

/* Raise / Bet Panel Drawer */
.raise-panel-drawer {
  background: rgba(12, 16, 28, 0.98);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
}

.raise-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.raise-title-group {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 800;
}

.raise-amount-tag strong {
  font-size: 14px;
  color: var(--accent-gold);
  font-weight: 900;
}

.raise-panel-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
}

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

.preset-btn {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 1px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.preset-btn:hover, .preset-btn:active {
  background: #d97706;
  color: #000;
  border-color: var(--accent-gold);
}

.raise-steppers-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.step-btn {
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 3px;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
}

.step-btn:hover { background: #1e293b; }

.raise-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-limit {
  font-size: 8.5px;
  color: #94a3b8;
  font-weight: 700;
}

#heroRaiseSlider {
  flex: 1;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.btn-confirm-raise {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #000;
  font-weight: 900;
  font-size: 12px;
  padding: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Main Action Buttons Row */
.hero-action-buttons {
  display: grid;
  grid-template-columns: 0.6fr 1fr 1fr 1.2fr;
  gap: 5px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-ko { font-size: 11.5px; font-weight: 800; }
.btn-en { font-size: 7.5px; opacity: 0.8; }

.btn-reaction {
  background: #1e293b;
  color: #ec4899;
  border: 1px solid #ec4899;
}

.btn-fold {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  color: #fecaca;
  border: 1px solid #b91c1c;
}

.btn-check {
  background: linear-gradient(135deg, #065f46, #047857);
  color: #a7f3d0;
  border: 1px solid #059669;
}

.btn-raise {
  background: linear-gradient(135deg, #be185d, #db2777);
  color: #fce7f3;
  border: 1px solid #f472b6;
}

.btn-start-deal {
  grid-column: 2 / -1;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid #fbbf24;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-start-deal.hidden {
  display: none !important;
}

/* Modals & Overlays - Mobile Fixed Centering & No Cut-off */
.modal-overlay,
.rebuy-modal-overlay,
.login-modal-overlay,
.invite-modal-overlay,
.reaction-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 10000 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

.modal-overlay.hidden,
.rebuy-modal-overlay.hidden,
.login-modal-overlay.hidden,
.invite-modal-overlay.hidden,
.reaction-modal-overlay.hidden {
  display: none !important;
}

.modal-card,
.rebuy-modal-card,
.login-modal-card,
.invite-modal-card,
.reaction-picker-card {
  background: #111827 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  border-radius: 16px !important;
  padding: 20px 18px !important;
  width: 100% !important;
  max-width: 380px !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95), 0 0 25px rgba(245, 158, 11, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  margin: auto !important;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

.modal-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.4;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-form-group label {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 700;
}

.login-form-group input {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.login-form-group input:focus {
  border-color: #38bdf8;
}

.auto-login-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #94a3b8;
  cursor: pointer;
}

.btn-login-submit {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #000;
  font-weight: 900;
  font-size: 13px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Custom Invite Modal */
.invite-input-row {
  display: flex;
  gap: 6px;
}

.invite-input-row input {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
}

.btn-gen-invite {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.invite-divider {
  text-align: center;
  font-size: 10px;
  color: #64748b;
}

.btn-copy-common-invite {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #0284c7;
  padding: 8px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.btn-close-invite {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}

.loan-terms {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.term-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
}

.text-danger { color: #f87171; font-weight: 800; }
.text-success { color: #34d399; font-weight: 800; }

.btn-loan-confirm {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #000;
  font-weight: 900;
  font-size: 12.5px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Reaction Modal */
.reaction-picker-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #f472b6;
}

.btn-close-reaction {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
}

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

.emoji-btn {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 20px;
  padding: 5px 0;
  cursor: pointer;
  transition: transform 0.15s;
}

.emoji-btn:active { transform: scale(1.2); }

.phrases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.phrase-btn {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 6px;
  text-align: left;
  cursor: pointer;
}

.phrase-btn:active {
  background: #ec4899;
  color: #000;
}

/* Ledger Drawer */
.ledger-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 13, 20, 0.96);
  backdrop-filter: blur(12px);
  z-index: 90;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.l-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #fff;
}

.l-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset-ledger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-close-ledger {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.ledger-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.ledger-table th {
  text-align: left;
  color: #94a3b8;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 9px;
}

.ledger-table td {
  padding: 7px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ledger-footer-note {
  margin-top: auto;
  font-size: 9px;
  color: #94a3b8;
  line-height: 1.4;
  padding-top: 8px;
}

/* Super Admin Console Drawer */
.admin-header-btn {
  background: rgba(236, 72, 153, 0.18);
  border-color: #ec4899;
  color: #f472b6;
}

.admin-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 13, 22, 0.98);
  backdrop-filter: blur(14px);
  z-index: 95;
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #ec4899;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.admin-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #f472b6;
  font-weight: 900;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-lock-admin {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-close-admin {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
}

.admin-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-section {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-section h4 {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
}

.admin-input-group {
  display: flex;
  gap: 6px;
}

.admin-input-group input {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  padding: 6px 8px;
  font-size: 11px;
  outline: none;
}

.admin-btn {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-btn:hover {
  background: #334155;
  border-color: #38bdf8;
}

.btn-admin-danger {
  border-color: #ef4444;
  color: #f87171;
}

.admin-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.hidden {
  display: none !important;
}
