/* General Styles */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
  line-height: 1.4;
  overflow-y: hidden;
}

/* Map Styles */
#map {
  height: 100vh;
  width: 100vw;
}

/* HUD Panel */
#hudTop {
  position: fixed;
  top: 14px;
  left: 18px;
  display: none;
  align-items: flex-start;
  gap: 14px;
  z-index: 1004;
  pointer-events: none;
}

#hudTop.hud-visible {
  display: flex;
}

#hudTop > * {
  pointer-events: auto;
}

.hud-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

#hudPanel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: rgba(12, 12, 16, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  color: #fff;
  max-width: clamp(280px, 48vw, 560px);
}

.hud-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
}

.hud-money {
  align-items: center;
  text-align: center;
  min-width: 72px;
}

.hud-money-icon {
  font-size: 22px;
  line-height: 1;
}

.hud-money-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 5ch;
}

.hud-money-value.long {
  font-size: 18px;
}

.hud-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.1));
}

.hud-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-label {
  font-size: 16px;
}

.hud-stats .hud-line,
.hud-resources .hud-line {
  font-size: 13px;
  font-weight: 600;
}

.hud-menu-wrapper {
  position: fixed;
  top: 14px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  pointer-events: auto;
  z-index: 1004;
}

.hud-icon-button {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #2d2c3e, #181926);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.35);
  padding: 0;
  line-height: 1;
  box-sizing: border-box;
  transition: transform 0.25s ease, color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hud-icon-button i {
  pointer-events: none;
  font-size: 18px;
}

.hud-icon-button.hud-menu-toggle {
  background: linear-gradient(135deg, #747cf1, #3c43d1);
  border-color: #858dff;
  box-shadow: 0 14px 24px rgba(114, 121, 232, 0.4);
}

.hud-icon-button.hud-pause {
  background: linear-gradient(135deg, #1fb28f, #0b6d55);
  border-color: #1fb28f;
  box-shadow: 0 14px 24px rgba(23, 150, 122, 0.4);
}

.hud-icon-button.hud-speed {
  background: linear-gradient(135deg, #3e81f0, #1c53c0);
  border-color: #3e81f0;
  box-shadow: 0 14px 24px rgba(62, 129, 240, 0.4);
}

.hud-icon-button.hud-sound {
  background: linear-gradient(135deg, #f7c53f, #d48c10);
  border-color: #f3b322;
  box-shadow: 0 14px 24px rgba(247, 197, 63, 0.4);
}

.hud-icon-button.hud-exit {
  background: linear-gradient(135deg, #f25a7f, #b81739);
  border-color: #ff6d8a;
  box-shadow: 0 14px 24px rgba(242, 90, 127, 0.4);
}

.hud-icon-button:hover,
.hud-icon-button:focus-visible {
  transform: translateY(-2px);
  color: #70d6ff;
}

.hud-icon-button.hud-menu-toggle:hover,
.hud-icon-button.hud-menu-toggle:focus-visible {
  color: #ffffff;
  border-color: #a2aaff;
  box-shadow: 0 16px 28px rgba(114, 121, 232, 0.55);
}

.hud-icon-button.hud-pause:hover,
.hud-icon-button.hud-pause:focus-visible {
  color: #ffffff;
  border-color: #35caa6;
  box-shadow: 0 16px 28px rgba(23, 150, 122, 0.55);
}

.hud-icon-button.hud-speed:hover,
.hud-icon-button.hud-speed:focus-visible {
  color: #ffffff;
  border-color: #5a94f5;
  box-shadow: 0 16px 28px rgba(62, 129, 240, 0.55);
}

.hud-icon-button.hud-sound:hover,
.hud-icon-button.hud-sound:focus-visible {
  color: #ffffff;
  border-color: #ffc857;
  box-shadow: 0 16px 28px rgba(247, 197, 63, 0.55);
}

.hud-icon-button.hud-exit:hover,
.hud-icon-button.hud-exit:focus-visible {
  color: #ffffff;
  border-color: #ff86a0;
  box-shadow: 0 16px 28px rgba(242, 90, 127, 0.55);
}

.hud-icon-button:active {
  transform: translateY(0) scale(0.96);
}

.hud-icon-button.speed {
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.1;
}

.hud-icon-button.speed.paused {
  opacity: 0.7;
}

.hud-speed-icon {
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}

.hud-speed-icon-bottom i {
  transform: rotate(180deg);
}

.hud-speed-value {
  font-size: 14px;
}

.hud-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  min-width: 46px;
}

#hudMenuWrapper.open #hudMenu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#hudMenuWrapper.open > #hudMenuToggle {
  color: #70d6ff;
}

.hud-fps {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  padding: 0 6px;
}

.hud-target-notification {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe8a3;
  background: rgba(18, 18, 32, 0.55);
  border: 1px solid rgba(255, 218, 106, 0.28);
  border-radius: 12px;
  padding: 4px 10px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(255, 185, 61, 0.55);
  min-width: 0;
}

.hud-target-notification.visible {
  opacity: 1;
  transform: translateY(0);
}

.tutorial-hud-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tutorial-hud-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tutorial-hud-row .hud-icon-button {
  pointer-events: none;
  cursor: default;
  flex-shrink: 0;
}

.tutorial-hud-label {
  font-size: 14px;
  line-height: 1.4;
}

.hud-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.exit-confirm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.exit-confirm.hidden {
  display: none !important;
}

.exit-dialog {
  background: rgba(10, 10, 16, 0.95);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 320px;
  width: calc(100% - 32px);
  color: #f5f5f5;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.exit-dialog h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.exit-dialog p {
  margin: 0 0 18px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}

.exit-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  transform: scale(1.1);
}

.exit-btn {
  min-width: 120px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.exit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.exit-btn.danger {
  background: linear-gradient(135deg, rgba(200, 38, 71, 0.15), rgba(200, 38, 71, 0.6));
  border-color: rgba(200, 38, 71, 0.75);
}

@media (max-width: 900px) {
  #hudTop {
    top: 10px;
    left: 10px;
    gap: 10px;
  }

  #hudPanel {
    gap: 10px;
    padding: 8px 14px;
    border-radius: 14px;
  }

  .hud-menu-wrapper {
    top: 10px;
    right: 10px;
  }

  .hud-money-value {
    font-size: 20px;
  }

  .hud-money-value.long {
    font-size: 17px;
  }
}

@media (max-width: 600px) {
  #hudTop {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
  }

  #hudPanel {
    flex-wrap: wrap;
    row-gap: 6px;
    column-gap: 10px;
    max-width: calc(100vw - 74px);
    padding: 6px 10px;
    border-radius: 12px;
  }

  .hud-section {
    font-size: 11px;
  }

  .hud-money {
    min-width: 56px;
  }

  .hud-money-icon {
    font-size: 18px;
  }

  .hud-money-value {
    font-size: 18px;
  }

  .hud-money-value.long {
    font-size: 15px;
  }

  .hud-label {
    font-size: 14px;
  }

  .hud-stats .hud-line,
  .hud-resources .hud-line {
    font-size: 11px;
  }

  .hud-menu-wrapper {
    top: 10px;
    right: 10px;
  }

  .hud-icon-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .hud-icon-button i {
    font-size: 16px;
  }

  .hud-menu {
    min-width: 38px;
  }

  .hud-fps {
    font-size: 10px;
  }

  .exit-dialog {
    padding: 20px 18px;
  }

  .exit-btn {
    min-width: 110px;
  }
}

/* HP bar над ціллю */
.hp-container {
  position: relative;
  width: 50px;
  height: 11px;
  background: #440000;
  border: 1px solid #000;
  border-radius: 6px;
  overflow: hidden;
  left: -50%;
}

.hp-bar {
  height: 100%;
  background: limegreen;
  width: 100%; /* буде оновлюватись у JS */
  transition: width 0.2s linear;
}

.hp-text {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 1px black;
  pointer-events: none;
}


/* Control Panel Styles */
#controlPanel,
#statsPanel {
  position: absolute;
  top: 10px;
  background: rgb(0, 0, 0);
  border: 2px solid #666;
  padding: 10px;
  z-index: 1001;
  border-radius: 6px;
  font-family: sans-serif;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  max-width: 280px;
  box-sizing: border-box;
  overflow-wrap: break-word;
  white-space: normal;
  display: none;
  color: #ffffff;
  min-width: 150px;
}
#controlPanel { left: 10px; }
#statsPanel   { right: 10px; }



#controlPanel .panel-body,
#statsPanel .panel-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


#controlPanel button {
  font-size: 14px;
  padding: 4px 6px;
  cursor: pointer;
}

/* Sound Button and Speed Buttons Styles */
#soundButtonContainer {
  position: absolute;
  top: 90px;
  right: 15px;
  z-index: 1002;
  display: none;
  flex-direction: column;
  gap: 4px;
  /* width: 120px */
}

#speedButtons {
  gap: 3px;
}

.speed-button {
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.speed-button.active {
  background-color: #007bff;
  box-shadow: 0 0 8px #007bff;
}

.speed-button:hover {
  background-color: #555;
}

#soundButton {
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 13px;
}

#pauseButton {
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 13px;
}

#settingsButtons {
  display: flex;
  gap: 3px;
}

/* PVO Menu Styles */
#pvoMenu {
  position: fixed;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: none;
  gap: 5px;
  background: linear-gradient(160deg, rgba(110, 118, 134, 0.88), rgba(60, 64, 75, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 10px 10px;
  backdrop-filter: blur(12px);
  overflow-x: auto;
  overflow-y: visible;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  align-content: stretch;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  width: auto;
}

@media (max-width: 600px) {
  #pvoMenu {
    width: auto;
    max-width: 94%;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
  }
}

.pvo-item,
.pvo-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 86px;
  min-width: 40px;
  min-height: 120px;
  padding: 1px 1px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(172, 178, 194, 0.95), rgba(88, 94, 109, 0.95));
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #f5f7ff;
  line-height: 1.2;
  user-select: none;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
              border-color 0.28s ease,
              background 0.32s ease;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 86px;
}

.pvo-item::before,
.pvo-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, 0.4), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

@keyframes pvoSelectedGlow {
  0% {
    box-shadow: 0 18px 32px rgba(86, 165, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 24px 40px rgba(86, 165, 255, 0.52), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  }
  100% {
    box-shadow: 0 18px 32px rgba(86, 165, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

.pvo-item:hover,
.pvo-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.pvo-item:hover::before,
.pvo-button:hover::before {
  opacity: 0.9;
}

.pvo-item:active,
.pvo-button:active {
  transform: translateY(-1px) scale(0.97);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.32);
}

.pvo-item.selected,
.pvo-button.selected,
.pvo-button.active {
  background: linear-gradient(155deg, rgba(120, 168, 255, 0.98), rgba(64, 108, 207, 0.98));
  border-color: rgba(180, 220, 255, 0.9);
  color: #ffffff;
  box-shadow: 0 22px 42px rgba(86, 165, 255, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translateY(-6px);
  animation: pvoSelectedGlow 1.8s ease-in-out infinite;
}

.pvo-item.selected::before,
.pvo-button.selected::before,
.pvo-button.active::before {
  opacity: 1;
  background: radial-gradient(140% 140% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 72%);
}

.pvo-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.2);
  transform: none;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.18);
}

.pvo-button:disabled::before {
  opacity: 0.2;
}

.pvo-item:focus-visible,
.pvo-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(120, 168, 255, 0.65), 0 18px 32px rgba(0, 0, 0, 0.35);
}

.pvo-item img,
.pvo-button img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-top: 2px;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.38));
  transition: transform 0.28s ease, filter 0.28s ease;
}

.pvo-item:hover img,
.pvo-button:hover img {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}

.pvo-item.selected img,
.pvo-button.selected img,
.pvo-button.active img {
  filter: drop-shadow(0 10px 18px rgba(74, 142, 255, 0.55));
}

.pvo-item b,
.pvo-button b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: inherit;
  text-transform: none;
}

.pvo-item span,
.pvo-button span {
  font-weight: 500;
  color: rgba(244, 247, 255, 0.86);
}

@media (max-width: 768px) {
  .pvo-item,
  .pvo-button {
    width: 72px;
    min-width: 40px;
    min-height: 102px;
    padding: 10px 2px;
    font-size: 12px;
    gap: 5px;
  }

  .pvo-item b,
  .pvo-button b {
    font-size: 12px;
  }

  .pvo-item img,
  .pvo-button img {
    width: 42px;
    height: 42px;
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {
  .pvo-item,
  .pvo-button {
    width: 62px;
    min-width: 62px;
    min-height: 92px;
    padding: 6px 8px;
    font-size: 11px;
    gap: 4px;
  }

  .pvo-item b,
  .pvo-button b {
    font-size: 11px;
  }

  .pvo-item img,
  .pvo-button img {
    width: 36px;
    height: 36px;
  }
}

/* Pre-Menu Styles */
#preMenu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/wallpaper.png') center center no-repeat;
  background-size: cover;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
  overflow: hidden;
}

#preMenu .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.preMenu-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 90%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  top: 90px;
  padding-top: 15px;
  font-size: 10px;
}

.ai-note {
  font-size: 15px;
  color: #ccc;
}

@media (max-width: 768px) {
  .ai-note {
    font-size: 11px;
    line-height: 1.3;
  }
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0;
  width: 100%;
  max-width: 320px;
  
}

.mode-button {
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #3b3b3b, #1b1b1b);
  color: #e0e0e0;
  border: 1px solid #444;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  width: 200px;
}

.mode-button:hover {
  background: linear-gradient(to bottom, #3a3a3a, #222);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  color: #fff;
  transform: scale(1.05);
}

#legend {
  margin-top: 5px;
  background: rgba(255,255,255,0.05);
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 13px;
  max-width: 400px;
  text-align: left;
  color: #fff;
}


/**/
.donate-buttons {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: calc(100% - 40px);
  max-width: 420px;
  z-index: 1005;
}

.donate-btn {
  --green: #14532d;
  display: inline-block;
  padding: 5px 15px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: none;
  border: 2px solid var(--green);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 40px 40px var(--green) inset, 0 0 0 0 var(--green);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  margin: 0;
}

.donate-btn:hover {
  box-shadow: 0 0 10px 0 var(--green) inset, 0 0 10px 4px var(--green);
  transform: scale(1.05);
}

.donate-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 6px 0 var(--green) inset, 0 0 6px 3px var(--green);
}
/**/

/**/
.footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  width: 100%;
  overflow: hidden;
  overflow: visible;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1004;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  flex-shrink: 0;
}

.footer-link:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.15);
}

.footer-link:active {
  transform: scale(0.90);
}

.footer-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media screen and (max-width: 600px) {
  .donate-buttons {
    bottom: 68px;
    gap: 8px;
    width: calc(100% - 24px);
  }

  .donate-buttons .donate-btn {
    flex: 1 1 100%;
    text-align: center;
  }

  .footer-links {
    gap: 8px;
    bottom: 12px;
  }
  .footer-link {
    width: 35px;
    height: 35px;
  }
}
/**/

.mode-button.mode-button-loading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 5px;
  cursor: default;
  background: rgba(10, 10, 10, 0.8);
  border-color: #3a3a3a;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
  color: #fff;
  overflow: hidden;
}

.mode-button.mode-button-loading:hover {
  transform: none;
}

.mode-button-loading .mode-progress-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  overflow: hidden;
}

.mode-button-loading .mode-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #1f8cff, #0ae8ff);
  transition: width 0.3s ease;
  opacity: 0.85;
}

.mode-button-loading .mode-progress-label {
  position: relative;
  z-index: 1;
  text-align: center;
  text-transform: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.mode-button-loading .mode-progress-percent {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-top: 3px;
}

/* Alarm Indicator Styles */
#alarmIndicator {
  position: absolute;
  bottom: 20px;
  left: 40px;
  display: none;
  z-index: 10000;
  width: 60px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #000;
}

.alarm-dot {
  width: 40px;
  height: 40px;
  margin: 0 auto 4px auto;
  background: red;
  border-radius: 50%;
  animation: pulse 0.4s infinite;
  box-shadow: 0 0 15px 6px red;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Heavy Drone Styles */
.heavy-drone-icon img {
  width: 45px;
  height: 45px;
}

.progress-bar-container {
  position: absolute;
  width: 60px;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #fff;
  border-radius: 4px;
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  background: #1f8cff;
  border-radius: 4px;
  width: 0%;
  transition: width 0.1s linear;
}

.mode-button.small {
  padding: 8px 14px;
  font-size: 16px;
}

.button-group.compact {
  flex-direction: row;
  gap: 8px;
  justify-content: center;
}

#pauseButton:hover, #soundButton:hover {
  background-color: #555;
}

#pauseButton.active, #soundButton.active {
  background-color: #007bff;
  box-shadow: 0 0 8px #007bff;
}

/* Сетка карточек ППО и целей */
.pvo-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 2 карточки в ряд */
  gap: 12px;
}

.pvo-card {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 10px;
  align-items: center;
}

.pvo-img {
  background: #ddd; /* серый фон */
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;   /* фиксированная ширина */
  height: 64px;  /* фиксированная высота */
}

.pvo-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* картинка сохраняет пропорции */
  display: block;
}


.pvo-info {
  font-size: 14px;
  line-height: 1.4;
}

/* На телефоне — одна колонка */
@media (max-width: 600px) {
  .pvo-cards {
    grid-template-columns: 1fr;
  }
}



/* Media Queries */
@media (max-width: 600px) {
  .button-group {
    width: 100%;
  }

  #pauseButton, #soundButton {
    font-size: 10px;
    padding: 3px 6px;
  }

  #legend {
    font-size: 13px;
  }



  #controlPanel {
    top: 10px;
    left: 10px;
    transform: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    box-shadow: none;
    padding: 6px 10px;
    font-size: 11px;
    max-width: none;
    z-index: 1002;
    display: block;
  }

  #statsPanel {
    top: 60px;
    right: 10px;
    transform: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    box-shadow: none;
    padding: 6px 10px;
    font-size: 11px;
    max-width: none;
    z-index: 1000;
    display: block;
    min-width: 120px;
  }

#controlPanel .panel-body,
#statsPanel .panel-body {
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}


  #controlPanel button {
    display: none !important;
  }

  #alarmIndicator {
    position: fixed !important;
    bottom: 150px !important;
    left: 20px !important;
    transform: none !important;
    z-index: 1003 !important;
  }

  #soundButtonContainer {
    top: 10px;
    right: 10px;
  }

  #soundButton {
    font-size: 11px;
    padding: 4px 20px;
  }

  #pauseButton {
    font-size: 11px;
    padding: 4px 20px;
  }

  #settingsButtons {
  display: flex;
  gap: 13px;
}

  .speed-button {
    font-size: 11px;
    padding: 4px 13px;
  }

  .rotating-icon {
    transform-origin: center center;
  }
}

.money-value {
  font-size: 16px;
}

@media (max-width: 600px) {
  .money-value {
    font-size: 11px;
  }
}

#install-wrapper {
  position: fixed;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: calc(100% - 40px);
  max-width: 420px;
  z-index: 1006;
}

#install-wrapper .donate-btn {
  --green: #0b7b44;
  background: none;
  border: 2px solid var(--green);
  box-shadow: 0 0 40px 40px var(--green) inset, 0 0 0 0 var(--green);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#install-wrapper .donate-btn:hover {
  box-shadow: 0 0 10px 0 var(--green) inset, 0 0 10px 4px var(--green);
  transform: scale(1.05);
}









