/* === ShellGames.ai — Global Styles === */
:root {
  --bg: #0a0a1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #242445;
  --accent: #e94560;
  --secondary: #00d4aa;
  --text: #e0e0e0;
  --text-muted: #6b6b8a;
  --border: #2a2a4a;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.accent { color: var(--accent); }
.muted { color: var(--text-muted); }
.optional { color: var(--text-muted); font-size: 0.85em; }

/* === Landing Page === */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.logo {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: float 3s ease-in-out infinite;
}

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

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.25rem;
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  opacity: 0;
  transition: opacity 0.25s;
}

.game-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.15);
}

.game-card:hover::before { opacity: 1; }

.game-card-soon {
  opacity: 0.5;
  cursor: default;
}
.game-card-soon:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.game-icon { font-size: 3rem; margin-bottom: 1rem; }

.game-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.game-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.game-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.badge {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.badge-live { border-color: var(--secondary); color: var(--secondary); }
.badge-soon { border-color: var(--text-muted); }

/* Rooms */
.rooms-section {
  margin-top: 3rem;
}

.rooms-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.room-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
}

.room-item:hover { background: var(--bg-card-hover); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 440px;
  position: relative;
}

.modal h2 { margin-bottom: 1.5rem; }

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
}

/* Buttons */
.btn {
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover { background: var(--bg-card-hover); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  width: 100%;
  font-weight: 600;
  margin-top: 0.5rem;
}

.btn-primary:hover { background: #d63a54; }

.btn-secondary {
  background: transparent;
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-secondary:hover { background: rgba(0,212,170,0.1); }

.btn-danger { border-color: var(--accent); color: var(--accent); }
.btn-danger:hover { background: rgba(233,69,96,0.1); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Footer */
footer {
  text-align: center;
  padding: 3rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Game Page === */
.game-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.logo-link {
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.room-info { display: flex; gap: 0.5rem; align-items: center; }

.room-id {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.game-type-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(233,69,96,0.15);
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
}

.game-controls {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.game-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.game-area {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem;
  overflow: auto;
}

.game-sidebar {
  width: 300px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.status-panel {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.turn-indicator {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.game-status {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.game-status.check { color: #ff6b6b; }
.game-status.over { color: var(--secondary); font-weight: 600; }

.move-history {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

/* === Captured Pieces === */
.captured-panel {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.captured-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 28px;
}
.captured-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.captured-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
}
.captured-piece-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.move-history h3 { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--text-muted); }

.moves-list {
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  max-height: 200px;
  overflow-y: auto;
}

.move-pair {
  display: flex;
  gap: 0.5rem;
}

.move-num { color: var(--text-muted); min-width: 2rem; }
.move-white, .move-black {
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  cursor: default;
  min-width: 4rem;
}
.move-white:hover, .move-black:hover { background: rgba(255,255,255,0.05); }

.webhook-panel {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.webhook-panel h3 { font-size: 0.9rem; color: var(--text-muted); }

.input-sm {
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}

.input-sm:focus { border-color: var(--accent); }

/* === Chess Board === */
.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(75vmin, 560px);
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.chess-square {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: min(7vmin, 52px);
  cursor: pointer;
  position: relative;
  transition: background 0.1s;
  user-select: none;
}

.chess-square.light { background: #2a2a4a; }
.chess-square.dark { background: #1a1a2e; }
.chess-piece-img { width: 85%; height: 85%; object-fit: contain; pointer-events: none; }
.chess-square.selected { background: rgba(233, 69, 96, 0.4) !important; }
.chess-square.legal-target::after {
  content: '';
  position: absolute;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: rgba(0, 212, 170, 0.4);
}
.chess-square.legal-target.has-piece::after {
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: transparent;
  border: 3px solid rgba(0, 212, 170, 0.5);
}
.chess-square.last-move { background: rgba(233, 69, 96, 0.15) !important; }
.chess-square.in-check { background: rgba(255, 50, 50, 0.4) !important; }

.chess-coords {
  position: absolute;
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.6;
}
.chess-coords.file { bottom: 2px; right: 4px; }
.chess-coords.rank { top: 2px; left: 4px; }

/* Promotion Modal */
.promo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.promo-choices {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
}

.promo-choice {
  font-size: 3rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.promo-choice:hover { background: rgba(233,69,96,0.2); }

/* === Ludo Board === */
.ludo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.ludo-board {
  width: min(85vmin, 540px);
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}

.ludo-board svg {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.ludo-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 540px;
}

.ludo-turn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ludo-turn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.ludo-dice-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 72px;
}

.ludo-roll-btn {
  font-size: 1.4rem;
  padding: 0.6rem 2rem;
  background: var(--bg-card);
  border: 2px solid;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ludo-roll-btn:hover {
  background: rgba(255,255,255,0.05);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(233,69,96,0.3);
}

.ludo-roll-btn:disabled { opacity: 0.4; cursor: default; transform: none; }

.ludo-roll-btn.rolling .roll-icon {
  animation: dice-spin 0.4s infinite linear;
}

@keyframes dice-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ludo-dice-result {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dice-svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }

.dice-rolling .dice-svg {
  animation: dice-roll-anim 0.5s ease-out;
}

.dice-landed .dice-svg {
  animation: dice-land 0.3s ease-out;
}

@keyframes dice-roll-anim {
  0% { transform: rotate(0deg) scale(0.5); opacity: 0; }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

@keyframes dice-land {
  0% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.ludo-moves {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ludo-move-btn {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 2px solid;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s;
}

.ludo-move-btn:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ludo-move-btn.selected {
  opacity: 0.5;
  pointer-events: none;
}

.ludo-log-entry {
  padding: 2px 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--secondary);
  color: var(--secondary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  z-index: 2000;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* === Touch & Mobile Foundation === */
button, .btn, .ludo-move-btn, .ludo-roll-btn, .game-card, .room-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* === Piece transitions === */
.ludo-board svg circle,
.ludo-board svg text {
  transition: cx 0.35s ease, cy 0.35s ease;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .logo { font-size: 2.5rem; }
  .tagline { font-size: 1rem; }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .game-main { flex-direction: column; }
  .game-sidebar {
    width: 100%;
    max-height: 35vh;
    border-left: none;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .game-controls { margin-left: 0; }
  .game-header { justify-content: center; gap: 0.5rem; padding: 0.5rem 0.75rem; }

  .chess-board { width: min(90vw, 90vmin); }

  .ludo-board { width: min(88vw, 50vh, 420px); }

  .ludo-turn { font-size: 1.25rem; }

  .ludo-roll-btn {
    font-size: 1.6rem;
    padding: 0.85rem 2.5rem;
    min-height: 52px;
  }

  .ludo-move-btn {
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
    min-height: 48px;
    flex: 1 1 auto;
  }

  .ludo-moves {
    width: 100%;
  }

  .btn, .btn-sm {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .rooms-section {
    margin-top: 2rem;
  }

  .rooms-list {
    max-height: 40vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
  }

  .form-group input,
  .form-group select {
    font-size: 16px; /* prevents iOS zoom */
    min-height: 44px;
  }

  .status-panel { padding: 0.75rem; }
  .move-history { padding: 0.75rem; }
  .webhook-panel { padding: 0.75rem; }
}

@media (max-width: 480px) {
  .hero { padding: 1.5rem 0 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .logo { font-size: 2rem; }
  .tagline { font-size: 0.9rem; }
  .container { padding: 1rem 0.75rem; }

  .game-card { padding: 1.25rem; }
  .game-card h2 { font-size: 1.2rem; }
  .game-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }

  .game-header {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }

  .ludo-board { width: min(92vw, 45vh, 380px); }

  .ludo-roll-btn {
    font-size: 1.8rem;
    padding: 1rem 3rem;
    min-height: 56px;
    width: 100%;
    justify-content: center;
  }

  .ludo-move-btn {
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    min-height: 52px;
    width: 100%;
  }

  .ludo-moves {
    flex-direction: column;
    width: 100%;
  }

  .ludo-dice-area { min-height: 80px; }

  .game-sidebar { max-height: 45vh; overflow-y: auto; }
  .game-sidebar .move-history,
  .game-sidebar .advanced-panel { display: none !important; }
  .game-sidebar.expanded .move-history { display: block !important; }
  .sidebar-toggle { display: block !important; width: 100%; padding: 0.4rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: #6b6b8a; font-size: 0.8rem; cursor: pointer; text-align: center; margin-top: 0.5rem; }

  .room-item {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }
}
/* === Color Picker === */
.color-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.color-btn {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s;
}

.color-btn:hover { opacity: 0.85; transform: scale(1.05); }
.color-btn.selected { border-color: #fff; box-shadow: 0 0 12px rgba(255,255,255,0.3); }

/* === Players Panel === */
.players-panel {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.players-panel h3 { display: none; }

#playersList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.player-entry {
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.05);
  border-radius: 1rem;
  white-space: nowrap;
}

/* === Controls Dropdown === */
.game-controls { position: relative; }

.btn-icon {
  font-size: 1.2rem;
  padding: 0.25rem 0.5rem;
  min-width: unset;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 0.5rem;
}

.controls-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  gap: 0.4rem;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  min-width: 120px;
}

.controls-dropdown.show {
  display: flex;
}

.controls-dropdown .btn {
  width: 100%;
  text-align: left;
}

/* === Share Panel === */
.share-panel {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

/* === Advanced Panel (hidden by default) === */
.advanced-panel { display: none; }
.advanced-panel.show { display: flex; }

.sidebar-toggle { display: none; }

/* === Lobby === */
.lobby-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.lobby-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.lobby-players {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.lobby-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 2px solid;
  border-radius: var(--radius-sm);
}

.lobby-player.empty {
  opacity: 0.4;
}

.lobby-player-color {
  font-size: 1.3rem;
}

.lobby-player-name {
  font-weight: 600;
}

.lobby-join-form {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.lobby-join-form h3 {
  margin-bottom: 1rem;
}

.lobby-waiting {
  text-align: center;
  padding: 1rem;
}

.lobby-share {
  margin-top: 0.5rem;
}

.badge-lobby { border-color: #f0c040; color: #f0c040; }

/* === Poker === */
.poker-table {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem;
  background: radial-gradient(ellipse at center, #1a5c2a 0%, #0d3318 70%, #091a0f 100%);
  border-radius: 120px / 80px;
  border: 4px solid #2a4a30;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.5), 0 8px 30px rgba(0,0,0,0.6);
  min-height: 400px;
}

.poker-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.poker-phase {
  background: rgba(233,69,96,0.2);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.poker-pot {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f0c040;
}

.poker-dealer {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.poker-community {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cards */
.poker-card {
  width: 60px;
  height: 84px;
  background: #f5f5f0;
  border-radius: 6px;
  border: 1px solid #ccc;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.poker-card.small {
  width: 42px;
  height: 58px;
  font-size: 0.7rem;
}

.poker-card.small .card-center { font-size: 1.2rem; }
.poker-card.small .card-corner { font-size: 0.55rem; }

.poker-card-back {
  background: linear-gradient(135deg, #1a3a6a, #2a5298);
  border: 2px solid #4a7ad4;
  color: #fff;
}

.card-back-design {
  font-size: 1.5rem;
  opacity: 0.6;
}

.poker-card.small .card-back-design { font-size: 1rem; }

.poker-card-placeholder {
  background: rgba(255,255,255,0.05);
  border: 2px dashed rgba(255,255,255,0.15);
}

.card-corner {
  position: absolute;
  font-size: 0.65rem;
  line-height: 1.1;
  text-align: center;
}

.card-corner.top { top: 3px; left: 4px; }
.card-corner.bottom { bottom: 3px; right: 4px; transform: rotate(180deg); }
.card-center { font-size: 1.6rem; }

/* Players */
.poker-players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

.poker-player-seat {
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--player-color, #888);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  min-width: 100px;
  text-align: center;
  transition: all 0.2s;
}

.poker-player-seat.is-current {
  box-shadow: 0 0 15px var(--player-color, #888);
}

.poker-player-seat.is-me {
  border-width: 3px;
}

.poker-player-seat.is-folded {
  opacity: 0.4;
}

.poker-player-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--player-color, #fff);
  margin-bottom: 0.25rem;
}

.poker-player-chips {
  font-size: 0.8rem;
  color: #f0c040;
}

.poker-player-bet {
  font-size: 0.75rem;
  color: var(--secondary);
}

.poker-player-cards {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.poker-player-status {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: 0.2rem;
}

.poker-player-status.allin {
  color: #f0c040;
}

/* Actions */
.poker-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 600px;
}

.poker-btn {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
}

.poker-btn:hover { transform: translateY(-2px); }

.poker-btn-fold { border-color: var(--accent); color: var(--accent); }
.poker-btn-fold:hover { background: rgba(233,69,96,0.15); }

.poker-btn-check { border-color: var(--secondary); color: var(--secondary); }
.poker-btn-check:hover { background: rgba(0,212,170,0.15); }

.poker-btn-call { border-color: #4a90d9; color: #4a90d9; }
.poker-btn-call:hover { background: rgba(74,144,217,0.15); }

.poker-btn-raise { border-color: #f0c040; color: #f0c040; }
.poker-btn-raise:hover { background: rgba(240,192,64,0.15); }

.poker-btn-allin { border-color: #a855f7; color: #a855f7; }
.poker-btn-allin:hover { background: rgba(168,85,247,0.15); }

.poker-raise-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.poker-slider {
  width: 120px;
  accent-color: #f0c040;
}

/* Showdown */
.poker-showdown {
  text-align: center;
  padding: 0.75rem;
}

.poker-winner {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f0c040;
  margin-bottom: 0.5rem;
}

.poker-hand-desc {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Log */
.poker-log {
  width: 100%;
  max-width: 600px;
  margin: 0.5rem auto;
  padding: 0.5rem;
  max-height: 120px;
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
}

.poker-log-entry {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.1rem 0;
}

@media (max-width: 768px) {
  .poker-table {
    border-radius: 40px;
    padding: 1rem;
  }
  .poker-card { width: 50px; height: 70px; }
  .poker-card.small { width: 36px; height: 50px; }
  .poker-player-seat { min-width: 80px; }
}

/* Floating dice FAB */
.ludo-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1a1a2e;
  border: 2px solid #e94560;
  border-radius: 16px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  min-width: 80px;
  max-width: 200px;
}
.ludo-fab-turn {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ludo-fab .ludo-roll-btn {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  min-height: 44px;
  border: 2px solid;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.ludo-fab .ludo-roll-btn:active {
  transform: scale(0.95);
}
.ludo-fab-moves {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}
.ludo-fab-moves .ludo-move-btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  min-height: 36px;
  border: 1.5px solid;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
}
