/* ══════════════════════════════════════════════════════════════
   N.O.S — JARVIS INTELLIGENCE SYSTEM · STYLESHEET v3.0
   ══════════════════════════════════════════════════════════════ */

:root {
  --hue: 190;
  --cyan:        hsl(var(--hue), 100%, 55%);
  --cyan-dim:    hsl(var(--hue), 80%, 35%);
  --cyan-glow:   hsl(var(--hue), 100%, 65%);
  --cyan-dark:   hsl(var(--hue), 60%, 15%);
  --neon-green:  #39ff6e;
  --neon-orange: #ff6b2b;
  --neon-red:    #ff2b4e;
  --neon-amber:  #ffb400;
  --neon-purple: #bf5fff;
  --bg:          #020810;
  --bg2:         #040d18;
  --bg3:         #071525;
  --glass:       rgba(0, 200, 255, 0.04);
  --glass-border:rgba(0, 200, 255, 0.15);
  --text:        #c8f0ff;
  --text-dim:    rgba(200, 240, 255, 0.5);
  --font-display:'Orbitron', monospace;
  --font-mono:   'Share Tech Mono', monospace;
  --font-ui:     'Rajdhani', sans-serif;
  --sidebar-w:   76px;
  --topbar-h:    46px;
  --radius:      8px;
}

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

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

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

/* ══════════════ BOOT SCREEN ══════════════ */
.boot-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  opacity: 0; pointer-events: none; transition: opacity 0.5s;
}
.boot-screen.active { opacity: 1; pointer-events: all; }
#bootCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.4; }

.boot-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; width: 90%; max-width: 520px;
}
.boot-logo {
  position: relative; width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.boot-logo-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--cyan);
  animation: spinRing 3s linear infinite;
}
.ring1 { width: 120px; height: 120px; border-color: var(--cyan); opacity: 0.6; }
.ring2 { width: 90px; height: 90px; border-color: var(--cyan-glow); opacity: 0.8; animation-direction: reverse; animation-duration: 2s; }
.ring3 { width: 60px; height: 60px; border-color: var(--cyan); opacity: 0.4; animation-duration: 4s; }
@keyframes spinRing { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.boot-logo-core {
  width: 50px; height: 50px; border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-dim), var(--bg));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan-dim);
}
.nos-text { font-family: var(--font-display); font-size: 10px; color: var(--cyan); font-weight: 900; }
.boot-title { font-family: var(--font-display); font-size: clamp(11px, 2.5vw, 16px); color: var(--cyan); letter-spacing: 3px; text-shadow: 0 0 20px var(--cyan); }
.boot-version { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 2px; }
.boot-logs {
  width: 100%; height: 130px; overflow-y: auto;
  background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--neon-green);
  display: flex; flex-direction: column; gap: 2px;
}
.boot-log-line { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.boot-progress-wrap { width: 100%; display: flex; align-items: center; gap: 10px; }
.boot-progress-bar { flex: 1; height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; border: 1px solid var(--glass-border); }
.boot-progress-fill { height: 100%; width: 0%; border-radius: 2px; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: 0 0 8px var(--cyan); transition: width 0.1s ease; }
.boot-progress-pct { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); min-width: 36px; }
.boot-status { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: 2px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ══════════════ LOGIN SCREEN ══════════════ */
.login-screen { position: fixed; inset: 0; z-index: 900; background: var(--bg); display: none; align-items: center; justify-content: center; flex-direction: column; }
.login-screen.active { display: flex; }
#loginCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.3; }
.login-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 24px; width: 90%; max-width: 420px; }
.login-header { text-align: center; }
.login-logo { font-family: var(--font-display); font-size: 42px; font-weight: 900; color: var(--cyan); text-shadow: 0 0 30px var(--cyan), 0 0 60px var(--cyan-dim); letter-spacing: 8px; }
.login-subtitle { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 2px; margin-top: 4px; }
.login-panel { width: 100%; padding: 28px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; backdrop-filter: blur(20px); box-shadow: 0 0 40px rgba(0,200,255,0.1); display: flex; flex-direction: column; gap: 20px; }
.scan-container { display: flex; justify-content: center; }
.face-scan { position: relative; width: 120px; height: 120px; border: 2px solid var(--glass-border); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: rgba(0,200,255,0.03); }
.scan-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 10px var(--cyan); animation: scanMove 2s ease-in-out infinite; }
@keyframes scanMove { 0%,100% { top: 0%; } 50% { top: 95%; } }
.scan-corners .corner { position: absolute; width: 14px; height: 14px; border-color: var(--cyan); border-style: solid; }
.corner.tl { top: 4px; left: 4px; border-width: 2px 0 0 2px; }
.corner.tr { top: 4px; right: 4px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: 4px; left: 4px; border-width: 0 0 2px 2px; }
.corner.br { bottom: 4px; right: 4px; border-width: 0 2px 2px 0; }
.scan-user-icon { font-size: 40px; color: var(--cyan-dim); }
.scan-label { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 9px; color: var(--cyan); }
.login-options { display: flex; flex-direction: column; gap: 12px; }
.login-input-wrap { display: flex; gap: 8px; }
.login-input { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 10px 14px; font-family: var(--font-mono); font-size: 13px; color: var(--cyan); outline: none; transition: border 0.3s; letter-spacing: 4px; }
.login-input:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,200,255,0.2); }
.login-btn { padding: 10px 16px; background: var(--cyan-dim); border: 1px solid var(--cyan); border-radius: var(--radius); color: var(--bg); font-family: var(--font-display); font-size: 10px; cursor: pointer; transition: all 0.2s; white-space: nowrap; letter-spacing: 1px; }
.login-btn:hover { background: var(--cyan); box-shadow: 0 0 20px var(--cyan); }
.login-divider { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); position: relative; }
.login-divider::before, .login-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--glass-border); }
.login-divider::before { left: 0; } .login-divider::after { right: 0; }
.guest-btn { width: 100%; padding: 10px; background: transparent; border: 1px solid var(--glass-border); border-radius: var(--radius); color: var(--text-dim); font-family: var(--font-ui); font-size: 13px; cursor: pointer; transition: all 0.2s; letter-spacing: 2px; }
.guest-btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--glass); }
.login-hint { text-align: center; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.hint-phrase { color: var(--cyan); }

/* ══════════════ MAIN OS ══════════════ */
.main-os { position: fixed; inset: 0; display: none; flex-direction: column; overflow: hidden; }
.main-os.active { display: flex; }
#bgCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.5; }

/* ──── TOPBAR ──── */
.topbar { position: relative; z-index: 10; height: var(--topbar-h); display: flex; align-items: center; background: rgba(2,8,16,0.92); border-bottom: 1px solid var(--glass-border); backdrop-filter: blur(20px); padding: 0 14px; gap: 10px; box-shadow: 0 0 20px rgba(0,200,255,0.08); }
.topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.topbar-logo { font-family: var(--font-display); font-size: 13px; font-weight: 900; color: var(--cyan); text-shadow: 0 0 10px var(--cyan); letter-spacing: 3px; }
.topbar-sep { width: 1px; height: 20px; background: var(--glass-border); }
.topbar-time { font-family: var(--font-mono); font-size: 13px; color: var(--cyan); }
.topbar-date { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.topbar-center { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--neon-green); }
.topbar-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); animation: pulse 2s infinite; }
.topbar-status-dot.alert { background: var(--neon-red); box-shadow: 0 0 6px var(--neon-red); animation: pulse 0.5s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.topbar-right { display: flex; align-items: center; gap: 6px; }

/* Vitals mini display */
.topbar-vitals-mini { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); padding: 4px 10px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; margin-right: 6px; }
.tvm-item { display: flex; align-items: center; gap: 4px; }
.tvm-item i { color: var(--cyan); font-size: 9px; }
.tvm-tox { color: var(--neon-green); }
.tvm-tox.warn { color: var(--neon-red) !important; animation: blink 0.8s infinite; }
.tvm-sep { color: var(--glass-border); }

.topbar-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--glass-border); cursor: pointer; color: var(--text-dim); font-size: 13px; transition: all 0.2s; position: relative; }
.topbar-icon:hover, .topbar-icon-active { color: var(--cyan); border-color: var(--cyan); background: var(--glass); box-shadow: 0 0 10px rgba(0,200,255,0.2); }
.topbar-icon .badge { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--neon-red); color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); }

/* ──── SIDEBAR ──── */
.sidebar { position: absolute; left: 0; top: var(--topbar-h); bottom: 0; width: var(--sidebar-w); z-index: 9; background: rgba(2,8,16,0.88); border-right: 1px solid var(--glass-border); backdrop-filter: blur(20px); display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 2px; }
.sidebar-item { width: 54px; height: 50px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--text-dim); font-size: 16px; transition: all 0.2s; border: 1px solid transparent; }
.sidebar-item span { font-family: var(--font-ui); font-size: 7px; letter-spacing: 1px; text-transform: uppercase; }
.sidebar-item:hover, .sidebar-item.active { color: var(--cyan); border-color: var(--glass-border); background: var(--glass); box-shadow: 0 0 14px rgba(0,200,255,0.15); }
.sidebar-item.active { border-color: var(--cyan-dim); }
.sidebar-divider { width: 36px; height: 1px; background: var(--glass-border); margin: 4px 0; }

/* ──── VIEWS ──── */
.view { position: absolute; top: var(--topbar-h); left: var(--sidebar-w); right: 0; bottom: 0; display: none; overflow: hidden; z-index: 5; animation: viewIn 0.35s ease; }
.view.active { display: flex; overflow: auto; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ══════════════ DASHBOARD ══════════════ */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 16px; width: 100%; align-content: start; }

.widget { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; padding: 16px; backdrop-filter: blur(12px); transition: border 0.3s, box-shadow 0.3s; position: relative; overflow: hidden; }
.widget::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(0,200,255,0.03), transparent); }
.widget:hover { border-color: var(--cyan-dim); box-shadow: 0 0 20px rgba(0,200,255,0.1); }
.widget-header { font-family: var(--font-display); font-size: 10px; letter-spacing: 2px; color: var(--cyan); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.widget-header i { font-size: 12px; }

/* CLOCK */
.clock-display { font-family: var(--font-display); font-size: clamp(28px, 5vw, 38px); color: var(--cyan); text-shadow: 0 0 20px var(--cyan); line-height: 1; }
.clock-date { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 2px; margin-top: 8px; }
.clock-ring { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--glass-border); box-shadow: 0 0 15px rgba(0,200,255,0.1) inset; animation: spinRing 8s linear infinite; }

/* METRICS */
.metric-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.metric-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); width: 28px; }
.metric-bar { flex: 1; height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.metric-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.cpu-fill { background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); box-shadow: 0 0 6px var(--cyan); }
.ram-fill { background: linear-gradient(90deg, #6b2bff, #a56bff); box-shadow: 0 0 6px #a56bff; }
.net-fill { background: linear-gradient(90deg, var(--neon-green), #2bffb8); box-shadow: 0 0 6px var(--neon-green); }
.gpu-fill { background: linear-gradient(90deg, var(--neon-orange), #ffb02b); box-shadow: 0 0 6px var(--neon-orange); }
.metric-val { font-family: var(--font-mono); font-size: 10px; color: var(--cyan); width: 36px; text-align: right; }

/* AI MONITOR */
.widget-ai-monitor canvas { width: 100%; }
.ai-status-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--font-mono); font-size: 10px; color: var(--neon-green); }
.active-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); animation: pulse 1.5s infinite; }

/* OPERATOR VITALS WIDGET */
.vitals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vital-card { background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); border-radius: 8px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: border 0.3s; }
.vital-card:hover { border-color: var(--cyan-dim); }
.vital-card.vital-tox.critical { border-color: var(--neon-red); animation: toxPulse 0.8s ease-in-out infinite; }
@keyframes toxPulse { 0%,100% { box-shadow: 0 0 4px var(--neon-red); } 50% { box-shadow: 0 0 16px var(--neon-red); } }
.vital-icon { font-size: 14px; color: var(--cyan); }
.vital-val { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--cyan); line-height: 1; }
.vital-label { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); letter-spacing: 1px; }
.vital-spark { display: block; opacity: 0.6; }

/* SUIT POWER WIDGET */
.suit-power-ring-wrap { position: relative; display: flex; justify-content: center; margin: 8px 0; }
.suit-ring-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.suit-power-num { font-family: var(--font-display); font-size: 18px; font-weight: 900; color: var(--cyan); }
.suit-power-sub { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); letter-spacing: 2px; }
.suit-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.suit-stat { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: rgba(0,0,0,0.3); border-radius: 6px; border: 1px solid var(--glass-border); }
.ss-lbl { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); letter-spacing: 1px; }
.ss-val { font-family: var(--font-display); font-size: 11px; color: var(--cyan); }
.suit-toggle-btn { width: 100%; padding: 8px; background: rgba(0,200,255,0.06); border: 1px solid var(--cyan-dim); border-radius: 6px; color: var(--cyan); font-family: var(--font-display); font-size: 9px; letter-spacing: 2px; cursor: pointer; transition: all 0.3s; }
.suit-toggle-btn:hover { background: rgba(0,200,255,0.14); box-shadow: 0 0 14px rgba(0,200,255,0.2); }
.suit-toggle-btn.online { background: rgba(57,255,110,0.08); border-color: var(--neon-green); color: var(--neon-green); }

/* WEATHER */
.weather-main { display: flex; align-items: center; gap: 16px; }
.weather-icon { font-size: 40px; color: var(--cyan); text-shadow: 0 0 15px var(--cyan); }
.weather-temp { font-family: var(--font-display); font-size: 36px; color: var(--text); }
.weather-desc { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 2px; margin: 8px 0; }
.weather-stats { display: flex; gap: 16px; }
.w-stat { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 5px; }
.w-stat i { color: var(--cyan); }

/* NOTIFICATIONS */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-size: 13px; color: var(--text); padding: 6px; border-radius: 6px; background: rgba(0,0,0,0.2); }
.notif-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--neon-green); box-shadow: 0 0 5px var(--neon-green); }
.notif-dot.warn { background: var(--neon-orange); box-shadow: 0 0 5px var(--neon-orange); }
.notif-dot.info { background: var(--cyan); box-shadow: 0 0 5px var(--cyan); }

/* MUSIC */
.music-visualizer { display: flex; align-items: flex-end; gap: 3px; height: 50px; margin-bottom: 10px; }
.viz-bar { flex: 1; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, var(--cyan), var(--cyan-dim)); box-shadow: 0 0 4px var(--cyan); animation: vizPulse 0.8s ease-in-out infinite alternate; height: var(--h); }
.viz-bar:nth-child(odd) { animation-duration: 0.6s; }
.viz-bar:nth-child(3n) { animation-duration: 1s; }
@keyframes vizPulse { from { opacity: 0.4; transform: scaleY(0.3); } to { opacity: 1; transform: scaleY(1); } }
.music-track { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); margin-bottom: 10px; }
.music-controls { display: flex; justify-content: center; gap: 12px; margin-bottom: 10px; }
.music-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-dim); cursor: pointer; font-size: 12px; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.music-btn:hover, .music-play { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(0,200,255,0.3); }
.music-open-btn { text-align: center; padding: 7px; border: 1px solid #1db954; border-radius: 6px; color: #1db954; font-family: var(--font-mono); font-size: 11px; cursor: pointer; transition: all 0.2s; letter-spacing: 1px; }
.music-open-btn:hover { background: rgba(29,185,84,0.1); box-shadow: 0 0 10px rgba(29,185,84,0.3); }

/* QUICK LAUNCH */
.launch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.launch-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 8px; cursor: pointer; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.2); transition: all 0.2s; }
.launch-item:hover { border-color: var(--cyan); background: var(--glass); box-shadow: 0 0 10px rgba(0,200,255,0.2); color: var(--cyan); }
.launch-item i { font-size: 20px; }
.launch-item span { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: 1px; }

/* ══════════════ JARVIS VIEW ══════════════ */
.jarvis-wrap { width: 100%; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.jarvis-header { text-align: center; }
.jarvis-title { font-family: var(--font-display); font-size: clamp(13px, 2.5vw, 18px); color: var(--cyan); letter-spacing: 4px; text-shadow: 0 0 20px var(--cyan); display: flex; align-items: center; justify-content: center; gap: 10px; }
.jarvis-subtitle { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 3px; margin-top: 4px; }

.jarvis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* JARVIS CARDS */
.j-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; padding: 16px; backdrop-filter: blur(12px); transition: border 0.3s, box-shadow 0.3s; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.j-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: 0.5; }
.j-card:hover { border-color: var(--cyan-dim); box-shadow: 0 0 24px rgba(0,200,255,0.12); }
.j-card-header { font-family: var(--font-display); font-size: 10px; letter-spacing: 2px; color: var(--cyan); display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--glass-border); }
.j-card-header i { font-size: 11px; }

/* Stat rows inside j-cards */
.j-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(0,200,255,0.06); font-family: var(--font-mono); font-size: 11px; }
.j-stat-row:last-child { border-bottom: none; }
.j-stat-row span:first-child { color: var(--text-dim); }
.j-stat-row span:last-child { color: var(--cyan); }
.j-green  { color: var(--neon-green) !important; }
.j-amber  { color: var(--neon-amber) !important; }
.j-red    { color: var(--neon-red) !important; }
.j-purple { color: var(--neon-purple) !important; }

/* Arc Reactor Visual */
.arc-reactor-visual { position: relative; display: flex; justify-content: center; }
.arc-center-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.arc-power-val { font-family: var(--font-display); font-size: 20px; font-weight: 900; color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }
.arc-power-lbl { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); letter-spacing: 2px; }

/* Bio chart */
.bio-chart-wrap { background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); border-radius: 6px; overflow: hidden; }
.bio-chart-wrap canvas { width: 100%; display: block; }

/* Flight HUD */
.flight-hud { background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: 6px; overflow: hidden; }
.flight-hud canvas { width: 100%; display: block; }

/* Iron Legion */
.legion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.legion-unit { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; background: rgba(0,0,0,0.3); border-radius: 6px; border: 1px solid var(--glass-border); transition: border 0.3s; }
.legion-unit.online { border-color: var(--neon-green); }
.legion-unit.low { border-color: var(--neon-amber); }
.legion-unit i { font-size: 14px; color: var(--cyan); }
.legion-unit .lu-id { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); }
.legion-unit .lu-pwr { font-family: var(--font-mono); font-size: 9px; color: var(--neon-green); }
.legion-unit.low .lu-pwr { color: var(--neon-amber); }

/* Target tracking */
.track-input-row { display: flex; gap: 6px; }
.j-input { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: 6px; padding: 8px 12px; font-family: var(--font-mono); font-size: 11px; color: var(--cyan); outline: none; transition: border 0.3s; }
.j-input:focus { border-color: var(--cyan); }
.j-btn { padding: 8px 14px; background: var(--glass); border: 1px solid var(--cyan-dim); border-radius: 6px; color: var(--cyan); font-family: var(--font-mono); font-size: 11px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.j-btn:hover { background: rgba(0,200,255,0.12); box-shadow: 0 0 12px rgba(0,200,255,0.2); }
.j-btn-full { width: 100%; text-align: center; margin-top: 4px; }
.track-result { font-family: var(--font-mono); font-size: 10px; color: var(--neon-green); min-height: 18px; line-height: 1.6; }

/* Energy list */
.energy-list { display: flex; flex-direction: column; gap: 5px; }
.energy-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; background: rgba(0,0,0,0.3); border-radius: 4px; border-left: 2px solid var(--cyan); font-family: var(--font-mono); font-size: 10px; }
.e-type { color: var(--text-dim); }
.e-level { color: var(--neon-green); }
.e-dist { color: var(--text-dim); }

/* Scene log */
.scene-controls { display: flex; gap: 8px; }
.scene-log { font-family: var(--font-mono); font-size: 10px; color: var(--neon-green); line-height: 1.7; min-height: 20px; }

/* Threat meter */
.threat-meter { display: flex; flex-direction: column; gap: 6px; }
.threat-level-bar { height: 10px; background: rgba(0,0,0,0.4); border-radius: 5px; border: 1px solid var(--glass-border); overflow: hidden; }
.threat-fill { height: 100%; background: linear-gradient(90deg, var(--neon-green), var(--neon-amber), var(--neon-red)); transition: width 1s ease; }
.threat-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); letter-spacing: 1px; }

/* ══════════════ TERMINAL ══════════════ */
.terminal-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; background: rgba(2,5,10,0.97); font-family: var(--font-mono); }
.terminal-titlebar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg3); border-bottom: 1px solid var(--glass-border); }
.term-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.term-dot.red { background: #ff5f57; } .term-dot.yellow { background: #febc2e; } .term-dot.green { background: #28c840; }
.term-title { flex: 1; text-align: center; font-size: 11px; color: var(--text-dim); letter-spacing: 2px; }
.term-clear-btn { background: none; border: 1px solid var(--glass-border); color: var(--text-dim); border-radius: 4px; padding: 2px 8px; font-family: var(--font-mono); font-size: 10px; cursor: pointer; transition: all 0.2s; }
.term-clear-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.terminal-output { flex: 1; overflow-y: auto; padding: 16px; font-size: 13px; line-height: 1.7; color: var(--neon-green); }
.terminal-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--glass-border); background: var(--bg3); }
.term-prompt { color: var(--cyan); font-size: 12px; white-space: nowrap; }
.term-input { flex: 1; background: none; border: none; outline: none; font-family: var(--font-mono); font-size: 13px; color: var(--neon-green); caret-color: var(--cyan); }
.term-line { margin: 2px 0; animation: fadeIn 0.15s ease; }
.term-cmd     { color: var(--cyan); }
.term-out     { color: var(--neon-green); }
.term-err     { color: var(--neon-red); }
.term-info    { color: var(--text-dim); }
.term-success { color: var(--neon-green); font-weight: bold; }
.term-system  { color: var(--neon-amber); }
.term-search  { color: var(--neon-purple); }

/* ══════════════ LAUNCHER ══════════════ */
.launcher-wrap { width: 100%; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.launcher-title { font-family: var(--font-display); font-size: clamp(14px, 3vw, 20px); color: var(--cyan); letter-spacing: 4px; text-shadow: 0 0 20px var(--cyan); }
.launcher-subtitle { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 3px; }
.launcher-search-wrap { position: relative; display: flex; flex-direction: column; gap: 6px; }
.launcher-search-icon { position: absolute; left: 14px; top: 13px; color: var(--text-dim); font-size: 13px; }
.launcher-search { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 12px 16px 12px 40px; font-family: var(--font-mono); font-size: 13px; color: var(--cyan); outline: none; transition: border 0.3s; }
.launcher-search:focus { border-color: var(--cyan); box-shadow: 0 0 16px rgba(0,200,255,0.15); }
.launcher-hint { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }
.launcher-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.app-card { padding: 24px 16px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass); display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; transition: all 0.3s; backdrop-filter: blur(10px); text-align: center; }
.app-card:hover { border-color: var(--cyan); background: rgba(0,200,255,0.08); box-shadow: 0 0 30px rgba(0,200,255,0.2); transform: translateY(-4px); }
.app-icon { font-size: 36px; color: var(--cyan); text-shadow: 0 0 15px var(--cyan); }
.app-name { font-family: var(--font-display); font-size: 11px; color: var(--text); letter-spacing: 2px; }
.app-status { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: 1px; }

/* ══════════════ AI CORE ══════════════ */
.ai-core-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 20px; overflow: auto; }
.ai-orb-container { position: relative; width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; flex-direction: column; flex-shrink: 0; }
.ai-orb-ring { position: absolute; border-radius: 50%; border: 1px solid var(--cyan); opacity: 0.3; animation: spinRing 6s linear infinite; }
.or1 { width: 180px; height: 180px; animation-duration: 8s; }
.or2 { width: 140px; height: 140px; animation-direction: reverse; animation-duration: 5s; border-color: var(--cyan-glow); }
.or3 { width: 100px; height: 100px; animation-duration: 3s; border-style: dashed; }
.ai-orb { width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--cyan), var(--cyan-dim), var(--bg)); box-shadow: 0 0 30px var(--cyan), 0 0 60px var(--cyan-dim); display: flex; align-items: center; justify-content: center; animation: orbPulse 3s ease-in-out infinite; cursor: pointer; }
.ai-orb.speaking { animation: orbSpeak 0.3s ease-in-out infinite alternate; }
@keyframes orbPulse { 0%,100% { box-shadow: 0 0 30px var(--cyan), 0 0 60px var(--cyan-dim); } 50% { box-shadow: 0 0 50px var(--cyan), 0 0 100px var(--cyan-dim); } }
@keyframes orbSpeak { from { transform: scale(1); } to { transform: scale(1.15); } }
.ai-orb-inner { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--cyan)); opacity: 0.8; }
.ai-orb-label { margin-top: 12px; font-family: var(--font-display); font-size: 9px; color: var(--cyan); letter-spacing: 3px; }
.ai-panel { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 12px; }
.ai-panel-header { font-family: var(--font-display); font-size: 11px; color: var(--cyan); letter-spacing: 3px; }
.ai-chat { background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 14px; height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { display: flex; gap: 10px; animation: fadeIn 0.3s ease; }
.ai-msg-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--glass); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--cyan); }
.ai-msg-text { font-family: var(--font-ui); font-size: 13px; color: var(--text); line-height: 1.6; flex: 1; padding-top: 6px; }
.ai-msg-system .ai-msg-text { color: var(--text-dim); }
.ai-msg-user .ai-msg-avatar { background: var(--cyan-dim); }
.ai-msg-user .ai-msg-text { color: var(--cyan); }
.ai-input-row { display: flex; gap: 8px; }
.ai-input { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 10px 14px; font-family: var(--font-mono); font-size: 12px; color: var(--cyan); outline: none; transition: border 0.3s; }
.ai-input:focus { border-color: var(--cyan); }
.ai-send-btn, .ai-voice-btn { width: 42px; height: 42px; border-radius: var(--radius); border: 1px solid var(--cyan); background: var(--glass); color: var(--cyan); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.ai-send-btn:hover, .ai-voice-btn:hover { background: var(--cyan-dim); box-shadow: 0 0 10px var(--cyan); }
.ai-voice-btn.active { background: var(--neon-red); border-color: var(--neon-red); animation: pulse 0.6s infinite; }
.ai-voice-status { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); text-align: center; }

/* ══════════════ RADAR ══════════════ */
.radar-wrap { width: 100%; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.radar-title { font-family: var(--font-display); font-size: clamp(13px, 2.5vw, 18px); color: var(--cyan); letter-spacing: 4px; text-shadow: 0 0 15px var(--cyan); }
.radar-container { position: relative; }
#radarCanvas { border-radius: 50%; }
.radar-stats { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.r-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 20px; border: 1px solid var(--glass-border); border-radius: 8px; background: var(--glass); min-width: 90px; }
.r-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: 2px; }
.r-val { font-family: var(--font-display); font-size: 16px; color: var(--cyan); }
.threat-val { color: var(--neon-green) !important; }

/* ══════════════ FLOATING PANELS ══════════════ */
.float-panel { position: fixed; bottom: 70px; right: 16px; width: 300px; max-height: 400px; background: rgba(4,13,24,0.96); border: 1px solid var(--glass-border); border-radius: 12px; backdrop-filter: blur(20px); z-index: 50; overflow: hidden; box-shadow: 0 0 40px rgba(0,200,255,0.15); animation: panelIn 0.2s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.float-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(0,200,255,0.05); border-bottom: 1px solid var(--glass-border); font-family: var(--font-display); font-size: 11px; color: var(--cyan); letter-spacing: 2px; }
.float-orb { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: pulse 1s infinite; }
.float-close { margin-left: auto; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; transition: color 0.2s; }
.float-close:hover { color: var(--neon-red); }
.float-body { padding: 12px; overflow-y: auto; max-height: 300px; display: flex; flex-direction: column; gap: 8px; }
.float-msg { font-family: var(--font-ui); font-size: 13px; color: var(--text); padding: 8px; border-radius: 6px; background: rgba(0,0,0,0.2); display: flex; align-items: center; gap: 8px; }
.dot-active { color: var(--neon-green); } .dot-warn { color: var(--neon-orange); } .dot-info { color: var(--cyan); }
.settings-body { gap: 10px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-ui); font-size: 13px; color: var(--text-dim); padding: 6px 0; border-bottom: 1px solid var(--glass-border); cursor: pointer; }
.setting-row:last-child { border-bottom: none; }
.tog { -webkit-appearance: none; width: 36px; height: 18px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--glass-border); cursor: pointer; position: relative; transition: background 0.3s; }
.tog:checked { background: var(--cyan-dim); border-color: var(--cyan); }
.tog::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.tog:checked::after { transform: translateX(18px); }
input[type=range] { -webkit-appearance: none; width: 100px; height: 4px; background: var(--glass-border); border-radius: 2px; outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--cyan); cursor: pointer; }

/* ══════════════ VOICE INDICATOR ══════════════ */
.voice-indicator { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: rgba(4,13,24,0.95); border: 1px solid var(--cyan); border-radius: 50px; padding: 12px 24px; display: none; align-items: center; gap: 12px; z-index: 100; box-shadow: 0 0 30px rgba(0,200,255,0.3); animation: panelIn 0.2s ease; }
.voice-indicator.active { display: flex; }
.vi-ring { position: absolute; width: 100%; height: 100%; border-radius: 50px; border: 1px solid var(--cyan); opacity: 0.4; animation: viRing 1.5s ease-out infinite; }
.vi-ring2 { animation-delay: 0.75s; }
@keyframes viRing { to { transform: scale(1.2); opacity: 0; } }
.vi-icon { color: var(--cyan); font-size: 16px; position: relative; animation: pulse 0.8s infinite; }
.vi-text { font-family: var(--font-display); font-size: 11px; color: var(--cyan); letter-spacing: 3px; position: relative; }

/* ══════════════ TOAST ══════════════ */
.toast { position: fixed; top: 58px; right: 16px; z-index: 200; background: rgba(4,13,24,0.96); border: 1px solid var(--cyan); border-radius: 8px; padding: 10px 16px; font-family: var(--font-mono); font-size: 12px; color: var(--cyan); opacity: 0; transform: translateY(-10px); transition: all 0.3s; pointer-events: none; max-width: 300px; text-align: center; }
.toast.show { opacity: 1; transform: none; }
.toast.alert { border-color: var(--neon-red); color: var(--neon-red); }

/* ══════════════ HUD ══════════════ */
.scanlines { position: fixed; inset: 0; z-index: 999; pointer-events: none; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px); animation: scanlinesMove 8s linear infinite; }
@keyframes scanlinesMove { from { background-position: 0 0; } to { background-position: 0 100px; } }
.hud-corner { position: fixed; z-index: 8; width: 30px; height: 30px; pointer-events: none; border-color: var(--cyan-dim); border-style: solid; opacity: 0.4; }
.hud-tl { top: calc(var(--topbar-h) + 4px); left: calc(var(--sidebar-w) + 4px); border-width: 1px 0 0 1px; }
.hud-tr { top: calc(var(--topbar-h) + 4px); right: 4px; border-width: 1px 1px 0 0; }
.hud-bl { bottom: 4px; left: calc(var(--sidebar-w) + 4px); border-width: 0 0 1px 1px; }
.hud-br { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .dashboard-grid, .jarvis-grid { grid-template-columns: 1fr; padding: 10px; }
  .ai-core-wrap { padding: 16px; }
  .radar-container canvas { width: 280px; height: 280px; }
  .topbar-center { display: none; }
  .topbar-date { display: none; }
  .topbar-vitals-mini { display: none; }
  .float-panel { width: calc(100vw - 32px); right: 16px; }
  .launcher-apps { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
@media (max-width: 480px) {
  .vitals-grid { grid-template-columns: 1fr 1fr; }
  .radar-stats { gap: 10px; }
  .r-stat { padding: 8px 12px; min-width: 70px; }
  .legion-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Misc utility */
.typing-cursor::after { content: '█'; animation: blink 0.7s infinite; font-size: 0.9em; }
.glow-text { text-shadow: 0 0 15px var(--cyan), 0 0 30px var(--cyan-dim); }
