
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500&family=Orbitron:wght@500;600&display=swap");

:root {
  --bg: #020308;
  --cyan: #7cefff;
  --ink: #d7eef6;
  --mute: #6f8b99;
}
* { box-sizing: border-box; }
html, body {
  height: 100%; margin: 0;
  background:
    radial-gradient(ellipse at 50% 42%, #07131c 0%, #020308 58%, #000 100%);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  overflow: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,0.18) 3px 4px);
  pointer-events: none; opacity: 0.35;
}
.hud {
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  grid-template-rows: 56px 1fr;
}
.hud .top { grid-column: 1 / -1; padding: 18px 22px 0; }
.hud .stage { grid-column: 1; }
.panel {
  grid-row: 2; grid-column: 2;
  margin: 8px 16px 16px 0;
  padding: 14px 14px 12px;
  border: 1px solid rgba(124,239,255,0.08);
  background: rgba(4, 10, 16, 0.55);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0.38;
  transition: opacity 0.25s ease;
}
.panel.open { opacity: 1; }
.panel-head {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.22em; font-size: 9px; color: var(--mute);
  text-transform: uppercase;
}

.top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: Orbitron, sans-serif; letter-spacing: 0.42em;
  font-size: 11px; color: var(--mute);
}
.top strong { color: var(--cyan); font-weight: 500; }
.stage { position: relative; display: grid; place-items: center; }
.rings {
  position: absolute; width: min(520px, 86vw); aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(124,239,255,0.12);
  box-shadow: 0 0 80px rgba(80,200,230,0.06);
}
.rings::before, .rings::after {
  content: ""; position: absolute; inset: 9%;
  border-radius: 50%;
  border: 1px solid rgba(124,239,255,0.08);
}
.rings::after { inset: 18%; border-style: dashed; animation: spin 36s linear infinite; }
.orb {
  width: min(280px, 58vw); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #e8ffff 0 6%, #7cefff 10%, #1b6f86 28%, #05202c 58%, #010508 78%);
  box-shadow:
    0 0 40px rgba(124,239,255,0.18),
    0 0 140px rgba(40,140,170,0.18),
    inset 0 0 40px rgba(255,255,255,0.08);
  position: relative;
  cursor: pointer;
}
.orb .iris {
  position: absolute; inset: 28%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 0 18px rgba(124,239,255,0.35);
}
.orb.armed { box-shadow: 0 0 50px rgba(124,239,255,0.22); }
.orb.command { animation: pulse 1.15s ease-in-out infinite; box-shadow: 0 0 70px rgba(124,239,255,0.5); }
.orb.thinking { filter: saturate(1.3); animation: think 4s linear infinite; }
.orb.speaking { animation: speak 0.85s ease-in-out infinite; }
.orb.off { filter: grayscale(0.35) brightness(0.7); }
@keyframes pulse { 50% { transform: scale(1.045); } }
@keyframes think { to { transform: rotate(360deg); } }
@keyframes speak { 50% { transform: scale(1.07); } }
@keyframes spin { to { transform: rotate(360deg); } }
.status {
  position: absolute; bottom: 6%;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.34em; font-size: 10px; color: var(--cyan);
  text-transform: uppercase;
}
.wave { height: 26px; display: flex; gap: 4px; justify-content: center; align-items: center; }
.wave span { width: 2px; height: 5px; background: var(--cyan); opacity: 0.75; }
.wave:not(.idle) span { animation: bar 0.85s ease-in-out infinite; }
.wave span:nth-child(2){animation-delay:.1s} .wave span:nth-child(3){animation-delay:.2s}
.wave span:nth-child(4){animation-delay:.28s} .wave span:nth-child(5){animation-delay:.14s}
@keyframes bar { 50% { height: 22px; } }
.wave.idle span { opacity: 0.2; }
.reply {
  text-align: center; font-size: 20px; font-weight: 300; line-height: 1.45;
  max-width: 720px; margin: 0 auto; min-height: 3em; padding: 0 16px;
}
.reply small { display: block; margin-top: 10px; color: var(--mute); font-size: 11px; letter-spacing: 0.08em; }
.history {
  display: block; flex: 1; overflow: auto; font-size: 13px; line-height: 1.4;
  min-height: 0;
}
.history p { margin: 0 0 10px; color: var(--mute); }
.history .jarvis { color: var(--ink); }
.reply { text-align: left; font-size: 15px; min-height: 0; margin: 0; padding: 0; max-width: none; }

.dock { display: flex; gap: 10px; align-items: center; max-width: 720px; margin: 0 auto; width: 100%; }
.mic {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(124,239,255,0.2);
  background: transparent; color: var(--mute); cursor: pointer;
}
.mic.fallback { opacity: 0.35; }
.field { flex: 1; display: flex; }
input {
  width: 100%; border: 0; outline: 0; background: transparent;
  border-bottom: 1px solid rgba(124,239,255,0.16);
  color: var(--ink); padding: 10px 4px; font-size: 14px;
}
button.send { display: none; }
.meta {
  display: flex; justify-content: space-between;
  font-family: Orbitron, sans-serif; font-size: 9px; letter-spacing: 0.16em;
  color: var(--mute); max-width: 720px; margin: 8px auto 0; width: 100%;
}
@media (max-width: 640px) {
  .reply { font-size: 17px; }
  .orb { width: min(230px, 64vw); }
}

@media (max-width: 820px) {
  .hud { grid-template-columns: 1fr; grid-template-rows: 48px 1fr auto; }
  .panel { grid-row: 3; grid-column: 1; max-height: 28vh; margin: 0 12px 12px; opacity: 1; }
}
