/* Top HUD Telemetry Bar & Gaming System Overlays */

.top-hud-bar {
  flex-shrink: 0;
  height: 62px;
  background: rgba(6, 10, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: relative;
  z-index: 20;
}

.top-hud-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 30%, var(--purple) 70%, transparent);
}

/* Operator Info Left Block */
.hud-operator-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.operator-id-tag {
  display: flex;
  flex-direction: column;
}

.operator-callsign {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  line-height: 1.1;
}

.operator-callsign .accent-callsign {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(0, 242, 254, 0.5);
}

.operator-class-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 3px;
}

/* Center HUD Telemetry */
.hud-telemetry-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hud-data-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-main);
  background: rgba(14, 21, 35, 0.55);
  border: 1px solid var(--border-dim);
  padding: 5px 12px;
  border-radius: 3px;
}

.hud-tag {
  color: var(--cyan);
  font-weight: 700;
}

.hud-status-beacon {
  width: 8px;
  height: 8px;
  background-color: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
  animation: beaconPulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes beaconPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Right HUD Controls */
.hud-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-ctrl-btn {
  background: rgba(14, 21, 35, 0.8);
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hud-ctrl-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 242, 254, 0.08);
}

.hud-ctrl-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 242, 254, 0.15);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

/* Mobile Nav Hamburger Toggle Button */
.mobile-nav-toggle-btn {
  display: none;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  padding: 6px 12px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mobile-nav-toggle-btn:hover,
.mobile-nav-toggle-btn.active {
  background: var(--cyan);
  color: #04060a;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.5);
}

.toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Bottom Hint & Telemetry Footer */
.bottom-hud-footer {
  flex-shrink: 0;
  height: 38px;
  background: rgba(6, 10, 18, 0.9);
  border-top: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  position: relative;
  z-index: 20;
}

.hotkey-hints {
  display: flex;
  align-items: center;
  gap: 16px;
}

.key-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 600;
  margin-right: 4px;
}

.hud-node-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

/* Mobile Bottom Tactical Quick Bar (Hidden on Desktop) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 56px;
  background: rgba(6, 10, 18, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-dim);
  z-index: 80;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.m-bottom-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  font-family: var(--font-tech);
}

.m-bottom-btn .m-btn-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.m-bottom-btn .m-btn-txt {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  text-transform: uppercase;
}

.m-bottom-btn:hover {
  color: var(--text-main);
}

.m-bottom-btn.active {
  color: var(--cyan);
}

.m-bottom-btn.active .m-btn-icon {
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.8));
}

.m-bottom-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* Mobile Tactical Navigation Drawer Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.mobile-nav-overlay.visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: rgba(8, 12, 22, 0.98);
  border-left: 1px solid var(--border-bright);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}

.mobile-nav-overlay.visible .mobile-nav-drawer {
  transform: translateX(0);
}

.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 16px;
}

.mobile-nav-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.mobile-nav-close-btn {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 3px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-nav-close-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.mobile-drawer-btn {
  background: rgba(14, 21, 35, 0.6);
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 14px 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.m-drawer-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.m-drawer-btn-left .m-icon {
  font-size: 1.15rem;
}

.mobile-drawer-btn .m-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.mobile-drawer-btn:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.4);
  color: var(--text-bright);
}

.mobile-drawer-btn.active {
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.2), rgba(168, 85, 247, 0.1));
  border-color: var(--border-bright);
  color: var(--cyan);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.mobile-drawer-btn.active .m-num {
  color: var(--cyan);
  font-weight: 700;
}

.mobile-nav-bottom-panel {
  border-top: 1px solid var(--border-dim);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-audio-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mobile-audio-toggles .hud-ctrl-btn {
  justify-content: center;
  padding: 8px 4px;
  font-size: 0.65rem;
}

.mobile-drawer-status {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0 4px;
}

/* Gamepad / Achievement Notification Banners */
.achievement-banner, .gamepad-banner {
  position: fixed;
  top: 74px;
  right: 24px;
  background: rgba(10, 15, 26, 0.94);
  border: 1px solid var(--border-bright);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.35);
  padding: 14px 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.achievement-banner.visible, .gamepad-banner.visible {
  transform: translateX(0);
  opacity: 1;
}

.ach-banner-icon {
  font-size: 1.8rem;
}

.ach-banner-text h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
}

.ach-banner-text p {
  font-family: var(--font-tech);
  font-size: 0.95rem;
  color: var(--text-main);
}

/* ============================================================ */
/* RESPONSIVE BREAKPOINTS (TABLET & MOBILE)                     */
/* ============================================================ */
@media (max-width: 900px) {
  .hud-telemetry-center {
    display: none;
  }
  .top-hud-bar {
    height: 52px;
    padding: 0 14px;
  }
  .operator-callsign {
    font-size: 1rem;
  }
  .operator-class-sub {
    font-size: 0.72rem;
  }
  .hud-controls-right #toggleCrtBtn {
    display: none;
  }
  .mobile-nav-toggle-btn {
    display: flex;
  }
  .bottom-hud-footer {
    display: none;
  }
  .mobile-bottom-bar {
    display: flex;
  }
}

@media (max-width: 540px) {
  .top-hud-bar {
    padding: 0 10px;
  }
  .operator-callsign {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }
  .operator-class-sub {
    display: none;
  }
  .hud-ctrl-btn {
    padding: 5px 8px;
    font-size: 0.65rem;
  }
}
