* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0a5c2e; font-family: 'Nunito', sans-serif; min-height: 100vh; display: flex; flex-direction: column; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; background: rgba(0,0,0,0.35); border-bottom: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; gap: 0.5rem; }
.btn-back { color: rgba(255,255,255,0.7); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.btn-back:hover { color: #fff; }
.game-title { font-size: 1.1rem; font-weight: 800; color: #fff; }
.stats { display: flex; gap: 1rem; font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,0.7); }

.game-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 1rem; max-width: 700px; margin: 0 auto; width: 100%; }

/* MULTIPLAYER STATUS */
.multiplayer-status { width: 100%; margin-bottom: 0.5rem; }
.mp-section { background: rgba(0,0,0,0.4); border-radius: 12px; padding: 0.8rem; border: 1px solid rgba(255,215,0,0.3); }
.mp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.5rem; }
.mp-badge { background: #ffd700; color: #222; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 800; }
.mp-status { font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.6); }
.mp-status.connected { color: #81c784; }
.mp-room-info { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.mp-room-url { flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; padding: 0.4rem 0.6rem; color: #fff; font-size: 0.75rem; }
.mp-actions { display: flex; gap: 0.5rem; }

/* TABLE */
.poker-table { width: 100%; background: radial-gradient(ellipse at center, #1a7a40 0%, #0f5c2a 70%, #0a4a20 100%); border-radius: 24px; border: 8px solid #5a3a1a; box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 2px 8px rgba(255,255,255,0.05); padding: 1rem; margin-bottom: 1rem; }

/* COMMUNITY CARDS */
.community-area { text-align: center; margin: 0.8rem 0; }
.community-label { font-size: 0.7rem; font-weight: 800; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.community-cards { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* POT */
.pot-area { text-align: center; margin: 0.5rem 0; }
.pot-display { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(0,0,0,0.35); border-radius: 999px; padding: 0.35rem 1rem; font-size: 0.9rem; font-weight: 800; color: #ffd700; }

/* CPU PLAYERS */
.opponents-row { display: flex; justify-content: space-around; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.opponent { background: rgba(0,0,0,0.3); border-radius: 14px; padding: 0.6rem 0.8rem; min-width: 90px; text-align: center; border: 2px solid transparent; transition: border-color 0.2s; }
.opponent.active-turn { border-color: #ffd700; box-shadow: 0 0 12px rgba(255,215,0,0.4); animation: turn-pulse 1s infinite alternate; }

@keyframes turn-pulse {
  from { box-shadow: 0 0 12px rgba(255,215,0,0.4); }
  to { box-shadow: 0 0 20px rgba(255,215,0,0.6); }
}

/* Phase indicator */
.phase-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.4);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.3);
}

.phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.phase-dot.active {
  background: #ffd700;
  box-shadow: 0 0 8px rgba(255,215,0,0.8);
}

/* Thinking animation */
.thinking-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.thinking-dots span {
  width: 5px;
  height: 5px;
  background: #ffd700;
  border-radius: 50%;
  animation: thinking-bounce 0.6s infinite alternate;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking-bounce {
  from { transform: translateY(0); opacity: 0.5; }
  to { transform: translateY(-6px); opacity: 1; }
}

/* Card animation */
@keyframes card-deal {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.card-deal-animation {
  animation: card-deal 0.3s ease-out;
}

/* Disabled actions */
.action-area.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.opponent.folded { opacity: 0.4; }
.opponent.all-in { border-color: #ff6b35; }
.opp-name { font-size: 0.7rem; font-weight: 800; color: rgba(255,255,255,0.6); margin-bottom: 0.3rem; }
.opp-chips { font-size: 0.8rem; font-weight: 800; color: #ffd700; margin-bottom: 0.4rem; }
.opp-bet { font-size: 0.7rem; font-weight: 700; color: #81c784; min-height: 16px; }
.opp-cards { display: flex; gap: 3px; justify-content: center; margin-top: 0.4rem; }
.opp-status { font-size: 0.65rem; font-weight: 800; color: #ff8f5e; margin-top: 0.3rem; min-height: 14px; }

/* CARDS */
.card { width: 44px; height: 62px; background: #fff; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem; color: #222; box-shadow: 0 2px 6px rgba(0,0,0,0.5); line-height: 1.1; text-align: center; user-select: none; flex-shrink: 0; }
.card.red { color: #c0392b; }
.card.back { background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #1a237e 100%); color: transparent; border: 2px solid rgba(255,255,255,0.15); }
.card.community { width: 50px; height: 70px; font-size: 1.05rem; }
.card.placeholder { background: rgba(255,255,255,0.08); border: 2px dashed rgba(255,255,255,0.2); box-shadow: none; }
.card.highlight { box-shadow: 0 0 0 3px #ffd700, 0 2px 12px rgba(255,215,0,0.5); }

/* PLAYER AREA */
.player-area { background: rgba(0,0,0,0.3); border-radius: 16px; padding: 0.8rem 1rem; border: 2px solid rgba(255,255,255,0.1); margin-top: 0.5rem; }
.player-area.active-turn { border-color: #ffd700; }
.player-info-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; flex-wrap: wrap; gap: 0.4rem; }
.player-name { font-size: 0.85rem; font-weight: 800; color: #fff; }
.player-chips { font-size: 0.85rem; font-weight: 800; color: #ffd700; }
.player-hand { display: flex; gap: 8px; justify-content: center; margin-bottom: 0.6rem; }
.player-hand-label { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.5); text-align: center; margin-top: 0.3rem; min-height: 18px; }

/* ACTIONS */
.action-area { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-top: 0.7rem; }
.btn-action { padding: 0.55rem 1.2rem; border-radius: 999px; border: 2px solid; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.85rem; cursor: pointer; transition: all 0.15s; }
.btn-fold { background: rgba(239,83,80,0.12); border-color: rgba(239,83,80,0.5); color: #ef9a9a; }
.btn-fold:hover { background: rgba(239,83,80,0.25); }
.btn-check { background: rgba(33,150,243,0.12); border-color: rgba(33,150,243,0.4); color: #90caf9; }
.btn-check:hover { background: rgba(33,150,243,0.25); }
.btn-call { background: rgba(76,175,80,0.12); border-color: rgba(76,175,80,0.4); color: #a5d6a7; }
.btn-call:hover { background: rgba(76,175,80,0.25); }
.btn-raise { background: rgba(255,107,53,0.15); border-color: rgba(255,107,53,0.5); color: #ff8f5e; }
.btn-raise:hover { background: rgba(255,107,53,0.3); }
.btn-allin { background: rgba(255,215,0,0.12); border-color: rgba(255,215,0,0.5); color: #ffd700; }
.btn-allin:hover { background: rgba(255,215,0,0.25); }
.btn-action:disabled { opacity: 0.3; cursor: default; }

/* BET SLIDER */
.bet-control { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; width: 100%; justify-content: center; flex-wrap: wrap; }
.bet-slider { width: 160px; accent-color: #ff6b35; }
.bet-value { font-size: 0.85rem; font-weight: 800; color: #ff8f5e; min-width: 60px; text-align: center; }

/* MESSAGE */
.message-bar { text-align: center; padding: 0.5rem; font-size: 0.85rem; font-weight: 800; color: rgba(255,255,255,0.7); min-height: 30px; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1rem; }
.modal-overlay.hidden { display: none; }
.modal-content { background: #1a2a1a; border: 2px solid rgba(255,255,255,0.15); border-radius: 20px; padding: 2rem; text-align: center; max-width: 360px; width: 100%; }
.modal-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.modal-title { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 0.4rem; }
.modal-msg { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 1.2rem; }
.btn-orange { background: #ff6b35; color: #fff; border: none; border-radius: 999px; padding: 0.7rem 1.8rem; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1rem; cursor: pointer; }
.btn-orange:hover { background: #e85d2a; }

/* BLIND INDICATOR */
.blind-chip { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; font-size: 0.55rem; font-weight: 800; margin-left: 4px; }
.chip-d { background: #fff; color: #222; }
.chip-sb { background: #1e88e5; color: #fff; }
.chip-bb { background: #e53935; color: #fff; }

/* GAME INFO */
.game-info { max-width: 700px; margin: 0 auto; padding: 2rem 1rem; width: 100%; }
.game-info h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.8rem; color: #333; }
.game-info h3 { font-size: 1rem; font-weight: 800; margin: 1rem 0 0.4rem; color: #555; }
.game-info p, .game-info li { font-size: 0.92rem; color: #555; line-height: 1.7; }
.game-info ul { padding-left: 1.2rem; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 480px) {
  .card { width: 38px; height: 54px; font-size: 0.8rem; }
  .card.community { width: 44px; height: 62px; font-size: 0.9rem; }
  .opponent { min-width: 75px; padding: 0.5rem; }
  .opp-cards .card { width: 28px; height: 40px; font-size: 0.65rem; }
  .mp-room-info { flex-direction: column; }
  .mp-actions { justify-content: center; }
}
