/* ============================================================
   MAH DAWGS POKER - RETRO GAME BOY + RETROWAVE AESTHETIC
   ============================================================ */

/* === PIXEL FONT === */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap');

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #0f0a1a;
  --bg-mid: #1a1130;
  --bg-felt: #0d4a2e;
  --felt-border: #1a6b42;
  --neon-pink: #ff6b9d;
  --neon-blue: #4ecdc4;
  --neon-purple: #b197fc;
  --neon-yellow: #ffd43b;
  --neon-orange: #ff922b;
  --neon-green: #51cf66;
  --card-bg: #f8f9fa;
  --card-border: #495057;
  --text: #e0e0e0;
  --text-dim: #868e96;
  --pixel-shadow: 2px 2px 0px rgba(0,0,0,0.5);
  --glow-pink: 0 0 10px rgba(255,107,157,0.5), 0 0 30px rgba(255,107,157,0.2);
  --glow-blue: 0 0 10px rgba(78,205,196,0.5), 0 0 30px rgba(78,205,196,0.2);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Silkscreen', 'Press Start 2P', monospace;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

/* === SCANLINE OVERLAY === */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   LOBBY
   ============================================================ */
.lobby {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.title-container {
  text-align: center;
  padding: 1rem 0;
}

.game-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(2rem, 8vw, 4rem);
  color: var(--neon-pink);
  text-shadow:
    3px 3px 0 #c0392b,
    6px 6px 0 rgba(0,0,0,0.4),
    0 0 20px rgba(255,107,157,0.6),
    0 0 60px rgba(255,107,157,0.3);
  letter-spacing: 4px;
  animation: titlePulse 2s ease-in-out infinite alternate;
}

.game-subtitle {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1rem, 4vw, 1.8rem);
  color: var(--neon-blue);
  text-shadow: 0 0 15px rgba(78,205,196,0.6);
  letter-spacing: 12px;
  margin-top: 0.5rem;
}

.title-dogs {
  font-size: 2rem;
  margin-top: 0.5rem;
  animation: dogBounce 1s ease-in-out infinite;
}

@keyframes titlePulse {
  from { text-shadow: 3px 3px 0 #c0392b, 6px 6px 0 rgba(0,0,0,0.4), 0 0 20px rgba(255,107,157,0.6); }
  to { text-shadow: 3px 3px 0 #c0392b, 6px 6px 0 rgba(0,0,0,0.4), 0 0 40px rgba(255,107,157,0.8), 0 0 80px rgba(255,107,157,0.4); }
}

@keyframes dogBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Glitch effect */
.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.glitch::before {
  color: #0ff;
  animation: glitch1 3s infinite;
  clip-path: inset(0 0 80% 0);
}
.glitch::after {
  color: #f0f;
  animation: glitch2 3s infinite;
  clip-path: inset(80% 0 0 0);
}
@keyframes glitch1 {
  0%, 94% { transform: translate(0); }
  95% { transform: translate(-3px, 2px); }
  96% { transform: translate(3px, -1px); }
  97% { transform: translate(0); }
}
@keyframes glitch2 {
  0%, 96% { transform: translate(0); }
  97% { transform: translate(3px, -2px); }
  98% { transform: translate(-3px, 1px); }
  99% { transform: translate(0); }
}

/* === SECTIONS === */
.lobby-section {
  width: 100%;
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.65rem, 2.5vw, 0.85rem);
  color: var(--neon-yellow);
  text-align: center;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  text-shadow: var(--pixel-shadow);
}

.pixel-border {
  border: 3px solid var(--neon-yellow);
  background: rgba(255,212,59,0.08);
  box-shadow: inset 0 0 15px rgba(255,212,59,0.1);
}

/* === PLAYER SELECT === */
.player-select {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.player-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.5rem;
  background: var(--bg-mid);
  border: 3px solid #333;
  color: var(--text);
  font-family: 'Silkscreen', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.player-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, var(--pcolor));
  opacity: 0;
  transition: opacity 0.15s;
}

.player-btn:hover::before,
.player-btn.selected::before {
  opacity: 0.15;
}

.player-btn.selected {
  border-color: var(--pcolor);
  box-shadow: 0 0 15px color-mix(in srgb, var(--pcolor) 40%, transparent),
              inset 0 0 15px color-mix(in srgb, var(--pcolor) 15%, transparent);
}

.player-btn:active {
  transform: scale(0.96);
}

.player-dog-icon {
  font-size: 2rem;
}

.player-btn-name {
  position: relative;
  z-index: 1;
  font-weight: bold;
}

/* === BOT SELECT === */
.bot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (min-width: 600px) {
  .bot-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.bot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.7rem 0.4rem;
  background: var(--bg-mid);
  border: 2px solid #333;
  color: var(--text);
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}

.bot-btn.selected {
  border-color: var(--pcolor);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pcolor) 40%, transparent);
  background: color-mix(in srgb, var(--pcolor) 10%, var(--bg-mid));
}

.bot-btn:active {
  transform: scale(0.96);
}

.bot-emoji {
  font-size: 1.8rem;
}

.bot-name {
  font-weight: bold;
  font-size: 0.65rem;
  text-align: center;
}

.bot-style {
  font-size: 0.5rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* === SETTINGS === */
.settings-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.settings-row label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--neon-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-row select {
  font-family: 'Silkscreen', monospace;
  font-size: 0.8rem;
  padding: 0.4rem;
  background: var(--bg-mid);
  color: var(--text);
  border: 2px solid var(--neon-blue);
  cursor: pointer;
}

/* === BUTTONS === */
.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.75rem;
  padding: 0.8rem 1.2rem;
  border: 3px solid;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.1s;
  position: relative;
  color: #fff;
}

.btn:active {
  transform: translate(2px, 2px);
}

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

.btn-primary {
  background: var(--neon-pink);
  border-color: #d63384;
  text-shadow: var(--pixel-shadow);
  box-shadow: 4px 4px 0 #1a1130;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: var(--glow-pink), 4px 4px 0 #1a1130;
}

.btn-secondary {
  background: var(--bg-mid);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.btn-large {
  font-size: clamp(0.8rem, 3vw, 1.1rem);
  padding: 1rem 2rem;
}

.pulse-btn:not(:disabled) {
  animation: btnPulse 1.5s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 4px 4px 0 #1a1130; }
  50% { box-shadow: 0 0 20px rgba(255,107,157,0.5), 4px 4px 0 #1a1130; }
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.btn-icon {
  font-size: 1.3rem;
  background: none;
  border: 2px solid #444;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 2px;
  line-height: 1;
}

/* ============================================================
   POKER TABLE
   ============================================================ */
.table-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0.5rem;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.5rem;
  gap: 0.5rem;
  flex-shrink: 0;
}

.table-info {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.round-badge {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: var(--neon-pink);
  border: 2px solid var(--neon-pink);
  padding: 0.25rem 0.5rem;
}

.phase-badge {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 0.25rem 0.5rem;
  border: 2px solid;
  text-transform: uppercase;
}

.phase-preflop { color: var(--neon-yellow); border-color: var(--neon-yellow); }
.phase-flop { color: var(--neon-green); border-color: var(--neon-green); }
.phase-turn { color: var(--neon-orange); border-color: var(--neon-orange); }
.phase-river { color: var(--neon-pink); border-color: var(--neon-pink); }
.phase-showdown { color: #fff; border-color: #fff; background: rgba(255,255,255,0.1); }

.blind-info {
  font-size: 0.6rem;
  color: var(--text-dim);
}

.table-actions-top {
  display: flex;
  gap: 0.5rem;
}

/* === FELT === */
.poker-table {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.felt {
  width: 85%;
  max-width: 600px;
  aspect-ratio: 1.6;
  background:
    radial-gradient(ellipse at center, #1a6b42 0%, #0d4a2e 60%, #08331e 100%);
  border: 4px solid #2d8a5e;
  border-radius: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow:
    0 0 0 6px #1a1130,
    0 0 0 10px #0d4a2e,
    0 0 40px rgba(0,0,0,0.5),
    inset 0 0 60px rgba(0,0,0,0.3);
}

.pot-display {
  text-align: center;
}

.pot-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255,212,59,0.5);
}

.pot-amount {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1rem, 4vw, 1.6rem);
  color: #fff;
  text-shadow:
    0 0 10px rgba(255,255,255,0.5),
    var(--pixel-shadow);
}

/* === COMMUNITY CARDS === */
.community-cards {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
}

.card {
  width: clamp(36px, 8vw, 52px);
  height: clamp(50px, 11vw, 72px);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Silkscreen', monospace;
  font-size: clamp(0.6rem, 2vw, 0.9rem);
  font-weight: bold;
  position: relative;
}

.community-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.card-empty {
  background: rgba(255,255,255,0.08);
  border: 2px dashed rgba(255,255,255,0.15);
}

.card .red { color: #e03131; }
.card .black { color: #212529; }

.card-enter {
  animation: cardFlipIn 0.4s ease-out backwards;
}

@keyframes cardFlipIn {
  from {
    transform: rotateY(90deg) scale(0.8);
    opacity: 0;
  }
  to {
    transform: rotateY(0) scale(1);
    opacity: 1;
  }
}

/* === ACTION DISPLAY === */
.action-display {
  text-align: center;
  padding: 0.3rem 0.6rem;
  margin-top: 0.3rem;
}

.action-actor {
  font-size: 0.55rem;
  color: var(--text-dim);
  display: block;
}

.action-text {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.5rem, 2vw, 0.7rem);
  color: var(--neon-yellow);
  text-shadow: var(--pixel-shadow);
}

.action-win .action-text {
  color: var(--neon-green);
  font-size: clamp(0.6rem, 2.5vw, 0.85rem);
  animation: winFlash 0.5s ease-in-out infinite alternate;
}

@keyframes winFlash {
  from { text-shadow: 0 0 10px rgba(81,207,102,0.5); }
  to { text-shadow: 0 0 25px rgba(81,207,102,0.8), 0 0 50px rgba(81,207,102,0.3); }
}

/* === SEATS === */
.seats-container {
  position: absolute;
  inset: 0;
}

.seat {
  position: absolute;
  left: var(--seat-x);
  top: var(--seat-y);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: all 0.3s;
  z-index: 2;
}

.seat.folded {
  opacity: 0.4;
}

.seat.active-seat .seat-avatar {
  box-shadow: 0 0 15px var(--pcolor), 0 0 30px color-mix(in srgb, var(--pcolor) 50%, transparent);
  animation: seatPulse 0.8s ease-in-out infinite alternate;
}

@keyframes seatPulse {
  from { box-shadow: 0 0 10px var(--pcolor); }
  to { box-shadow: 0 0 25px var(--pcolor), 0 0 40px color-mix(in srgb, var(--pcolor) 40%, transparent); }
}

.seat-avatar {
  width: clamp(36px, 9vw, 52px);
  height: clamp(36px, 9vw, 52px);
  border: 3px solid #555;
  background: var(--bg-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
}

.seat-emoji { font-size: clamp(1.2rem, 4vw, 1.8rem); }

.seat-name {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.35rem, 1.5vw, 0.5rem);
  color: var(--pcolor);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-chips {
  font-family: 'Silkscreen', monospace;
  font-size: clamp(0.5rem, 1.8vw, 0.65rem);
  color: var(--neon-green);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
}

.seat-bet {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  color: var(--neon-yellow);
  background: rgba(0,0,0,0.7);
  padding: 0.15rem 0.3rem;
  border: 1px solid var(--neon-yellow);
}

.dealer-chip {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: var(--neon-yellow);
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000;
  z-index: 3;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

.fold-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.4rem;
  color: #e03131;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
}

.allin-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.4rem;
  color: var(--neon-orange);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
  animation: allInFlash 0.4s infinite alternate;
}

@keyframes allInFlash {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

.seat-cards {
  display: flex;
  gap: 2px;
  flex-direction: column;
  align-items: center;
}

.mini-card {
  font-family: 'Silkscreen', monospace;
  font-size: 0.55rem;
  background: var(--card-bg);
  padding: 0.1rem 0.2rem;
  border: 1px solid #666;
  display: inline-block;
}

.mini-card.red { color: #e03131; }
.mini-card.black { color: #212529; }

.seat-hand-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.35rem;
  color: var(--neon-green);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
  white-space: nowrap;
}

/* === MY HAND === */
.my-hand {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  align-items: center;
  flex-shrink: 0;
}

.hand-card {
  width: clamp(52px, 14vw, 72px);
  height: clamp(72px, 19vw, 100px);
  background: var(--card-bg);
  border: 3px solid var(--card-border);
  font-size: clamp(1rem, 3.5vw, 1.5rem);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
  animation: handCardIn 0.3s ease-out;
}

@keyframes handCardIn {
  from { transform: translateY(30px) rotateZ(10deg); opacity: 0; }
  to { transform: translateY(0) rotateZ(0); opacity: 1; }
}

.hand-result {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.5rem, 2vw, 0.7rem);
  color: var(--neon-green);
  text-shadow: var(--pixel-shadow);
  background: rgba(0,0,0,0.6);
  padding: 0.3rem 0.6rem;
  border: 2px solid var(--neon-green);
}

/* === ACTION BAR === */
.action-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: rgba(0,0,0,0.3);
  border-top: 2px solid #333;
}

.btn-fold {
  background: #495057;
  border-color: #343a40;
  font-size: 0.65rem;
  padding: 0.6rem 0.8rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.btn-check {
  background: var(--neon-blue);
  border-color: #20c997;
  font-size: 0.65rem;
  padding: 0.6rem 0.8rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.btn-call {
  background: #228be6;
  border-color: #1c7ed6;
  font-size: 0.65rem;
  padding: 0.6rem 0.8rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.btn-raise {
  background: var(--neon-orange);
  border-color: #e8590c;
  font-size: 0.65rem;
  padding: 0.6rem 0.8rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.btn-allin {
  background: #e03131;
  border-color: #c92a2a;
  font-size: 0.65rem;
  padding: 0.6rem 0.8rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
  animation: allInFlash 0.6s infinite alternate;
}

.raise-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.raise-slider {
  width: 80px;
  accent-color: var(--neon-orange);
  cursor: pointer;
}

/* === BOT QUOTE === */
.bot-quote {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  border: 3px solid var(--neon-yellow);
  padding: 0.6rem 1rem;
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  max-width: 90%;
  text-align: center;
  z-index: 100;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(255,212,59,0.3);
}

.bot-quote.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

.bot-quote.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === THINKING === */
.thinking-indicator {
  text-align: center;
  padding: 0.5rem;
  flex-shrink: 0;
}

.dot-anim {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--neon-purple);
  animation: dotPulse 0.6s infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================================
   GAME OVER
   ============================================================ */
.gameover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  gap: 1.5rem;
  text-align: center;
}

.winner-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.winner-crown {
  font-size: 4rem;
  animation: crownBounce 1s ease-in-out infinite;
}

@keyframes crownBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.1); }
}

.winner-name {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1.2rem, 5vw, 2rem);
  text-shadow: var(--pixel-shadow);
}

.winner-chips {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1rem, 4vw, 1.5rem);
  color: var(--neon-green);
}

.winner-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--neon-yellow);
  animation: winFlash 0.5s infinite alternate;
}

.final-standings {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.standing-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.8rem;
  background: var(--bg-mid);
  border: 2px solid var(--pcolor);
}

.standing-rank {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--neon-yellow);
  min-width: 2rem;
}

.standing-name {
  flex: 1;
  font-size: 0.75rem;
  color: var(--pcolor);
}

.standing-chips {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--neon-green);
}

/* ============================================================
   HISTORY
   ============================================================ */
.history-screen {
  padding: 1.5rem 1rem;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.history-session {
  background: var(--bg-mid);
  border: 2px solid #333;
  padding: 0.8rem;
}

.history-session-header {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.history-date {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: var(--neon-pink);
}

.history-player {
  font-size: 0.65rem;
  color: var(--neon-blue);
}

.history-rounds {
  font-size: 0.6rem;
  color: var(--text-dim);
}

.history-standings {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.history-chip {
  font-size: 0.6rem;
  background: rgba(255,255,255,0.05);
  padding: 0.2rem 0.4rem;
  border: 1px solid #444;
}

.history-details {
  font-size: 0.6rem;
  color: var(--text-dim);
}

.history-details summary {
  cursor: pointer;
  color: var(--neon-yellow);
  margin-bottom: 0.3rem;
}

.history-round {
  padding: 0.2rem 0;
  border-bottom: 1px solid #222;
}

.history-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 2rem;
}

/* === PIXEL DOG STYLES === */
.pixel-dog {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  filter: contrast(1.2) brightness(1.1);
}

.corgi-dog { filter: hue-rotate(-10deg) saturate(1.3); }
.shiba-dog { filter: hue-rotate(20deg) saturate(1.5); }
.golden-dog { filter: hue-rotate(30deg) saturate(1.2); }
.husky-dog { filter: hue-rotate(200deg) saturate(0.8) brightness(1.2); }

/* === ALL-IN SEAT === */
.all-in-seat .seat-avatar {
  animation: allInGlow 0.5s infinite alternate;
}

@keyframes allInGlow {
  from { box-shadow: 0 0 10px var(--neon-orange); }
  to { box-shadow: 0 0 25px var(--neon-orange), 0 0 40px rgba(255,146,43,0.4); }
}

/* === RETROWAVE BACKGROUND === */
body {
  background:
    linear-gradient(180deg,
      #0f0a1a 0%,
      #1a0a2e 30%,
      #2d1b69 60%,
      #1a0a2e 80%,
      #0f0a1a 100%
    );
  background-attachment: fixed;
}

/* Subtle grid lines on bg */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,107,157,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,157,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 480px) {
  .felt {
    width: 95%;
    aspect-ratio: 1.3;
  }

  .community-cards {
    gap: 0.2rem;
  }

  .action-bar {
    padding: 0.4rem;
    gap: 0.3rem;
  }

  .btn-fold, .btn-check, .btn-call, .btn-raise, .btn-allin {
    font-size: 0.55rem;
    padding: 0.5rem 0.6rem;
  }

  .raise-slider {
    width: 60px;
  }

  .player-select {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .seat-avatar {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 360px) {
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .raise-controls {
    justify-content: center;
  }
}

/* === PWA SAFE AREAS === */
@supports (padding: env(safe-area-inset-top)) {
  .table-header {
    padding-top: calc(0.3rem + env(safe-area-inset-top));
  }
  .action-bar {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }
}

/* === WAITING / FOLDED INDICATORS === */
.waiting-indicator {
  text-align: center;
  padding: 0.5rem;
  flex-shrink: 0;
}

.wait-text {
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  animation: dotPulse 1s infinite;
}

.folded-hand {
  justify-content: center;
}

.fold-msg {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #e03131;
  text-shadow: var(--pixel-shadow);
  opacity: 0.6;
}

/* === SELECTION / TAP HIGHLIGHT === */
* {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
