/* css/styles.css - Poker Duel Mobile & Desktop Optimized Styling */

:root {
  --bg-felt: #0d3824;
  --bg-felt-dark: #072215;
  --table-border: #8b6b23;
  --table-border-light: #d4af37;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --yellow-assist: #fbbf24;
  --yellow-assist-glow: rgba(251, 191, 36, 0.6);
  --card-width: clamp(48px, 14vw, 66px);
  --card-height: clamp(68px, 20vw, 94px);
  --card-radius: 6px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  height: 100%;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  background: radial-gradient(circle at center, #1b4d36 0%, #0c2518 70%, #05130b 100%);
  font-family: var(--font-family);
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

/* Header / Navigation */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  height: 44px;
  flex-shrink: 0;
  z-index: 50;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-title {
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #fbd38d 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.room-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 16px;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
}

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

.icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.icon-btn:hover, .icon-btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* Main Casino Arena */
.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 8px;
  position: relative;
  min-height: 0;
}

/* The Poker Table Oval */
.poker-table {
  flex: 1;
  min-height: 0;
  background: radial-gradient(ellipse at center, #155e3a 0%, #0d3d25 60%, #082617 100%);
  border: 8px solid #3d2314;
  outline: 2.5px solid #d4af37;
  border-radius: 40px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), inset 0 0 35px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 12px;
  position: relative;
  overflow: hidden;
}

/* Watermark */
.poker-table::before {
  content: 'POKER DUEL';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.025);
  letter-spacing: 4px;
  pointer-events: none;
}

/* Centered Player Pods */
.player-pod {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.player-info-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.9);
  padding: 4px 12px;
  border-radius: 22px;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  min-width: 140px;
  transition: all 0.25s ease;
}

.player-info-card.active-turn {
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.7);
  transform: scale(1.02);
}

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.avatar-dad {
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.player-details {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: #f8fafc;
  white-space: nowrap;
}

.player-chips {
  color: #facc15;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
}

.bet-badge {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #fbbf24;
  color: #fef08a;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Card Container */
.cards-row {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* Poker Cards */
.poker-card {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-radius);
  perspective: 1000px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.poker-card.medium {
  width: var(--card-width);
  height: var(--card-height);
}

.poker-card.large {
  width: clamp(64px, 20vw, 84px);
  height: clamp(92px, 28vw, 120px);
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
}

.card-front, .card-back {
  width: 100%;
  height: 100%;
  border-radius: var(--card-radius);
  position: absolute;
  backface-visibility: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.card-front {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3px 4px;
  color: #1e293b;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-front.custom-art-card {
  background-size: cover;
  background-position: center;
  border: 1.5px solid #d4af37;
  position: relative;
}

.card-art-overlay {
  display: none !important;
}

.card-front.custom-art-card .corner {
  position: absolute;
  z-index: 10;
  background: rgba(15, 23, 42, 0.75);
  padding: 1px 3px;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fef08a;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  line-height: 1.05;
}

.card-front.custom-art-card .corner.top-left {
  top: 2px;
  left: 2px;
  bottom: auto;
  right: auto;
}

.card-front.custom-art-card .corner.bottom-right {
  bottom: 2px;
  right: 2px;
  top: auto;
  left: auto;
  transform: rotate(180deg);
}

.card-front.food-card {
  background: #fdfbf7;
  border: 1.5px solid #d4af37;
}

.center-food {
  font-size: clamp(1.4rem, 4vw, 2rem);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.card-front.red-suit { color: #dc2626; }
.card-front.black-suit { color: #181824; }

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

.corner.top-left {
  align-self: flex-start;
}

.corner.bottom-right {
  align-self: flex-end;
  transform: rotate(180deg);
}

.card-rank { font-weight: 800; font-size: clamp(0.7rem, 2.2vw, 0.9rem); }
.card-suit { font-size: clamp(0.6rem, 1.8vw, 0.75rem); }

.card-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.center-suit { font-size: clamp(1.1rem, 3.5vw, 1.5rem); }

.card-back {
  background: #991b1b;
  border: 1.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-pattern {
  width: 86%;
  height: 86%;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  background: repeating-linear-gradient(45deg, #7f1d1d, #7f1d1d 3px, #991b1b 3px, #991b1b 6px);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-logo {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

/* Glowing winning cards */
.poker-card.highlighted {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 0 12px 2px #fbbf24, 0 4px 12px rgba(0,0,0,0.5);
  z-index: 20;
}
.poker-card.highlighted .card-front {
  border: 2px solid #fbbf24;
}

/* Center Table Area */
.table-center-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  z-index: 10;
}

.house-dealer-badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #fef08a;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pot-display {
  background: rgba(0, 0, 0, 0.75);
  border: 1.5px solid #d4af37;
  padding: 2px 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.pot-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.pot-amount {
  font-size: 1.05rem;
  font-weight: 800;
  color: #facc15;
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.5);
}

/* Community 5 Slots */
.community-cards-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.slots-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.community-slots-row {
  display: flex;
  gap: clamp(3px, 1vw, 6px);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-slot {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-radius);
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.3);
  position: relative;
}

.card-slot.filled {
  border: 1.5px solid transparent;
  background: transparent;
}

.slot-number { font-weight: 700; font-size: 0.78rem; }

/* Showdown On-Table Victory Banner */
.showdown-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.98);
  border: 2px solid #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.6), 0 15px 35px rgba(0, 0, 0, 0.85);
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 150;
  text-align: center;
  width: 90%;
  max-width: 360px;
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.showdown-trophy { font-size: 1.8rem; }
.showdown-title { font-size: 1.15rem; font-weight: 900; color: #fde047; }
.showdown-desc { font-size: 0.88rem; color: #f8fafc; font-weight: 700; }

.btn-pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Active Card Draft Dock (Draggable Modal / Dock) */
.draft-spotlight-tray {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.96);
  border: 2px solid #fbbf24;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85), 0 0 16px rgba(251, 191, 36, 0.5);
  border-radius: 14px;
  padding: 4px 12px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 120;
  backdrop-filter: blur(8px);
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.draft-spotlight-tray.is-dragging {
  cursor: grabbing;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95), 0 0 24px rgba(251, 191, 36, 0.8);
  opacity: 0.96;
}

.draft-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 2px 0 4px 0;
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  color: #fbbf24;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.75px;
  opacity: 0.85;
  cursor: grab;
}

.draft-drag-handle:hover {
  opacity: 1;
}

.draft-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.draft-card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.draft-info-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.draft-header {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fde047;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.draft-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-keep {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4);
  transition: transform 0.15s ease;
  white-space: nowrap;
}

.btn-keep:hover, .btn-keep:active {
  transform: scale(1.05);
}

.btn-discard {
  flex: 1;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4);
  transition: transform 0.15s ease;
  white-space: nowrap;
}

.btn-discard:hover, .btn-discard:active {
  transform: scale(1.05);
}

.draft-waiting {
  font-size: 0.74rem;
  color: #94a3b8;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =========================================================
   10-TIER HAND ASSIST HUD & ACTION CONTROLS
   ========================================================= */
.hand-assist-hud {
  width: 100%;
  background: rgba(10, 15, 29, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 10px;
  padding: 4px 10px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

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

.assist-hand-name {
  font-size: clamp(0.78rem, 2.8vw, 0.95rem);
  font-weight: 800;
  color: #fef08a;
  text-shadow: 0 0 6px rgba(254, 240, 138, 0.5);
}

.meter-segments-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  width: 100%;
}

.meter-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.segment-bar {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.meter-segment.active .segment-bar {
  background: linear-gradient(180deg, #fef08a 0%, #facc15 50%, #eab308 100%);
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.7);
  border-color: #fef08a;
}

.meter-segment.current-tier .segment-bar {
  background: linear-gradient(180deg, #ffffff 0%, #fde047 50%, #f59e0b 100%);
  box-shadow: 0 0 10px 1px rgba(254, 240, 138, 0.95);
  transform: scaleY(1.3);
}

.seg-label {
  font-size: 0.52rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.meter-segment.active .seg-label { color: #cbd5e1; }
.meter-segment.current-tier .seg-label {
  color: #fef08a;
  font-weight: 800;
}

/* Action Controls Bar */
.action-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.94);
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.action-buttons-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.btn-action {
  flex: 1;
  padding: 9px 8px;
  border-radius: 8px;
  font-weight: 800;
  font-size: clamp(0.76rem, 2.5vw, 0.88rem);
  border: none;
  cursor: pointer;
  color: white;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-fold { background: linear-gradient(135deg, #dc2626, #991b1b); }
.btn-fold:not(:disabled):hover { background: #ef4444; }

.btn-check-call { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.btn-check-call:not(:disabled):hover { background: #3b82f6; }

.btn-bet-raise { background: linear-gradient(135deg, #d97706, #b45309); }
.btn-bet-raise:not(:disabled):hover { background: #f59e0b; }

.btn-allin { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.btn-allin:not(:disabled):hover { background: #8b5cf6; }

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

.bet-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: #334155;
}

.bet-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #facc15;
  cursor: pointer;
}

.bet-presets { display: flex; gap: 3px; }
.preset-chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 5px;
  border-radius: 5px;
  cursor: pointer;
}
.preset-chip:hover { background: rgba(255, 255, 255, 0.25); }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #0f172a;
  border: 2px solid #d4af37;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  position: relative;
}

.modal-title { font-size: 1.2rem; font-weight: 800; color: #fde047; margin-bottom: 6px; text-align: center; }
.modal-desc { color: #94a3b8; font-size: 0.82rem; margin-bottom: 14px; text-align: center; }

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  width: 100%;
  min-height: 42px;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-secondary {
  background: #334155;
  color: #e2e8f0;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  width: 100%;
  min-height: 38px;
  margin-top: 6px;
}

.modal-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
}

.toast-container {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
  width: 90%;
  max-width: 340px;
}

.toast {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid #fbbf24;
  color: #fef08a;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  animation: toastFade 3s forwards;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateY(10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1500;
}

/* =========================================================
   MOBILE PORTRAIT SPECIFIC OPTIMIZATIONS (<= 600px)
   ========================================================= */
@media (max-width: 600px) {
  .poker-table {
    border-width: 5px;
    border-radius: 28px;
    padding: 6px 6px;
  }

  .player-pod {
    gap: 6px;
  }

  .player-info-card {
    min-width: 110px;
    padding: 3px 8px;
    gap: 6px;
  }

  .player-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }

  .player-name { font-size: 0.75rem; }
  .draft-spotlight-tray {
    top: 13%;
    padding: 6px 10px;
    gap: 8px;
    max-width: 90%;
  }

  .draft-header { font-size: 0.72rem; }
  .btn-keep, .btn-discard { font-size: 0.76rem; padding: 6px 10px; }

  .seg-label { font-size: 0.46rem; }

  .action-buttons-row {
    gap: 4px;
  }

  .btn-action {
    padding: 8px 4px;
    font-size: 0.76rem;
  }
}

/* =========================================================
   ARCADE GAME SELECTION LOBBY & GAME MODALS
   ========================================================= */

.game-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.game-select-card {
  background: rgba(30, 41, 59, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-select-card:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(251, 191, 36, 0.6);
  transform: translateY(-2px);
}

.game-select-card.selected {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.game-select-card .game-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.game-select-card .game-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fef08a;
  line-height: 1.1;
}

.game-select-card .game-subtitle {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.1;
}

/* Busted / Caught in a Lie Banner */
.busted-banner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(127, 29, 29, 0.98);
  border: 3px solid #ef4444;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.8), 0 15px 40px rgba(0,0,0,0.9);
  border-radius: 18px;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  z-index: 300;
  width: 90%;
  max-width: 380px;
  animation: alarmPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alarmPop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.busted-icon { font-size: 2.2rem; animation: pulse 0.8s infinite; }
.busted-title { font-size: 1.3rem; font-weight: 900; color: #fee2e2; text-shadow: 0 0 10px rgba(239, 68, 68, 0.8); }
.busted-desc { font-size: 0.88rem; color: #fecaca; font-weight: 700; line-height: 1.3; }

/* Go Fish Ranks Grid */
.gofish-ranks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.btn-gofish-rank {
  background: #1e293b;
  border: 1.5px solid #fbbf24;
  color: #fef08a;
  font-size: 1.1rem;
  font-weight: 900;
  padding: 12px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-gofish-rank:hover {
  background: #334155;
  transform: scale(1.08);
}

/* Wild Suit Grid */
.wild-suit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.btn-wild-suit {
  background: #1e293b;
  border: 1.5px solid #d4af37;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 800;
  padding: 14px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-wild-suit:hover {
  background: #f59e0b;
  color: black;
  transform: translateY(-2px);
}

/* Spades Bid Grid */
.spades-bid-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.btn-spades-bid {
  background: #1e293b;
  border: 1px solid #475569;
  color: #f1f5f9;
  font-size: 1rem;
  font-weight: 800;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-spades-bid:hover {
  background: #3b82f6;
  border-color: #60a5fa;
}

/* Center Arcade Stage */
.center-arcade-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.75);
  padding: 10px 20px;
  border-radius: 20px;
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  margin: 4px auto;
  max-width: 95%;
}

/* Crazy 8s Arena */
.crazy8-center-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.crazy8-stock-pile, .crazy8-discard-pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.deck-count-badge {
  background: rgba(30, 41, 59, 0.9);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
}

.active-suit-badge {
  background: rgba(30, 41, 59, 0.95);
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid #fbbf24;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Ocean Pond for Go Fish */
.ocean-pond-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.ocean-pond-graphic {
  font-size: 2.2rem;
  animation: floatFish 3s ease-in-out infinite alternate;
}

@keyframes floatFish {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-6px) rotate(3deg); }
}

.ocean-pond-count {
  font-size: 0.8rem;
  color: #93c5fd;
  font-weight: 700;
}

.turn-announcement {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fde047;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Card Playable Pulse Highlight */
.card-playable-pulse {
  animation: playablePulse 1.8s infinite ease-in-out !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.8), 0 4px 10px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-4px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-playable-pulse:hover {
  transform: translateY(-10px) scale(1.06) !important;
  box-shadow: 0 0 24px rgba(34, 197, 94, 1), 0 8px 18px rgba(0, 0, 0, 0.7) !important;
}

@keyframes playablePulse {
  0% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 22px rgba(34, 197, 94, 0.95); }
  100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
}

/* =========================================================================
   4-PLAYER TABLE & WEBRTC VIDEO/VOICE AV STYLES
   ========================================================================= */

.poker-table.table-layout-4p {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(80px, 130px) 1fr minmax(80px, 130px);
  grid-template-areas:
    "top top top"
    "left center right"
    "bottom bottom bottom";
  align-items: center;
  justify-items: center;
  gap: 4px;
}

.pod-top { grid-area: top; width: 100%; }
.pod-bottom { grid-area: bottom; width: 100%; }
.pod-left { grid-area: left; flex-direction: column; width: 100%; max-width: 130px; }
.pod-right { grid-area: right; flex-direction: column; width: 100%; max-width: 130px; }
.table-center-area { grid-area: center; width: 100%; }

/* AV Video Elements & Avatar Wrapper */
.player-avatar-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pod-video-element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: none;
  background: #0f172a;
}

.avatar-video-active .pod-video-element {
  display: block;
}

/* Speaking Halo Pulse */
.player-pod.is-speaking .player-avatar-wrapper {
  box-shadow: 0 0 0 3px #10b981, 0 0 16px rgba(16, 185, 129, 0.9) !important;
  animation: speakingGlow 1s ease-in-out infinite alternate;
}

.player-pod.is-speaking .player-info-card {
  border-color: #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6) !important;
}

@keyframes speakingGlow {
  0% { box-shadow: 0 0 0 2px #10b981, 0 0 8px rgba(16, 185, 129, 0.6); }
  100% { box-shadow: 0 0 0 4px #10b981, 0 0 20px rgba(16, 185, 129, 1); }
}

/* Spectator Badge */
.spectator-badge {
  background: rgba(147, 51, 234, 0.35);
  border: 1px solid #a855f7;
  color: #d8b4fe;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Roster List in Modal */
.roster-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  margin-bottom: 4px;
}

.roster-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-seat { background: #3b82f6; color: white; }
.badge-spectator { background: #a855f7; color: white; }

@media (max-width: 600px) {
  .poker-table.table-layout-4p {
    grid-template-columns: minmax(70px, 90px) 1fr minmax(70px, 90px);
    padding: 4px 6px;
  }
  .player-info-card {
    min-width: 100px;
    padding: 3px 6px;
    font-size: 0.75rem;
  }
  .player-avatar-wrapper {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
}

