/* =========================================================
   Hotel Zumbi Universe — Shared Game HUD
   Path: /css/components/game-hud.css
   V18.3 — Clean Top HUD / No Ghost Actions
   ========================================================= */

.game-hud {
  position: sticky;
  top: 8px;
  z-index: 90;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid rgba(62, 255, 155, .18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(62, 255, 155, .10), transparent 42%),
    linear-gradient(135deg, rgba(7, 14, 22, .97), rgba(4, 8, 14, .97));
  box-shadow:
    0 18px 54px rgba(0, 0, 0, .42),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(18px);
}

.game-hud--v17,
.game-hud--v18 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.game-hud-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.game-hud-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.game-hud-avatar {
  position: relative;
  z-index: 2;
  display: block;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 2px solid rgba(62, 255, 155, .26);
  border-radius: 14px;
  background: radial-gradient(circle, rgba(62, 255, 155, .15), transparent 62%);
}

.game-hud-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-hud-avatar-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 0 9px rgba(62, 255, 155, .24));
}

.game-hud-player__meta {
  min-width: 0;
}

.game-hud-player small,
.game-hud-player__meta small {
  display: block;
  color: rgba(225, 238, 255, .62);
  font-size: .58rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.game-hud-player strong,
.game-hud-player__meta strong {
  display: block;
  margin-top: 3px;
  color: var(--text, #f5fff9);
  font-size: .78rem;
  line-height: 1;
  text-transform: uppercase;
}

.game-hud-player em,
.game-hud-player__meta em {
  display: block;
  margin-top: 3px;
  color: rgba(225, 238, 255, .84);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
}

.game-hud-player__meta b {
  display: block;
  margin-top: 3px;
  color: #35ff9d;
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
}

.game-hud-power {
  display: none;
}

/* compatibilidade sem criar layout antigo */
.game-hud__top,
.game-hud__bottom {
  display: contents;
}

.game-hud-resources {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding: 2px;
}

.game-hud-resources::-webkit-scrollbar {
  display: none;
}

.game-hud-resource,
.game-hud-resources span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .06), transparent 65%),
    rgba(255, 255, 255, .055);
  color: var(--text, #f5fff9);
  font-size: .78rem;
  font-weight: 950;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, .035);
}

.game-hud-resource i {
  font-style: normal;
  line-height: 1;
}

.game-hud-resource strong,
.game-hud-resources strong {
  color: #fff;
  font-size: .82rem;
  line-height: 1;
}

/* ações só existem quando renderizadas no JS */
.game-hud-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.game-hud-actions:empty {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.game-hud-back,
.game-hud-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(62, 255, 155, .16);
  border-radius: 16px;
  color: var(--text, #f5fff9);
  background:
    radial-gradient(circle at 50% 0%, rgba(62, 255, 155, .10), transparent 62%),
    rgba(255, 255, 255, .035);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease,
    box-shadow .16s ease;
}

.game-hud-icon-btn small,
.game-hud-back small {
  display: none;
}

.game-hud-icon-btn__icon {
  line-height: 1;
}

.game-hud-back:hover,
.game-hud-icon-btn:hover,
.game-hud-avatar-wrap:hover {
  transform: translateY(-2px);
}

.game-hud-back:hover,
.game-hud-icon-btn:hover {
  border-color: rgba(62, 255, 155, .42);
  background: rgba(62, 255, 155, .08);
  box-shadow: 0 0 20px rgba(62, 255, 155, .12);
}

.game-hud-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 2px solid rgba(3, 8, 12, .95);
  border-radius: 999px;
  color: #fff;
  background: #ff334d;
  font-size: .52rem;
  font-weight: 950;
  line-height: 1;
}

/* remove blocos antigos da base */
.hotel-map__resources,
.hz-map-mini-stats,
.hotel-map__hud,
.bottom-nav,
.nav-icon,
.arcade-header {
  display: none !important;
}

/* menu oficial novo não é afetado */
.hz-bottom-nav {
  display: grid;
}

.hz-game-map-card {
  margin-top: 0 !important;
  min-height: calc(100dvh - 92px) !important;
}

@media (max-width: 900px) {
  .game-hud--v17,
  .game-hud--v18 {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .game-hud-player {
    min-width: 0;
  }

  .game-hud-resources {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .game-hud-actions:not(:empty) {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .game-hud {
    top: 6px;
    padding: 8px;
    border-radius: 20px;
  }

  .game-hud--v17,
  .game-hud--v18 {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .game-hud-player {
    width: 100%;
    gap: 9px;
  }

  .game-hud-avatar-wrap {
    width: 54px;
    height: 54px;
  }

  .game-hud-avatar {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .game-hud-player__meta small {
    font-size: .54rem;
  }

  .game-hud-player__meta strong {
    font-size: .8rem;
    line-height: .95;
  }

  .game-hud-player__meta em {
    font-size: .62rem;
  }

  .game-hud-player__meta b {
    font-size: .68rem;
  }

  .game-hud-resources {
    width: 100%;
    justify-content: flex-start;
    gap: 7px;
  }

  .game-hud-resource,
  .game-hud-resources span {
    min-height: 36px;
    padding: 0 11px;
    font-size: .8rem;
  }

  .game-hud-resource strong,
  .game-hud-resources strong {
    font-size: .86rem;
  }

  .game-hud-back,
  .game-hud-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    font-size: 1rem;
  }

  .hz-game-map-card {
    min-height: calc(100dvh - 178px) !important;
  }

  body:has(.hotel-map-screen) .app-shell,
  body:has(.profile-screen) .app-shell,
  body:has(.survivor-center-screen) .app-shell {
    padding-bottom: 96px !important;
  }
}

@media (max-width: 430px) {
  .game-hud {
    top: 4px;
    padding: 7px;
    border-radius: 18px;
  }

  .game-hud-player {
    align-items: center;
  }

  .game-hud-avatar-wrap {
    width: 50px;
    height: 50px;
  }

  .game-hud-avatar {
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }

  .game-hud-player__meta small {
    font-size: .5rem;
  }

  .game-hud-player__meta strong {
    font-size: .74rem;
  }

  .game-hud-player__meta em {
    font-size: .58rem;
  }

  .game-hud-player__meta b {
    font-size: .64rem;
  }

  .game-hud-resource,
  .game-hud-resources span {
    min-height: 34px;
    padding: 0 10px;
    font-size: .74rem;
  }

  .game-hud-resource strong,
  .game-hud-resources strong {
    font-size: .8rem;
  }
}
