:root {
  --bg-deep: #020612;
  --bg-panel: rgba(6, 14, 30, 0.72);
  --bg-panel-hover: rgba(10, 24, 50, 0.88);
  --border-subtle: rgba(0, 229, 255, 0.2);
  --border-strong: rgba(0, 229, 255, 0.58);
  --cyan: #00e5ff;
  --ice: #7dd3fc;
  --amber: #f59e0b;
  --danger: #f43f5e;
  --ok: #10b981;
  --text-main: #e2e8f0;
  --text-muted: #64748b;
  --font-hud: "Orbitron", "Space Grotesk", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* HUD BACKGROUND LAYERS */
/* DYNAMISCHE EMOTIES & MOOD THEMING */
body.mood-angry {
  --cyan: #ef4444;
  --ice: #f87171;
  --border-subtle: rgba(239, 68, 68, 0.28);
  --border-strong: rgba(239, 68, 68, 0.8);
}
body.mood-angry .nova-core {
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.45), inset 0 0 35px rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}
body.mood-angry .core-radar {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(239, 68, 68, 0.45) 360deg) !important;
  animation-duration: 1.5s !important;
}
body.mood-angry .core-shockwave {
  border-color: rgba(239, 68, 68, 0.6) !important;
  animation-duration: 1.2s !important;
}
body.mood-angry #novaMoodBadge {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}
body.mood-angry .mood-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 8px #ef4444 !important;
}

body.mood-sarcastic {
  --cyan: #a855f7;
  --ice: #c084fc;
  --border-subtle: rgba(168, 85, 247, 0.28);
  --border-strong: rgba(168, 85, 247, 0.75);
}
body.mood-sarcastic .core-radar {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(168, 85, 247, 0.45) 360deg) !important;
}
body.mood-sarcastic #novaMoodBadge {
  border-color: #a855f7 !important;
  color: #a855f7 !important;
  background: rgba(168, 85, 247, 0.15) !important;
}
body.mood-sarcastic .mood-dot {
  background: #a855f7 !important;
  box-shadow: 0 0 8px #a855f7 !important;
}

body.mood-hyped {
  --cyan: #f59e0b;
  --ice: #fbbf24;
  --border-subtle: rgba(245, 158, 11, 0.28);
  --border-strong: rgba(245, 158, 11, 0.75);
}
body.mood-hyped .core-radar {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(245, 158, 11, 0.45) 360deg) !important;
}
body.mood-hyped #novaMoodBadge {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.15) !important;
}
body.mood-hyped .mood-dot {
  background: #f59e0b !important;
  box-shadow: 0 0 8px #f59e0b !important;
}

body.mood-alert {
  --cyan: #f97316;
  --ice: #fb923c;
  --border-subtle: rgba(249, 115, 22, 0.28);
  --border-strong: rgba(249, 115, 22, 0.75);
}
body.mood-alert #novaMoodBadge {
  border-color: #f97316 !important;
  color: #f97316 !important;
  background: rgba(249, 115, 22, 0.15) !important;
}

body.mood-deadpan {
  --cyan: #64748b;
  --ice: #94a3b8;
  --border-subtle: rgba(100, 116, 139, 0.28);
  --border-strong: rgba(100, 116, 139, 0.75);
}

.mood-telemetry-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 12px;
}
.mood-telemetry-row .val {
  color: #ffffff;
  font-weight: 600;
}
.mood-switcher-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}
.mood-chip {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mood-chip:hover,
.mood-chip.active {
  border-color: var(--cyan);
  color: #ffffff;
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.28);
}

.hud-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 38%, rgba(0, 229, 255, 0.12) 0%, rgba(0, 102, 204, 0.04) 38%, transparent 65%),
    linear-gradient(to right, rgba(0, 229, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 229, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to right, rgba(0, 229, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 229, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  z-index: 0;
}

.hud-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 2px,
    rgba(0, 229, 255, 0.025) 3px
  );
  z-index: 1;
}

.hud-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(1, 4, 10, 0.78) 100%);
  z-index: 1;
}

/* HEADER */
.hud-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(2, 6, 18, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0, 229, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 10px;
  height: 34px;
  background: linear-gradient(180deg, var(--cyan), #0284c7);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.75);
  clip-path: polygon(0 0, 100% 6px, 100% 100%, 0 calc(100% - 6px));
}

.brand-title {
  font-family: var(--font-hud);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--ice);
  margin-top: 2px;
}

.muted {
  color: var(--text-muted);
}

.header-telemetry {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.status-pill.online .dot {
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

.admin-trigger {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  padding: 7px 14px;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background 0.2s, box-shadow 0.2s;
}

.admin-trigger:hover {
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
}

/* MAIN GRID */
.hud-main {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 330px 1fr 350px;
  gap: 22px;
  padding: 22px 28px;
  max-width: 1580px;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
  align-items: start;
}

.panel-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* TACTICAL HUD CARD WITH CORNER RETICLES */
.hud-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 16px 18px;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 24px rgba(0, 229, 255, 0.03);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  animation: hudReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  overflow: hidden;
}

.panel-column .hud-card:nth-child(2) { animation-delay: 0.08s; }
.panel-column .hud-card:nth-child(3) { animation-delay: 0.16s; }
.panel-column .hud-card:nth-child(4) { animation-delay: 0.24s; }

.hud-card::before,
.hud-card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  border-color: var(--cyan);
  border-style: solid;
}

.hud-card::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.hud-card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.hud-card:hover {
  border-color: rgba(0, 229, 255, 0.42);
  box-shadow: inset 0 0 28px rgba(0, 229, 255, 0.06), 0 0 18px rgba(0, 229, 255, 0.08);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-label::before {
  content: "▸";
  color: var(--ice);
}

.card-header-row .card-label {
  margin-bottom: 0;
}

/* CLOCK & WEATHER */
.clock-time {
  font-family: var(--font-hud);
  font-size: 2.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}

.clock-date {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ice);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.weather-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.weather-temp {
  font-family: var(--font-hud);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}

.weather-meta {
  font-size: 0.88rem;
  line-height: 1.5;
}

.mono-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* TELEMETRY LISTS */
.telemetry-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.telemetry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 5px 8px;
  background: rgba(2, 6, 18, 0.45);
  border-left: 2px solid rgba(0, 229, 255, 0.25);
}

.mono-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ice);
}

.meter-group {
  margin-bottom: 10px;
}

.meter-group:last-child {
  margin-bottom: 0;
}

.meter-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.meter-bar {
  height: 5px;
  background: rgba(0, 229, 255, 0.12);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, var(--cyan));
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.55);
  transition: width 0.4s ease;
}

.note-del-btn {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 6px;
  cursor: pointer;
}

.node-ok {
  color: var(--ok);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.node-down {
  color: var(--danger);
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

.ha-chip {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.ha-chip.online {
  border-color: rgba(16, 185, 129, 0.55);
  color: var(--ok);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* CORE STAGE */
.core-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 560px;
  padding: 6px 10px;
}

.core-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.nova-core {
  position: relative;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, transparent 68%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.25s ease;
}

.nova-core:hover {
  transform: scale(1.03);
}

.core-radar {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(0, 229, 255, 0.28) 0deg,
    rgba(0, 229, 255, 0.06) 45deg,
    transparent 95deg,
    transparent 360deg
  );
  animation: spinCW 5s linear infinite;
  pointer-events: none;
}

.core-shockwave {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  opacity: 0;
  pointer-events: none;
}

.core-shockwave.pulse {
  animation: shockwaveExpand 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.core-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.28));
}

.ring {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  transform-origin: 140px 140px;
}

.ring-ticks {
  stroke: rgba(125, 211, 252, 0.35);
  stroke-width: 2;
  stroke-dasharray: 2 9;
  animation: spinCW 45s linear infinite;
}

.ring-outer {
  stroke-width: 1.6;
  stroke-dasharray: 95 28 22 28;
  opacity: 0.55;
  animation: spinCW 20s linear infinite;
}

.ring-mid {
  stroke-width: 2.5;
  stroke: var(--ice);
  stroke-dasharray: 62 24 14 24;
  opacity: 0.8;
  animation: spinCCW 12s linear infinite;
}

.ring-inner {
  stroke-width: 3.2;
  stroke-dasharray: 140 30 30 30;
  opacity: 0.95;
  animation: spinCW 7s linear infinite;
}

.ring-pulse {
  fill: rgba(0, 229, 255, 0.08);
  stroke: var(--cyan);
  stroke-width: 1.4;
  transform-origin: 140px 140px;
  animation: breathe 3.2s ease-in-out infinite;
}

.reticle-line {
  stroke: var(--cyan);
  stroke-width: 1.6;
  opacity: 0.7;
}

.core-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.core-label {
  font-family: var(--font-hud);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: #fff;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.85);
}

.core-state {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.core-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
  margin-top: 2px;
}

.core-eq span {
  width: 3px;
  height: 3px;
  background: var(--cyan);
  opacity: 0.4;
  transition: height 0.15s;
}

/* CORE STATE VARIATIONS */
body[data-state="listening"] .ring-pulse {
  fill: rgba(0, 229, 255, 0.24);
  animation: breatheFast 0.85s ease-in-out infinite;
}
body[data-state="listening"] .ring-inner {
  animation-duration: 2s;
  stroke: #ffffff;
}
body[data-state="listening"] .core-eq span,
body[data-state="speaking"] .core-eq span {
  opacity: 1;
  animation: eqBar 0.45s ease-in-out infinite alternate;
}
body[data-state="listening"] .core-eq span:nth-child(2),
body[data-state="speaking"] .core-eq span:nth-child(2) { animation-delay: 0.1s; }
body[data-state="listening"] .core-eq span:nth-child(3),
body[data-state="speaking"] .core-eq span:nth-child(3) { animation-delay: 0.22s; }
body[data-state="listening"] .core-eq span:nth-child(4),
body[data-state="speaking"] .core-eq span:nth-child(4) { animation-delay: 0.08s; }
body[data-state="listening"] .core-eq span:nth-child(5),
body[data-state="speaking"] .core-eq span:nth-child(5) { animation-delay: 0.18s; }

body[data-state="thinking"] .ring {
  stroke: var(--amber);
}
body[data-state="thinking"] .ring-pulse {
  fill: rgba(245, 158, 11, 0.18);
  stroke: var(--amber);
}
body[data-state="thinking"] .core-state {
  color: var(--amber);
}

body[data-state="speaking"] .ring-pulse {
  fill: rgba(125, 211, 252, 0.26);
  animation: speakPulse 0.42s ease-in-out infinite;
}

.nova-dialogue {
  width: 100%;
  max-width: 640px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ice);
  padding: 10px 16px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(6, 14, 30, 0.6);
}

/* CHAT / TERMINAL FEED */
.chat-panel {
  position: relative;
  width: 100%;
  max-width: 660px;
  margin-top: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  backdrop-filter: blur(12px);
}

.chat-panel::before,
.chat-panel::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--cyan);
  border-style: solid;
  pointer-events: none;
}

.chat-panel::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.chat-panel::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.chat-feed {
  height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.chat-msg {
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.52;
  border-left: 2px solid var(--border-subtle);
  background: rgba(2, 6, 18, 0.65);
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.user {
  border-left-color: var(--ice);
  background: rgba(12, 24, 48, 0.72);
}

.chat-msg.assistant {
  border-left-color: var(--cyan);
}

.chat-role {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-badge {
  background: rgba(0, 229, 255, 0.14);
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  padding: 1px 6px;
  font-size: 0.6rem;
}

/* COMMAND BAR */
.command-bar {
  width: 100%;
  max-width: 660px;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.command-input {
  flex: 1;
  background: rgba(4, 10, 24, 0.9);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.command-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.18);
}

.icon-btn, .send-btn, .mini-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 0 16px;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: background 0.2s, box-shadow 0.2s;
}

.mini-btn {
  padding: 5px 10px;
  font-size: 0.64rem;
}

.icon-btn:hover, .send-btn:hover, .mini-btn:hover {
  background: rgba(0, 229, 255, 0.24);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.22);
}

.icon-btn.active {
  background: var(--cyan);
  color: var(--bg-deep);
  font-weight: 700;
}

/* SCENES */
.scene-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scene-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(6, 14, 32, 0.82);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.scene-btn:hover {
  border-color: var(--cyan);
  background: var(--bg-panel-hover);
  box-shadow: inset 0 0 16px rgba(0, 229, 255, 0.12);
}

.scene-btn.scene-danger:hover {
  border-color: var(--danger);
  box-shadow: inset 0 0 16px rgba(244, 63, 94, 0.15);
}

.scene-title {
  font-size: 0.82rem;
  font-weight: 600;
}

.scene-meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--cyan);
}

.full-width-btn {
  width: 100%;
  margin-top: 12px;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 6, 18, 0.84);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-box {
  width: 100%;
  background: #040b1c;
  border: 1px solid var(--border-strong);
  padding: 24px;
  box-shadow: 0 0 48px rgba(0, 229, 255, 0.14);
}

.pin-box {
  max-width: 380px;
}

.admin-box {
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h2 {
  font-family: var(--font-hud);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.pin-error {
  min-height: 20px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--danger);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions .send-btn, .modal-actions .mini-btn {
  padding: 10px 16px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ice);
}

.field input,
.field select {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 9px 11px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--cyan);
}

.toggle-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

.debug-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.debug-log {
  background: #02050e;
  border: 1px solid var(--border-subtle);
  padding: 12px;
  height: 150px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #94a3b8;
  white-space: pre-wrap;
}

/* ANIMATIONS */
@keyframes spinCW {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinCCW {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes breatheFast {
  0%, 100% { transform: scale(0.94); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes speakPulse {
  0%, 100% { transform: scale(0.97); }
  50% { transform: scale(1.1); }
}

@keyframes eqBar {
  0% { height: 3px; }
  100% { height: 12px; }
}

@keyframes hudReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shockwaveExpand {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* LIVE TERMINAL */
.terminal-card {
  width: 100%;
  max-width: 660px;
  margin-top: 14px;
  padding: 12px 14px;
}

.hud-terminal {
  height: 110px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  color: #38bdf8;
  background: rgba(1, 4, 12, 0.78);
  padding: 8px 10px;
  border: 1px solid rgba(0, 229, 255, 0.12);
  white-space: pre-wrap;
}

.danger-btn {
  border-color: rgba(244, 63, 94, 0.7) !important;
  color: #fb7185 !important;
  background: rgba(244, 63, 94, 0.12) !important;
}

.danger-btn:hover {
  background: rgba(244, 63, 94, 0.28) !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35) !important;
}

/* HOLOGRAPHIC VISION HUD (HANDGEBAREN MET VENSTERS) */
.vision-hud {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(2, 6, 18, 0.94);
  display: flex;
  flex-direction: column;
}

.vision-hud.hidden {
  display: none;
}

.vision-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-strong);
  background: rgba(4, 10, 24, 0.9);
}

.vision-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
}

#visionCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: contrast(1.15) saturate(0.7);
}

#holo3dCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.vision-windows {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 18px;
  padding: 22px 26px;
  height: 100%;
  pointer-events: auto;
}

#vWinScenes { grid-column: 1; grid-row: 1; }
#vWinMedia { grid-column: 1; grid-row: 2; }
#vWinTelemetry { grid-column: 3; grid-row: 1; }
#vWin3d { grid-column: 3; grid-row: 2; }

/* CENTRALE HOLOGRAFISCHE HUD & RETICLE */
.holo-center-hud {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  pointer-events: none;
  padding: 10px 0 16px 0;
  z-index: 5;
}

.holo-header-reticle {
  text-align: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.08) 0%, transparent 75%);
  padding: 10px 24px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.25);
  position: relative;
}

.holo-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.holo-main-title {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.holo-status-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.status-pill.cyan-pill {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
}

.holo-stage-telemetry {
  display: flex;
  gap: 12px;
  pointer-events: none;
  margin-bottom: 12px;
}

.holo-tele-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: rgba(4, 12, 28, 0.75);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 3px;
}

.holo-tele-chip span {
  color: #ffffff;
  font-weight: 600;
  margin-left: 4px;
}

.holo-action-bar {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  background: rgba(4, 12, 28, 0.88);
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  border-radius: 4px;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.14);
}

.holo-bar-btn {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.holo-bar-btn:hover,
.holo-bar-btn.v-target.hovered {
  color: #ffffff;
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.holo-bar-btn.active {
  color: #030712;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.5);
}

/* 3D HOLOGRAM LAB CONTROLS */
.holo-search-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.holo-search-row .command-input {
  flex: 1;
  font-size: 0.76rem;
  padding: 6px 10px;
}

.holo-model-grid {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.holo-upload-box {
  display: block;
  margin-top: 10px;
  padding: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  border: 1px dashed rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 3px;
}

.holo-upload-box:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.25);
  color: #ffffff;
}

/* ZEN FOCUS MODE */
.vision-windows.zen-mode #vWinScenes,
.vision-windows.zen-mode #vWinMedia,
.vision-windows.zen-mode #vWinTelemetry,
.vision-windows.zen-mode #vWin3d {
  display: none !important;
}

.vision-windows.zen-mode {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.vision-windows.zen-mode .holo-center-hud {
  grid-column: 1;
}

.vision-win {
  background: rgba(4, 12, 28, 0.82);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.12);
}

.vision-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.v-target.hovered {
  border-color: #ffffff !important;
  background: rgba(0, 229, 255, 0.28) !important;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.45) !important;
  transform: scale(1.03);
}

.v-target.pinched {
  background: var(--cyan) !important;
  color: var(--bg-deep) !important;
}

.hand-cursor {
  position: fixed;
  z-index: 85;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s linear;
}

.hand-cursor.hidden {
  display: none;
}

.hand-cursor-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--cyan);
  animation: spinCW 4s linear infinite;
}

.hand-cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
}

.hand-cursor.pinching .hand-cursor-ring {
  transform: scale(0.55);
  border-color: #ffffff;
  background: rgba(0, 229, 255, 0.35);
}

@media (max-width: 1050px) {
  .vision-windows {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* PROTOCOL ZERO LOCKDOWN */
body.lockdown .hud-grid-bg {
  background-image:
    radial-gradient(circle at 50% 38%, rgba(244, 63, 94, 0.22) 0%, transparent 65%),
    linear-gradient(to right, rgba(244, 63, 94, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 63, 94, 0.08) 1px, transparent 1px);
}

.lockdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(24, 3, 10, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lockdown-overlay.hidden {
  display: none;
}

.lockdown-box {
  max-width: 440px;
  width: 100%;
  border: 2px solid var(--danger);
  background: rgba(15, 2, 8, 0.95);
  padding: 28px;
  text-align: center;
  box-shadow: 0 0 60px rgba(244, 63, 94, 0.35);
}

.lockdown-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: #fb7185;
  margin-bottom: 10px;
}

.lockdown-box h1 {
  font-family: var(--font-hud);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 10px;
}

.lockdown-box p {
  font-size: 0.84rem;
  color: #fda4af;
  margin-bottom: 18px;
}

.lockdown-box .send-btn {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
}

/* RESPONSIVE */
@media (max-width: 1120px) {
  .hud-main {
    grid-template-columns: 1fr;
  }
  .core-column {
    order: -1;
    min-height: 440px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
