/* User / Ship HUD — crisp glass panels (no soft blur / scale smear) */

#game { --wu-hud-scale: 1; }

#game .hud-profile-stack {
  position: absolute;
  top: 42px;
  left: 10px;
  right: auto;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  pointer-events: none;
  /* zoom stays sharp; transform:scale blurs text/sprites */
  zoom: var(--wu-hud-scale);
  transform-origin: top left;
}
@supports not (zoom: 1) {
  #game .hud-profile-stack {
    zoom: normal;
    transform: scale(var(--wu-hud-scale));
  }
}

#game .hud-win {
  pointer-events: auto;
  position: relative;
  box-sizing: border-box;
  color: #eef6ff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}
#game .hud-win.is-dragging { z-index: 40; }
#game .hud-win.hidden,
#game .hud-win.docked { display: none !important; }
#game .hud-win.minimize-anim {
  opacity: 0.25;
  transform: translate(var(--fly-x, 0), var(--fly-y, 0)) scale(0.12);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 50;
}

#game .hud-win.hud-go {
  width: 320px;
  border: 1px solid rgba(140, 210, 255, 0.55);
  border-radius: 12px;
  background:
    linear-gradient(168deg, rgba(22, 52, 86, 0.97) 0%, rgba(10, 22, 40, 0.98) 52%, rgba(6, 14, 26, 0.99) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(40, 120, 200, 0.18);
  padding: 0;
  overflow: hidden;
  /* no backdrop-filter — it washed the panel over the nebula */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#game .hud-win.hud-go.hud-win-ship { width: 320px; }

#game .hud-win.hud-go .go-window {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#game .hud-win.hud-go .hud-win-head {
  height: 40px;
  background: linear-gradient(180deg, #3a7ec4 0%, #1e4f84 55%, #163a64 100%);
  border-bottom: 1px solid rgba(170, 220, 255, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
#game .hud-win.hud-go .hud-win-head:active { cursor: grabbing; }

#game .hud-win.hud-go .go-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(0, 12, 28, 0.45);
  box-shadow: 0 0 0 1px rgba(160, 220, 255, 0.28) inset;
}

#game .hud-win.hud-go .hud-win-title {
  flex: 1;
  color: #ffffff;
  font: 700 13px/1 "Segoe UI Semibold", "Segoe UI", Arial, Helvetica, sans-serif;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

#game .wu-premium {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  font: 800 9px/1 Georgia, serif;
  color: #3a2808;
  background: linear-gradient(180deg, #ffe9a8, #e8b84a 55%, #c99228);
  border: 1px solid rgba(90, 60, 10, 0.5);
  flex: 0 0 auto;
  pointer-events: none;
}
#game .wu-premium.hidden { display: none !important; }

#game .hud-win.hud-go .hud-win-min {
  width: 30px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(160, 220, 255, 0.35) !important;
  border-radius: 6px;
  background: rgba(0, 10, 24, 0.45) !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#game .hud-win.hud-go .hud-win-min:hover {
  background: rgba(80, 170, 255, 0.4) !important;
  border-color: rgba(180, 230, 255, 0.7) !important;
}
#game .hud-win.hud-go .go-minimize-icon {
  width: 14px;
  height: 3px;
  background: #d6f0ff;
  pointer-events: none;
}

#game .hud-win.hud-go .hud-win-body {
  display: flex !important;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  background: transparent !important;
}
#game .hud-win.is-min .hud-win-body { display: none !important; }

#game .hud-win.hud-go .go-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 0;
  min-width: 0;
}
#game .hud-win.hud-go .go-col-right { flex: 1 1 0; }

#game .hud-win.hud-go .go-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(4, 14, 28, 0.72);
  box-shadow:
    0 0 0 1px rgba(120, 190, 255, 0.16) inset,
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

#game .hud-win.hud-go .go-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game .hud-win.hud-go .go-val {
  flex: 1 1 auto;
  min-width: 0;
  color: #f7fbff;
  font: 700 13px/1.25 "Segoe UI Semibold", "Segoe UI", Tahoma, Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.15px;
}

#game .hud-win.hud-go .go-val-next {
  display: block;
  color: #7dffb0;
  font: 700 10px/1.2 "Segoe UI", Arial, Helvetica, sans-serif;
  margin-top: 1px;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.75);
}

#game .hud-win.hud-go .go-stat-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 auto;
}

#game .hud-win.hud-go #user-credits { color: #ffe08a; }
#game .hud-win.hud-go #user-uridium { color: #7aeeff; }
#game .hud-win.hud-go #user-honor { color: #ffc090; }
#game .hud-win.hud-go #user-gold { color: #ffe9a0; }
#game .hud-win.hud-go #ship-hp-val { color: #b8ffd0; }
#game .hud-win.hud-go #ship-shield-val { color: #b8e8ff; }
#game .hud-win.hud-go #ship-nanohull-val { color: #ffe9a8; }
#game .hud-win.hud-go #ship-damage { color: #ffb0a0; }
#game .hud-win.hud-go #ship-name { color: #ffe28a; }

/* ship name footer chip */
#game .hud-win.hud-go .go-ship-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 10px;
  padding: 7px 9px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(36, 88, 140, 0.55), rgba(14, 36, 68, 0.45));
  box-shadow: 0 0 0 1px rgba(140, 210, 255, 0.28) inset;
  min-width: 0;
}
#game .hud-win.hud-go .go-ship-thumb {
  width: 52px;
  height: 40px;
  flex: 0 0 52px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(0, 8, 20, 0.55);
  box-shadow: 0 0 0 1px rgba(140, 210, 255, 0.28) inset;
  image-rendering: auto;
}
#game .hud-win.hud-go .go-ship-thumb.is-fallback {
  padding: 4px;
  object-fit: none;
  background-color: rgba(0, 8, 20, 0.55);
  background-image: url("/assets/do_ui/hud/globalorbit/ship_sprite.png?v=3");
  background-repeat: no-repeat;
  background-position: -1px -2px;
  background-size: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

#game .hud-win.hud-go .go-spr {
  display: inline-block !important;
  overflow: hidden;
  flex: 0 0 auto;
  vertical-align: middle;
  font-style: normal;
  line-height: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
#game .hud-win.hud-go .go-spr-header-user,
#game .hud-win.hud-go .go-spr-credits,
#game .hud-win.hud-go .go-spr-exp,
#game .hud-win.hud-go .go-spr-honor,
#game .hud-win.hud-go .go-spr-jackpot,
#game .hud-win.hud-go .go-spr-level,
#game .hud-win.hud-go .go-spr-uridium,
#game .hud-win.hud-go .go-spr-key,
#game .hud-win.hud-go .go-spr-jump {
  background-image: url("/assets/do_ui/hud/globalorbit/user_sprite.png?v=3");
  background-repeat: no-repeat;
}
#game .hud-win.hud-go .go-spr-header-user {
  width: 18px;
  height: 18px;
  background-position: -6px -5px;
}
#game .hud-win.hud-go .go-spr-credits { width: 16px; height: 16px; background-position: -32px -2px; }
#game .hud-win.hud-go .go-spr-exp { width: 16px; height: 16px; background-position: -52px -2px; }
#game .hud-win.hud-go .go-spr-honor { width: 16px; height: 16px; background-position: -72px -2px; }
#game .hud-win.hud-go .go-spr-jackpot { width: 16px; height: 16px; background-position: -92px -2px; }
#game .hud-win.hud-go .go-spr-level { width: 16px; height: 16px; background-position: -112px -2px; }
#game .hud-win.hud-go .go-spr-uridium { width: 16px; height: 16px; background-position: -132px -2px; }
#game .hud-win.hud-go .go-spr-key { width: 16px; height: 15px; background-position: -152px -2px; }
#game .hud-win.hud-go .go-spr-jump {
  width: 16px;
  height: 16px;
  background-image: url("/do_img/global/HTML5/UI/windows/window_icons_atlas.png?v=6") !important;
  background-size: 108px 52px;
  background-position: -72px -18px;
  background-repeat: no-repeat;
}

#game .hud-win.hud-go .go-spr-header-ship,
#game .hud-win.hud-go .go-spr-cargo,
#game .hud-win.hud-go .go-spr-config,
#game .hud-win.hud-go .go-spr-hp,
#game .hud-win.hud-go .go-spr-nanohull,
#game .hud-win.hud-go .go-spr-shield,
#game .hud-win.hud-go .go-spr-speed {
  background-image: url("/assets/do_ui/hud/globalorbit/ship_sprite.png?v=3");
  background-repeat: no-repeat;
}
#game .hud-win.hud-go .go-spr-header-ship { width: 16px; height: 18px; background-position: -4px -4px; }
#game .hud-win.hud-go .go-spr-cargo { width: 16px; height: 16px; background-position: -2px -30px; }
#game .hud-win.hud-go .go-spr-config { width: 16px; height: 16px; background-position: -2px -50px; }
#game .hud-win.hud-go .go-spr-hp { width: 16px; height: 16px; background-position: -2px -70px; }
#game .hud-win.hud-go .go-spr-nanohull { width: 16px; height: 16px; background-position: -2px -90px; }
#game .hud-win.hud-go .go-spr-shield { width: 16px; height: 16px; background-position: -2px -110px; }
#game .hud-win.hud-go .go-spr-speed { width: 16px; height: 16px; background-position: -2px -130px; }
#game .hud-win.hud-go .go-spr-damage {
  display: inline-block !important;
  width: 16px;
  height: 16px;
  background: url("/assets/do_ui/windows/shipInfoIcon_damage.png?v=3") center / contain no-repeat;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
#game .hud-win.hud-go .go-spr-repair {
  display: inline-block !important;
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background:
    linear-gradient(160deg, #6dffb8 0%, #1fa86a 55%, #0d6b42 100%);
  box-shadow:
    0 0 0 1px rgba(20, 80, 50, 0.55) inset,
    0 0 4px rgba(60, 255, 160, 0.35);
}
#game .hud-win.hud-go .go-spr-repair::before,
#game .hud-win.hud-go .go-spr-repair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #f2fff8;
  border-radius: 1px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
}
#game .hud-win.hud-go .go-spr-repair::before {
  width: 8px;
  height: 2.5px;
}
#game .hud-win.hud-go .go-spr-repair::after {
  width: 2.5px;
  height: 8px;
}
#game .hud-win.hud-go #ship-repair-credits {
  color: #9dffc8;
}

#game .hud-win.hud-go .go-config-row { cursor: pointer; }
#game .hud-win.hud-go .go-config-row:hover {
  background: rgba(40, 120, 200, 0.35);
}
#game .hud-win.hud-go .go-config-row:hover .go-val { color: #7ee0ff; }
#game .hud-win.hud-go .ship-config-btn { display: none !important; }

#game .hud-win.hud-go .ast-skin,
#game .hud-win.hud-go .wu-ep-bar,
#game .hud-win.hud-go .ship-bar-track,
#game .hud-win.hud-go .ship-config-gear { display: none !important; }

#game .hud-profile-restore {
  position: absolute;
  top: 42px;
  left: 10px;
  z-index: 6;
  display: none;
  gap: 4px;
  pointer-events: auto;
  zoom: var(--wu-hud-scale);
  transform-origin: top left;
}
@supports not (zoom: 1) {
  #game .hud-profile-restore {
    zoom: normal;
    transform: scale(var(--wu-hud-scale));
  }
}
#game .hud-profile-restore.is-visible { display: flex; }
#game .hud-profile-restore .hud-restore-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(120, 200, 255, 0.45);
  background: rgba(10, 22, 40, 0.92);
  color: #cfe8ff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
}
#game .hud-profile-restore .hud-restore-btn:hover {
  border-color: rgba(255, 200, 80, 0.7);
  color: #fff;
}

@media (max-width: 1366px) {
  #game:not([style*="--wu-hud-scale"]) { --wu-hud-scale: 0.95; }
}
@media (max-width: 1100px) {
  #game:not([style*="--wu-hud-scale"]) { --wu-hud-scale: 0.9; }
}
@media (min-width: 1800px) {
  #game:not([style*="--wu-hud-scale"]) { --wu-hud-scale: 1.06; }
}
@media (min-width: 2200px) {
  #game:not([style*="--wu-hud-scale"]) { --wu-hud-scale: 1.12; }
}
