/* ============================================================
   J.A.R.V.I.S — HOLOGRAPHIC HUD STYLESHEET
   Tone: Retro-Futuristic · Iron Man HUD · Neon Cyan on Deep Space
   ============================================================ */

:root {
  --cyan: #00d4ff;
  --cyan-dim: #0099bb;
  --cyan-glow: rgba(0, 212, 255, 0.4);
  --cyan-faint: rgba(0, 212, 255, 0.08);
  --blue: #0066ff;
  --blue-glow: rgba(0, 102, 255, 0.4);
  --orange: #ff6b2b;
  --orange-glow: rgba(255, 107, 43, 0.5);
  --gold: #ffd700;
  --green: #00ff88;
  --red: #ff3355;
  --bg: #020b14;
  --bg2: #040f1c;
  --bg3: #061525;
  --panel-bg: rgba(0, 20, 40, 0.75);
  --panel-border: rgba(0, 212, 255, 0.2);
  --panel-border-bright: rgba(0, 212, 255, 0.5);
  --text: #c8e8f0;
  --text-dim: #5a8a9a;
  --font-hud: 'Orbitron', monospace;
  --font-body: 'Exo 2', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  user-select: none;
}

.hidden { display: none !important; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 2px; }

/* ============================================================
   PARTICLE CANVAS
   ============================================================ */
#particle-canvas {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   BOOT SCREEN
   ============================================================ */
#boot-screen {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.boot-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.arc-reactor-boot {
  position: relative;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}

.arc-reactor-boot .arc-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  animation: spin linear infinite;
}
.arc-reactor-boot .ar1 { width: 120px; height: 120px; animation-duration: 4s; border-color: rgba(0,212,255,0.3); }
.arc-reactor-boot .ar2 { width: 85px; height: 85px; animation-duration: 2.5s; animation-direction: reverse; border-color: rgba(0,212,255,0.6); }
.arc-reactor-boot .ar3 { width: 55px; height: 55px; animation-duration: 1.5s; border-color: var(--cyan); }
.arc-reactor-boot .arc-core {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--cyan) 40%, var(--blue) 100%);
  box-shadow: 0 0 20px var(--cyan), 0 0 40px var(--blue), 0 0 60px rgba(0,212,255,0.3);
  animation: pulse-core 1.5s ease-in-out infinite;
}
.arc-reactor-boot .arc-glow {
  position: absolute; inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.15) 0%, transparent 70%);
  animation: pulse-glow 2s ease-in-out infinite;
}

.boot-text { text-align: center; }
.boot-title {
  font-family: var(--font-hud);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.4em;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan-dim);
  animation: flicker 3s ease-in-out infinite;
}
.boot-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  margin-top: 6px;
}
.boot-version {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: rgba(0,212,255,0.4);
  margin-top: 4px;
}

.boot-log {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--cyan-dim);
  text-align: center;
  height: 80px;
  overflow: hidden;
  width: 500px;
  max-width: 90vw;
  line-height: 1.8;
}

.boot-bar-wrap {
  width: 400px; max-width: 80vw;
  height: 3px;
  background: rgba(0,212,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.boot-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 10px var(--cyan);
  transition: width 0.1s linear;
}

/* ============================================================
   HUD LAYOUT
   ============================================================ */
#hud {
  position: fixed; inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,102,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(0,212,255,0.04) 0%, transparent 60%),
    var(--bg);
}

/* ── TOP BAR ── */
.hud-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(0,10,25,0.9);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  z-index: 20;
  flex-shrink: 0;
}

.topbar-left {
  display: flex; align-items: center; gap: 12px;
}

.arc-mini {
  position: relative; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.arc-mini .arc-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--cyan);
  animation: spin linear infinite;
}
.arc-mini .arm1 { width: 32px; height: 32px; animation-duration: 3s; opacity: 0.4; }
.arc-mini .arm2 { width: 20px; height: 20px; animation-duration: 1.8s; animation-direction: reverse; opacity: 0.7; }
.arc-core-mini {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan), 0 0 16px var(--blue);
  animation: pulse-core 2s ease-in-out infinite;
}

.system-name {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}
.system-status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--green);
  letter-spacing: 0.1em;
  animation: blink 2s step-end infinite;
}

.topbar-center { text-align: center; }
.hud-clock {
  font-family: var(--font-hud);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cyan);
  text-shadow: 0 0 15px var(--cyan);
  letter-spacing: 0.15em;
}
.hud-date {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-top: 2px;
}

.topbar-right {
  display: flex; align-items: center; gap: 8px;
}
.stat-pill {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 4px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--cyan-faint);
  color: var(--text);
  letter-spacing: 0.05em;
}
.ai-model-pill {
  border-color: rgba(0,102,255,0.4);
  background: rgba(0,102,255,0.08);
  color: #88aaff;
}
.icon-btn {
  background: none; border: 1px solid var(--panel-border);
  color: var(--text-dim); cursor: pointer;
  width: 30px; height: 30px; border-radius: 6px;
  font-size: 0.9rem; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }

/* ── MAIN LAYOUT ── */
.hud-main {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 12px;
  padding: 12px;
  flex: 1;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* ── PANELS ── */
.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.panel-block {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.panel-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}
.panel-block:hover { border-color: var(--panel-border-bright); }

.panel-label {
  font-family: var(--font-hud);
  font-size: 0.5rem;
  letter-spacing: 0.25em;
  color: var(--cyan-dim);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}

/* ── ARC REACTOR MAIN ── */
.reactor-block { text-align: center; }

.arc-reactor-main {
  position: relative;
  width: 130px; height: 130px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
}
.arc-reactor-main .arc-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--cyan);
  animation: spin linear infinite;
}
.arc-reactor-main .r1 { width: 130px; height: 130px; animation-duration: 8s; border-color: rgba(0,212,255,0.15); }
.arc-reactor-main .r2 { width: 105px; height: 105px; animation-duration: 5s; animation-direction: reverse; border-color: rgba(0,212,255,0.3); }
.arc-reactor-main .r3 { width: 80px; height: 80px; animation-duration: 3s; border-color: rgba(0,212,255,0.5); }
.arc-reactor-main .r4 { width: 58px; height: 58px; animation-duration: 2s; animation-direction: reverse; border-color: var(--cyan); }

.arc-core-main {
  width: 32px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--cyan) 35%, var(--blue) 80%);
  box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--blue), 0 0 50px rgba(0,212,255,0.2);
  animation: pulse-core 2s ease-in-out infinite;
  z-index: 2;
}
.arc-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
  animation: pulse-glow 2s ease-in-out infinite;
}
.arc-label {
  position: absolute;
  bottom: -4px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--cyan-dim);
}

.reactor-stats {
  display: flex; flex-direction: column; gap: 4px;
}
.rstat {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  padding: 3px 0;
  border-bottom: 1px solid rgba(0,212,255,0.05);
}
.rstat span:last-child { color: var(--cyan); }

/* ── QUICK COMMANDS ── */
.quick-cmds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.qcmd {
  background: rgba(0,212,255,0.04);
  border: 1px solid rgba(0,212,255,0.15);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.qcmd:hover {
  background: rgba(0,212,255,0.12);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 8px rgba(0,212,255,0.2);
  transform: translateX(2px);
}

/* ── MEMORY LOG ── */
.memory-list {
  max-height: 100px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 8px;
}
.mem-empty {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: center;
  padding: 8px;
}
.mem-item {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text);
  padding: 4px 8px;
  background: rgba(0,212,255,0.04);
  border-left: 2px solid var(--cyan-dim);
  border-radius: 0 4px 4px 0;
}
.badge {
  background: var(--cyan);
  color: var(--bg);
  font-size: 0.45rem;
  padding: 1px 5px;
  border-radius: 10px;
  font-family: var(--font-mono);
}
.clear-btn, .refresh-btn {
  background: none;
  border: 1px solid rgba(255,51,85,0.3);
  color: rgba(255,51,85,0.7);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.2s;
  width: 100%;
}
.clear-btn:hover { border-color: var(--red); color: var(--red); background: rgba(255,51,85,0.08); }
.refresh-btn {
  border-color: rgba(0,212,255,0.3);
  color: var(--cyan-dim);
  width: auto; padding: 2px 8px;
  margin-left: auto;
}
.refresh-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── CENTER PANEL ── */
.panel-center {
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}

/* ── VOICE VISUALIZER ── */
.voice-visualizer {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 16px;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}
.vv-bars {
  display: flex; align-items: center; gap: 3px;
  height: 30px;
}
.vv-bars span {
  display: block;
  width: 3px;
  background: var(--cyan);
  border-radius: 2px;
  height: 4px;
  transition: height 0.1s;
  box-shadow: 0 0 4px var(--cyan);
}
.vv-bars.active span { animation: wave 0.6s ease-in-out infinite; }
.vv-bars.active span:nth-child(2n) { animation-delay: 0.1s; }
.vv-bars.active span:nth-child(3n) { animation-delay: 0.2s; }
.vv-bars.active span:nth-child(4n) { animation-delay: 0.15s; }
.vv-bars.active span:nth-child(5n) { animation-delay: 0.05s; }

.vv-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* ── CHAT WINDOW ── */
.chat-window {
  flex: 1;
  overflow-y: auto;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 16px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.chat-window::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
}

.chat-welcome {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1;
  gap: 12px; opacity: 0.5;
}
.welcome-icon {
  font-size: 2rem; color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan);
  animation: pulse-core 3s ease-in-out infinite;
}
.welcome-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.6;
  font-style: italic;
}

/* Chat Messages */
.chat-msg {
  display: flex; gap: 10px;
  animation: msg-in 0.3s ease-out;
}
.chat-msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; flex-shrink: 0;
  border: 1px solid var(--panel-border);
}
.chat-msg.user .msg-avatar { background: rgba(0,102,255,0.2); border-color: rgba(0,102,255,0.4); color: #88aaff; }
.chat-msg.jarvis .msg-avatar { background: rgba(0,212,255,0.1); border-color: var(--cyan-dim); color: var(--cyan); }

.msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.6;
  position: relative;
}
.chat-msg.user .msg-bubble {
  background: rgba(0,102,255,0.15);
  border: 1px solid rgba(0,102,255,0.3);
  color: #c0d4ff;
  border-radius: 8px 2px 8px 8px;
}
.chat-msg.jarvis .msg-bubble {
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--text);
  border-radius: 2px 8px 8px 8px;
}
.msg-time {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

.typing-indicator {
  display: flex; gap: 4px; align-items: center; padding: 4px 0;
}
.typing-indicator span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* ── INPUT BAR ── */
.input-bar {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 12px;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}
.input-wrap {
  display: flex; align-items: center; gap: 8px;
}
.input-prefix {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  caret-color: var(--cyan);
}
#chat-input::placeholder { color: var(--text-dim); }

.voice-btn {
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.voice-btn svg { width: 14px; height: 14px; }
.voice-btn:hover, .voice-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
  background: rgba(0,212,255,0.08);
}
.voice-btn.listening {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 12px rgba(255,51,85,0.4);
  animation: pulse-listen 1s ease-in-out infinite;
}

.send-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border: none;
  color: var(--bg);
  font-family: var(--font-hud);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.send-btn:hover {
  box-shadow: 0 0 15px var(--cyan-glow);
  transform: translateY(-1px);
}

.input-hints {
  display: flex; gap: 8px; align-items: center;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: rgba(0,212,255,0.25);
  flex-wrap: wrap;
}

/* ── RIGHT PANEL ── */
.panel-right { overflow-y: auto; }

/* ── NEWS FEED ── */
.news-feed {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.news-loading {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: center;
  padding: 12px;
}
.news-item {
  padding: 8px;
  border-left: 2px solid var(--cyan-dim);
  background: rgba(0,212,255,0.03);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: all 0.2s;
}
.news-item:hover { background: rgba(0,212,255,0.08); border-left-color: var(--cyan); }
.news-title {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 3px;
}
.news-meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-dim);
}

/* ── WEATHER ── */
.weather-widget {}
.weather-main {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.weather-icon { font-size: 2rem; }
.weather-temp {
  font-family: var(--font-hud);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}
.weather-details { display: flex; flex-direction: column; gap: 4px; }
.wdet {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  padding: 2px 0;
  border-bottom: 1px solid rgba(0,212,255,0.05);
}
.wdet span:last-child { color: var(--text); }

/* ── SYSTEM MONITOR ── */
.sys-monitor { display: flex; flex-direction: column; gap: 8px; }
.sys-row {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
}
.sys-row > span:first-child { width: 30px; flex-shrink: 0; }
.sys-row > span:last-child { width: 30px; text-align: right; color: var(--cyan); flex-shrink: 0; }
.sys-bar-wrap {
  flex: 1; height: 4px;
  background: rgba(0,212,255,0.08);
  border-radius: 2px; overflow: hidden;
}
.sys-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 2px;
  box-shadow: 0 0 6px var(--cyan-glow);
  transition: width 1s ease;
}

/* ── MODULES GRID ── */
.modules-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.module {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,212,255,0.1);
  background: rgba(0,212,255,0.03);
  color: var(--text-dim);
  transition: all 0.3s;
}
.module.active {
  border-color: rgba(0,255,136,0.3);
  background: rgba(0,255,136,0.05);
  color: var(--green);
}
.module.active::before { content: '● '; font-size: 0.4rem; }

/* ── HUD CORNER DECORATIONS ── */
.hud-corner {
  position: fixed;
  width: 40px; height: 40px;
  z-index: 5; pointer-events: none;
}
.hud-corner::before, .hud-corner::after {
  content: '';
  position: absolute;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}
.hud-corner::before { width: 2px; height: 20px; }
.hud-corner::after { width: 20px; height: 2px; }
.hud-corner.tl { top: 8px; left: 8px; }
.hud-corner.tl::before { top: 0; left: 0; }
.hud-corner.tl::after { top: 0; left: 0; }
.hud-corner.tr { top: 8px; right: 8px; }
.hud-corner.tr::before { top: 0; right: 0; }
.hud-corner.tr::after { top: 0; right: 0; }
.hud-corner.bl { bottom: 8px; left: 8px; }
.hud-corner.bl::before { bottom: 0; left: 0; }
.hud-corner.bl::after { bottom: 0; left: 0; }
.hud-corner.br { bottom: 8px; right: 8px; }
.hud-corner.br::before { bottom: 0; right: 0; }
.hud-corner.br::after { bottom: 0; right: 0; }

/* ── SETTINGS MODAL ── */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(0,5,15,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--bg2);
  border: 1px solid var(--panel-border-bright);
  border-radius: 12px;
  width: 480px; max-width: 95vw;
  box-shadow: 0 0 40px rgba(0,212,255,0.15);
  overflow: hidden;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-border);
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.modal-header button {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 1rem; transition: color 0.2s;
}
.modal-header button:hover { color: var(--red); }
.modal-body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  max-height: 70vh; overflow-y: auto;
}
.setting-group { display: flex; flex-direction: column; gap: 6px; }
.setting-group label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
.setting-group label small { color: rgba(0,212,255,0.4); font-size: 0.5rem; }
.setting-group input, .setting-group select {
  background: rgba(0,212,255,0.04);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s;
}
.setting-group input:focus, .setting-group select:focus { border-color: var(--cyan); }
.setting-group select option { background: var(--bg2); }
.save-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border: none; color: var(--bg);
  font-family: var(--font-hud);
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.2em;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.save-btn:hover { box-shadow: 0 0 20px var(--cyan-glow); transform: translateY(-1px); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulse-core {
  0%, 100% { box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--blue); opacity: 1; }
  50% { box-shadow: 0 0 25px var(--cyan), 0 0 50px var(--blue), 0 0 70px rgba(0,212,255,0.3); opacity: 0.85; }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
  98% { opacity: 0.5; }
  99% { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 24px; }
}
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-listen {
  0%, 100% { box-shadow: 0 0 8px rgba(255,51,85,0.4); }
  50% { box-shadow: 0 0 20px rgba(255,51,85,0.8); }
}
@keyframes scan-line {
  0% { top: -2px; }
  100% { top: 100%; }
}

/* Scan line overlay */
#hud::after {
  content: '';
  position: fixed; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.08), transparent);
  animation: scan-line 6s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .hud-main { grid-template-columns: 220px 1fr 240px; }
}
@media (max-width: 900px) {
  .hud-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .panel-left, .panel-right { display: none; }
}