/* ==========================================================
   SOAP'S REDEMPTION - GRITTY REALISTIC TACTICAL STYLE SHEET
   ========================================================== */

:root {
  --tactical-green: #52604d;       /* Matte Olive Drab */
  --tactical-green-light: #7a8c73; /* Muted Active Green */
  --tactical-warn: #c2410c;        /* Matte Rust Orange */
  --tactical-red: #991b1b;         /* Muted Deep Crimson */
  --bg-matte: #0e1113;             /* Dark Matte Charcoal */
  --panel-bg: rgba(18, 22, 25, 0.94);
  --panel-border: rgba(255, 255, 255, 0.12);
  --font-military: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --panel-radius: 4px;             /* Industrial sharp/slight rounded corners */
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-matte);
  font-family: var(--font-body);
  color: #e5e7eb;
}

/* Gameplay Viewport */
#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* --- OVERLAY SYSTEM --- */
.screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease-out;
  transform: scale(0.98);
  background: rgba(0, 0, 0, 0.5); /* Dim background behind cards */
}

.screen-overlay.active {
  pointer-events: all;
  opacity: 1;
  transform: scale(1);
}

/* Realistic Tactical Panel (Matte, flat, thin desaturated borders) */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-radius: var(--panel-radius);
  padding: 35px;
  max-width: 550px;
  width: 90%;
  text-align: center;
  position: relative;
}

/* Clean industrial highlight line instead of neon scrolling bar */
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--tactical-green-light);
}

/* Title & Military Typography */
h1.tactical-title {
  font-family: var(--font-military);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #f3f4f6;
  margin-bottom: 5px;
  text-transform: uppercase;
  line-height: 1.1;
}

.subtitle {
  font-family: var(--font-military);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--tactical-green-light);
  letter-spacing: 4px;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.briefing-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #9ca3af;
  margin-bottom: 25px;
  text-align: left;
  border-left: 2px solid var(--tactical-green);
  padding-left: 15px;
}

.briefing-text p {
  margin-bottom: 8px;
}

.briefing-text span {
  color: #fff;
  font-weight: 600;
}

/* Loadout Table / Info */
.loadout-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.loadout-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 2px;
  font-family: var(--font-military);
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: #d1d5db;
}

/* Solid Tactical Buttons (No neon shadows, clean modern states) */
.btn-deploy {
  background: var(--tactical-green);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--font-military);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 12px 35px;
  border-radius: var(--panel-radius);
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease, transform 0.1s ease;
  text-transform: uppercase;
}

.btn-deploy:hover {
  background: var(--tactical-green-light);
}

.btn-deploy:active {
  transform: translateY(1px);
}

/* --- HUD (HEADS-UP DISPLAY) --- */
#gameHud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#gameHud.active {
  opacity: 1;
}

/* Flat HUD Panel design */
.hud-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.hud-panel {
  background: rgba(18, 22, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--panel-radius);
  padding: 10px 18px;
  font-family: var(--font-military);
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-label {
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-value {
  color: #fff;
  font-weight: 700;
}

.stat-value.highlight {
  color: var(--tactical-green-light);
}

/* Bottom HUD Controls & Loadout */
.hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

/* Vitals / Health Bar */
.hud-health-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 250px;
  background: rgba(18, 22, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--panel-radius);
  padding: 10px 12px;
}

.health-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-military);
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: #9ca3af;
}

.health-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  overflow: hidden;
}

.health-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--tactical-green-light);
  transition: width 0.15s ease-out;
}

.health-bar-fill.warning {
  background: var(--tactical-warn);
}

.health-bar-fill.critical {
  background: var(--tactical-red);
}

/* Action Loadout Grid */
.hud-actions {
  display: flex;
  gap: 10px;
}

.action-card {
  background: rgba(18, 22, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--panel-radius);
  padding: 8px 12px;
  min-width: 90px;
  text-align: center;
  position: relative;
  font-family: var(--font-military);
}

.action-card.active {
  border-color: var(--tactical-green-light);
}

.action-name {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.action-ammo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.action-cooldown {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 22, 25, 0.85);
  border-radius: var(--panel-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tactical-warn);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.action-card.cooldown .action-cooldown {
  opacity: 1;
}

/* Keybind indicator */
.keybind-indicator {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- COMMS PANEL (TOP-LEFT UNDER STATS) --- */
#hudCommsPanel {
  position: absolute;
  top: 75px;
  left: 20px;
  width: 320px;
  background: rgba(15, 18, 21, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--tactical-green-light);
  border-radius: var(--panel-radius);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  z-index: 6;
}

#hudCommsPanel.active {
  opacity: 1;
  transform: translateX(0);
}

.comms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-military);
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.comms-status-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comms-blinker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tactical-green-light);
  animation: pulse-blinker 1s infinite alternate;
}

@keyframes pulse-blinker {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.speaker-tag {
  font-family: var(--font-military);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Color codes speaker tags */
.speaker-tag.price {
  color: var(--tactical-green-light);
}

.speaker-tag.ghost {
  color: #78a1bb; /* Muted Slate Blue */
}

.comms-text-box {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #cbd5e1;
  min-height: 42px;
  font-family: var(--font-body);
}

/* Soundwave Audio Indicator */
.soundwave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.soundwave-bar {
  width: 2px;
  height: 100%;
  background: var(--tactical-green-light);
  animation: bounce-soundwave 0.7s ease-in-out infinite alternate;
}
.soundwave-bar:nth-child(2) { animation-delay: 0.15s; }
.soundwave-bar:nth-child(3) { animation-delay: 0.3s; }
.soundwave-bar:nth-child(4) { animation-delay: 0.05s; }

@keyframes bounce-soundwave {
  0% { height: 2px; }
  100% { height: 10px; }
}

/* --- GULAG TRANSITION SCREEN --- */
#gulagScreen {
  background: rgba(10, 5, 5, 0.95);
  border-color: var(--tactical-red);
}

#gulagScreen h1.tactical-title {
  color: var(--tactical-red);
}

.gulag-subtitle {
  font-family: var(--font-military);
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.gulag-alert-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px;
  border-radius: var(--panel-radius);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #9ca3af;
  margin-bottom: 25px;
  text-align: left;
  border-left: 2px solid var(--tactical-red);
}

/* --- MATCH REPORT SCREEN --- */
.match-report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
  text-align: left;
}

.report-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--panel-radius);
  padding: 10px 15px;
}

.report-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.report-value {
  font-family: var(--font-military);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.report-value.highlight {
  color: var(--tactical-green-light);
}

.redeploy-desc {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 25px;
}

/* Clean sound toggle */
.sound-toggle-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  font-size: 0.95rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sound-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Flat Red/Green damage indicators */
#damageIndicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  box-shadow: inset 0 0 0px 0px rgba(255, 51, 51, 0);
  z-index: 2;
  pointer-events: none;
  transition: box-shadow 0.05s ease-out;
}

#damageIndicator.hurt {
  box-shadow: inset 0 0 40px 10px rgba(153, 27, 27, 0.5); /* Flat deep red shadow */
}

#damageIndicator.heal {
  box-shadow: inset 0 0 40px 10px rgba(82, 96, 77, 0.45); /* Flat olive green shadow */
}

/* Clean warning audio prompt banner */
#audioRequestBanner {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-bg);
  border: 1px solid var(--tactical-warn);
  border-radius: var(--panel-radius);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-family: var(--font-military);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 101;
  pointer-events: all;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.banner-btn {
  background: var(--tactical-warn);
  color: #fff;
  border: none;
  font-family: var(--font-military);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.banner-btn:hover {
  background: #ea580c;
}
.hidden {
  display: none !important;
}

/* ==========================================================
   Tactical Command Center (Home Screen Dashboard Grid)
   ========================================================== */

.main-menu-dashboard {
  max-width: 1050px !important;
  width: 95% !important;
  padding: 25px !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(12, 14, 16, 0.96) !important;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 15px;
  margin-bottom: 20px;
  text-align: left;
}

.header-left {
  display: flex;
  flex-direction: column;
}

.system-status {
  font-family: var(--font-military);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tactical-green-light);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.blinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--tactical-green-light);
  animation: pulse-blinker 0.8s infinite alternate;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-military);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  color: #6b7280;
  gap: 4px;
  padding-top: 5px;
}

.sys-time {
  color: #fff;
  font-weight: 700;
}

/* Dashboard Columns */
.dashboard-grid {
  display: grid;
  grid-template-columns: 310px 1fr 310px;
  gap: 20px;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    height: auto;
    overflow-y: auto;
    max-height: 70vh;
  }
}

.dashboard-col {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--panel-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.col-title {
  font-family: var(--font-military);
  font-size: 1rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  border-left: 3px solid var(--tactical-green);
  padding-left: 8px;
  text-transform: uppercase;
}

/* Operative Callsign Input */
.input-container {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.tactical-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-military);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 8px 12px;
  border-radius: 2px;
  text-transform: uppercase;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tactical-input:focus {
  outline: none;
  border-color: var(--tactical-green-light);
  box-shadow: 0 0 10px rgba(122, 140, 115, 0.15);
}

.input-accent {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--tactical-green-light);
  border-bottom: 2px solid var(--tactical-green-light);
}

.operative-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.stat-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-green {
  color: var(--tactical-green-light) !important;
}

.deploy-container {
  margin-top: auto;
}

/* Vertical Stages scroll/list */
.stage-scroller {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 185px;
  overflow-y: auto;
  padding-right: 4px;
}

.stage-scroller::-webkit-scrollbar {
  width: 4px;
}
.stage-scroller::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.stage-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.stage-item {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.stage-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.stage-item.active {
  background: rgba(82, 96, 77, 0.15);
  border-color: var(--tactical-green-light);
}

.stage-num {
  font-family: var(--font-military);
  font-size: 0.95rem;
  font-weight: 700;
  color: #6b7280;
}

.stage-item.active .stage-num {
  color: var(--tactical-green-light);
}

.stage-name {
  font-family: var(--font-military);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #cbd5e1;
}

.stage-item.active .stage-name {
  color: #fff;
}

/* Armory Selection and detail */
.armory-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.armory-tab {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  font-family: var(--font-military);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.armory-tab:hover {
  color: #fff;
}

.armory-tab.active {
  background: var(--tactical-green);
  color: #fff;
}

.armory-detail-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--panel-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.armory-item-name {
  font-family: var(--font-military);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.armory-item-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #9ca3af;
}

.armory-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.armory-stat-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.armory-stat-row .stat-label {
  font-size: 0.65rem;
}

.stat-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: var(--tactical-green-light);
  transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.briefing-container {
  flex-grow: 1;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: var(--panel-radius);
  padding: 10px 12px;
}

.briefing-text {
  font-size: 0.85rem !important;
  line-height: 1.45 !important;
  margin-bottom: 0 !important;
  border-left: 2px solid var(--tactical-green) !important;
  padding-left: 10px !important;
}

/* ==========================================================
   Tactical Pause Menu Layout Styles
   ========================================================== */

.pause-dashboard {
  max-width: 440px !important;
  width: 90% !important;
  padding: 30px !important;
  border-color: var(--tactical-green-light) !important;
}

.pause-status-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
  text-align: left;
}

.pause-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.pause-trigger-btn {
  background: rgba(18, 22, 25, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-military);
  font-size: 0.95rem;
  letter-spacing: 1px;
  padding: 8px 15px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pause-trigger-btn:hover {
  background: var(--tactical-green-light);
  border-color: var(--tactical-green-light);
  color: #fff;
}
