html,
body {
  height: 100%;
}

body {
  touch-action: none;
}

canvas {
  touch-action: none;
}

.battlefield-container {
  width: 1200px;
  height: 640px;
  max-width: 100%;
  max-height: 100%;
}

#top-bar {
  min-height: clamp(52px, 6vw, 72px);
  min-width: 0;
}

#top-bar > div {
  min-width: 0;
}

#top-bar .resource-pill {
  font-size: clamp(0.75rem, 1.5vw, 1.5rem);
  line-height: 1;
  padding: clamp(0.2rem, 0.6vw, 0.5rem) clamp(0.4rem, 0.9vw, 0.8rem);
  white-space: nowrap;
}

#top-bar .resource-pill svg {
  width: clamp(14px, 1.5vw, 22px);
  height: clamp(14px, 1.5vw, 22px);
}

#timer-text {
  font-size: clamp(0.65rem, 1.15vw, 0.95rem);
  line-height: 1;
  white-space: nowrap;
}

#btn-play,
#btn-reset,
#btn-radio,
#btn-user,
#btn-report {
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  padding-top: clamp(0.3rem, 0.6vw, 0.55rem);
  padding-bottom: clamp(0.3rem, 0.6vw, 0.55rem);
}

#btn-play {
  padding-left: clamp(0.55rem, 1.1vw, 1.5rem);
  padding-right: clamp(0.55rem, 1.1vw, 1.5rem);
  position: relative;
  overflow: hidden;
}

#timer-bar {
  height: 100%;
  opacity: 0.9;
}

#btn-play:disabled #timer-bar {
  opacity: 0.2;
}

#btn-reset {
  padding-left: clamp(0.45rem, 0.9vw, 1rem);
  padding-right: clamp(0.45rem, 0.9vw, 1rem);
}

#btn-radio,
#btn-user,
#btn-report {
  padding-left: clamp(0.45rem, 0.9vw, 0.95rem);
  padding-right: clamp(0.45rem, 0.9vw, 0.95rem);
}

.radio-tooltip {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 8px, 0) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.radio-tooltip.radio-tooltip-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}

#report-map .leaflet-control-zoom a {
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.55);
}

#report-map .leaflet-control-zoom a:hover {
  background: rgba(30, 41, 59, 0.95);
}

#report-map .leaflet-popup-content-wrapper,
#report-map .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
}

#towers-menu {
  position: relative;
  min-height: clamp(84px, 13vw, 128px);
  align-items: stretch;
}

#towers-menu > div {
  min-width: 0;
}

.tower-card-overlay {
  padding: clamp(0.3rem, 0.7vw, 0.5rem);
}

.tower-card-label {
  font-size: clamp(0.62rem, 1.1vw, 1.1rem);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tower-card-cost {
  font-size: clamp(0.82rem, 1.55vw, 1.45rem);
  line-height: 1.05;
}

@media (max-width: 920px) {
  #top-bar {
    flex-wrap: wrap;
  }

  #top-resources {
    flex: 1 1 auto;
  }

  #top-bar > :last-child {
    flex: 1 0 100%;
    justify-content: flex-end;
  }

  #btn-play {
    min-width: 0;
    flex: 1 1 auto;
  }
}

#tooltip {
  display: none;
  backdrop-filter: blur(20px) !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

#towers-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.7) 100%);
  border-radius: 0;
}
