/* ==========================================================================
   CHRONO BREACH // 时空裂隙：环带方舟 — Dual-Phase Visor HUD Panels
   Author: 星星恐龙 (Zero backdrop-filter in gameplay HUD for 60 FPS lock)
   ========================================================================== */

/* 1. Top-Left Chamfered Objective Card & Safe Zone Badge */
.hud-objective {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 2;
  display: flex;
  align-items: stretch;
  gap: 11px;
  max-width: min(500px, 44vw);
  padding: 10px 16px 10px 12px;
  background: var(--obsidian-hud);
  border: 1px solid rgba(255, 255, 255, 0.11);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.objective-rule {
  width: 3px;
  flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-soft);
}

.objective-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.objective-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.objective-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-shadow: var(--hud-shadow);
  line-height: 1;
}

.objective-pips-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(243, 245, 248, 0.64);
  margin-left: 2px;
}

.objective-pips {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.obj-pip {
  display: inline-block;
  width: 9px;
  height: 5px;
  transform: skewX(-20deg);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: transparent;
}

.obj-pip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.obj-pip.current {
  background: var(--accent);
  border-color: #ffffff;
}

.objective-count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(243, 245, 248, 0.85);
}

.objective-text {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
  line-height: 1.28;
  margin-top: 5px;
  text-shadow: var(--hud-shadow);
}

.objective-meta-row {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.zone-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  color: rgba(243, 245, 248, 0.72);
  text-shadow: var(--hud-shadow);
}

.hud-safezone-badge {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 3px 9px;
  width: fit-content;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  line-height: 1.2;
  color: #dff5e4;
  background: rgba(16, 26, 20, 0.78);
  border: 1px solid rgba(110, 198, 134, 0.34);
  border-left: 2.5px solid #68d084;
  pointer-events: none;
  white-space: nowrap;
}

.hud-safezone-badge.visible {
  display: inline-flex;
}

.safezone-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: #68d084;
}

/* 2. Boss Health & Dual-Phase Vulnerability Bar */
.hud-boss-panel {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, 74vw);
  padding: 9px 14px;
  background: var(--obsidian-hud);
  border: 1px solid rgba(255, 255, 255, 0.12);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
}

.boss-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 5px;
  text-shadow: var(--hud-shadow);
}

.boss-phase-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold-bright);
  padding: 1px 7px;
  background: rgba(228, 188, 112, 0.14);
  border: 1px solid rgba(228, 188, 112, 0.36);
}

.boss-hp-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  transform: skewX(-18deg);
}

.boss-hp-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  transition: width 0.12s ease-out;
}

.boss-plates-row {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

.boss-plate-pip {
  flex: 1;
  height: 3.5px;
  transform: skewX(-18deg);
  background: var(--cyan);
}

.boss-plate-pip.destroyed {
  background: rgba(255, 255, 255, 0.14);
}

.boss-state-hint {
  margin-top: 5px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 245, 248, 0.86);
  text-align: center;
  text-shadow: var(--hud-shadow);
}

/* 3. Diegetic Center-Lower Interaction Prompt & Tactical Warnings */
.hud-interact-prompt {
  position: absolute;
  top: 61%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  background: rgba(10, 14, 20, 0.78);
  border: 1px solid var(--accent-border);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.hud-interact-prompt.visible {
  opacity: 1;
  will-change: opacity;
}

.interact-key {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #0b0e14;
  background: var(--accent);
}

.interact-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--ivory);
  text-shadow: var(--hud-shadow);
}

.interact-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0;
}

.hud-grenade-warning {
  position: fixed;
  left: 50%;
  bottom: 24%;
  transform: translateX(-50%);
  z-index: 28;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffe9e6;
  background: rgba(34, 12, 12, 0.86);
  border: 1px solid rgba(255, 86, 72, 0.62);
  border-left: 3px solid var(--crimson);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  pointer-events: none;
  white-space: nowrap;
}

.hud-grenade-warning.visible {
  display: inline-flex;
}

.hud-grenade-warning-cue {
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.hud-takedown-tag {
  position: fixed;
  left: 50%;
  top: calc(50% + 22px);
  transform: translateX(-50%);
  z-index: 29;
  opacity: 0;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #f8deaa;
  background: rgba(18, 15, 11, 0.80);
  border: 1px solid rgba(228, 188, 112, 0.52);
  pointer-events: none;
  white-space: nowrap;
}

.hud-takedown-tag.visible {
  will-change: opacity;
}

/* 4. Bottom-Left Dual-Phase Vitals & Jump-Kit Pod */
.low-health-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 110px rgba(225, 32, 48, 0.68);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.visor-pod {
  background: var(--obsidian-hud);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.visor-pod-left {
  border-left: 3px solid var(--accent);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  padding: 10px 16px 10px 14px;
}

.visor-pod-right {
  border-right: 3px solid var(--accent);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
  padding: 10px 14px 10px 18px;
}

.hud-vitals {
  position: absolute;
  left: 24px;
  bottom: 22px;
}

.vitals-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
}

.vitals-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(243, 245, 248, 0.68);
  text-shadow: var(--hud-shadow);
}

.shield-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(124, 212, 255, 0.85);
}

.shield-num {
  font-family: var(--font-cond);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #7cd4ff;
  text-shadow: var(--hud-shadow);
}

.shield-num.depleted {
  color: rgba(255, 160, 120, 0.82);
}

.vitals-main-row {
  display: flex;
  align-items: flex-end;
  gap: 11px;
}

.health-num {
  font-family: var(--font-cond);
  font-size: 36px;
  font-weight: 700;
  line-height: 0.86;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  min-width: 42px;
  text-shadow: var(--hud-shadow);
}

.health-num.critical {
  color: var(--crimson);
  animation: critical-pulse 0.6s ease-in-out infinite alternate;
}

.vitals-bars-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 3px;
}

.vitals-bars {
  display: flex;
  gap: 3px;
}

.vital-seg {
  width: 12px;
  height: 5px;
  transform: skewX(-18deg);
  background: rgba(255, 255, 255, 0.15);
}

.vital-seg.lit {
  background: #ffffff;
}

.vital-seg.critical.lit {
  background: var(--crimson);
  animation: critical-pulse 0.6s ease-in-out infinite alternate;
}

.armor-seg {
  width: 12px;
  height: 3.5px;
  transform: skewX(-18deg);
  background: rgba(124, 212, 255, 0.15);
}

.armor-seg.lit {
  background: #7cd4ff;
}

.armor-seg.depleted {
  background: rgba(124, 212, 255, 0.10);
}

@keyframes critical-pulse {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.45;
  }
}

.movement-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(243, 245, 248, 0.72);
  text-shadow: var(--hud-shadow);
}

.move-pill {
  color: rgba(243, 245, 248, 0.86);
}

.move-pill.shift-ready {
  color: var(--accent);
  font-weight: 700;
}

.pill-dot {
  opacity: 0.40;
}

/* 5. Bottom-Right Ballistic Loadout & Chrono Phase Pod */
.hud-weapon-cluster {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.weapon-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 4px;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
  background: rgba(8, 12, 18, 0.58);
}

.timeline-badge.past {
  color: var(--gold-bright);
  border-color: rgba(228, 188, 112, 0.45);
}

.timeline-badge.present {
  color: var(--cyan);
  border-color: rgba(94, 228, 255, 0.48);
}

.tl-dot {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: currentColor;
}

.weapon-slots-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-shadow: var(--hud-shadow);
}

.weapon-slot-sep {
  color: rgba(243, 245, 248, 0.28);
}

.weapon-slot-tab {
  color: rgba(243, 245, 248, 0.44);
  font-weight: 600;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}

.weapon-slot-tab .slot-key {
  font-family: var(--font-mono);
  font-weight: 700;
  color: rgba(228, 188, 112, 0.50);
}

.weapon-slot-tab.active {
  color: #ffffff;
  border-bottom-color: var(--accent);
}

.weapon-slot-tab.active .slot-key {
  color: var(--accent);
}

.ammo-status-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  text-shadow: var(--hud-shadow);
  min-height: 13px;
  margin-bottom: 1px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.ammo-status-tag.visible {
  opacity: 1;
}

.ammo-status-tag.empty {
  color: var(--crimson);
}

.ammo-readout {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.weapon-chips-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.firemode-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  background: rgba(12, 15, 22, 0.68);
  border-left: 2px solid var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.firemode-key {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

.firemode-badge.fixed-mode .firemode-key {
  opacity: 0.36;
}

.firemode-tag {
  color: var(--ivory);
  font-weight: 700;
}

.hud-flashlight-badge {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(232, 242, 255, 0.28);
  background: rgba(12, 16, 22, 0.50);
  color: rgba(242, 247, 255, 0.94);
  pointer-events: none;
}

.flashlight-pip {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f2f8ff;
  box-shadow: 0 0 5px rgba(230, 244, 255, 0.85);
}

.hud-flashlight-badge.off {
  opacity: 0.48;
  color: rgba(168, 176, 188, 0.72);
  border-color: rgba(168, 176, 188, 0.16);
}

.hud-flashlight-badge.off .flashlight-pip {
  background: rgba(140, 148, 160, 0.45);
  box-shadow: none;
}

.ammo-mag {
  font-family: var(--font-cond);
  font-size: 46px;
  font-weight: 700;
  line-height: 0.88;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  text-shadow: var(--hud-shadow);
}

.ammo-mag.low {
  color: var(--gold-bright);
}

.ammo-mag.empty {
  color: var(--crimson);
}

.ammo-mag.reloading {
  opacity: 0.76;
}

.ammo-reserve-wrap {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(243, 245, 248, 0.72);
  align-self: flex-end;
  padding-bottom: 4px;
}

.ammo-slash {
  opacity: 0.50;
  margin-right: 2px;
}

.ammo-ticks {
  display: flex;
  justify-content: flex-end;
  gap: 2.5px;
  margin: 5px 0 6px;
}

.ammo-tick {
  width: 2.5px;
  height: 7px;
  transform: skewX(-16deg);
  background: rgba(255, 255, 255, 0.15);
}

.ammo-tick.sidearm-tick {
  width: 3.5px;
}

.ammo-tick.unused {
  display: none;
}

.ammo-tick.loaded {
  background: #ffffff;
}

.ammo-tick.loaded.low {
  background: var(--gold-bright);
}

.weapon-ordnance-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(243, 245, 248, 0.84);
  text-shadow: var(--hud-shadow);
}

.ordnance-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ordnance-item.depleted {
  opacity: 0.44;
}

.ordnance-item.active-strike {
  color: var(--gold-bright);
}

.ord-key {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

.frag-pips {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  margin-left: 1px;
}

.frag-pip {
  display: inline-block;
  width: 6px;
  height: 7px;
  transform: skewX(-16deg);
  border: 1px solid rgba(243, 245, 248, 0.40);
  background: transparent;
}

.frag-pip.live {
  background: var(--accent);
  border-color: var(--accent);
}

.weapon-caption-sep {
  opacity: 0.42;
}

.weapon-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 245, 248, 0.62);
}

/* 6. Radio Comms Subtitles */
.hud-subtitles {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(620px, 52vw);
  padding: 8px 16px;
  background: rgba(8, 11, 17, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 2px solid var(--accent);
  text-align: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.hud-subtitles.visible {
  opacity: 1;
}

.subtitle-speaker-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 3px;
}

.comms-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.subtitle-speaker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-shadow: var(--hud-shadow);
}

.subtitle-text {
  display: block;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.48;
  color: #f4f6f9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.96);
}
