/* ==========================================================================
   PANDEMIC TACTICAL COMMAND TERMINAL - GAME STYLING
   High-contrast, dark biohazard command room aesthetic
   ========================================================================== */

:root {
  --bg-deep: #030712;
  --bg-panel: rgba(15, 23, 42, 0.88);
  --bg-panel-hover: rgba(30, 41, 59, 0.95);
  --border-panel: rgba(56, 189, 248, 0.22);
  --border-panel-bright: rgba(56, 189, 248, 0.6);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-blue: #38bdf8;
  --accent-yellow: #facc15;
  --accent-black: #94a3b8;
  --accent-red: #f43f5e;
  --accent-green: #10b981;

  --shadow-hud: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  --glow-cyan: 0 0 14px rgba(56, 189, 248, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  touch-action: manipulation;
}

/* ==========================================================================
   FULLSCREEN GAME CONTAINER
   ========================================================================== */
.game-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* World Map Canvas */
.map-canvas-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#mapCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Tactical Screen Vignette */
.screen-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.85);
}

/* 3D Globe Navigation HUD Controls */
.globe-nav-controls {
  position: absolute;
  right: 16px;
  top: 96px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 16, 30, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.btn-globe-nav {
  width: 32px;
  height: 32px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 6px;
  color: #38bdf8;
  font-size: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-globe-nav:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: scale(1.06);
}

.btn-globe-nav:active {
  transform: scale(0.94);
}

.btn-globe-nav.active {
  background: rgba(56, 189, 248, 0.32);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

@media (max-width: 600px) {
  .globe-nav-controls {
    right: 10px;
    top: auto;
    bottom: 215px;
    padding: 4px;
    gap: 4px;
  }
  .btn-globe-nav {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}

/* ==========================================================================
   TOP TACTICAL HUD (Trackers, Vials, System Controls)
   ========================================================================== */
.top-hud {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.top-hud > * {
  pointer-events: auto;
}

.hud-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-panel);
  border-radius: 12px;
  padding: 6px 14px;
  box-shadow: var(--shadow-hud);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Brand Logo */
.brand-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.8));
  animation: pulseBio 2.4s infinite ease-in-out;
}

@keyframes pulseBio {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
}

.brand-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

.brand-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fca5a5;
}

/* Trackers: Outbreaks & Infection Rate */
.trackers-panel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tracker-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracker-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.tracker-val {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
}

.tracker-pips {
  display: flex;
  gap: 3px;
}

.track-pip {
  font-size: 10px;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

.track-pip.active {
  background: rgba(56, 189, 248, 0.35);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  transform: scale(1.1);
}

.track-pip.skull.active {
  background: rgba(244, 63, 94, 0.5);
  border-color: #f43f5e;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.8);
}

/* Cure Vials Panel */
.vials-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vial-card {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
}

.vial-icon {
  font-size: 13px;
}

.vial-info {
  display: flex;
  flex-direction: column;
}

.vial-name {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.vial-status {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
}

.vial-blue { border-color: rgba(56, 189, 248, 0.35); }
.vial-blue .vial-name { color: var(--accent-blue); }
.vial-blue.status-cured { border-color: var(--accent-blue); box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }

.vial-yellow { border-color: rgba(250, 204, 21, 0.35); }
.vial-yellow .vial-name { color: var(--accent-yellow); }
.vial-yellow.status-cured { border-color: var(--accent-yellow); box-shadow: 0 0 10px rgba(250, 204, 21, 0.5); }

.vial-black { border-color: rgba(148, 163, 184, 0.35); }
.vial-black .vial-name { color: var(--accent-black); }
.vial-black.status-cured { border-color: var(--accent-black); box-shadow: 0 0 10px rgba(148, 163, 184, 0.5); }

.vial-red { border-color: rgba(244, 63, 94, 0.35); }
.vial-red .vial-name { color: var(--accent-red); }
.vial-red.status-cured { border-color: var(--accent-red); box-shadow: 0 0 10px rgba(244, 63, 94, 0.5); }

.vial-card.status-cured .vial-status { color: #10b981; font-weight: 900; }
.vial-card.status-eradicated .vial-status { color: #facc15; font-weight: 900; }

.top-hud-row {
  display: contents;
}

.brand-panel { order: 1; }
.trackers-panel { order: 2; }
.vials-panel { order: 3; }
.supplies-panel { order: 4; }
.controls-panel { order: 5; }

.tracker-icon-mini {
  display: none;
}

.tracker-max {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
}

/* Disease Supplies Panel */
.supplies-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.supplies-counter-list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
}

.supply-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-roster-toggle {
  display: none;
}

/* System Controls (Sound, Rules, New Game) */
.controls-panel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-tactical {
  background: rgba(30, 41, 59, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tactical:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

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

/* ==========================================================================
   RESUME GAME BANNER
   ========================================================================== */
.resume-banner {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(15, 23, 42, 0.96);
  border: 1.5px solid var(--accent-yellow);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75), 0 0 15px rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  max-width: 92vw;
  box-sizing: border-box;
}

.resume-banner .resume-squad-names {
  color: var(--accent-cyan);
  font-weight: 700;
}

.btn-banner-action {
  background: var(--accent-yellow);
  color: #000000;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-banner-action:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-banner-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}

.btn-banner-dismiss:hover {
  color: #ffffff;
}

/* ==========================================================================
   TACTICAL TOAST NOTIFICATIONS
   ========================================================================== */
.tactical-toast-container {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.tactical-toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}

.tactical-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.tactical-toast.toast-success {
  border-color: var(--disease-green);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.tactical-toast.toast-danger {
  border-color: var(--disease-red);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
}

.tactical-toast .toast-indicator {
  color: var(--accent-cyan);
  font-size: 11px;
}

.tactical-toast.toast-success .toast-indicator {
  color: var(--disease-green);
}

.tactical-toast.toast-danger .toast-indicator {
  color: var(--disease-red);
}

/* ==========================================================================
   TACTICAL CARD REVEAL MODAL (Drawn Player & Infection Cards)
   ========================================================================== */
.modal-card.card-reveal-modal-card {
  max-width: 760px !important;
  width: min(760px, 94vw) !important;
  max-height: calc(100vh - 40px);
  background: #0b1120 !important;
  border: 1.5px solid var(--accent-cyan);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.6);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.modal-card.card-reveal-modal-card::-webkit-scrollbar {
  width: 6px;
}
.modal-card.card-reveal-modal-card::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
.modal-card.card-reveal-modal-card::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 3px;
}

.modal-card.card-reveal-modal-card.has-epidemic {
  border-color: var(--disease-red);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 40px rgba(239, 68, 68, 0.45);
  animation: epidemicBorderPulse 1.8s infinite alternate ease-in-out;
}

@keyframes epidemicBorderPulse {
  0% { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(239, 68, 68, 0.35); }
  100% { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 55px rgba(239, 68, 68, 0.75); }
}

.card-reveal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.card-reveal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-reveal-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.card-reveal-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.modal-card.card-reveal-modal-card.has-epidemic .card-reveal-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: #ef4444;
}

/* Cards Grid */
.drawn-cards-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin: 14px 0;
  flex-wrap: wrap;
}

/* Individual Revealed Card */
.revealed-card {
  flex: 1 1 200px;
  max-width: 230px;
  min-width: 190px;
  min-height: 270px;
  background: #162032;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: revealCardPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.revealed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8);
}

@keyframes revealCardPop {
  0% {
    opacity: 0.95;
    transform: translateY(14px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Revealed Card Types */
.revealed-card.card-blue {
  border-color: var(--disease-blue);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.25);
}
.revealed-card.card-yellow {
  border-color: var(--disease-yellow);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(250, 204, 21, 0.25);
}
.revealed-card.card-black {
  border-color: var(--disease-black);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(148, 163, 184, 0.25);
}
.revealed-card.card-red {
  border-color: var(--disease-red);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(244, 63, 94, 0.25);
}
.revealed-card.card-event {
  border-color: #a855f7;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.3);
}
.revealed-card.card-epidemic {
  border-color: #ef4444;
  background: linear-gradient(180deg, #3f1016 0%, #17070b 100%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 30px rgba(239, 68, 68, 0.5);
  animation: epidemicCardShake 0.5s ease-in-out;
}

@keyframes epidemicCardShake {
  0%, 100% { transform: translateY(0); }
  20%, 60% { transform: translateY(-4px) rotate(-1deg); }
  40%, 80% { transform: translateY(4px) rotate(1deg); }
}

/* Card Header Banner */
.revealed-card-header {
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-blue .revealed-card-header { background: rgba(56, 189, 248, 0.22); color: #7dd3fc; }
.card-yellow .revealed-card-header { background: rgba(250, 204, 21, 0.22); color: #fde047; }
.card-black .revealed-card-header { background: rgba(148, 163, 184, 0.22); color: #cbd5e1; }
.card-red .revealed-card-header { background: rgba(244, 63, 94, 0.22); color: #fda4af; }
.card-event .revealed-card-header { background: rgba(168, 85, 247, 0.25); color: #d8b4fe; }
.card-epidemic .revealed-card-header { background: rgba(239, 68, 68, 0.35); color: #fca5a5; }

/* Card Body */
.revealed-card-body {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  text-align: center;
}

.revealed-card-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.2;
}

.revealed-card-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.revealed-card-icon-big {
  font-size: 38px;
  margin: 8px 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.revealed-card-desc {
  font-size: 11.5px;
  color: var(--text-main);
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
  text-align: left;
}

/* Card Transmission Outcome Badge (for Infection Cards) */
.revealed-card-outcome {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.outcome-cube-added {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.outcome-outbreak {
  background: rgba(239, 68, 68, 0.25);
  border: 1.5px solid var(--disease-red);
  color: #fca5a5;
  animation: outbreakFlash 1s infinite alternate;
}

@keyframes outbreakFlash {
  0% { background: rgba(239, 68, 68, 0.2); }
  100% { background: rgba(239, 68, 68, 0.45); }
}

.outcome-eradicated {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--disease-green);
  color: #6ee7b7;
}

.outcome-quarantine {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}

/* Tactical Alert Banner inside modal */
.card-reveal-alert {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid #ef4444;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.card-reveal-alert-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.card-reveal-alert-body {
  font-size: 12px;
  color: #fecaca;
  line-height: 1.4;
}

.card-reveal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.btn-reveal-continue {
  padding: 10px 24px;
  font-size: 13px;
  letter-spacing: 1px;
}

/* Interactive Deck tracker hover effect */
.tracker-deck-interactive:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: var(--accent-cyan) !important;
}

/* ==========================================================================
   BOTTOM COMMAND DECK (Active Player, Actions, Hand)
   ========================================================================== */
.bottom-command-deck {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.bottom-command-deck > * {
  pointer-events: auto;
}

/* Command Center Bar (Compact Layout) */
.command-center-bar.compact-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .command-center-bar.compact-layout {
    display: flex;
    flex-direction: row;
    gap: 6px;
  }
}

/* 1. Active Player Card */
.active-player-card {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--border-panel);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: var(--shadow-hud);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.p-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
}

.p-card-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.p-card-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-card-role {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.p-card-city {
  font-size: 10.5px;
  color: var(--text-muted);
}

.p-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 5px;
}

.action-battery-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.battery-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
}

.action-pips {
  display: flex;
  gap: 3px;
}

.action-pip {
  font-size: 11px;
  line-height: 1;
}

.action-pip.charged {
  color: #facc15;
  filter: drop-shadow(0 0 6px #facc15);
}

.action-pip.spent {
  color: rgba(255, 255, 255, 0.15);
}

.phase-tag {
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   VERTICAL ACTION DOCK (FLOATING OVER CANVAS)
   ========================================================================== */
.vertical-action-dock {
  position: absolute;
  top: 64px;
  left: 12px;
  z-index: 15;
  width: 154px;
  max-height: calc(100vh - 175px);
  background: rgba(10, 16, 30, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border-panel);
  border-radius: 12px;
  padding: 8px 6px;
  box-shadow: var(--shadow-hud), 0 8px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  pointer-events: auto;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s ease;
}

.vertical-action-dock::-webkit-scrollbar {
  width: 3px;
}
.vertical-action-dock::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}

/* Header & Toggle Button */
.action-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2px;
}

.action-dock-header-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dock-header-icon {
  font-size: 12px;
  color: var(--accent-yellow);
}

.action-dock-title {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.btn-dock-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dock-toggle:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Collapsed State for Mobile / Minimal Mode */
.vertical-action-dock.collapsed {
  width: 52px;
  padding: 8px 7px;
  box-sizing: border-box;
}

.vertical-action-dock.collapsed .action-dock-title,
.vertical-action-dock.collapsed .action-label {
  display: none;
}

.vertical-action-dock.collapsed .action-dock-header {
  justify-content: center;
  border-bottom: none;
  padding-bottom: 2px;
}

.vertical-action-dock.collapsed .action-dock-header-left {
  display: none;
}

.vertical-action-dock.collapsed .btn-dock-toggle {
  transform: rotate(180deg);
}

.vertical-action-dock.collapsed .btn-action {
  justify-content: center !important;
  padding: 0 !important;
  width: 38px !important;
  height: 38px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

/* Action Buttons Vertical Grid */
.action-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.btn-action {
  background: rgba(30, 41, 59, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: left;
  width: 100%;
}

.action-icon {
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}

.action-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-action:hover:not(:disabled) {
  background: rgba(51, 65, 85, 1);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  transform: translateX(2px);
}

.btn-action:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

/* Specific button styles */
.btn-action-drive {
  border-left: 3px solid #0284c7;
}

.btn-action-flight {
  border-left: 3px solid #38bdf8;
}

.btn-action-charter {
  border-left: 3px solid #facc15;
}

.btn-action-shuttle {
  border-left: 3px solid #06b6d4;
}

.btn-action-cure {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.3) 0%, rgba(4, 120, 87, 0.4) 100%);
  border-color: #34d399;
}

.btn-action-cure:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-action-pass {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
}

/* Targeting Mode Active State */
.btn-action.targeting-active {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.7) !important;
  color: #38bdf8 !important;
  animation: pulseTargetingBtn 1.6s infinite ease-in-out;
}

@keyframes pulseTargetingBtn {
  0%, 100% { border-color: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
  50% { border-color: #ffffff; box-shadow: 0 0 16px rgba(56, 189, 248, 0.9); }
}

/* Draw & Infect Phase Big Buttons in Vertical Dock */
.phase-action-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding-top: 4px;
}

.btn-big-phase {
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  text-align: center;
  width: 100%;
}

.btn-draw-cards {
  background: linear-gradient(135deg, #0284c7 0%, #0f766e 100%);
  border: 1.5px solid #38bdf8;
  color: #ffffff;
}

.btn-draw-cards:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.7);
}

.btn-infect-cities {
  background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
  border: 1.5px solid #f43f5e;
  color: #ffffff;
}

.btn-infect-cities:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.7);
}

/* ==========================================================================
   MAP TARGETING BANNER (FLOATING HUD OVER CANVAS)
   ========================================================================== */
.map-targeting-banner {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(10, 18, 36, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid #38bdf8;
  border-radius: 30px;
  padding: 6px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 18px rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: bannerSlideDown 0.25s ease-out;
}

@keyframes bannerSlideDown {
  0% { transform: translate(-50%, -4px); opacity: 1; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

.targeting-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.targeting-banner-icon {
  font-size: 15px;
  animation: pulseTargetIcon 1.5s infinite ease-in-out;
}

@keyframes pulseTargetIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.targeting-banner-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  white-space: nowrap;
}

.targeting-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-targeting-list, .btn-targeting-cancel {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-targeting-list {
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.btn-targeting-list:hover {
  background: #38bdf8;
  color: #000000;
}

.btn-targeting-cancel {
  background: rgba(244, 63, 94, 0.25);
  border: 1px solid #f43f5e;
  color: #fca5a5;
}

.btn-targeting-cancel:hover {
  background: #f43f5e;
  color: #ffffff;
}
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
}

.btn-draw-cards {
  background: linear-gradient(135deg, #0284c7 0%, #0f766e 100%);
  border: 2px solid #38bdf8;
  color: #ffffff;
}

.btn-draw-cards:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
}

.btn-infect-cities {
  background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
  border: 2px solid #f43f5e;
  color: #ffffff;
}

.btn-infect-cities:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.7);
}

/* 3. Player Hand Cards */
.hand-deck-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-panel);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: var(--shadow-hud);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.hand-panel-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.player-hand-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.player-hand-container::-webkit-scrollbar {
  height: 4px;
}
.player-hand-container::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.hand-card {
  min-width: 82px;
  max-width: 95px;
  height: 98px;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
}

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

.card-type-tag {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.card-color-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.card-title-name {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  word-break: break-word;
}

.card-sub-info {
  font-size: 8px;
  color: var(--text-dim);
}

.card-event-desc {
  font-size: 7.5px;
  color: #cbd5e1;
  line-height: 1.1;
  overflow: hidden;
}

.btn-card-play, .btn-card-discard {
  width: 100%;
  padding: 3px 0;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
  border: none;
}

.btn-card-play {
  background: #06b6d4;
  color: #000000;
}

.btn-card-discard {
  background: #f43f5e;
  color: #ffffff;
}

/* Team Hands Overview Drawer */
.team-hands-overview {
  background: rgba(10, 16, 30, 0.92);
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.team-hands-overview::-webkit-scrollbar {
  height: 3px;
}
.team-hands-overview::-webkit-scrollbar-track {
  background: transparent;
}
.team-hands-overview::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}

.team-player-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 4px 8px;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.team-player-card.active-turn {
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

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

.team-p-role {
  font-size: 9px;
  font-weight: 800;
}

.team-p-city {
  font-size: 8.5px;
  color: var(--text-muted);
}

.team-p-name {
  font-size: 10px;
  font-weight: 700;
}

.team-p-hand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.team-card-chip {
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.chip-blue { border-color: var(--accent-blue); color: var(--accent-blue); }
.chip-yellow { border-color: var(--accent-yellow); color: var(--accent-yellow); }
.chip-black { border-color: var(--accent-black); color: var(--accent-black); }
.chip-red { border-color: var(--accent-red); color: var(--accent-red); }
.chip-event { border-color: #06b6d4; color: #06b6d4; }

/* Comms Log Ticker */
.log-ticker-bar {
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: monospace;
}

.ticker-tag {
  color: var(--accent-blue);
  font-weight: 800;
}

.log-ticker {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-warn { color: #facc15; }
.ticker-danger { color: #f43f5e; font-weight: bold; }
.ticker-success { color: #34d399; font-weight: bold; }
.ticker-epidemic { color: #f43f5e; font-weight: bold; text-shadow: 0 0 6px #f43f5e; }

/* ==========================================================================
   MODALS (Hotseat Pass, Action Selection, Setup, Rules, Game Over)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(4, 7, 16, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: #0f172a;
  border: 2px solid var(--border-panel);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), var(--glow-cyan);
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.6);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalPop 0.25s ease-out;
}

.modal-card::-webkit-scrollbar {
  width: 6px;
}
.modal-card::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 3px;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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

.modal-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

/* ==========================================================================
   RULES & PROTOCOL MANUAL MODAL
   ========================================================================== */
.rules-modal-card {
  background: #0b1120;
  max-width: 800px;
  width: 95%;
  max-height: 88vh;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
  animation: none;
}

.rules-tab-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.rules-tab-bar::-webkit-scrollbar {
  display: none;
}

.rules-tab-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rules-tab-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}

.rules-tab-btn.active {
  background: rgba(2, 132, 199, 0.35);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.rules-tab-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.6);
}

.rules-tab-content::-webkit-scrollbar {
  width: 5px;
}
.rules-tab-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.rules-tab-content::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}

.rules-tab-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.rules-tab-pane.active {
  display: flex;
}

.rules-section-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
}

.rules-section-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.rules-callout {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11.5px;
  line-height: 1.45;
  margin-top: 8px;
  border-left: 3.5px solid transparent;
}

.rules-callout-tip {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #a7f3d0;
}

.rules-callout-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: #fde68a;
}

.rules-callout-danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: #f43f5e;
  color: #fecdd3;
}

.rules-role-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--role-color, #38bdf8);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.rules-role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.rules-role-title {
  font-weight: 800;
  font-size: 13px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rules-faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
}
.rules-faq-item:last-child {
  border-bottom: none;
}
.rules-faq-q {
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rules-faq-a {
  color: #cbd5e1;
  font-size: 12px;
  padding-left: 18px;
}

/* Hotseat Pass Device Modal */
.pass-device-card {
  text-align: center;
  align-items: center;
}

.pass-avatar-big {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
  margin: 6px 0;
}

.pass-player-name {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
}

.pass-player-role {
  font-size: 14px;
  font-weight: 800;
}

.pass-player-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.4;
}

.btn-ready-action {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 2px solid #38bdf8;
  color: #ffffff;
  padding: 12px 32px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
  transition: all 0.2s ease;
}

.btn-ready-action:hover {
  transform: scale(1.05);
}

/* Action Modal Options List */
.action-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.btn-modal-option {
  background: rgba(30, 41, 59, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-option:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: #38bdf8;
  transform: translateX(4px);
}

/* Setup Form */
.setup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

.form-select, .form-input {
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.setup-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.setup-p-idx {
  font-size: 11px;
  font-weight: 900;
  color: var(--accent-blue);
  width: 22px;
}

.input-p-name {
  flex: 1;
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.select-p-role {
  flex: 1.5;
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.setup-buttons-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* Game Over Modal Stats */
.game-over-stats {
  display: flex;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 8px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-box span {
  font-size: 10px;
  color: var(--text-muted);
}

.stat-box strong {
  font-size: 18px;
  color: #ffffff;
}

.text-win { color: #34d399; }
.text-defeat { color: #f43f5e; }

/* ==========================================================================
   MOBILE RESPONSIVENESS (< 768px)
   Maximize canvas map area, compact HUD and floating controls
   ========================================================================== */
@media (max-width: 768px) {
  /* ==========================================================================
     TOP HUD: Mobile 2-Row Layout - 100% visible, zero scroll clipping
     Row 1: Trackers (Outbreaks, Rate, Deck) + 5 Tactical Controls
     Row 2: 4 Disease Vials + 4 Disease Supplies
     ========================================================================== */
  .top-hud {
    top: 4px;
    left: 4px;
    right: 4px;
    gap: 3px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    pointer-events: none;
  }

  .top-hud-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    pointer-events: none;
  }

  .top-hud-row > * {
    pointer-events: auto;
  }

  .hud-panel {
    padding: 2px 6px;
    gap: 6px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  /* Hide brand block on mobile so all tactical indicators fit on screen */
  .brand-panel {
    display: none !important;
  }

  /* Trackers Panel (Row 1 Left): Mini icons + numeric readouts */
  .trackers-panel {
    gap: 6px;
    padding: 3px 7px;
  }

  .tracker-group {
    gap: 3px;
  }

  .tracker-icon-mini {
    display: inline-block;
    font-size: 11px;
  }

  .tracker-label {
    display: none; /* Hide OUTBREAKS: / RATE: / DECK: text on mobile */
  }

  .tracker-val {
    font-size: 12px;
    font-weight: 900;
  }

  .tracker-max {
    font-size: 9px;
    color: var(--text-dim);
  }

  .tracker-pips {
    display: none !important; /* Hide long pip tracks on mobile */
  }

  .tracker-sep {
    height: 12px !important;
  }

  /* Tactical Controls (Row 1 Right) */
  .controls-panel {
    gap: 3px;
    padding: 2px 4px;
  }

  .btn-tactical {
    width: 26px;
    height: 26px;
    font-size: 11px;
    border-radius: 6px;
  }

  /* Disease Cure Vials (Row 2 Left) */
  .vials-panel {
    gap: 3px;
    padding: 2px 4px;
  }

  .vial-card {
    padding: 2px 4px;
    gap: 2px;
    border-radius: 5px;
  }

  .vial-icon {
    font-size: 9px;
  }

  .vial-name {
    font-size: 8px;
  }

  .vial-status {
    display: none; /* Border color and glow communicate state */
  }

  /* Disease Supply Counters (Row 2 Right) */
  .supplies-panel {
    padding: 2px 6px;
    gap: 4px;
  }

  .supplies-counter-list {
    gap: 5px;
    font-size: 9.5px;
    font-weight: 800;
  }

  .supply-chip {
    gap: 2px;
  }

  /* Vertical Action Dock: Position below 2-row top HUD with NO background on mobile */
  .vertical-action-dock {
    top: 64px;
    left: 4px;
    max-height: calc(100vh - 165px);
    width: 136px;
    padding: 5px 3px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    scrollbar-width: none;
    transition: none !important;
  }

  .vertical-action-dock::-webkit-scrollbar {
    display: none;
  }

  .vertical-action-dock.collapsed {
    width: 48px;
    padding: 6px 6px;
    left: 6px;
    box-sizing: border-box;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .vertical-action-dock.collapsed .btn-action {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .vertical-action-dock .action-dock-header {
    border-bottom: none !important;
    margin-bottom: 4px;
  }

  .vertical-action-dock .action-dock-header-left {
    background: rgba(10, 16, 30, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  }

  .vertical-action-dock .btn-dock-toggle {
    background: rgba(10, 16, 30, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  }

  /* Hide unavailable actions on mobile viewports */
  .vertical-action-dock .btn-action:disabled,
  .vertical-action-dock .btn-action.action-unavailable {
    display: none !important;
  }

  .btn-action {
    padding: 5px 6px;
    font-size: 9.5px;
    gap: 4px;
  }

  .action-icon {
    font-size: 12px;
  }

  /* Bottom Command Deck */
  .bottom-command-deck {
    bottom: 4px;
    left: 4px;
    right: 4px;
    gap: 4px;
  }

  /* Collapsible Squad Roster Button on Mobile */
  .btn-roster-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border-panel);
    border-radius: 6px;
    padding: 3px 8px;
    color: var(--text-main);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.15s ease;
  }

  .btn-roster-toggle:hover {
    background: rgba(30, 41, 59, 0.95);
  }

  .team-hands-overview.collapsed {
    display: none !important;
  }

  .team-hands-overview {
    padding: 3px 6px;
    gap: 6px;
  }

  .team-player-card {
    min-width: 130px;
    padding: 3px 6px;
  }

  .command-center-bar.compact-layout {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: stretch;
  }

  .active-player-card {
    min-width: 105px;
    max-width: 120px;
    padding: 4px 6px;
    gap: 4px;
  }

  .player-avatar-badge {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .p-card-name {
    font-size: 11px;
  }

  .p-card-role {
    font-size: 9px;
  }

  .p-card-city {
    font-size: 9px;
  }

  .battery-label {
    display: none;
  }

  .action-pip {
    font-size: 10px;
  }

  .phase-tag {
    display: none;
  }

  .hand-deck-panel {
    padding: 4px 6px;
    gap: 3px;
    flex: 1;
    overflow: hidden;
  }

  .hand-panel-header {
    display: none;
  }

  .player-hand-container {
    gap: 5px;
    padding-bottom: 2px;
  }

  .hand-card {
    min-width: 66px;
    max-width: 76px;
    height: 72px;
    padding: 4px;
    border-width: 1.5px;
  }

  .card-type-tag {
    font-size: 7px;
  }

  .card-title-name {
    font-size: 9px;
    line-height: 1.1;
  }

  .card-sub-info {
    font-size: 7px;
  }

  .btn-card-play, .btn-card-discard {
    font-size: 7px;
    padding: 2px 0;
  }

  .log-ticker-bar {
    padding: 2px 6px;
    font-size: 9.5px;
  }

  .map-targeting-banner {
    top: 64px;
    padding: 4px 10px;
    font-size: 10.5px;
    max-width: 92vw;
  }

  .resume-banner {
    top: 64px;
    padding: 6px 10px;
    font-size: 11px;
    max-width: 95vw;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .tactical-toast-container {
    top: 60px;
    max-width: 95vw;
  }

  .tactical-toast {
    font-size: 11px;
    padding: 6px 12px;
  }

  .rules-modal-card {
    width: 96%;
    padding: 14px 12px;
    max-height: 90vh;
  }

  .rules-tab-btn {
    padding: 5px 9px;
    font-size: 10px;
  }

  .modal-card.card-reveal-modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 12px 10px;
    max-height: 92vh;
    gap: 8px;
    overflow-y: auto;
  }

  .drawn-cards-grid {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
  }

  .revealed-card {
    width: 100%;
    max-width: 330px;
    min-height: unset;
    border-radius: 8px;
    flex: 1 1 auto;
  }

  .revealed-card-header {
    padding: 5px 8px;
    font-size: 9px;
  }

  .revealed-card-body {
    padding: 8px 10px;
    gap: 2px;
  }

  .revealed-card-title {
    font-size: 15px;
    margin-bottom: 2px;
  }

  .revealed-card-icon-big {
    font-size: 22px;
    margin: 2px 0;
  }

  .revealed-card-meta {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .revealed-card-outcome {
    padding: 5px 8px;
    font-size: 10.5px;
    margin-top: 4px;
  }

  .revealed-card-desc {
    font-size: 10.5px;
    padding: 6px 8px;
    line-height: 1.35;
  }

  .card-reveal-alert {
    padding: 8px 10px;
    margin-top: 6px;
  }

  .card-reveal-alert-body {
    font-size: 11px;
    line-height: 1.35;
  }

  .card-reveal-actions {
    margin-top: 8px;
  }

  .btn-reveal-continue {
    width: 100%;
    padding: 10px 16px;
    font-size: 12px;
    text-align: center;
  }
}

