.hud-top-center {
  position: absolute;
  top: 2vh;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh;
  overflow: visible;
  pointer-events: none;
  z-index: 10;
}

.hud-invasion-title {
  margin: 0;
  font-size: 3.2vh;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1;
  -webkit-text-stroke: 0.12vh #000000;
  paint-order: stroke fill;
}

.hud-progress {
  position: relative;
  width: 100%;
  height: 3.2vh;
  max-width: 55vw;
}

.hud-progress__track {
  width: 100%;
  height: 100%;
  border: 0.35vh solid #000000;
  border-radius: 0.5vh;
  background: linear-gradient(180deg, #5fe86a 0%, #2db83a 100%);
  overflow: hidden;
  box-sizing: border-box;
}

.hud-progress__fill {
  height: 100%;
  width: 0%;
  background: #1a1a1a;
  border-radius: 0.15vh;
}

.hud-progress__icon {
  position: absolute;
  left: clamp(
    2.75vh,
    calc(var(--progress, 0) * 100%),
    calc(100% - 2.75vh)
  );
  top: 50%;
  transform: translate(-50%, -50%);
  height: 5.5vh;
  width: auto;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
}

.hud-top-right {
  position: absolute;
  top: 5.5vh;
  right: 2vw;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3vh;
  pointer-events: none;
  z-index: 10;
}

.hud-avatar {
  width: 8vh;
  height: auto;
  object-fit: contain;
  display: block;
}

.resource-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1vh;
  pointer-events: none;
}

.resource-counter {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 12vh;
  height: 4vh;
  padding: 0 9vh 0 3vh;
  background-color: transparent;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  box-sizing: border-box;
}

.resource-icon {
  position: absolute;
  right: 1.2vh;
  top: 50%;
  transform: translateY(-50%);
  width: 4.5vh;
  height: 4.5vh;
  border-radius: 0.4vh;
  flex-shrink: 0;
}

.resource-count {
  min-width: 2ch;
  color: #ffffff;
  font-size: 2.4vh;
  font-weight: 400;
  line-height: 1;
  -webkit-text-stroke: 0.15vh #000000;
  paint-order: stroke fill;
}

.hud-bottom-left {
  position: absolute;
  left: 2vw;
  bottom: 30vh;
  pointer-events: none;
  z-index: 10;
}

.hud-weapon {
  position: relative;
  width: 9vh;
}

.hud-weapon__bg {
  width: 100%;
  height: auto;
  display: block;
}

.hud-weapon__tool {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 58%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.hud-weapon__level {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 1.8vh;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  -webkit-text-stroke: 0.12vh #000000;
  paint-order: stroke fill;
}

.resource-fly-pickup {
  position: fixed;
  width: 3vh;
  height: 3vh;
  border-radius: 0.4vh;
  border: 0.15vh solid rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
}

@media (orientation: landscape) {
  .hud-top-center {
    top: 1.2vh;
    width: 55%;
    max-width: 36vh;
    gap: 0.5vh;
  }

  .hud-invasion-title {
    font-size: 2.6vh;
  }

  .hud-progress {
    height: 2.6vh;
  }

  .hud-progress__icon {
    height: 4.2vh;
  }

  .hud-top-right {
    top: 1vh;
    right: 1.5vw;
    gap: 0.5vh;
  }

  .hud-avatar {
    width: 10vh;
  }

  .resource-counter {
    width: 12vh;
    height: 4vh;
    padding: 0 7.5vh 0 2.5vh;
  }

  .resource-icon {
    width: 3.8vh;
    height: 3.8vh;
    right: 1vh;
  }

  .resource-count {
    font-size: 2.2vh;
  }

  .hud-bottom-left {
    left: 20px;
    bottom: 22vh;
  }

  .hud-weapon {
    width: 16vh;
  }

  .hud-weapon__level {
    font-size: 1.5vh;
  }
}
