/* ============================================================================
   NOVA — Phase 1  ·  space intelligence layer
   Scoped additively over the existing War Room dashboard.
   ========================================================================== */

:root{
  --nova-teal:#19f0e6;
  --nova-blue:#2a6bff;
  --nova-violet:#8a4dff;
  --nova-crimson:#7a1030;
  --nova-ink:#000000;
}

/* hide the native cursor everywhere once NOVA is live */
html.nova-on, html.nova-on *{ cursor:none !important; }

/* ---- persistent full-screen space canvas (behind everything) ------------- */
#nova-canvas{
  position:fixed; inset:0; width:100vw; height:100vh;
  z-index:0; display:block; background:#000; pointer-events:none;
}
/* scrim sits above the canvas; opaque on non-main tabs so existing tabs look
   untouched, transparent on the main tab so the void shows through */
#nova-scrim{
  position:fixed; inset:0; z-index:1; background:#000;
  opacity:1; transition:opacity 1.1s ease; pointer-events:none;
}
html.nova-booted #nova-scrim{ opacity:0; }
html.nova-booted.nova-offmain #nova-scrim{ opacity:0.985; }

/* keep the real dashboard above canvas + scrim */
body > header, body > .tabs, body > section, body > footer,
body > div:not(#nova-canvas):not(#nova-scrim):not(#nova-overlay):not(#nova-cursor):not(#nova-cursor-glow):not(#nova-page-bg){
  position:relative; z-index:2;
}

/* full-page space backdrop — one continuous star/nebula field behind the whole
   dashboard so there is no boundary between NOVA's section and the rest */
#nova-page-bg{
  position:fixed; inset:0; width:100vw; height:100vh; z-index:0;
  pointer-events:none; background:#000;
}

/* ---- custom cursor ------------------------------------------------------- */
#nova-cursor{
  position:fixed; left:0; top:0; width:34px; height:34px; margin:-17px 0 0 -17px;
  border-radius:50%; z-index:99999; pointer-events:none;
  border:1px solid rgba(25,240,230,0.45);
  box-shadow:0 0 14px 2px rgba(25,240,230,0.25), inset 0 0 8px rgba(25,240,230,0.15);
  transition:width .18s ease, height .18s ease, border-color .18s ease, background .18s ease;
  will-change:transform;
}
#nova-cursor::after{ /* inner bright teal dot */
  content:""; position:absolute; left:50%; top:50%; width:6px; height:6px;
  margin:-3px 0 0 -3px; border-radius:50%;
  background:var(--nova-teal);
  box-shadow:0 0 10px 3px rgba(25,240,230,0.9);
}
#nova-cursor.nova-hot{
  width:52px; height:52px; margin:-26px 0 0 -26px;
  border-color:rgba(25,240,230,0.95);
  box-shadow:0 0 26px 6px rgba(25,240,230,0.5), inset 0 0 14px rgba(25,240,230,0.3);
}
#nova-cursor.nova-down{ width:20px; height:20px; margin:-10px 0 0 -10px; }
/* breathing pulse while idle */
@keyframes nova-breathe{
  0%,100%{ transform:scale(1); opacity:.85; }
  50%    { transform:scale(1.18); opacity:1; }
}
#nova-cursor.nova-idle{ animation:nova-breathe 3.4s ease-in-out infinite; }

/* cursor particle-trail dots */
.nova-trail{
  position:fixed; width:5px; height:5px; margin:-2.5px 0 0 -2.5px; border-radius:50%;
  background:rgba(25,240,230,0.7); box-shadow:0 0 8px 2px rgba(25,240,230,0.5);
  z-index:99998; pointer-events:none; opacity:.7;
  animation:nova-trail-fade .3s linear forwards;
}
@keyframes nova-trail-fade{ to{ opacity:0; transform:scale(.2); } }
/* click particle-burst dots */
.nova-spark{
  position:fixed; width:5px; height:5px; margin:-2.5px 0 0 -2.5px; border-radius:50%;
  background:var(--nova-teal); box-shadow:0 0 10px 3px rgba(25,240,230,0.7);
  z-index:99998; pointer-events:none;
}

/* ---- login + boot overlay ------------------------------------------------ */
#nova-overlay{
  position:fixed; inset:0; z-index:5000; background:#000;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
#nova-overlay.nova-fade{ transition:opacity 1.4s ease; opacity:0; }
#nova-overlay-canvas{ position:absolute; inset:0; width:100%; height:100%; z-index:1; }
#nova-overlay-ui{
  position:relative; z-index:2; text-align:center;
  font-family:'Segoe UI',system-ui,sans-serif; color:#cfeffe; user-select:none;
}
#nova-title{
  font-size:84px; font-weight:200; letter-spacing:.42em; margin-left:.42em;
  color:#eafcff;
  text-shadow:0 0 24px rgba(25,240,230,0.55), 0 0 60px rgba(42,107,255,0.4);
  opacity:0; transition:opacity 2s ease;
}
#nova-title.nova-show{ opacity:1; }
#nova-login-hint{
  margin-top:34px; font-size:12px; letter-spacing:.32em; color:rgba(180,230,245,.45);
  opacity:0; transition:opacity 1.2s ease;
}
#nova-login-hint.nova-show{ opacity:.7; animation:nova-hint 3s ease-in-out infinite; }
@keyframes nova-hint{ 0%,100%{opacity:.25;} 50%{opacity:.7;} }

#nova-login-field{
  margin-top:40px; height:30px; display:flex; align-items:center; justify-content:center;
  gap:2px; font-family:'Consolas','Courier New',monospace; font-size:24px;
  letter-spacing:.34em; color:var(--nova-teal); min-height:30px;
  text-shadow:0 0 14px rgba(25,240,230,0.6); opacity:0; transition:opacity .5s ease;
}
#nova-login-field.nova-show{ opacity:1; }
#nova-login-caret{ width:11px; height:24px; background:var(--nova-teal);
  box-shadow:0 0 12px rgba(25,240,230,.8); animation:nova-caret 1s step-end infinite; }
@keyframes nova-caret{ 50%{ opacity:0; } }
#nova-login-status{
  margin-top:30px; font-size:13px; letter-spacing:.36em; color:#bfe9ff;
  opacity:0; transition:opacity .8s ease; text-shadow:0 0 16px rgba(42,107,255,.5);
}
#nova-login-status.nova-show{ opacity:.92; }

/* point of light / seed */
#nova-seed{
  position:absolute; left:50%; top:50%; width:8px; height:8px; border-radius:50%;
  transform:translate(-50%,-50%) scale(1); background:#ffffff; opacity:0; z-index:2;
  box-shadow:0 0 18px 6px rgba(255,255,255,.9);
}
/* vignette mask — recedes as stars fade in from edges inward */
#nova-vignette{
  position:absolute; inset:0; z-index:1; opacity:1; pointer-events:none;
  background:radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 18%, #000 62%);
}
/* gravitational ripple ring */
#nova-ripple{
  position:absolute; left:50%; top:50%; width:60px; height:60px; margin:0; border-radius:50%;
  transform:translate(-50%,-50%) scale(0.1); opacity:0; z-index:2; pointer-events:none;
  border:2px solid rgba(170,225,255,.8);
  box-shadow:0 0 26px 6px rgba(120,180,255,.5), inset 0 0 26px rgba(120,180,255,.4);
}
/* boot orb mount (centre of overlay) */
#nova-boot-orb{
  position:absolute; left:50%; top:50%; width:300px; height:300px;
  margin:-150px 0 0 -150px; z-index:2; opacity:0; transition:opacity 1s ease; pointer-events:none;
}
#nova-boot-greet{
  margin-top:18px; font-family:'Segoe UI',system-ui,sans-serif; font-weight:300;
  font-size:17px; letter-spacing:.03em; color:#dff4ff; width:340px;
  opacity:0; transition:opacity 1.1s ease; text-shadow:0 0 16px rgba(42,107,255,.4);
}
#nova-boot-greet.nova-show{ opacity:.95; }

/* ---- boot system text ---------------------------------------------------- */
#nova-boot-text{
  position:absolute; z-index:2; left:50%; top:58%; transform:translateX(-50%);
  font-family:'Consolas','Courier New',monospace; color:#bfe9ff;
  font-size:13px; letter-spacing:.18em; line-height:1.95; text-align:left;
  width:340px; pointer-events:none; opacity:0;
}
#nova-boot-title{
  font-family:'Segoe UI',system-ui,sans-serif; font-weight:200; letter-spacing:.4em;
  font-size:30px; color:#eafcff; margin-bottom:6px;
  text-shadow:0 0 20px rgba(25,240,230,.6);
  opacity:0; transition:opacity .9s ease;
}
#nova-boot-title.nova-show{ opacity:1; }
.nova-boot-line{ opacity:0; transform:translateY(4px); transition:opacity .6s ease, transform .6s ease; }
.nova-boot-line.nova-show{ opacity:.9; transform:none; }
.nova-boot-line .dot{ color:var(--nova-teal); margin-right:9px;
  text-shadow:0 0 8px rgba(25,240,230,.8); }

/* ---- NOVA stage on the MAIN tab ----------------------------------------- */
#nova-stage{
  position:relative; z-index:2; margin:0 0 26px 0; padding:30px 0 22px;
  min-height:74vh; display:flex; flex-direction:column; align-items:center;
  justify-content:center; text-align:center; overflow:hidden;
}
/* the starfield now lives in #nova-page-bg (full page); the stage itself is
   transparent so that one continuous field shows through it — no boundary */
.nova-stage-bg{ position:absolute; inset:0; z-index:0; background:transparent; }
#nova-stage > :not(.nova-stage-bg){ position:relative; z-index:2; }
#nova-orb-mount{ width:300px; height:300px; position:relative; z-index:2; }
#nova-greeting{
  margin-top:10px; font-family:'Segoe UI',system-ui,sans-serif; font-weight:300;
  font-size:19px; letter-spacing:.04em; color:#dff4ff; max-width:680px;
  text-shadow:0 0 18px rgba(42,107,255,.35); min-height:26px;
  opacity:0; transition:opacity 1s ease;
}
#nova-greeting.nova-show{ opacity:.95; }

/* barely-visible BST clock + level — coordinates in space */
#nova-clock{
  position:absolute; top:8px; right:4px; font-family:'Consolas',monospace;
  font-size:12px; letter-spacing:.3em; color:rgba(150,210,235,.20);
}
#nova-level{
  position:absolute; top:8px; left:4px; font-family:'Consolas',monospace;
  font-size:12px; letter-spacing:.22em; color:rgba(150,210,235,.20); white-space:nowrap;
}
#nova-level .pip-f{ color:rgba(25,240,230,.55); }

/* ---- chat ---------------------------------------------------------------- */
#nova-chat{ width:min(680px,92%); margin:18px auto 0; position:relative; z-index:2; }
#nova-chat-log{
  display:flex; flex-direction:column; gap:12px; max-height:320px; overflow-y:auto;
  padding:6px 4px 14px; text-align:left;
}
#nova-chat-log::-webkit-scrollbar{ width:5px; }
#nova-chat-log::-webkit-scrollbar-thumb{ background:rgba(25,240,230,.25); border-radius:3px; }
.nova-msg{ font-family:'Segoe UI',system-ui,sans-serif; font-size:14.5px; line-height:1.6;
  max-width:86%; opacity:0; transform:translateY(6px); animation:nova-msg-in .5s ease forwards; }
@keyframes nova-msg-in{ to{ opacity:1; transform:none; } }
.nova-msg.user{ align-self:flex-end; color:#cfe9ff; text-align:right;
  text-shadow:0 0 10px rgba(42,107,255,.25); }
.nova-msg.nova{ align-self:flex-start; color:#e8fbff;
  text-shadow:0 0 14px rgba(25,240,230,.30); }
.nova-msg .who{ display:block; font-size:10px; letter-spacing:.3em;
  opacity:.4; margin-bottom:3px; }
#nova-chat-input-wrap{
  display:flex; align-items:center; gap:10px; margin-top:6px;
  border:1px solid rgba(25,240,230,.18); border-radius:30px;
  background:rgba(8,16,26,.5); padding:9px 18px;
  box-shadow:0 0 22px rgba(25,240,230,.07), inset 0 0 18px rgba(8,20,30,.6);
}
#nova-chat-input{
  flex:1; background:transparent; border:0; outline:none; color:#eafcff;
  font-family:'Segoe UI',system-ui,sans-serif; font-size:14.5px; letter-spacing:.02em;
}
#nova-chat-input::placeholder{ color:rgba(160,210,235,.35); }
#nova-chat-send{
  background:transparent; border:0; color:var(--nova-teal); font-size:18px;
  text-shadow:0 0 10px rgba(25,240,230,.6);
}
#nova-chat-typing{ font-size:12px; letter-spacing:.3em; color:rgba(25,240,230,.5);
  margin-top:8px; min-height:14px; text-align:left; opacity:0; transition:opacity .3s; }
#nova-chat-typing.nova-show{ opacity:.8; }

/* Phase 2 voice — small transient hint ("Listening…", "Voice requires Chrome") */
#nova-voice-hint{
  margin-top:8px; text-align:center; font-family:'Consolas',monospace;
  font-size:11px; letter-spacing:.28em; color:rgba(25,240,230,.55);
  opacity:0; transition:opacity .3s ease; pointer-events:none; min-height:13px;
}
#nova-voice-hint.nova-show{ opacity:.85; }
#nova-orb-mount{ pointer-events:auto; }   /* tappable to talk */

/* ---- logout -------------------------------------------------------------- */
#nova-logout{
  position:fixed; right:14px; bottom:10px; z-index:3; font-family:'Consolas',monospace;
  font-size:11px; letter-spacing:.26em; color:rgba(150,210,235,.18);
  background:transparent; border:0;
}
#nova-logout:hover{ color:rgba(25,240,230,.6); }
