/* =========================================
   Site-wide custom styles
   ========================================= */

body {
  background-color: #f8f9fa;
}

/* ── Brand styling ─────────────────────────────────────────────────────── */

.brand-text {
  color: #FFD700;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.brand-link:hover {
  text-decoration: none;
}

/* ── Home page: join form ──────────────────────────────────────────────── */

.join-form-wrapper {
  margin-top: 100px;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Two concentric thin black outlines around each textbox:
   inner = border, outer = box-shadow ring with a background-coloured gap */
.join-form-wrapper .form-control {
  text-align: center;
  font-size: 1.15rem;
  padding: 0.65rem 1rem;
  border: 2px solid #000;
  border-radius: 0.375rem;
  box-shadow:
    0 0 0 3px #f8f9fa,   /* gap that matches the page background */
    0 0 0 5px #000;       /* outer concentric outline              */
  outline: none;
}

.join-form-wrapper .form-control:focus {
  border-color: #000;
  box-shadow:
    0 0 0 3px #f8f9fa,
    0 0 0 5px #000;
}

.btn-join {
  background-color: #FFD700;
  border: 2px solid #222;
  color: #222;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.6rem 2.5rem;
  letter-spacing: 0.04em;
  transition: background-color 0.15s;
}

.btn-join:hover {
  background-color: #ffca00;
  border-color: #000;
  color: #000;
}

/* ── Game pages ────────────────────────────────────────────────────────── */

.game-page {
  text-align: center;
  margin-top: 80px;
}

.game-page h1 {
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.game-page .game-desc {
  max-width: 480px;
  margin: 0 auto 2rem;
}

.btn-create-room {
  background: linear-gradient(135deg, #FFD700, #FF8C00);
  border: 2px solid #222;
  color: #222;
  font-weight: 800;
  font-size: 1.25rem;
  padding: 0.8rem 3rem;
  letter-spacing: 0.06em;
  border-radius: 0.5rem;
  box-shadow: 3px 3px 0 #222;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-create-room:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #222;
  color: #000;
}

.btn-create-room:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 #222;
}

/* ── Room lobby ────────────────────────────────────────────────────────── */

.room-code-display {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  font-family: 'Courier New', Courier, monospace;
  color: #222;
  text-shadow: 2px 2px 0 #FFD700;
}

#player-list {
  min-height: 120px;
}

#player-list .list-group-item {
  font-size: 1.05rem;
}

#start-game-btn {
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

/* Mobile: stack player list above START GAME button */
@media (max-width: 767.98px) {
  .room-code-display {
    font-size: 2.8rem;
    letter-spacing: 0.2em;
  }

  #page-room .row {
    flex-direction: column;
  }

  #page-room .row > .col-md-6:last-child {
    margin-top: 2rem;
    min-height: auto !important;
  }
}

/* ── Dev badge (TEST GAME indicator) ──────────────────────────────────── */

.dev-badge {
  font-size: 0.7rem;
  vertical-align: super;
  padding: 0.15em 0.4em;
}

/* ── Host game screen ─────────────────────────────────────────────────── */

.host-game-screen {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 1rem;
}

.round-title {
  font-weight: 800;
  font-size: 2rem;
  color: #222;
}

.host-scoreboard h5 {
  text-align: center;
  margin-bottom: 1rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.score-card {
  background: #fff;
  border: 2px solid #222;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  min-width: 120px;
  text-align: center;
  box-shadow: 2px 2px 0 #222;
}

.score-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.score-value {
  font-size: 2rem;
  font-weight: 900;
  color: #FFD700;
  text-shadow: 1px 1px 0 #222;
}

.pick-status {
  font-size: 1.5rem;
  margin-top: 0.25rem;
  transition: transform 0.3s;
}

.pick-status.picked {
  transform: scale(1.3);
}

/* Round result reveal */
.round-result-reveal h3 {
  font-weight: 800;
  color: #222;
}

.picks-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.result-pick {
  background: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1.1rem;
}

.result-pick.winner {
  background: #FFD700;
  font-weight: 700;
  border: 2px solid #222;
}

/* Game over / final scores */
.game-over-title {
  font-size: 3rem;
  font-weight: 900;
  color: #222;
  text-shadow: 3px 3px 0 #FFD700;
}

.final-scores {
  max-width: 400px;
  margin: 0 auto;
}

.final-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1.15rem;
}

.final-score-row.winner-row {
  background: #FFF8DC;
  border-color: #FFD700;
  box-shadow: 2px 2px 0 #222;
}

.final-rank {
  font-size: 1.3rem;
  min-width: 40px;
}

.final-name {
  flex: 1;
  text-align: left;
  padding-left: 0.5rem;
  font-weight: 600;
}

.final-score {
  font-weight: 900;
  font-size: 1.4rem;
  color: #222;
}

.round-history {
  max-width: 500px;
  margin: 0 auto;
}

.round-history h5 {
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.round-history-item {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.3rem;
}

/* ── Player game screen ───────────────────────────────────────────────── */

.player-game-screen {
  max-width: 420px;
  margin: 60px auto;
  padding: 0 1rem;
}

.player-round-header h3 {
  font-weight: 800;
  color: #222;
}

.player-choices {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-choice {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #222;
  background: linear-gradient(135deg, #FFD700, #FF8C00);
  font-size: 2rem;
  font-weight: 900;
  color: #222;
  cursor: pointer;
  box-shadow: 3px 3px 0 #222;
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.3s;
}

.btn-choice:hover:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #222;
}

.btn-choice:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 #222;
}

.btn-choice.selected {
  background: #28a745;
  color: #fff;
  border-color: #1e7e34;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
}

.btn-choice.disabled:not(.selected) {
  opacity: 0.4;
}

.player-result-reveal h4 {
  font-weight: 700;
}

.all-picks-mini {
  font-size: 0.95rem;
  color: #666;
}

.player-final-scores {
  max-width: 280px;
  margin: 0 auto;
}

.player-score-line {
  padding: 0.4rem 0;
  font-size: 1.1rem;
  border-bottom: 1px solid #eee;
}

/* ── Mobile adjustments for game screens ──────────────────────────────── */

@media (max-width: 575.98px) {
  .btn-choice {
    width: 85px;
    height: 85px;
    font-size: 1.7rem;
  }

  .score-card {
    min-width: 90px;
    padding: 0.75rem 1rem;
  }

  .game-over-title {
    font-size: 2.2rem;
  }

  .host-game-screen {
    margin-top: 20px;
  }

  .player-game-screen {
    margin-top: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DUCKGEONS AND DRAGONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── DnD Screens (shared layout) ────────────────────────────────────────── */

.dnd-host-screen {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 1rem;
}

.dnd-player-screen {
  max-width: 400px;
  margin: 40px auto;
  padding: 0 1rem;
}

/* ── Duck selector (class + cosmetic picker) ─────────────────────────────── */

.duck-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.75rem 0;
}

.selector-label {
  min-width: 180px;
  text-align: center;
}

.arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #222;
  background: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.arrow-btn:hover {
  background: #FFD700;
}

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

.duck-preview-large {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duck-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #999;
}

/* ── Host preplanning player cards ───────────────────────────────────────── */

.dnd-player-card {
  background: #fff;
  border: 2px solid #222;
  border-radius: 14px;
  padding: 1rem;
  min-width: 160px;
  max-width: 200px;
  text-align: center;
  box-shadow: 2px 2px 0 #222;
}

.dnd-player-card .duck-preview {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dnd-player-card .card-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.dnd-player-card .card-class {
  color: #666;
  font-size: 0.9rem;
}

.dnd-player-card .mini-stats {
  font-size: 0.7rem;
  color: #888;
  margin-top: 0.25rem;
  font-family: monospace;
}

.dnd-player-card .mini-enh {
  font-size: 0.75rem;
  color: #444;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ── Stat roll ───────────────────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 320px;
  margin: 0 auto;
}

.stat-box {
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 0.6rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
}

.stat-box.rolled {
  border-color: #222;
}

.stat-val {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: #222;
}

.stat-mod {
  display: block;
  font-size: 0.8rem;
  color: #888;
}

/* ── Enhancement buttons ─────────────────────────────────────────────────── */

.enhancement-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 340px;
  margin: 0 auto;
}

.enh-btn {
  background: #fff;
  border: 2px solid #222;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.enh-btn:hover:not(:disabled) {
  background: #FFF8DC;
  transform: translateX(3px);
}

.enh-btn:disabled {
  opacity: 0.5;
}

.enh-label {
  font-weight: 700;
  font-size: 1.05rem;
}

.enh-desc {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.15rem;
}

/* ── Phase 1 intro scene ─────────────────────────────────────────────────── */

.dnd-intro-scene {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 1rem;
}

.intro-scene-graphic {
  border: 2px solid #222;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 3px 3px 0 #222;
}

.intro-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Battle Grid ─────────────────────────────────────────────────────────── */

.battle-grid-container {
  overflow: auto;
  border: 2px solid #222;
  border-radius: 8px;
  background: #2A6FA0;
}

.battle-grid {
  display: grid;
  gap: 1px;
  background: #1E5A80;
  min-width: fit-content;
}

.grid-cell {
  width: 32px;
  height: 32px;
  position: relative;
  cursor: default;
}

.water-cell {
  background: #3B8DBD;
}

.boat-cell {
  background: #8B6B4A;
}

.grid-cell.highlight-move {
  background: rgba(40, 167, 69, 0.45);
  cursor: pointer;
}

.grid-cell.highlight-attack {
  background: rgba(220, 53, 69, 0.45);
  cursor: crosshair;
}

.grid-cell.highlight-heal {
  background: rgba(40, 200, 100, 0.45);
  cursor: pointer;
}

.grid-cell.highlight-aoe {
  background: rgba(128, 0, 255, 0.25);
  cursor: crosshair;
}

/* Tokens on grid */

.grid-token {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

.player-token {
  border: 2px solid #FFD700;
  background: rgba(255, 255, 255, 0.85);
}

.enemy-token {
  border: 2px solid #dc3545;
  background: rgba(255, 255, 255, 0.85);
  font-size: 16px;
}

.ko-token {
  opacity: 0.35;
}

/* Player grid (smaller cells for phone) */
.player-grid .grid-cell {
  width: 18px;
  height: 18px;
}

.player-grid .grid-token {
  width: 16px;
  height: 16px;
  font-size: 9px;
  top: 0;
  left: 0;
}

.player-grid .grid-token svg {
  width: 14px !important;
  height: 14px !important;
}

/* ── Turn banner (player phone) ──────────────────────────────────────────── */

.turn-banner {
  text-align: center;
  padding: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  background: #f0f0f0;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.turn-banner.your-turn {
  background: #FFD700;
  color: #222;
  animation: pulse-turn 1s ease-in-out infinite;
}

@keyframes pulse-turn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* ── Stats panel (collapsible) ───────────────────────────────────────────── */

.player-stats-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.stats-toggle {
  font-size: 0.75rem;
}

/* ── Action bar ──────────────────────────────────────────────────────────── */

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  padding: 0.5rem 0;
}

.action-bar .btn {
  font-weight: 600;
  font-size: 0.85rem;
}

.btn-purple {
  background: #7B2FBE;
  color: #fff;
  border: none;
}

.btn-purple:hover {
  background: #6A1FAE;
  color: #fff;
}

/* ── Initiative bar (host) ───────────────────────────────────────────────── */

.initiative-bar {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}

.init-entry {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: #f0f0f0;
  white-space: nowrap;
}

.init-entry.active-turn {
  background: #FFD700;
  font-weight: 700;
}

.init-entry.ko {
  opacity: 0.35;
  text-decoration: line-through;
}

/* ── Player HP bar (always visible) ─────────────────────────────────────── */

.player-hp-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: #222;
  border-radius: 8px;
}

.player-hp-bar-container .hp-label {
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
  min-width: 24px;
}

.hp-bar-track {
  flex: 1;
  height: 16px;
  background: #444;
  border-radius: 8px;
  overflow: hidden;
}

.hp-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.4s ease, background 0.4s ease;
}

.player-hp-bar-container .hp-text {
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
  min-width: 50px;
  text-align: right;
}

/* ── Next up banner ─────────────────────────────────────────────────────── */

.next-up-banner {
  min-height: 1.2em;
  font-size: 0.8rem;
}

/* ── Combat log ──────────────────────────────────────────────────────────── */

.combat-log {
  max-height: 160px;
  overflow-y: auto;
  background: #1a1a2e;
  color: #eee;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
}

.combat-log-entry {
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── DnD Mobile adjustments ──────────────────────────────────────────────── */

@media (max-width: 575.98px) {
  .dnd-player-screen {
    margin-top: 20px;
  }

  .arrow-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .dnd-player-card {
    min-width: 130px;
    padding: 0.75rem;
  }

  .grid-cell {
    width: 28px;
    height: 28px;
  }

  .combat-log {
    max-height: 100px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DUCK WAR
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared screens ───────────────────────────────────────────────────────── */

.war-host-screen {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 1rem;
}

.war-player-screen {
  max-width: 400px;
  margin: 40px auto;
  padding: 0 1rem;
}

/* ── Host duck select cards ───────────────────────────────────────────────── */

.war-host-player-card {
  background: #fff;
  border: 2px solid #222;
  border-radius: 14px;
  padding: 1.5rem;
  min-width: 180px;
  max-width: 220px;
  text-align: center;
  box-shadow: 2px 2px 0 #222;
}

.war-host-player-card .duck-preview-area {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.war-host-player-card .card-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.war-host-player-card .card-status {
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ── Playing cards ────────────────────────────────────────────────────────── */

.war-card {
  background: #fff;
  border: 2px solid #333;
  border-radius: 10px;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
  user-select: none;
}

.war-card.card-large {
  width: 130px;
  height: 190px;
}

.war-card.card-medium {
  width: 100px;
  height: 145px;
}

.war-card.card-small {
  width: 70px;
  height: 100px;
}

.card-red { color: #d10000; }
.card-black { color: #222; }

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

.card-top-left {
  top: 6px;
  left: 8px;
}

.card-bottom-right {
  bottom: 6px;
  right: 8px;
  transform: rotate(180deg);
}

.card-rank {
  font-weight: 900;
  font-size: 1.2rem;
}

.card-suit {
  font-size: 0.9rem;
}

.card-large .card-rank { font-size: 1.5rem; }
.card-large .card-suit { font-size: 1.1rem; }
.card-large .card-center-suit { font-size: 3.5rem; }

.card-medium .card-rank { font-size: 1.2rem; }
.card-medium .card-suit { font-size: 0.9rem; }
.card-medium .card-center-suit { font-size: 2.5rem; }

.card-center-suit {
  font-size: 2rem;
  font-weight: 400;
}

/* Card back */
.war-card.card-back {
  background: linear-gradient(135deg, #1a237e, #283593);
  border-color: #0d1342;
}

.card-back-pattern {
  width: 70%;
  height: 75%;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(255,255,255,0.06) 5px,
    rgba(255,255,255,0.06) 10px
  );
}

/* Deck stack */
.war-deck-stack {
  position: relative;
  display: inline-block;
}

.war-deck-layer {
  position: absolute;
}

.war-deck-layer:last-of-type {
  position: relative;
}

.war-deck-count {
  position: absolute;
  top: -10px;
  left: -10px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #222;
  background: rgba(255,255,255,0.92);
  padding: 1px 7px;
  border-radius: 6px;
  border: 1.5px solid #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  z-index: 3;
}

.war-deck-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ccc;
  border-radius: 10px;
  color: #999;
  font-size: 0.85rem;
  width: 100px;
  height: 145px;
}

.war-deck-empty.card-medium {
  width: 100px;
  height: 145px;
}

/* ── Card animations ──────────────────────────────────────────────────────── */

@keyframes card-flip-in {
  0% { transform: rotateY(90deg) scale(0.8); opacity: 0.3; }
  60% { transform: rotateY(-10deg) scale(1.05); }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

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

@keyframes card-win-pulse {
  0%, 100% { transform: scale(1); box-shadow: 2px 2px 6px rgba(0,0,0,0.15); }
  50% { transform: scale(1.08); box-shadow: 0 0 20px rgba(255,215,0,0.6); }
}

.card-win-pulse {
  animation: card-win-pulse 0.4s ease-in-out 1;
}

@keyframes card-war-win-pulse {
  0%, 100% { transform: scale(1); box-shadow: 2px 2px 6px rgba(0,0,0,0.15); }
  30% { transform: scale(1.12); box-shadow: 0 0 30px rgba(255,0,0,0.5); }
  60% { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,215,0,0.7); }
}

.card-war-win-pulse {
  animation: card-war-win-pulse 0.6s ease-in-out 1;
}

/* ── Battlefield layout (host) ────────────────────────────────────────────── */

.war-battlefield {
  text-align: center;
}

.war-battlefield-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.war-player-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
}

.war-duck-avatar {
  margin-bottom: 0.5rem;
}

.war-player-name {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.war-card-counts {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.war-card-counts .total-count {
  font-weight: 700;
  color: #222;
  font-size: 1rem;
}

.war-card-slot {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* VS center */
.war-vs-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding-top: 60px;
}

.war-vs-text {
  font-size: 2.5rem;
  font-weight: 900;
  color: #222;
  text-shadow: 2px 2px 0 #FFD700;
}

@keyframes war-banner-pulse {
  0%, 100% { transform: scale(1); color: #dc3545; }
  50% { transform: scale(1.15); color: #ff0000; }
}

.war-banner-pulse {
  animation: war-banner-pulse 0.8s ease-in-out infinite;
}

.war-victory-text {
  color: #28a745 !important;
  text-shadow: 2px 2px 0 #FFD700;
}

.war-center-status {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
  max-width: 140px;
  text-align: center;
}

/* ── Round log ────────────────────────────────────────────────────────────── */

.war-round-log {
  max-width: 600px;
  margin: 0 auto;
}

.war-round-log h6 {
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.war-log-entries {
  max-height: 150px;
  overflow-y: auto;
  background: #1a1a2e;
  color: #eee;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
}

.war-log-entry {
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.war-log-entry.war-log-war {
  color: #ff6b6b;
  font-weight: 600;
}

.war-log-round {
  color: #FFD700;
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ── Game over ────────────────────────────────────────────────────────────── */

.war-game-over-ducks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.war-winner-duck {
  text-align: center;
}

.war-winner-label {
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 0.3rem;
}

.war-winner-badge {
  display: inline-block;
  background: #FFD700;
  color: #222;
  font-weight: 800;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 2px solid #222;
  margin-top: 0.3rem;
}

.war-vs-small {
  font-size: 1.2rem;
  font-weight: 600;
  color: #999;
  font-style: italic;
}

.war-loser-duck {
  text-align: center;
  opacity: 0.65;
}

.war-loser-label {
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0.3rem;
  color: #666;
}

/* ── War spoils tray (host) ────────────────────────────────────────────────── */

.war-spoils-tray {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  min-height: 50px;
  padding: 0.5rem;
}

.war-spoils-tray .war-card {
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.war-spoils-tray .war-card.spoil-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.war-spoils-label {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  margin-top: 0.25rem;
}

.war-spoils-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 68px;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #666;
}

/* ── Player war banner ────────────────────────────────────────────────────── */

.war-player-war-banner {
  font-size: 2rem;
  font-weight: 900;
  color: #dc3545;
  text-shadow: 2px 2px 0 #222;
  animation: war-banner-pulse 0.8s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.war-player-deck-area {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Player flip screen layout (pinned bottom button) ─────────────────────── */

.war-player-flip-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
  max-width: 400px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.war-player-top-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 1rem;
}

.war-player-top-area .war-player-deck-area {
  margin-bottom: 0.75rem;
}

.war-player-top-area .war-player-counts {
  margin-bottom: 0.75rem;
}

.war-player-top-area #war-player-card-area {
  margin-bottom: 0.5rem;
}

.war-player-bottom-area {
  padding: 1.25rem 0 2rem;
  flex-shrink: 0;
}

.war-flip-btn-size {
  min-width: 240px;
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
}

.war-player-result {
  padding: 0.5rem;
  border-radius: 8px;
}

.war-player-result.result-win {
  background: #d4edda;
  color: #155724;
}

.war-player-result.result-lose {
  background: #f8d7da;
  color: #721c24;
}

.war-player-war-alert {
  background: #fff3cd;
  color: #856404;
  padding: 0.75rem;
  border-radius: 8px;
  border: 2px solid #ffc107;
}

.war-player-war-alert h3 {
  font-weight: 900;
  margin-bottom: 0.25rem;
}

/* ── Mobile adjustments ───────────────────────────────────────────────────── */

@media (max-width: 767.98px) {
  .war-battlefield-layout {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .war-vs-center {
    padding-top: 0;
    flex-direction: row;
    gap: 1rem;
  }

  .war-card.card-large {
    width: 100px;
    height: 145px;
  }

  .card-large .card-rank { font-size: 1.2rem; }
  .card-large .card-suit { font-size: 0.9rem; }
  .card-large .card-center-suit { font-size: 2.5rem; }

  .war-player-side {
    min-width: 140px;
  }

  .war-card-slot {
    min-height: 155px;
  }
}

@media (max-width: 575.98px) {
  .war-host-screen {
    margin-top: 15px;
  }

  .war-player-screen {
    margin-top: 20px;
  }

  .war-flip-btn-size {
    min-width: 260px;
    padding: 1.1rem 2.5rem;
    font-size: 1.25rem;
  }

  .war-player-flip-layout {
    min-height: calc(100vh - 60px);
  }

  .war-spoils-tray {
    gap: 0.2rem;
  }

  .war-spoils-tray .war-card.card-small {
    width: 50px;
    height: 72px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WAR MULTIPLAYER — Host battlefield (horizontal row layout)
   ═══════════════════════════════════════════════════════════════════════════ */

.war-multi-battlefield {
  padding-top: 1rem;
}

.war-multi-player-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.war-multi-player-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  transition: opacity 0.5s, filter 0.5s;
}

.war-multi-player-col.war-multi-eliminated {
  opacity: 0.45;
  filter: grayscale(0.8);
}

.war-multi-duck-avatar {
  position: relative;
  margin-bottom: 0.25rem;
}

.war-multi-elim-x {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  font-weight: 900;
  color: #dc3545;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
  pointer-events: none;
  line-height: 1;
}

.war-multi-player-name {
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.war-multi-card-count {
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 0.25rem;
}

.war-multi-card-slot {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.war-multi-out-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #dc3545;
  padding: 0.5rem 1rem;
  border: 2px solid #dc3545;
  border-radius: 6px;
  opacity: 0.7;
}

.war-multi-center {
  text-align: center;
  margin-top: 1rem;
  padding: 0.5rem;
}

/* ── Elimination screen (player) ── */

.war-multi-elim-duck-wrapper {
  position: relative;
  display: inline-block;
}

.war-multi-elim-duck-gray {
  filter: grayscale(0.8);
  opacity: 0.5;
}

.war-multi-elim-x-big {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6rem;
  font-weight: 900;
  color: #dc3545;
  text-shadow: 0 0 12px rgba(0,0,0,0.5);
  line-height: 1;
}

/* ── Game over standings ── */

.war-multi-standings {
  max-width: 350px;
  margin: 0 auto;
}

.war-multi-standing-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.war-multi-winner-row {
  background: rgba(255, 193, 7, 0.1);
  border-radius: 6px;
  border-bottom: none;
  margin-bottom: 0.25rem;
}

.war-multi-place {
  font-weight: 700;
  min-width: 32px;
  font-size: 0.9rem;
}

.war-multi-standing-duck {
  flex-shrink: 0;
}

.war-multi-standing-name {
  font-weight: 500;
}

/* ── Responsive: smaller screens ── */

@media (max-width: 768px) {
  .war-multi-player-row {
    gap: 0.4rem;
  }

  .war-multi-player-col {
    min-width: 70px;
    padding: 0.35rem;
  }

  .war-multi-player-name {
    font-size: 0.75rem;
    max-width: 70px;
  }

  .war-multi-elim-x {
    font-size: 3rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIAR'S DICE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Dice face ───────────────────────────────────────────────────────────── */

.ld-die {
  display: inline-block;
  border-radius: 20%;
  overflow: hidden;
  vertical-align: middle;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ld-die-highlight {
  filter: none;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
  transform: scale(1.05);
}

.ld-last-die {
  animation: ld-pulse-die 1.5s ease-in-out infinite;
}

@keyframes ld-pulse-die {
  0%, 100% { box-shadow: 0 0 4px rgba(255, 0, 0, 0.3); }
  50% { box-shadow: 0 0 16px rgba(255, 0, 0, 0.7); }
}

/* ── Host table (oval poker table) ───────────────────────────────────────── */

.ld-host-table {
  max-width: 900px;
}

.ld-table-oval {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 3rem auto 3rem;
  aspect-ratio: 16 / 10;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%232d6b3f'/%3E%3Crect x='0' y='0' width='1' height='1' fill='%23296838' opacity='0.3'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23327244' opacity='0.25'/%3E%3C/svg%3E"),
    radial-gradient(ellipse, #2d6b3f 0%, #1a4a2a 80%);
  border: 8px solid #5a3a1a;
  border-radius: 50%;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.35),
    inset 0 0 120px rgba(0,0,0,0.15),
    6px 6px 0 #3a2510,
    0 8px 30px rgba(0,0,0,0.4);
  overflow: visible;
}

.ld-table-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 1;
}

.ld-center-round {
  font-weight: 700;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ld-center-bid {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0.25rem 0;
  min-height: 1.5em;
}

.ld-center-bid .ld-bid-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ld-center-turn {
  font-size: 1.6rem;
  color: rgba(255,255,255,0.8);
}

.ld-center-wild {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
}

.ld-dice-total {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  padding: 0.3rem 1.2rem;
  border-radius: 20px;
  font-size: 1.3rem;
  border: 1px solid rgba(255,255,255,0.2);
  letter-spacing: 0.02em;
}

/* ── Seat cards (PokerStars-style, outside the table) ─────────────────── */

.ld-table-seat {
  position: absolute;
  /* top/left computed in JS via elliptical math */
  transform: translate(-50%, -50%);
  transition: opacity 0.5s, filter 0.5s;
  z-index: 2;
  /* Card styling */
  background: #2a2a2e;
  border-radius: 10px;
  padding: 6px 10px;
  border: 2px solid #3a3a3e;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  white-space: nowrap;
}

/* Horizontal inner layout: duck left, info right */
.ld-seat-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ld-seat-active {
  border-color: #FFD700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.6), 0 3px 10px rgba(0,0,0,0.5);
}

.ld-seat-active .ld-seat-name {
  color: #FFD700;
  font-weight: 700;
}

/* Pulsing glow for active turn */
.ld-seat-active::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 2px solid #FFD700;
  animation: ld-turn-glow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ld-turn-glow {
  0%, 100% { opacity: 0.3; box-shadow: 0 0 6px rgba(255,215,0,0.3); }
  50% { opacity: 1; box-shadow: 0 0 16px rgba(255,215,0,0.6); }
}

.ld-seat-eliminated {
  opacity: 0.3;
  filter: grayscale(0.9);
}

.ld-seat-avatar {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ld-seat-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ld-seat-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e0e0e0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.ld-seat-dice-count {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
}

.ld-seat-out {
  font-size: 0.8rem;
  font-weight: 800;
  color: #dc3545;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hidden dice (?) styling */
.ld-die-hidden {
  display: inline-block;
}

/* ── Bid Log (Liar's Dice) ─────────────────────────────────────────────── */

#ld-bid-log {
  max-width: 700px;
  margin: 0 auto;
}

#ld-bid-log h6 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: #888;
}

#ld-bid-log .war-log-entries {
  min-height: 60px;
  max-height: 200px;
  font-size: 1.1rem;
  border: 1px solid rgba(255,255,255,0.06);
}

#ld-bid-log .war-log-entries:empty::before {
  content: 'No bids yet...';
  display: block;
  text-align: center;
  color: rgba(255,255,255,0.3);
  padding: 1rem 0;
  font-style: italic;
  font-family: inherit;
}

#ld-bid-log .war-log-entry {
  padding: 0.3rem 0;
  font-size: 1.1rem;
}

/* ── Challenge / Reveal ──────────────────────────────────────────────────── */

.ld-host-challenge {
  text-align: center;
}

.ld-liar-title {
  font-weight: 900;
  font-size: 3.5rem;
}

.ld-challenge-bid {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2.2rem;
  font-weight: 700;
  background: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 12px;
  border: 3px solid #222;
}

.ld-reveal-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}

.ld-reveal-player {
  text-align: center;
  min-width: 120px;
}

.ld-reveal-avatar {
  margin-bottom: 0.4rem;
}

.ld-reveal-name {
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.ld-reveal-dice {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  min-height: 68px;
  align-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s;
}

.ld-reveal-dice.ld-reveal-visible {
  opacity: 1;
  transform: scale(1);
}

.ld-reveal-counter {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 1.5rem 0;
}

.ld-counter-value {
  display: inline-block;
  background: #222;
  color: #fff;
  padding: 0.3rem 1rem;
  border-radius: 10px;
  font-size: 2.5rem;
  min-width: 2em;
  transition: background 0.3s;
}

.ld-counter-value.ld-counter-met {
  background: #28a745;
  animation: ld-counter-pulse 0.5s ease-in-out;
}

@keyframes ld-counter-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.ld-counter-needed {
  font-size: 1.8rem;
  font-weight: 400;
  color: #666;
  margin-left: 0.3rem;
}

/* ── Verdict ─────────────────────────────────────────────────────────────── */

.ld-verdict {
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1rem auto;
  max-width: 500px;
  animation: ld-verdict-in 0.4s ease-out;
}

@keyframes ld-verdict-in {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ld-verdict h2 {
  font-weight: 900;
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.ld-verdict-liar {
  background: #f8d7da;
  border: 3px solid #dc3545;
  color: #721c24;
}

.ld-verdict-liar h2 { color: #dc3545; }

.ld-verdict-not-liar {
  background: #d4edda;
  border: 3px solid #28a745;
  color: #155724;
}

.ld-verdict-not-liar h2 { color: #28a745; }

.ld-verdict-loser {
  font-size: 1.8rem;
  margin-top: 0.5rem;
}

/* ── Player layout (mobile-first, no scroll needed for buttons) ──────────── */

.ld-player-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
  max-width: 400px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  text-align: center;
}

.ld-player-dice-area {
  padding: 0.5rem 0;
  flex-shrink: 0;
}

.ld-my-dice {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.5rem;
}

.ld-my-dice-last .ld-die {
  animation: ld-pulse-die 1.5s ease-in-out infinite;
}

.ld-dice-info {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.25rem;
}

.ld-current-bid-area {
  padding: 0.4rem 0;
  flex-shrink: 0;
}

.ld-current-bid {
  background: #fff;
  border: 2px solid #222;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ld-bid-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.ld-bid-display {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 800;
  font-size: 1.1rem;
}

.ld-bid-by {
  font-size: 0.8rem;
  color: #888;
}

/* ── Bid controls ────────────────────────────────────────────────────────── */

.ld-bid-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
}

.ld-waiting-turn {
  opacity: 0.5;
}

.ld-quantity-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ld-qty-value {
  font-size: 2rem;
  font-weight: 900;
  min-width: 2em;
  text-align: center;
}

.ld-qty-btn {
  width: 44px;
  height: 44px;
}

.ld-value-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ld-value-option {
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
}

.ld-value-option:hover:not(.ld-value-disabled) {
  border-color: #FFD700;
}

.ld-value-selected {
  border-color: #222 !important;
  background: #FFF8DC;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.ld-value-disabled {
  opacity: 0.25;
  pointer-events: none;
}

/* ── Action buttons (side by side) ───────────────────────────────────────── */

.ld-action-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 0.5rem 0 1rem;
  flex-shrink: 0;
}

.ld-bid-btn {
  flex: 3;
  background: #28a745;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid #1e7e34;
  border-radius: 8px;
  box-shadow: 2px 2px 0 #1a5c2a;
  transition: transform 0.1s, box-shadow 0.1s;
}

.ld-bid-btn:hover:not(:disabled) {
  background: #218838;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #1a5c2a;
}

.ld-bid-btn:disabled {
  opacity: 0.5;
}

.ld-liar-btn {
  flex: 2;
  background: #dc3545;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid #bd2130;
  border-radius: 8px;
  box-shadow: 2px 2px 0 #8b1a25;
  transition: transform 0.1s, box-shadow 0.1s;
}

.ld-liar-btn:hover:not(:disabled) {
  background: #c82333;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #8b1a25;
}

.ld-liar-btn:disabled {
  opacity: 0.5;
}

/* ── Roll animation ──────────────────────────────────────────────────────── */

.ld-roll-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}

.ld-cup {
  font-size: 6rem;
  animation: ld-shake 0.4s ease-in-out infinite alternate;
}

@keyframes ld-shake {
  0% { transform: rotate(-15deg) translateY(0); }
  100% { transform: rotate(15deg) translateY(-10px); }
}

.ld-shake-text {
  font-weight: 700;
  font-size: 1.3rem;
  color: #666;
  margin-top: 1rem;
}

/* ── Mobile adjustments ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .ld-table-oval {
    aspect-ratio: 4 / 3;
  }

  .ld-center-bid {
    font-size: 1.2rem;
  }

  .ld-center-turn {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .ld-player-layout {
    min-height: calc(100vh - 60px);
    padding: 0.25rem 0.75rem;
  }

  .ld-qty-value {
    font-size: 1.8rem;
  }

  .ld-action-row {
    padding: 0.25rem 0 0.75rem;
  }

  .ld-bid-btn, .ld-liar-btn {
    font-size: 1.1rem;
    padding: 0.7rem 1rem;
  }

  .ld-my-dice {
    gap: 0.3rem;
    padding: 0.3rem;
  }
}
