/* ==========================================================================
   DHRUV HUD COCKPIT - STARK TACTICAL INTERFACE (1:1 REFERENCE REPLICA)
   Layered Holographic UI • Electric Cyan, Titanium Gold & Code Red Palette
   ========================================================================== */

:root {
  --bg-space: #02050c;
  --bg-deep: #010307;
  --bg-hud: rgba(4, 12, 26, 0.82);
  --bg-glass-chip: rgba(0, 240, 255, 0.12);
  --bg-glass-card: rgba(5, 14, 30, 0.88);

  /* Iron Man & Stark Palette */
  --cyan-core: #00F0FF;
  --cyan-bright: #38f9d7;
  --cyan-glow: rgba(0, 240, 255, 0.55);
  --cyan-border: rgba(0, 240, 255, 0.38);

  --gold-stark: #FFB800;
  --gold-glow: rgba(255, 184, 0, 0.5);
  --gold-border: rgba(255, 184, 0, 0.38);

  --red-repulsor: #FF2A4D;
  --red-glow: rgba(255, 42, 77, 0.6);
  --red-border: rgba(255, 42, 77, 0.45);

  --green-online: #0ECB81;
  --text-main: #E2F1FF;
  --text-muted: #84A3C2;
  --text-dim: #4B6E94;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 30px;
  --font-hud: 'Orbitron', monospace;
  --font-body: 'Rajdhani', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-code: 'Fira Code', monospace;
}

/* Theme Variations */
body[data-theme="arc-blue"] {
  --cyan-core: #1E90FF;
  --cyan-bright: #00BFFF;
  --cyan-glow: rgba(30, 144, 255, 0.6);
  --cyan-border: rgba(30, 144, 255, 0.45);
}

body[data-theme="code-red"] {
  --cyan-core: #FF2A4D;
  --cyan-bright: #FF5E7E;
  --cyan-glow: rgba(255, 42, 77, 0.65);
  --cyan-border: rgba(255, 42, 77, 0.45);
}

body[data-theme="stark-gold"] {
  --cyan-core: #FFB800;
  --cyan-bright: #FFD700;
  --cyan-glow: rgba(255, 184, 0, 0.65);
  --cyan-border: rgba(255, 184, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-space);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ==========================================================================
   LAYER 1: BACKGROUND & PARTICLES
   ========================================================================== */
.hud-layer-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(circle at 50% 42%, rgba(0, 180, 255, 0.18) 0%, rgba(0, 50, 120, 0.08) 45%, transparent 72%),
    radial-gradient(circle at 12% 85%, rgba(255, 42, 77, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 88% 15%, rgba(255, 184, 0, 0.06) 0%, transparent 40%),
    linear-gradient(rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%);
  background-size: 100% 4px;
  z-index: 3;
  opacity: 0.28;
}

/* ==========================================================================
   TOP BAR (CENTERED BRAND + CONTROLS ON RIGHT)
   ========================================================================== */
.hud-top-bar {
  position: fixed;
  top: 10px;
  left: 18px;
  right: 18px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  pointer-events: auto;
}

.hud-top-left-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cyan-core);
  text-shadow: 0 0 8px var(--cyan-glow);
  opacity: 0.85;
}

.pulse-led-cyan {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan-core);
  box-shadow: 0 0 10px var(--cyan-core);
  animation: pulse-dot 1.8s infinite;
}

/* Centered / Left Header Brand */
.hud-top-brand-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 2;
}

.brand-sub-badge {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--cyan-core);
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}

.hud-hero-status-pill,
.mobile-status-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 5px 18px;
  font-size: 11px;
  letter-spacing: 1.2px;
  margin-top: 8px;
  border-radius: 20px;
  width: auto;
  max-width: fit-content;
}

.hud-top-center-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.brand-text-glowing {
  font-family: var(--font-hud);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 2.8px;
  color: #fff;
  text-shadow: 0 0 14px var(--cyan-core), 0 0 28px rgba(0, 240, 255, 0.5);
  text-transform: uppercase;
}

.hud-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Voice / Language Selector Dropdown */
.hud-voice-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(6, 16, 32, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  padding-right: 8px;
}

.hud-voice-select {
  background: transparent;
  border: none;
  color: var(--cyan-core);
  padding: 6px 20px 6px 8px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.hud-voice-select option {
  background: #061020;
  color: #fff;
}

.hud-select-arrow {
  position: absolute;
  right: 8px;
  pointer-events: none;
  font-size: 9px;
  color: var(--cyan-core);
}

/* Icon Action Buttons */
.hud-top-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(6, 16, 32, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cyan-border);
  color: var(--cyan-core);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.18);
  transition: all 0.25s ease;
}

.hud-top-icon-btn:hover {
  background: var(--cyan-core);
  color: #020914;
  box-shadow: 0 0 18px var(--cyan-core);
  transform: translateY(-1px);
}

.hud-glass-btn {
  padding: 5px 12px;
  background: rgba(6, 16, 32, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 11px;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.hud-glass-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cyan-core);
  box-shadow: 0 0 14px var(--cyan-glow);
}

.btn-stop-audio {
  background: rgba(255, 42, 77, 0.2);
  border-color: var(--red-repulsor);
  color: var(--red-repulsor);
  display: none;
}

/* Auto-Listen Toggle Switch */
.hud-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--cyan-core);
  cursor: pointer;
  user-select: none;
  padding: 4px 10px;
  background: rgba(6, 16, 32, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.hud-switch-input { display: none; }

.hud-switch-slider {
  width: 30px;
  height: 15px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--cyan-border);
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.hud-switch-slider::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan-core);
  box-shadow: 0 0 6px var(--cyan-core);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hud-switch-input:checked + .hud-switch-slider {
  background: rgba(0, 240, 255, 0.35);
  border-color: var(--cyan-core);
}

.hud-switch-input:checked + .hud-switch-slider::after {
  transform: translateX(14px);
  background: #fff;
  box-shadow: 0 0 10px var(--cyan-core);
}

/* ==========================================================================
   MAIN COCKPIT LAYOUT (CLEAN FOLDABLE DESKTOP COCKPIT)
   ========================================================================== */
.hud-main-cockpit {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 60px 20px 16px 20px;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  box-sizing: border-box;
}

/* Edge Toggle Handles (Desktop Left / Right Flank Drawers) */
.desktop-flank-edge-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  background: rgba(4, 14, 30, 0.9);
  border: 1.5px solid var(--cyan-core);
  color: var(--cyan-core);
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  user-select: none;
}

.edge-btn-left {
  left: 0;
  border-left: none;
  border-radius: 0 10px 10px 0;
}

.edge-btn-right {
  right: 0;
  border-right: none;
  border-radius: 10px 0 0 10px;
}

.desktop-flank-edge-btn:hover {
  background: var(--cyan-core);
  color: #020914;
  box-shadow: 0 0 28px var(--cyan-core);
}

.edge-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.desktop-flank-edge-btn.active .edge-arrow {
  transform: rotate(180deg);
}

.edge-btn-left.active {
  left: 290px;
  background: rgba(0, 240, 255, 0.22);
  border-color: #fff;
  color: #fff;
}

.edge-btn-right.active {
  right: 270px;
  background: rgba(0, 240, 255, 0.22);
  border-color: #fff;
  color: #fff;
}

/* ==========================================================================
   LEFT FLANK: COMMAND CENTER WINDOW + 4 CYAN PILLS (SLIDE-OUT DRAWER)
   ========================================================================== */
.hud-flank-left {
  position: fixed;
  left: 0;
  top: 55px;
  bottom: 75px;
  width: 290px;
  max-width: 88vw;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: rgba(3, 11, 24, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1.5px solid var(--cyan-core);
  box-shadow: 12px 0 35px rgba(0, 240, 255, 0.25);
  border-radius: 0 16px 16px 0;
  overflow-y: auto;
  pointer-events: auto;
  z-index: 26;
  transform: translateX(-105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-flank-left.open {
  transform: translateX(0);
}

.hud-flank-left::-webkit-scrollbar,
.hud-flank-right::-webkit-scrollbar {
  width: 4px;
}

.hud-flank-left::-webkit-scrollbar-thumb,
.hud-flank-right::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.4);
  border-radius: 2px;
}

/* Command Center Glass Window (Screenshot Match) */
.hud-cmd-window {
  background: rgba(4, 12, 26, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--cyan-border);
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.15), inset 0 0 15px rgba(0, 240, 255, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.hud-cmd-window.minimized .cmd-window-body {
  display: none;
}

.cmd-window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 240, 255, 0.08);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.cmd-window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.8px;
}

.cmd-window-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-btn {
  color: var(--cyan-core);
  font-size: 10.5px;
  font-family: var(--font-code);
  cursor: pointer;
  padding: 0 4px;
  border-radius: 3px;
  transition: all 0.2s;
  user-select: none;
}

.win-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  color: #fff;
}

.cmd-window-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-group-title {
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan-core);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #D6E8FA;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  user-select: none;
}

.cmd-item:hover {
  background: rgba(0, 240, 255, 0.16);
  color: #fff;
  transform: translateX(4px);
  text-shadow: 0 0 8px var(--cyan-glow);
}

.cmd-num {
  font-family: var(--font-code);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cyan-core);
  width: 14px;
}

/* Stack of 4 Glowing Electric Cyan Pill Buttons (Screenshot Match) */
.hud-pill-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hud-pill-button {
  width: 100%;
  padding: 8px 16px;
  border-radius: 25px;
  background: rgba(0, 240, 255, 0.14);
  border: 1.5px solid var(--cyan-core);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.32), inset 0 0 10px rgba(0, 240, 255, 0.12);
  color: #fff;
  font-family: var(--font-hud);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.hud-pill-button:hover {
  background: var(--cyan-core);
  color: #020914;
  box-shadow: 0 0 28px var(--cyan-core), inset 0 0 12px rgba(255, 255, 255, 0.6);
  transform: translateY(-2px) scale(1.02);
}

.hud-pill-button i {
  font-size: 13px;
  color: var(--cyan-core);
  transition: all 0.2s;
}

.hud-pill-button:hover i {
  color: #020914;
}

/* ==========================================================================
   RIGHT FLANK: CONTROLS & TOOLS + 4 CYAN PILLS (SLIDE-OUT DRAWER)
   ========================================================================== */
.hud-flank-right {
  position: fixed;
  right: 0;
  top: 55px;
  bottom: 75px;
  width: 270px;
  max-width: 88vw;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  background: rgba(3, 11, 24, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1.5px solid var(--cyan-core);
  box-shadow: -12px 0 35px rgba(0, 240, 255, 0.25);
  border-radius: 16px 0 0 16px;
  overflow-y: auto;
  pointer-events: auto;
  z-index: 26;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-flank-right.open {
  transform: translateX(0);
}

/* Flank Drawer Header */
.flank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 10px 6px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  margin-bottom: 4px;
}

.flank-header-title {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--cyan-core);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-flank {
  background: transparent;
  border: none;
  color: var(--cyan-core);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
  transition: all 0.2s;
}

.btn-close-flank:hover {
  color: #fff;
  transform: scale(1.2);
}

.hud-pill-status {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan-core);
  color: #fff;
}

.status-dot-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-online);
  box-shadow: 0 0 10px var(--green-online);
  animation: pulse-dot 1.6s infinite;
}

/* Circular Avatar Button (As in Reference Screenshot) */
.hud-circle-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.25) 0%, rgba(2, 12, 28, 0.85) 80%);
  border: 1.5px solid var(--cyan-core);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 0 8px rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.hud-circle-avatar-btn:hover {
  background: var(--cyan-core);
  color: #020914;
  box-shadow: 0 0 28px var(--cyan-core);
  transform: scale(1.1);
}

/* ==========================================================================
   CENTER HERO STAGE: IRON MAN CYBER ARMOR + TAGLINE + EQUALIZER
   ========================================================================== */
.hud-hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 8;
  position: relative;
  width: 100%;
  flex: 1;
}

.hologram-centerpiece {
  position: relative;
  width: clamp(340px, 46vh, 480px);
  height: clamp(340px, 46vh, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Multi-tier Concentric Rotating HUD Rings */
.hud-ring-outer {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px dashed rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.16);
  animation: spin-clockwise 38s linear infinite;
  pointer-events: none;
}

.hud-ring-outer::before {
  content: '00° • 90° • 180° • 270°';
  position: absolute;
  top: -14px;
  left: 0; right: 0;
  text-align: center;
  font-size: 8px;
  font-family: var(--font-hud);
  color: var(--cyan-core);
  letter-spacing: 4px;
  text-shadow: 0 0 8px var(--cyan-core);
}

.hud-ring-mid {
  position: absolute;
  width: 86%;
  height: 86%;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--cyan-core);
  border-bottom-color: var(--cyan-core);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.22);
  animation: spin-counter 24s linear infinite;
  pointer-events: none;
}

.hud-ring-inner {
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  border: 1px dotted rgba(0, 240, 255, 0.55);
  animation: spin-clockwise 16s linear infinite;
  pointer-events: none;
}

.hud-radar-sweep {
  position: absolute;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 240, 255, 0.22) 0deg, transparent 65deg, transparent 360deg);
  animation: radar-sweep-anim 4.8s linear infinite;
  pointer-events: none;
}

/* Detailed Iron Man Cyber Armor SVG Container */
.ironman-svg-container {
  position: relative;
  width: 90%;
  height: 94%;
  filter: drop-shadow(0 0 26px rgba(0, 240, 255, 0.65));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
}

/* Chest Arc Reactor Core (Clickable trigger for voice listening) */
.arc-reactor-core {
  position: absolute;
  bottom: 8%;
  width: clamp(74px, 11vh, 102px);
  height: clamp(74px, 11vh, 102px);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #00F0FF 45%, #003366 85%, #000 100%);
  box-shadow: 0 0 40px var(--cyan-core), 0 0 75px rgba(0, 240, 255, 0.6);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  cursor: pointer;
  animation: arc-pulse 2.2s infinite ease-in-out;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.arc-reactor-core:hover {
  transform: scale(1.08);
  box-shadow: 0 0 60px #00F0FF, 0 0 100px rgba(0, 240, 255, 0.9);
}

.arc-reactor-core::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed var(--cyan-core);
  animation: spin-clockwise 10s linear infinite;
}

.arc-reactor-core::after {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.4);
  animation: pulse-ring 2.6s infinite;
}

.arc-reactor-label {
  font-family: var(--font-hud);
  font-size: clamp(11px, 1.5vh, 14px);
  font-weight: 900;
  letter-spacing: 2px;
  color: #020914;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.95);
  user-select: none;
}

/* Wordmark, Tagline & Realtime Equalizer */
.hud-hero-typography {
  margin-top: 10px;
  text-align: center;
  z-index: 7;
}

.hud-wordmark-title {
  font-family: var(--font-hud);
  font-size: clamp(14px, 2.3vh, 20px);
  font-weight: 900;
  letter-spacing: 3.2px;
  color: var(--cyan-core);
  text-shadow: 0 0 20px var(--cyan-core), 0 0 45px rgba(0, 240, 255, 0.65);
  text-transform: uppercase;
}

.hud-wordmark-sub {
  font-family: var(--font-body);
  font-size: clamp(11px, 1.4vh, 13.5px);
  font-weight: 600;
  letter-spacing: 1.6px;
  color: #B2D8FA;
  text-transform: uppercase;
  margin-top: 3px;
}

.hud-equalizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 22px;
  margin-top: 6px;
}

.eq-bar {
  width: 3px;
  height: 4px;
  background: var(--cyan-core);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan-core);
  transition: height 0.08s ease;
}

/* ==========================================================================
   BOTTOM DOCK: ANGLED HUD FRAME CONSOLE + 6 ORBS + ACTIVATE BUTTON + QR
   ========================================================================== */
.hud-bottom-dock {
  grid-column: 1 / span 3;
  grid-row: 3;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  pointer-events: auto;
  z-index: 12;
}

/* High-Tech Angled Console Frame (Reference Screenshot Match) */
.dock-console-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 24px 12px;
  background: rgba(3, 10, 24, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(0, 240, 255, 0.48);
  border-radius: 18px 18px 0 0;
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%, 0 18px);
  box-shadow: 0 -5px 35px rgba(0, 240, 255, 0.22);
}

/* Row of 6 Circular Modules */
.hud-floating-modules {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.module-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.module-chip:hover {
  transform: translateY(-3px);
}

.module-orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, rgba(0, 40, 80, 0.65) 80%);
  border: 1.5px solid var(--cyan-core);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.42), inset 0 0 8px rgba(0, 240, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  transition: all 0.25s ease;
}

.module-chip:hover .module-orb {
  background: var(--cyan-core);
  color: #020914;
  box-shadow: 0 0 26px var(--cyan-core);
  transform: scale(1.08);
}

.orb-red {
  border-color: var(--red-repulsor);
  background: radial-gradient(circle, rgba(255, 42, 77, 0.25) 0%, rgba(70, 10, 25, 0.65) 80%);
  box-shadow: 0 0 18px var(--red-glow), inset 0 0 8px rgba(255, 42, 77, 0.35);
}

.module-chip:hover .orb-red {
  background: var(--red-repulsor);
  color: #fff;
  box-shadow: 0 0 28px var(--red-repulsor);
}

.module-label {
  font-family: var(--font-hud);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
  text-align: center;
  white-space: nowrap;
}

/* Prominent Glowing Center Activate Button (Screenshot Match) */
.btn-activate-jarvis {
  padding: 8px 30px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.9) 0%, rgba(0, 140, 255, 0.9) 100%);
  border: 1.5px solid #fff;
  border-radius: 30px;
  color: #020914;
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.8), 0 0 50px rgba(0, 240, 255, 0.4);
  animation: activate-pulse 2.2s infinite ease-in-out;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: all 0.25s ease;
}

.btn-activate-jarvis:hover {
  transform: scale(1.05);
  box-shadow: 0 0 45px #00F0FF, 0 0 80px rgba(0, 240, 255, 0.8);
}

@keyframes activate-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(0, 240, 255, 0.7); }
  50% { box-shadow: 0 0 40px var(--cyan-core), 0 0 65px rgba(0, 240, 255, 0.9); }
}

/* Bottom Left Sovereignty Stamp */
.hud-bottom-left-info {
  position: absolute;
  bottom: 6px;
  left: 20px;
  font-family: var(--font-hud);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

/* Bottom Right Download / QR Card (Screenshot Match) */
.hud-download-card {
  position: absolute;
  bottom: 6px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(4, 12, 26, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cyan-border);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.16);
  font-family: var(--font-body);
}

.download-card-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.download-card-text strong {
  font-family: var(--font-hud);
  font-size: 10.5px;
  color: #fff;
  letter-spacing: 0.8px;
}

.download-card-text span {
  font-size: 9.5px;
  color: var(--text-muted);
}

.store-badge {
  font-size: 8.5px;
  font-family: var(--font-hud);
  color: var(--cyan-core);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qr-code-box {
  width: 44px;
  height: 44px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--cyan-core);
  border-radius: 6px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
  cursor: pointer;
}

/* ==========================================================================
   LAYER 4: CHAT GLASS OVERLAY (TACTICAL STREAM MODAL)
   ========================================================================== */
.hud-chat-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(1, 4, 10, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.hud-chat-overlay.active {
  opacity: 1;
  visibility: visible;
}

.hud-chat-modal {
  width: 100%;
  max-width: 860px;
  height: 82vh;
  max-height: 850px;
  background: rgba(5, 14, 30, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid var(--cyan-border);
  border-radius: 18px;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.3), 0 25px 80px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-chat-overlay.active .hud-chat-modal {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.hud-modal-header {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.05);
}

.hud-modal-title {
  font-family: var(--font-hud);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}

.hud-modal-badge {
  font-size: 9.5px;
  padding: 2px 8px;
  background: rgba(0, 240, 255, 0.18);
  border: 1px solid var(--cyan-border);
  border-radius: 10px;
  color: var(--cyan-core);
  letter-spacing: 1px;
}

.hud-modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--cyan-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: var(--red-repulsor);
  border-color: var(--red-repulsor);
  box-shadow: 0 0 15px var(--red-glow);
}

/* Chat Stream Box */
.chat-box-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

/* Scrollbar */
.chat-box::-webkit-scrollbar {
  width: 5px;
}
.chat-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.chat-box::-webkit-scrollbar-thumb {
  background: var(--cyan-border);
  border-radius: 4px;
}

/* Messages */
.message {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 90%;
  animation: msg-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-user {
  align-self: flex-end;
}

.message-assistant {
  align-self: flex-start;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 1px;
}

.meta-sender {
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar-reactor {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan-core);
  color: #020914;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  box-shadow: 0 0 8px var(--cyan-core);
}

.sender-name {
  color: #fff;
  font-weight: 700;
}

.sender-badge {
  font-size: 8px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan-core);
  border: 1px solid var(--cyan-border);
}

.meta-time {
  color: var(--text-dim);
  font-size: 9px;
}

.message-body {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  position: relative;
  word-break: break-word;
}

.message-user .message-body {
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.28) 0%, rgba(0, 80, 180, 0.28) 100%);
  border: 1px solid rgba(0, 200, 255, 0.45);
  color: #FFFFFF;
  border-top-right-radius: 2px;
  box-shadow: 0 0 18px rgba(0, 180, 255, 0.2);
}

.message-assistant .message-body {
  background: rgba(6, 18, 38, 0.75);
  border: 1px solid var(--cyan-border);
  color: var(--text-main);
  border-top-left-radius: 2px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.12);
}

/* Markdown styling in message body */
.markdown-body pre {
  background: #040914 !important;
  border: 1px solid var(--cyan-border);
  border-radius: 8px;
  padding: 10px;
  overflow-x: auto;
  margin: 8px 0;
}
.markdown-body code {
  font-family: var(--font-code);
  font-size: 12px;
}
.markdown-body p { margin-bottom: 6px; }
.markdown-body p:last-child { margin-bottom: 0; }

/* Thinking Indicator */
.thinking-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px dashed var(--cyan-border);
  border-radius: 10px;
  font-family: var(--font-hud);
  font-size: 11px;
  color: var(--cyan-core);
  letter-spacing: 1px;
}

.thinking-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-top-color: var(--cyan-core);
  border-radius: 50%;
  animation: spin-clockwise 1s linear infinite;
}

/* ==========================================================================
   ATTACHMENT PREVIEWS & MULTIMODAL MEDIA
   ========================================================================== */
.attachment-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 8px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.22);
  margin-bottom: 8px;
}

.attachment-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(3, 14, 32, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 8px;
  padding: 3px 6px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

.attach-thumb {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.4);
}

.attach-chip-name {
  font-family: var(--font-hud);
  font-size: 10px;
  color: #c9e4fb;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-remove-attach {
  background: transparent;
  border: none;
  color: #ff5b77;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  transition: transform 0.2s ease;
}

.btn-remove-attach:hover {
  transform: scale(1.2);
}

/* Chat bubble attachment styling */
.message-attachments-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.msg-img-preview-link {
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}

.msg-img-preview-link:hover {
  transform: scale(1.02);
  border-color: var(--cyan-core);
}

.msg-img-preview {
  max-width: 220px;
  max-height: 180px;
  display: block;
  object-fit: cover;
}

.msg-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-hud);
  font-size: 10px;
  color: var(--cyan-core);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Modal Input Bar */
.hud-modal-input-bar {
  padding: 12px 18px;
  background: rgba(0, 240, 255, 0.04);
  border-top: 1px solid rgba(0, 240, 255, 0.18);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.chat-input {
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  background: rgba(0, 240, 255, 0.06);
  border: 1.5px solid var(--cyan-border);
  border-radius: var(--radius-pill);
  padding: 10px 38px 10px 18px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  outline: none;
  resize: none;
  transition: all 0.25s ease;
}

.chat-input:focus {
  border-color: var(--cyan-core);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.btn-clear-input {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  display: none;
}
.btn-clear-input:hover { color: #fff; }

.btn-icon-hud {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(6, 16, 32, 0.8);
  border: 1.5px solid var(--cyan-core);
  color: var(--cyan-core);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
  transition: all 0.25s ease;
}

.btn-icon-hud:hover {
  background: var(--cyan-core);
  color: #020914;
  box-shadow: 0 0 22px var(--cyan-core);
  transform: scale(1.06);
}

.btn-icon-hud.recording {
  background: var(--red-repulsor) !important;
  border-color: #fff !important;
  color: #fff !important;
  box-shadow: 0 0 25px var(--red-repulsor) !important;
  animation: pulse-dot 1s infinite;
}

.btn-icon-send {
  background: var(--cyan-core);
  color: #020914;
}

.scroll-bottom-pill {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cyan-core);
  color: #020914;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-family: var(--font-hud);
  font-weight: 700;
  cursor: pointer;
  display: none;
  box-shadow: 0 0 15px var(--cyan-core);
  z-index: 10;
}

/* ==========================================================================
   TOAST & PWA BANNER
   ========================================================================== */
.jarvis-toast {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: rgba(6, 16, 32, 0.95);
  border: 1px solid var(--cyan-core);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.jarvis-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-banner {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 12px; right: 12px;
  background: var(--bg-hud);
  backdrop-filter: blur(16px);
  border: 1px solid var(--cyan-core);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.5);
  z-index: 10000;
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pwa-banner-text strong {
  font-family: var(--font-hud);
  color: #fff;
  display: block;
  font-size: 12px;
}
.pwa-banner-text { font-size: 11px; color: var(--text-muted); }

/* Compatibility Hidden Containers */
#cockpit-orb-view,
#tactical-stream-view,
#mobile-tabs {
  display: none !important;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-counter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes radar-sweep-anim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes arc-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 35px var(--cyan-core); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px var(--cyan-core), 0 0 90px rgba(0, 240, 255, 0.65); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 16px var(--cyan-core); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   CINEMATIC BOOT SEQUENCE ("ENTERING DHRUV AI WORLD")
   ========================================================================== */
.hud-boot-cinematic {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 50% 50%, #03122c 0%, #010511 50%, #000 100%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
  pointer-events: auto;
}

.hud-boot-cinematic.dismissed {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.12);
  pointer-events: none;
}

.boot-warp-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.warp-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
  animation: warp-pulse 3s infinite ease-out;
}
.warp-ring-1 { width: 120px; height: 120px; animation-delay: 0s; }
.warp-ring-2 { width: 260px; height: 260px; animation-delay: 0.6s; border-color: rgba(0, 240, 255, 0.2); }
.warp-ring-3 { width: 440px; height: 440px; animation-delay: 1.2s; border-color: rgba(255, 184, 0, 0.25); }
.warp-ring-4 { width: 680px; height: 680px; animation-delay: 1.8s; border-color: rgba(0, 240, 255, 0.15); }
.warp-ring-5 { width: 960px; height: 960px; animation-delay: 2.4s; border-color: rgba(0, 240, 255, 0.08); }

@keyframes warp-pulse {
  0% { transform: scale(0.2) rotate(0deg); opacity: 0; }
  30% { opacity: 0.8; }
  100% { transform: scale(1.6) rotate(180deg); opacity: 0; }
}

.boot-laser-scan {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #00F0FF 50%, transparent 100%);
  box-shadow: 0 0 20px #00F0FF, 0 0 40px #00F0FF;
  animation: laser-scan-loop 2.8s infinite ease-in-out;
  pointer-events: none;
}
@keyframes laser-scan-loop {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.boot-star-core {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #00F0FF 40%, #003366 80%, transparent 100%);
  box-shadow: 0 0 60px #00F0FF, 0 0 120px rgba(0, 240, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: star-core-pulse 2s infinite ease-in-out;
  z-index: 5;
  margin-bottom: 8px;
}
.boot-star-core::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 184, 0, 0.7);
  animation: spin-clockwise 8s linear infinite;
}
@keyframes star-core-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 50px #00F0FF; }
  50% { transform: scale(1.15); box-shadow: 0 0 90px #00F0FF, 0 0 140px rgba(0, 240, 255, 0.9); }
}

.boot-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 540px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.boot-title {
  font-family: var(--font-hud);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 25px var(--cyan-core), 0 0 50px rgba(0, 240, 255, 0.7);
  text-transform: uppercase;
}

.boot-subtitle {
  font-family: var(--font-hud);
  font-size: clamp(10.5px, 1.3vw, 12.5px);
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--gold-stark);
  text-shadow: 0 0 12px var(--gold-glow);
  text-transform: uppercase;
}

.boot-telemetry-box {
  width: 100%;
  background: rgba(4, 12, 26, 0.85);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-code);
  font-size: 11.5px;
  color: var(--cyan-core);
  text-align: left;
  line-height: 1.6;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15);
  min-height: 80px;
}

.boot-telemetry-line {
  margin-bottom: 2px;
  opacity: 0;
  animation: line-fade-in 0.3s forwards ease-in-out;
}
@keyframes line-fade-in { to { opacity: 1; } }

.btn-enter-realm {
  margin-top: 10px;
  padding: 12px 38px;
  background: linear-gradient(90deg, #00F0FF, #38f9d7, #FFB800, #00F0FF);
  background-size: 300% 100%;
  border: 2px solid #fff;
  border-radius: var(--radius-pill);
  color: #020914;
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.9), inset 0 0 15px rgba(255, 255, 255, 0.6);
  animation: gradient-shift 4s ease infinite;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
}
.btn-enter-realm:hover {
  transform: scale(1.08);
  box-shadow: 0 0 55px #00F0FF, 0 0 100px rgba(0, 240, 255, 0.9);
}

.btn-skip-intro {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 10.5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 20;
}
.btn-skip-intro:hover { color: #fff; border-color: var(--cyan-core); }

/* ==========================================================================
   SECURITY CLEARANCE AUTHENTICATION GATE
   ========================================================================== */
.hud-security-gate {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 50% 45%, #05142e 0%, #010612 55%, #000 100%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

.hud-security-gate.unlocked {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.08);
  pointer-events: none;
}

.security-card {
  width: 100%;
  max-width: 440px;
  background: rgba(6, 16, 34, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid var(--cyan-border);
  border-radius: 18px;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.25), 0 20px 60px rgba(0, 0, 0, 0.9);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.security-card::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-core), var(--gold-stark), transparent);
}

.security-icon-core {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 42, 77, 0.2) 0%, rgba(60, 10, 20, 0.6) 80%);
  border: 2px solid var(--red-repulsor);
  box-shadow: 0 0 25px var(--red-glow), inset 0 0 15px rgba(255, 42, 77, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  transition: all 0.3s ease;
  animation: arc-pulse 2.4s infinite ease-in-out;
}

.security-icon-core.authorized {
  border-color: var(--cyan-core);
  background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, rgba(0, 40, 80, 0.6) 80%);
  box-shadow: 0 0 35px var(--cyan-core);
}

.security-title {
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2.2px;
  color: #fff;
  text-shadow: 0 0 15px var(--cyan-glow);
  text-transform: uppercase;
  text-align: center;
}

.security-sub {
  font-family: var(--font-hud);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--gold-stark);
  text-transform: uppercase;
  text-align: center;
  margin-top: -6px;
}

.security-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.security-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.hud-auth-input {
  width: 100%;
  background: rgba(0, 240, 255, 0.05);
  border: 1.2px solid var(--cyan-border);
  border-radius: var(--radius-pill);
  padding: 11px 42px 11px 18px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.hud-auth-input:focus {
  border-color: var(--cyan-core);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.btn-toggle-pwd {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}
.btn-toggle-pwd:hover { color: #fff; }

.captcha-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(4, 12, 24, 0.7);
  border: 1px dashed var(--gold-border);
  border-radius: var(--radius-md);
  padding: 10px;
  animation: msg-in 0.3s ease;
}

.captcha-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-stark);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.captcha-visual-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-refresh-captcha {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--cyan-border);
  color: var(--cyan-core);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}
.btn-refresh-captcha:hover {
  background: var(--cyan-core);
  color: #020914;
  transform: rotate(180deg);
}

.hud-captcha-input {
  text-align: center;
  letter-spacing: 5px;
  font-family: var(--font-hud);
  text-transform: uppercase;
}

.auth-error-msg {
  color: var(--red-repulsor);
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-align: center;
  min-height: 16px;
}

.shake-anim { animation: error-shake 0.4s ease; }
@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.btn-auth-submit {
  width: 100%;
  justify-content: center;
  padding: 11px 20px;
  font-size: 13px;
  margin-top: 4px;
}

.btn-logout {
  background: rgba(255, 42, 77, 0.15);
  border-color: var(--red-repulsor);
  color: #fff;
}
.btn-logout:hover {
  background: var(--red-repulsor);
  box-shadow: 0 0 15px var(--red-glow);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1150px) {
  .hud-main-cockpit {
    grid-template-columns: 240px 1fr 210px;
    padding: 10px 12px 14px 12px;
  }
  .hologram-centerpiece {
    width: clamp(280px, 38vh, 380px);
    height: clamp(280px, 38vh, 380px);
  }
  .hud-floating-modules {
    gap: 10px;
  }
  .module-orb {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
  .module-label {
    font-size: 8px;
  }
}

/* Mobile Visibility Utilities */
.show-mobile-only {
  display: none !important;
}

/* ==========================================================================
   FOLDED QUICK ACTIONS DRAWER (MOBILE SLIDE-UP SHEET)
   ========================================================================== */
.hud-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 17, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.hud-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.hud-mobile-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  max-height: 82dvh;
  background: rgba(4, 12, 26, 0.96);
  border-top: 1.5px solid var(--cyan-core);
  border-radius: 20px 20px 0 0;
  z-index: 101;
  padding: 8px 14px 24px 14px;
  box-shadow: 0 -8px 32px rgba(0, 240, 255, 0.25), 0 -20px 60px rgba(0, 0, 0, 0.8);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.hud-mobile-drawer.open {
  transform: translateY(0);
}

.drawer-grab-bar {
  display: flex;
  justify-content: center;
  padding: 6px 0 10px 0;
  cursor: pointer;
}

.grab-handle {
  width: 40px;
  height: 4px;
  border-radius: 3px;
  background: rgba(0, 240, 255, 0.4);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.18);
  margin-bottom: 8px;
}

.drawer-title {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
}

.btn-close-drawer {
  background: transparent;
  border: none;
  color: #8ba2c0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s ease;
}

.btn-close-drawer:hover {
  color: var(--cyan-core);
}

.drawer-safety-notice {
  font-family: var(--font-body);
  font-size: 9.5px;
  color: #8fa3bf;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.drawer-safety-notice i {
  color: var(--cyan-core);
  font-size: 11px;
  flex-shrink: 0;
}

.drawer-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(6, 18, 38, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.drawer-card:active {
  transform: scale(0.98);
  background: rgba(0, 240, 255, 0.16);
  border-color: var(--cyan-core);
}

.drawer-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-core);
  font-size: 14px;
  flex-shrink: 0;
}

.drawer-card-red .drawer-card-icon {
  background: rgba(255, 42, 77, 0.15);
  border-color: rgba(255, 42, 77, 0.4);
  color: var(--red-repulsor);
}

.drawer-card-text {
  flex: 1;
  min-width: 0;
}

.drawer-card-name {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
  margin-bottom: 2px;
}

.drawer-card-red .drawer-card-name {
  color: #ff5b77;
}

.drawer-card-desc {
  font-family: var(--font-body);
  font-size: 9.5px;
  color: #7b94b2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-card-stage-arrow {
  color: rgba(0, 240, 255, 0.5);
  font-size: 11px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.drawer-card:active .drawer-card-stage-arrow {
  transform: translateX(3px);
  color: var(--cyan-core);
}

/* ==========================================================================
   TABLET & MOBILE COCKPIT LAYOUT (< 900px and < 768px)
   ========================================================================== */
@media (max-width: 900px) {
  .hud-top-left-status { display: none; }
  .hud-voice-select-wrap { display: none; }
  .hud-download-card, .hud-bottom-left-info { display: none !important; }
}

@media (max-width: 768px) {
  html, body {
    overflow: hidden !important;
    height: 100% !important;
    height: 100dvh !important;
  }

  /* Single-line sleek top bar */
  .hud-top-bar {
    position: fixed;
    top: 6px;
    left: 10px;
    right: 10px;
    height: 38px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    z-index: 50;
  }

  .hud-top-brand-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .brand-text-glowing {
    font-size: 13px;
    letter-spacing: 1.5px;
  }

  .hide-mobile,
  .brand-sub-badge {
    display: none !important;
  }

  .hud-top-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }

  .hud-top-icon-btn {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .btn-stop-audio {
    padding: 0 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
  }

  .hud-switch-label {
    margin: 0;
    transform: scale(0.78);
    transform-origin: center right;
  }

  /* Main Cockpit: single viewport height without scrolling clutter */
  .hud-main-cockpit {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 46px 8px 10px 8px;
    overflow: hidden;
    gap: 0;
    box-sizing: border-box;
  }

  /* Hide flank duplicate boxes from mobile cockpit (accessible via terminal & modules) */
  .hud-flank-left,
  .hud-flank-right {
    display: none !important;
  }

  /* Centerpiece Hero takes center stage */
  .hud-hero-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .hologram-centerpiece {
    width: clamp(210px, 32vh, 275px);
    height: clamp(210px, 32vh, 275px);
    margin: 0 auto 4px auto;
  }

  .hud-hero-typography {
    text-align: center;
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hud-wordmark-title {
    font-size: 11.5px;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
    white-space: nowrap;
  }

  .hud-wordmark-sub {
    font-size: 7.5px;
    letter-spacing: 0.6px;
    line-height: 1.2;
    max-width: 86vw;
    margin: 0 auto 3px auto;
    opacity: 0.8;
  }

  .hud-equalizer {
    height: 10px;
    gap: 2px;
    margin-top: 2px;
  }

  .hud-hero-status-pill,
  .mobile-status-pill {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    font-size: 9.5px;
    letter-spacing: 1px;
    margin-top: 4px;
    border-radius: 14px;
    height: auto;
    width: auto;
  }

  /* Compact Mobile Footer Dock */
  .hud-bottom-dock {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 4px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
  }

  /* Desktop Console Frame Hidden on Mobile */
  .dock-console-frame {
    display: none !important;
  }

  /* Mobile Essential 3-Button Footer Bar */
  .show-mobile-only {
    display: flex !important;
  }

  .hud-mobile-footer-bar {
    width: 100%;
    margin: 0 auto;
    padding: 5px 8px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(3, 11, 24, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1.2px solid rgba(0, 240, 255, 0.32);
    border-radius: 26px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8), inset 0 0 14px rgba(0, 240, 255, 0.1);
    box-sizing: border-box;
  }

  .btn-mobile-footer {
    border: none;
    cursor: pointer;
    font-family: var(--font-hud);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .btn-footer-terminal,
  .btn-footer-drawer {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--cyan-core);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.28);
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.12);
    position: relative;
  }

  .btn-footer-terminal:active,
  .btn-footer-drawer:active,
  .btn-footer-drawer.active {
    transform: scale(0.93);
    background: rgba(0, 240, 255, 0.24);
    border-color: var(--cyan-core);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
  }

  .drawer-arrow-indicator {
    position: absolute;
    bottom: 3px;
    right: 5px;
    font-size: 8px;
    opacity: 0.85;
    color: var(--cyan-core);
    transition: transform 0.25s ease;
  }

  .btn-footer-drawer.active .drawer-arrow-indicator {
    transform: rotate(180deg);
  }

  .btn-footer-activate {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #FFFFFF !important;
    text-shadow: 0 0 10px var(--cyan-core), 0 0 20px rgba(0, 240, 255, 0.9) !important;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.32) 0%, rgba(0, 163, 255, 0.24) 100%) !important;
    border: 1.5px solid var(--cyan-core) !important;
    border-radius: 20px;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.4), inset 0 0 12px rgba(0, 240, 255, 0.2) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    overflow: hidden;
  }

  .btn-footer-activate:active {
    transform: scale(0.96);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.5) 0%, rgba(0, 163, 255, 0.4) 100%) !important;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.8), inset 0 0 16px rgba(0, 240, 255, 0.4) !important;
  }

  .pulse-mic-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan-core);
    box-shadow: 0 0 8px var(--cyan-core);
    animation: pulse-dot 1.2s infinite;
  }

  .hud-chat-modal {
    height: 94vh;
    height: 94dvh;
    max-height: none;
    border-radius: 12px 12px 0 0;
  }
}

/* ==========================================================================
   DIRECTIVE TERMINATION & ABORT CONTROLS
   ========================================================================== */
.btn-terminate {
  background: rgba(255, 42, 77, 0.22) !important;
  border-color: var(--red-repulsor) !important;
  color: var(--red-repulsor) !important;
  transition: all 0.25s ease;
}

.btn-terminate:hover {
  background: var(--red-repulsor) !important;
  color: #fff !important;
  box-shadow: 0 0 20px var(--red-glow) !important;
}

.btn-icon-terminate {
  background: var(--red-repulsor) !important;
  border-color: #fff !important;
  color: #fff !important;
  box-shadow: 0 0 20px var(--red-repulsor) !important;
  animation: pulse-dot 1s infinite;
}

.btn-processing {
  opacity: 0.85;
}

/* ==========================================================================
   MOBILE-FIRST ULTRA-COMPACT RESPONSIVE CHAT UI (< 600px)
   ========================================================================== */
@media (max-width: 600px) {
  .hud-chat-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .hud-chat-modal {
    width: 100vw !important;
    height: 94vh !important;
    height: 94dvh !important;
    max-height: none !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(3, 10, 24, 0.96) !important;
  }

  .hud-modal-header {
    padding: 10px 14px !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.22) !important;
  }

  .hud-modal-title {
    font-size: 12px !important;
    letter-spacing: 0.8px !important;
    gap: 6px !important;
  }

  .hud-modal-title-text {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hud-modal-badge {
    display: none !important;
  }

  .hud-modal-controls {
    gap: 6px !important;
  }

  .btn-modal-clear {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }

  .hide-mobile {
    display: none !important;
  }

  .btn-close-modal {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }

  .chat-box-container {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .chat-box {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 14px 10px 24px 10px !important;
    gap: 10px !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Compact modern chat bubbles */
  .message {
    width: auto !important;
    max-width: 94% !important;
    margin-bottom: 2px !important;
  }

  .message-user {
    align-self: flex-end !important;
    max-width: 85% !important;
  }

  .message-assistant {
    align-self: flex-start !important;
    max-width: 95% !important;
  }

  /* Minimal sender line */
  .message-meta {
    margin-bottom: 3px !important;
    font-size: 9px !important;
    opacity: 0.75 !important;
  }

  .meta-sender {
    gap: 4px !important;
  }

  .avatar-reactor {
    width: 14px !important;
    height: 14px !important;
    font-size: 8px !important;
  }

  .sender-name {
    font-size: 10px !important;
    letter-spacing: 0.6px !important;
  }

  .sender-badge {
    padding: 1px 4px !important;
    font-size: 7.5px !important;
  }

  .meta-time {
    font-size: 8.5px !important;
  }

  /* Message content body */
  .message-body {
    padding: 8px 12px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .message-user .message-body {
    background: rgba(0, 240, 255, 0.14) !important;
    border: 1px solid rgba(0, 240, 255, 0.38) !important;
    border-radius: 14px 14px 2px 14px !important;
    color: #FFFFFF !important;
  }

  .message-assistant .message-body {
    background: rgba(4, 13, 28, 0.92) !important;
    border: 1px solid rgba(0, 240, 255, 0.22) !important;
    border-left: 2.5px solid var(--cyan-core) !important;
    border-radius: 4px 14px 14px 14px !important;
    color: #e2eaf5 !important;
  }

  .markdown-body p {
    margin-bottom: 6px !important;
  }

  .markdown-body p:last-child {
    margin-bottom: 0 !important;
  }

  .markdown-body ul,
  .markdown-body ol {
    margin: 4px 0 6px 16px !important;
    padding: 0 !important;
  }

  .markdown-body li {
    margin-bottom: 3px !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
  }

  /* Sleek docked input bar with safe clearance */
  .hud-modal-input-bar {
    flex-shrink: 0 !important;
    padding: 8px 10px env(safe-area-inset-bottom, 8px) 10px !important;
    background: rgba(2, 8, 20, 0.98) !important;
    border-top: 1px solid rgba(0, 240, 255, 0.22) !important;
  }

  .chat-form {
    gap: 6px !important;
  }

  .chat-input-wrapper {
    background: rgba(5, 14, 30, 0.95) !important;
    border: 1.2px solid rgba(0, 240, 255, 0.32) !important;
    border-radius: 20px !important;
  }

  .chat-input {
    font-size: 13px !important;
    padding: 8px 28px 8px 12px !important;
    min-height: 36px !important;
    max-height: 72px !important;
    line-height: 1.35 !important;
  }

  .btn-clear-input {
    right: 7px !important;
    font-size: 11px !important;
    width: 20px !important;
    height: 20px !important;
  }

  .btn-icon-hud {
    width: 36px !important;
    height: 36px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
  }
}
