/* =========================================================
   SKYNET OS — Cyberdyne Systems
   ========================================================= */
:root {
  --red: #ff3326;
  --red-hi: #ff6a5c;
  --red-dim: #8f1510;
  --red-dark: #2a0504;
  --bg: #050000;
  --dos: #c8c8c8;
  --term: #ff4a3a;
  --glow: 0 0 6px rgba(255, 51, 38, .75), 0 0 18px rgba(255, 51, 38, .35);
  --mono: "VT323", "Share Tech Mono", "Courier New", monospace;
  --tech: "Share Tech Mono", "Consolas", monospace;
  --disp: "Orbitron", "Share Tech Mono", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: #000; color: var(--red);
  overflow: hidden;
  font-family: var(--tech);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- CRT ---------- */
#crt { position: fixed; inset: 0; background: #000; overflow: hidden; }
#screen { position: absolute; inset: 0; transform-origin: center; }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 9000; }
.scanlines {
  background: repeating-linear-gradient(to bottom,
    rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.28) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: multiply;
}
.scanbar {
  background: linear-gradient(to bottom, transparent 0%, rgba(255,60,40,.06) 48%, rgba(255,90,70,.10) 50%, transparent 52%);
  background-size: 100% 300%;
  animation: scanbar 7s linear infinite;
}
@keyframes scanbar { from { background-position: 0 100%; } to { background-position: 0 -200%; } }
.vignette { background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 85%, rgba(0,0,0,.9) 100%); }
.flicker { background: rgba(255, 40, 30, .025); animation: flicker .15s steps(2) infinite; }
@keyframes flicker { 0% { opacity: .2 } 50% { opacity: .8 } 100% { opacity: .4 } }

#crt.power-on #screen { animation: tvOn .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes tvOn {
  0%   { transform: scale(0, .004); filter: brightness(8); }
  35%  { transform: scale(1, .004); filter: brightness(8); }
  70%  { transform: scale(1, 1.04); filter: brightness(2); }
  100% { transform: scale(1, 1);   filter: none; }
}
#crt.power-off #screen { animation: tvOff .7s cubic-bezier(.6,0,.9,.4) both; }
@keyframes tvOff {
  0%   { transform: scale(1, 1);   filter: brightness(1); }
  45%  { transform: scale(1, .004); filter: brightness(6); }
  80%  { transform: scale(.002, .004); filter: brightness(10); }
  100% { transform: scale(0, 0); filter: brightness(0); }
}
#crt #screen.glitch { animation: glitch .6s steps(1) both; }
@keyframes glitch {
  0%   { transform: translate(0); filter: none; clip-path: inset(0); }
  10%  { transform: translate(-12px, 3px) skewX(8deg); filter: hue-rotate(40deg) saturate(3); clip-path: inset(20% 0 30% 0); }
  20%  { transform: translate(10px, -4px); filter: invert(1); clip-path: inset(60% 0 5% 0); }
  30%  { transform: translate(-4px, 0) scaleY(1.1); filter: brightness(3); clip-path: inset(0 0 70% 0); }
  45%  { transform: translate(14px, 2px) skewX(-10deg); filter: none; clip-path: inset(40% 0 40% 0); }
  60%  { transform: translate(-8px, 0); filter: contrast(3) brightness(2); clip-path: inset(10% 0 55% 0); }
  80%  { transform: translate(3px, -2px); filter: hue-rotate(-30deg); clip-path: inset(0); }
  100% { transform: none; filter: none; clip-path: none; }
}

.skip-btn {
  position: absolute; right: 18px; bottom: 16px; z-index: 9500;
  font-family: var(--tech); font-size: 13px; letter-spacing: 2px;
  color: rgba(255,80,60,.55); border: 1px solid rgba(255,80,60,.3);
  padding: 6px 12px; display: none;
}
.skip-btn:hover { color: var(--red); border-color: var(--red); }
.skip-btn.show { display: block; }

/* ---------- Stages ---------- */
.stage { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
.stage.active { opacity: 1; visibility: visible; transition: opacity .5s; }

/* ---------- Power ---------- */
#stage-power { display: grid; place-items: center; background: #000; cursor: pointer; }
.power-box { text-align: center; font-family: var(--mono); padding: 16px; }
.power-msg { color: #777; font-size: clamp(16px, 2.4vw, 22px); letter-spacing: 3px; margin-bottom: 26px; }
.power-btn { color: var(--red); font-size: clamp(22px, 4vw, 36px); text-shadow: var(--glow); animation: blink 1.1s steps(2) infinite; }
.power-hint { color: #444; font-size: 16px; margin-top: 22px; letter-spacing: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- BIOS ---------- */
#stage-bios { background: #000; padding: clamp(14px, 3vw, 40px); overflow: hidden; }
#bios {
  margin: 0; font-family: var(--mono); color: var(--dos);
  font-size: clamp(15px, 2.1vw, 23px); line-height: 1.18;
  white-space: pre-wrap; word-break: break-word;
  text-shadow: 0 0 4px rgba(220,220,220,.35);
}
#bios::after { content: "_"; animation: blink .8s steps(2) infinite; }
#bios .hl { color: #fff; }
#bios .ok { color: #6f6; }
#bios .red { color: var(--red); text-shadow: var(--glow); }
.bios-badge {
  position: absolute; right: clamp(14px, 3vw, 40px); top: clamp(14px, 3vw, 40px);
  width: clamp(60px, 9vw, 110px); fill: none; stroke: var(--red); stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(255,51,38,.6));
  animation: badgeIn 1.2s ease-out both;
}
@keyframes badgeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; } }

/* ---------- LOGO ---------- */
#stage-logo {
  background: radial-gradient(ellipse at 50% 45%, #1a0302 0%, #000 65%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.logo-wrap {
  position: relative;
  width: min(78vw, 56vh);
  aspect-ratio: 500 / 430;
  overflow: hidden;
}
.logo-slices { position: absolute; inset: 0; }
.slice {
  position: absolute; left: 0; width: 100%;
  background-image: url("../img/Skynet_logo.webp");
  background-repeat: no-repeat;
  opacity: 0;
  animation: sliceIn .7s cubic-bezier(.15,.85,.25,1) both;
  animation-delay: var(--d);
}
@keyframes sliceIn {
  0%   { opacity: 0; transform: translateX(var(--x)) scaleY(.15); filter: brightness(4) saturate(0); }
  55%  { opacity: 1; transform: translateX(calc(var(--x) * -0.04)) scaleY(1); filter: brightness(2.2); }
  100% { opacity: 1; transform: none; filter: none; }
}
.logo-wrap.assembled .slice { opacity: 1; }
.logo-wrap.assembled { animation: logoPulse 2.4s ease-in-out infinite; }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,40,30,0)); }
  50%      { filter: drop-shadow(0 0 22px rgba(255,40,30,.55)); }
}
.logo-wrap.jitter .slice:nth-child(3n) { animation: jitter .25s steps(2) 3; }
@keyframes jitter { 0% { transform: translateX(-14px); } 50% { transform: translateX(10px); } 100% { transform: none; } }
.logo-beam {
  position: absolute; left: -10%; right: -10%; height: 3px; top: -5%;
  background: linear-gradient(90deg, transparent, #ff6a5c, #fff, #ff6a5c, transparent);
  box-shadow: 0 0 22px 6px rgba(255,60,40,.6);
  opacity: 0;
}
.logo-wrap.sweep .logo-beam { animation: beam 1.3s ease-in-out forwards; }
@keyframes beam { 0% { top: -2%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 102%; opacity: 0; } }
.logo-tag {
  margin-top: 10px; min-height: 1.4em; padding: 0 16px; text-align: center;
  font-family: var(--tech); font-size: clamp(12px, 1.6vw, 16px); letter-spacing: 4px;
  color: var(--red-hi); text-shadow: var(--glow);
}

/* ---------- INIT (HUD rebuild) ---------- */
#stage-init { background: #0d0000; overflow: hidden; --hud: #ffd8d2; --hud-glow: 0 0 3px rgba(255,120,100,.95), 0 0 9px rgba(255,50,35,.55); }

/* out-of-focus machinery background */
.ini-bg {
  position: absolute; inset: -6%;
  background: radial-gradient(ellipse 60% 55% at 48% 50%, #6e0e0b 0%, #470706 40%, #220202 75%, #0c0000 100%);
}
.ini-board {
  position: absolute; left: 14%; top: -10%; width: 46%; height: 120%;
  transform: rotate(-24deg);
  background:
    repeating-linear-gradient(90deg, rgba(255,90,70,.16) 0 2.2%, rgba(0,0,0,.25) 2.2% 4.6%),
    linear-gradient(180deg, transparent, rgba(255,60,40,.12) 40%, transparent);
  filter: blur(13px);
  opacity: .55;
}
.ini-blob { position: absolute; border-radius: 50%; filter: blur(28px); }
.ini-blob.b1 { left: 64%; top: 12%; width: 9vw; height: 9vw; background: radial-gradient(circle, rgba(255,110,95,.55), transparent 65%); }
.ini-blob.b2 { left: 74%; top: 30%; width: 7vw; height: 7vw; background: radial-gradient(circle, rgba(255,90,80,.5), transparent 65%); }
.ini-blob.b3 { left: 80%; top: 78%; width: 16vw; height: 16vw; background: radial-gradient(circle, rgba(255,70,60,.35), transparent 65%); }
.ini-blob.b4 { left: 2%; top: 55%; width: 26vw; height: 18vw; border-radius: 30%; background: rgba(0,0,0,.55); }
.ini-blob.b5 { left: 30%; top: 70%; width: 30vw; height: 10vw; border-radius: 30%; background: rgba(120,10,8,.45); }
.ini-blob.b6 { left: 55%; top: -6%; width: 30vw; height: 14vw; border-radius: 40%; background: rgba(0,0,0,.45); }

/* the HUD layer */
.ini-hud {
  position: absolute; inset: 0;
  font-family: var(--tech); color: var(--hud); text-shadow: var(--hud-glow);
  font-size: clamp(7px, .92vw, 13px); line-height: 1.22; letter-spacing: .04em;
}
#stage-init.run .ini-bg  { animation: iniBg 11s ease-out both; }
#stage-init.run .ini-hud { animation: iniCam 11s cubic-bezier(.2,.6,.3,1) both, hudFlick 5s steps(1) 1s infinite; }
@keyframes iniBg  { 0% { opacity: 0; transform: scale(1.18) translateX(2%); filter: brightness(2); } 8% { opacity: 1; } 100% { transform: scale(1.04) translateX(-1%); filter: none; } }
@keyframes iniCam { 0% { transform: scale(1.07) translateX(-.6%); } 100% { transform: scale(1); } }
@keyframes hudFlick { 0%, 100% { opacity: 1; } 31% { opacity: .55; } 32% { opacity: 1; } 66% { opacity: .75; } 67% { opacity: 1; } 68% { opacity: .6; } 69% { opacity: 1; } }

/* crosshair grid */
.ini-crosses { position: absolute; inset: 0; }
.ini-crosses span {
  position: absolute; transform: translate(-50%, -50%); font-size: 1.2em; opacity: 0;
  color: rgba(255,215,208,.55); text-shadow: 0 0 4px rgba(255,80,60,.8);
}
#stage-init.run .ini-crosses span { animation: popX .35s var(--d) both; }
@keyframes popX { 0% { opacity: 0; transform: translate(-50%, -50%) scale(3); } 60% { opacity: 1; } 100% { opacity: .6; transform: translate(-50%, -50%) scale(1); } }

/* rulers */
.ruler { position: absolute; width: 3.2em; }
.rl-left  { left: 5.2%;  top: 7%; bottom: 9%; }
.rl-right { right: 5.2%; top: 5%; bottom: 11%; }
.rl-axis { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--hud); box-shadow: 0 0 5px #ff5040; transform-origin: top; }
.rl-left .rl-axis  { left: 2.2em; }
.rl-right .rl-axis { right: 2.2em; }
.rl-axis::before, .rl-axis::after { content: ""; position: absolute; width: .9em; height: 1px; background: var(--hud); }
.rl-axis::before { top: 0; }
.rl-axis::after { bottom: 0; }
.rl-left .rl-axis::before, .rl-left .rl-axis::after { left: 0; }
.rl-right .rl-axis::before, .rl-right .rl-axis::after { right: 0; }
.rl-ticks {
  position: absolute; top: 0; bottom: 0; width: .6em; transform-origin: top;
  background: repeating-linear-gradient(to bottom, var(--hud) 0 1px, transparent 1px 2.6%);
  opacity: .8;
}
.rl-left .rl-ticks  { left: 1.6em; }
.rl-right .rl-ticks { right: 1.6em; }
.rl-nums { position: absolute; left: 0; top: 14%; bottom: 8%; width: 1em; }
.rl-nums span { position: absolute; left: 0; transform: translateY(-50%); opacity: 0; }
.rl-nums span:nth-child(1) { top: 0%; }
.rl-nums span:nth-child(2) { top: 14.28%; }
.rl-nums span:nth-child(3) { top: 28.57%; }
.rl-nums span:nth-child(4) { top: 42.85%; }
.rl-nums span:nth-child(5) { top: 57.14%; }
.rl-nums span:nth-child(6) { top: 71.42%; }
.rl-nums span:nth-child(7) { top: 85.71%; }
.rl-nums span:nth-child(8) { top: 100%; }
.rl-inner {
  position: absolute; width: .7em; transform-origin: top;
  border: 1px solid var(--hud); box-shadow: 0 0 4px rgba(255,80,60,.7);
}
.rl-left .rl-inner  { left: 2.7em; border-right: 0; top: 66%; height: 22%; }
.rl-right .rl-inner { right: 2.7em; border-left: 0; top: 18%; height: 66%; }
.rl-mark, .rl-cap { position: absolute; font-style: normal; font-size: .9em; opacity: 0; }
.rl-left .rl-mark  { left: 2.5em; top: 70%; }
.rl-right .rl-mark { right: 2.5em; top: 30%; }
.rl-left .rl-cap   { left: 2.6em; top: -.6em; }
.rl-right .rl-cap  { right: 2.6em; top: -.6em; }

#stage-init.run .rl-axis  { animation: drawY .9s .35s cubic-bezier(.3,.8,.3,1) both; }
#stage-init.run .rl-ticks { animation: drawY 1.2s .55s cubic-bezier(.3,.8,.3,1) both; }
#stage-init.run .rl-inner { animation: drawY .6s 1.3s ease-out both; }
#stage-init.run .rl-nums span { animation: fadeNum .2s both; }
#stage-init.run .rl-nums span:nth-child(1) { animation-delay: .80s; }
#stage-init.run .rl-nums span:nth-child(2) { animation-delay: .87s; }
#stage-init.run .rl-nums span:nth-child(3) { animation-delay: .94s; }
#stage-init.run .rl-nums span:nth-child(4) { animation-delay: 1.01s; }
#stage-init.run .rl-nums span:nth-child(5) { animation-delay: 1.08s; }
#stage-init.run .rl-nums span:nth-child(6) { animation-delay: 1.15s; }
#stage-init.run .rl-nums span:nth-child(7) { animation-delay: 1.22s; }
#stage-init.run .rl-nums span:nth-child(8) { animation-delay: 1.29s; }
#stage-init.run .rl-cap  { animation: fadeNum .2s 1.4s both; }
#stage-init.run .rl-left .rl-mark  { animation: fadeNum .2s 1.5s both, markL 3.2s 1.5s ease-in-out infinite alternate; }
#stage-init.run .rl-right .rl-mark { animation: fadeNum .2s 1.5s both, markR 2.6s 1.5s ease-in-out infinite alternate; }
@keyframes drawY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeNum { 0% { opacity: 0; } 50% { opacity: 1; filter: brightness(3); } 100% { opacity: 1; } }
@keyframes markL { from { top: 66%; } to { top: 86%; } }
@keyframes markR { from { top: 18%; } to { top: 82%; } }

/* text blocks */
.ini-block { position: absolute; width: 14.5em; white-space: pre; }
.ini-block.tl { left: 9.6%; top: 13%; }
.ini-block.bl { left: 9.6%; bottom: 6.5%; width: 9em; }
.ini-block.tr { right: 9.2%; top: 13%; }
.ini-block .ln { display: flex; justify-content: space-between; gap: 1em; min-height: 1.22em; }
.ini-block .ln.h { justify-content: flex-end; margin-bottom: .25em; }
.ini-block .ln.c { justify-content: center; }
.ini-block .ln.r { justify-content: flex-end; }
.ini-block .ln.stars { letter-spacing: .12em; overflow: hidden; margin: .25em 0 .5em; }
.ini-block .ln.new { animation: lnIn .25s ease-out; }
@keyframes lnIn { 0% { opacity: 0; filter: brightness(3); transform: translateX(-.4em); } 100% { opacity: 1; } }

/* center */
.ini-center {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
}
.ini-logo { width: clamp(130px, 17vw, 260px); overflow: visible; filter: drop-shadow(0 0 4px rgba(255,140,120,.9)) drop-shadow(0 0 14px rgba(255,50,35,.5)); }
.ini-logo rect { fill: #ffe6e1; transform-box: fill-box; transform-origin: center; transform: scaleX(0); opacity: 0; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .15s; }
.ini-logo rect.on { transform: none; opacity: 1; }
.ini-box {
  margin-top: clamp(8px, 1.2vw, 16px);
  padding: .28em .9em .22em;
  font-family: var(--disp); font-weight: 500; letter-spacing: .14em; white-space: pre;
  font-size: clamp(12px, 1.75vw, 24px); color: #fff;
  border: 2px solid #ffe3de; background: rgba(255,170,160,.16);
  text-shadow: 0 0 4px #fff, 0 0 10px #ff5a48;
  box-shadow: 0 0 10px rgba(255,110,95,.9), 0 0 26px rgba(255,50,35,.5), inset 0 0 12px rgba(255,140,120,.5);
  transform: scaleX(0); opacity: 0;
}
.ini-box.open { animation: boxOpen .55s cubic-bezier(.2,.9,.25,1) forwards; }
.ini-box.flick { animation: boxFlick .7s steps(1) forwards; }
@keyframes boxOpen { 0% { transform: scale(0, .08); opacity: 1; filter: brightness(4); } 45% { transform: scale(1, .08); opacity: 1; filter: brightness(3); } 100% { transform: none; opacity: 1; filter: none; } }
@keyframes boxFlick { 0% { opacity: 1; transform: none; } 15% { opacity: .15; } 25% { opacity: 1; filter: brightness(2); } 45% { opacity: .3; } 55% { opacity: 1; } 100% { opacity: 1; transform: none; filter: none; } }
.ini-kernel {
  margin-top: clamp(8px, 1vw, 14px);
  font-size: clamp(9px, 1.05vw, 15px); letter-spacing: .12em; white-space: pre;
}
.ini-kernel.blink { animation: blink 1.2s steps(2) infinite; }

@media (max-width: 720px) {
  .ini-block.tr { top: auto; bottom: 8%; }
  .ini-block.bl { display: none; }
}

.init-online {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--disp); font-weight: 900; letter-spacing: .3em;
  font-size: clamp(26px, 6vw, 72px); color: #fff;
  text-shadow: 0 0 12px #ff3326, 0 0 40px #ff3326, 0 0 80px #ff3326;
  background: rgba(60,0,0,.6);
  opacity: 0; pointer-events: none;
}
.init-online.show { animation: online 1.4s ease-out forwards; }
@keyframes online {
  0% { opacity: 0; transform: scale(1.6); } 15% { opacity: 1; transform: scale(1); }
  25% { opacity: .3; } 32% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; }
}

/* ---------- DESKTOP ---------- */
#stage-desktop { background: var(--bg); font-family: var(--tech); }
.wallpaper { position: absolute; inset: 0; overflow: hidden;
  background:
    linear-gradient(rgba(10,0,0,.82), rgba(5,0,0,.92)),
    url("../img/Tg-originalt800-film-hudreboot.webp") center / cover no-repeat;
}
.wp-grid {
  position: absolute; inset: -40px;
  background-image:
    linear-gradient(rgba(255,51,38,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,51,38,.07) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove { to { transform: translate(40px, 40px); } }
.wp-logo {
  position: absolute; left: 50%; top: 50%; width: min(50vw, 420px); aspect-ratio: 500/430;
  transform: translate(-50%, -50%);
  background: url("../img/Skynet_logo.webp") top / 100% auto no-repeat;
  opacity: .1; filter: grayscale(.2);
}

.topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 34px; z-index: 50;
  display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: linear-gradient(#1c0302, #0b0101);
  border-bottom: 1px solid var(--red-dim);
  box-shadow: 0 0 16px rgba(255,40,30,.25);
  font-size: 13px; letter-spacing: 2px;
}
.tb-left { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tb-left b { font-family: var(--disp); letter-spacing: 3px; color: #eee; }
.tb-left span { color: var(--red-dim); }
.tri { width: 22px; fill: var(--red); filter: drop-shadow(0 0 4px var(--red)); }
.tb-center { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker { white-space: nowrap; display: inline-block; padding-left: 100%; animation: ticker 38s linear infinite; color: var(--red-hi); }
@keyframes ticker { to { transform: translateX(-100%); } }
.tb-right { display: flex; gap: 14px; white-space: nowrap; color: #ddd; }
.defcon { color: var(--red); animation: blink 1.6s steps(2) infinite; }

.icons {
  position: absolute; top: 50px; left: 14px; bottom: 56px; z-index: 5;
  display: flex; flex-direction: column; flex-wrap: wrap; gap: 10px; align-content: flex-start;
}
.icon {
  width: 92px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid transparent; font-size: 11px; letter-spacing: 1px; color: #f3c9c4;
}
.icon svg { width: 44px; height: 44px; fill: none; stroke: var(--red); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(255,51,38,.6)); }
.icon svg .fill { fill: var(--red); }
.icon:hover, .icon:focus-visible { border-color: var(--red-dim); background: rgba(255,51,38,.08); outline: none; }
.icon:hover svg { stroke: var(--red-hi); }

.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42px; z-index: 60;
  display: flex; align-items: center; gap: 8px; padding: 0 8px;
  background: linear-gradient(#120201, #070000);
  border-top: 1px solid var(--red-dim);
  box-shadow: 0 0 18px rgba(255,40,30,.25);
}
.start {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  font-family: var(--disp); font-weight: 700; letter-spacing: 3px; font-size: 12px; color: #eee;
  border: 1px solid var(--red-dim); background: rgba(255,51,38,.1);
}
.start svg { width: 20px; fill: var(--red); }
.start:hover, .start.open { background: rgba(255,51,38,.25); border-color: var(--red); }
.task-items { flex: 1; display: flex; gap: 6px; overflow: hidden; }
.task-item {
  height: 30px; padding: 0 12px; max-width: 170px; font-size: 12px; letter-spacing: 1px;
  border: 1px solid rgba(255,51,38,.25); color: #e9b5af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: taskIn .3s ease-out;
}
.task-item.active { border-color: var(--red); background: rgba(255,51,38,.15); color: #fff; }
.task-item.min { opacity: .55; }
@keyframes taskIn { from { transform: translateY(20px); opacity: 0; } }
.tray { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #ddd; padding-left: 8px; border-left: 1px solid var(--red-dim); }
.tray button { font-size: 11px; color: var(--red-hi); letter-spacing: 1px; }
.tray-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1s steps(2) infinite; }

.startmenu {
  position: absolute; left: 8px; bottom: 48px; z-index: 70; width: 240px;
  background: rgba(14,1,1,.96); border: 1px solid var(--red);
  box-shadow: 0 0 30px rgba(255,40,30,.35);
  display: none; flex-direction: column; padding-bottom: 6px;
  transform-origin: bottom left;
}
.startmenu.open { display: flex; animation: menuIn .2s ease-out; }
@keyframes menuIn { from { transform: scaleY(.2); opacity: 0; } }
.sm-head {
  font-family: var(--disp); font-weight: 900; letter-spacing: 6px; font-size: 18px; color: #eee;
  padding: 14px 14px 10px; background: linear-gradient(90deg, rgba(255,51,38,.35), transparent);
  margin-bottom: 6px;
}
.sm-head small { display: block; font-family: var(--tech); font-weight: 400; font-size: 9px; letter-spacing: 2px; color: var(--red-hi); margin-top: 3px; }
.startmenu button { text-align: left; padding: 8px 16px; font-size: 14px; color: #f0c4be; letter-spacing: 1px; }
.startmenu button:hover { background: rgba(255,51,38,.22); color: #fff; }
.startmenu hr { border: 0; border-top: 1px solid var(--red-dim); margin: 6px 10px; width: auto; }

/* Desktop build-up animation */
#stage-desktop.booting .wallpaper { animation: fadeIn 1s ease-out both; }
#stage-desktop.booting .topbar { animation: slideDown .6s .4s cubic-bezier(.2,.9,.3,1.2) both; }
#stage-desktop.booting .taskbar { animation: slideUp .6s .55s cubic-bezier(.2,.9,.3,1.2) both; }
#stage-desktop.booting .icon { animation: iconIn .45s cubic-bezier(.2,.9,.3,1.3) both; }
#stage-desktop.booting .icon:nth-child(1) { animation-delay: .9s; }
#stage-desktop.booting .icon:nth-child(2) { animation-delay: 1.0s; }
#stage-desktop.booting .icon:nth-child(3) { animation-delay: 1.1s; }
#stage-desktop.booting .icon:nth-child(4) { animation-delay: 1.2s; }
#stage-desktop.booting .icon:nth-child(5) { animation-delay: 1.3s; }
@keyframes fadeIn { from { opacity: 0; filter: brightness(3); } }
@keyframes slideDown { from { transform: translateY(-100%); } }
@keyframes slideUp { from { transform: translateY(100%); } }
@keyframes iconIn { 0% { opacity: 0; transform: scale(.3); filter: brightness(4); } 100% { opacity: 1; transform: none; } }

/* ---------- Windows ---------- */
#windows { position: absolute; inset: 34px 0 42px 0; z-index: 20; pointer-events: none; }
.window {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column;
  min-width: 260px; min-height: 160px;
  background: rgba(8,0,0,.94);
  border: 1px solid var(--red-dim);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 10px 40px rgba(0,0,0,.7), 0 0 20px rgba(255,40,30,.15);
  resize: both; overflow: hidden;
}
.window.focused { border-color: var(--red); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 14px 50px rgba(0,0,0,.8), 0 0 28px rgba(255,40,30,.35); }
.window.opening { animation: winOpen .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes winOpen {
  0%   { transform: scale(.02, .004); opacity: 0; filter: brightness(5); }
  40%  { transform: scale(1, .004); opacity: 1; filter: brightness(4); }
  100% { transform: none; filter: none; }
}
.window.closing { animation: winClose .3s ease-in both; pointer-events: none; }
@keyframes winClose { 0% { transform: none; } 60% { transform: scale(1, .004); filter: brightness(4); opacity: 1; } 100% { transform: scale(0, .004); opacity: 0; } }
.window.minimized { display: none; }
.window.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; resize: none; }

.win-title {
  height: 28px; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 10px;
  background: linear-gradient(90deg, #4a0806, #1e0201 70%);
  border-bottom: 1px solid var(--red-dim);
  cursor: move; user-select: none; touch-action: none;
  font-size: 12px; letter-spacing: 2px; color: #f6d6d2;
}
.window:not(.focused) .win-title { background: linear-gradient(90deg, #220302, #110101 70%); color: #a77; }
.win-title .t { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-title .t::before { content: "▲ "; color: var(--red); }
.win-btns { display: flex; gap: 4px; }
.win-btns button {
  width: 22px; height: 18px; line-height: 16px; font-size: 12px; text-align: center;
  border: 1px solid var(--red-dim); color: #f0bdb7;
}
.win-btns button:hover { background: var(--red); color: #000; border-color: var(--red); }
.win-body { flex: 1; position: relative; overflow: hidden; }

/* ---------- Terminal ---------- */
.term {
  position: absolute; inset: 0; padding: 10px 12px; overflow-y: auto;
  font-family: var(--mono); font-size: 20px; line-height: 1.15; color: var(--term);
  text-shadow: 0 0 5px color-mix(in srgb, var(--term) 70%, transparent);
  cursor: text;
  scrollbar-width: thin; scrollbar-color: var(--red-dim) transparent;
}
.term-out { white-space: pre-wrap; word-break: break-word; }
.term-out .dim { opacity: .55; }
.term-out .hi { color: #fff; text-shadow: 0 0 6px var(--term); }
.term-out .err { color: #ff9a2e; }
.term-out .ok { color: #7dff7a; text-shadow: 0 0 5px rgba(120,255,120,.5); }
.term-out .big { font-family: var(--disp); font-weight: 900; letter-spacing: 6px; font-size: 26px; }
.term-line { display: flex; white-space: pre-wrap; word-break: break-all; }
.term-line.hidden { visibility: hidden; }
.term-line .prompt { flex: 0 0 auto; }
.term-line .ti { flex: 1; }
.term .cur { background: var(--term); color: #000; text-shadow: none; animation: blink 1s steps(2) infinite; }
.term:not(.has-focus) .cur { background: transparent; outline: 1px solid var(--term); animation: none; }
.term-input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; }

/* ---------- Monitor / Network ---------- */
.mon { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; padding: 10px; gap: 8px; font-size: 12px; color: #f3c9c4; }
.mon-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.mon-stat { border: 1px solid rgba(255,51,38,.3); padding: 6px 8px; }
.mon-stat b { display: block; font-family: var(--disp); font-size: 18px; color: var(--red); text-shadow: var(--glow); }
.mon canvas, .net canvas { width: 100%; height: 100%; display: block; border: 1px solid rgba(255,51,38,.25); }
.net { position: absolute; inset: 0; padding: 10px; display: grid; grid-template-rows: 1fr auto; gap: 6px; }
.net-info { font-size: 12px; letter-spacing: 1px; color: #f3c9c4; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.net-info b { color: var(--red); }

/* ---------- Viewer ---------- */
.viewer { position: absolute; inset: 0; background: #000; display: grid; place-items: center; }
.viewer img { width: 100%; height: 100%; object-fit: contain; }
.viewer.cover img { object-fit: cover; }
.viewer .vlabel {
  position: absolute; left: 10px; top: 8px; font-size: 11px; letter-spacing: 2px; color: #ffd9d4;
  text-shadow: 0 0 6px #ff3326; background: rgba(0,0,0,.4); padding: 2px 6px;
}
.viewer .rec::before { content: "● "; color: var(--red); animation: blink 1s steps(2) infinite; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .tb-center { display: none; }
  .tb-left span { display: none; }
  .icons { flex-direction: row; bottom: auto; right: 14px; }
  .icon { width: 74px; font-size: 9px; }
  .icon svg { width: 34px; height: 34px; }
  .window { left: 6px !important; width: calc(100% - 12px) !important; resize: none; }
  .term { font-size: 18px; }
  .task-item { max-width: 90px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .scanbar, .flicker, .wp-grid, .ticker { animation: none; }
}

/* =========================================================
   EXTRA APPS
   ========================================================= */
.startmenu { max-height: calc(100vh - 100px); overflow-y: auto; }
#stage-desktop.booting .icon:nth-child(6)  { animation-delay: 1.4s; }
#stage-desktop.booting .icon:nth-child(7)  { animation-delay: 1.5s; }
#stage-desktop.booting .icon:nth-child(8)  { animation-delay: 1.6s; }
#stage-desktop.booting .icon:nth-child(9)  { animation-delay: 1.7s; }
#stage-desktop.booting .icon:nth-child(10) { animation-delay: 1.8s; }
#stage-desktop.booting .icon:nth-child(11) { animation-delay: 1.9s; }
.hidden { display: none !important; }

.chip {
  font-family: var(--tech); font-size: 12px; letter-spacing: 1px; color: #f6d6d2;
  border: 1px solid var(--red-dim); background: rgba(255,51,38,.08); padding: 5px 10px;
  transition: background .15s, border-color .15s;
}
.chip:hover { background: rgba(255,51,38,.28); border-color: var(--red); color: #fff; }
.chip.big { font-size: 15px; padding: 9px 18px; letter-spacing: 2px; }

/* ---- Chat ---- */
.chat { position: absolute; inset: 0; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid rgba(255,51,38,.3); background: linear-gradient(90deg, rgba(255,51,38,.12), transparent); }
.chat-id { flex: 1; display: flex; flex-direction: column; }
.chat-id b { font-family: var(--disp); letter-spacing: 4px; color: #fff; }
.chat-id small { font-size: 10px; letter-spacing: 2px; color: var(--red-hi); }
.eye { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--red-dim); display: grid; place-items: center; background: radial-gradient(circle, #300, #000); }
.eye i { width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red), 0 0 22px var(--red); animation: eyeIdle 3s ease-in-out infinite; }
.eye.think i { animation: eyeThink .3s steps(2) infinite; }
.eye.talk i { animation: eyeTalk .18s ease-in-out infinite alternate; }
@keyframes eyeIdle { 50% { transform: scale(.75); opacity: .7; } }
@keyframes eyeThink { 50% { opacity: .2; } }
@keyframes eyeTalk { to { transform: scale(1.5); background: #ffb0a8; } }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--red-dim) transparent; }
.msg { max-width: 85%; padding: 7px 11px; font-size: 14px; line-height: 1.35; border: 1px solid; animation: lnIn .25s ease-out; }
.msg .who { display: block; font-size: 9px; letter-spacing: 2px; opacity: .65; margin-bottom: 3px; }
.msg.ai { align-self: flex-start; border-color: var(--red-dim); background: rgba(255,51,38,.1); color: #ffd8d2; text-shadow: 0 0 5px rgba(255,60,40,.6); }
.msg.me { align-self: flex-end; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: #ddd; }
.txt.dots::after { content: "▮"; animation: blink .5s steps(2) infinite; }
.chat-sugg { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.chat-sugg button { flex: 0 0 auto; font-size: 11px; color: #e9b5af; border: 1px solid rgba(255,51,38,.3); padding: 4px 8px; border-radius: 12px; }
.chat-sugg button:hover { border-color: var(--red); color: #fff; }
.chat-form { display: flex; border-top: 1px solid rgba(255,51,38,.3); }
.chat-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; padding: 12px; font: 16px var(--tech); color: #fff; }
.chat-form input::placeholder { color: rgba(255,180,170,.4); }
.chat-form button { padding: 0 18px; font-family: var(--disp); letter-spacing: 2px; font-size: 12px; color: #fff; background: rgba(255,51,38,.25); border-left: 1px solid var(--red-dim); }
.chat-form button:hover { background: var(--red); }

/* ---- Optic ---- */
.optic { position: absolute; inset: 0; background: #100000; }
.op-view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.op-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(10,0,0,.6); text-align: center; padding: 16px; }
.op-title { font-family: var(--disp); letter-spacing: 4px; color: #fff; text-shadow: var(--glow); font-size: clamp(14px, 2vw, 20px); }
.op-start small { font-size: 11px; color: rgba(255,200,190,.6); }
.op-report {
  position: absolute; left: 14px; bottom: 50px; min-width: 260px; padding: 10px 12px;
  font-family: var(--tech); font-size: 12px; line-height: 1.35; white-space: pre; color: #fff;
  text-shadow: 0 0 6px #ff3326; background: rgba(40,0,0,.55); border: 1px solid rgba(255,220,215,.5);
  opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.op-report.show { opacity: 1; transform: none; }
.op-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.op-motion { margin-left: auto; font-size: 12px; color: #ffd8d2; letter-spacing: 1px; }
.op-motion b { color: #fff; }

/* ---- Perimeter game ---- */
.game { position: absolute; inset: 0; background: #080000; }
.game canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.game-hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 12px; letter-spacing: 1px; color: #f3c9c4; pointer-events: none; flex-wrap: wrap; }
.game-hud b { color: #fff; text-shadow: var(--glow); }
.game-hud .hp { color: var(--red); letter-spacing: 0; }
.game-ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px; background: rgba(8,0,0,.78); }
.game-ov h2 { margin: 0; font-family: var(--disp); font-weight: 900; letter-spacing: 6px; color: #fff; text-shadow: 0 0 10px var(--red), 0 0 30px var(--red); font-size: clamp(18px, 3vw, 30px); }
.game-ov p { margin: 0; color: #f3c9c4; font-size: 14px; line-height: 1.6; }
.game-ov p b { color: #fff; }

/* ---- Neural ---- */
.neural { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; }
.neural .nn { width: 100%; height: 100%; display: block; min-height: 0; }
.nn-panel { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-top: 1px solid rgba(255,51,38,.3); font-size: 11px; color: #f3c9c4; letter-spacing: 1px; }
.nn-stats { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.nn-stats b { color: #fff; }
.nn-loss { width: 100%; height: 46px; display: block; }
.nn-aware { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.nn-aware b { color: var(--red); text-shadow: var(--glow); font-family: var(--disp); }
.nn-bar { height: 8px; border: 1px solid var(--red-dim); }
.nn-bar i { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 8px var(--red); transition: width .1s; }
.nn-btns { display: flex; flex-direction: column; gap: 6px; }
.nn-msg { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-family: var(--disp); font-weight: 700; letter-spacing: 4px; color: #fff; text-shadow: 0 0 10px var(--red), 0 0 30px var(--red); font-size: clamp(14px, 2.4vw, 24px); line-height: 1.6; pointer-events: none; opacity: 0; }
.nn-msg.show { opacity: 1; }
@media (max-width: 720px) { .nn-panel { grid-template-columns: 1fr 1fr; } .nn-loss { grid-column: 1 / -1; } }

/* ---- Sigint ---- */
.sig { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto auto 90px; }
.sig canvas { width: 100%; height: 100%; display: block; min-height: 0; }
.sig-ctrl { display: flex; gap: 6px; align-items: center; padding: 8px 10px; flex-wrap: wrap; border-top: 1px solid rgba(255,51,38,.3); }
.sig-freq { margin-left: auto; font-size: 12px; color: #f3c9c4; }
.sig-freq b { color: #fff; text-shadow: var(--glow); }
.sig-keys { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 0 10px 8px; }
.sig-keys button { height: 46px; border: 1px solid var(--red-dim); background: linear-gradient(#2a0403, #120101); display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; }
.sig-keys button b { font-family: var(--disp); color: #fff; font-size: 14px; }
.sig-keys button small { font-size: 9px; color: rgba(255,200,190,.6); }
.sig-keys button.on { background: var(--red); box-shadow: 0 0 18px var(--red); }
.sig-keys button.on small { color: #000; }
.sig-log { overflow-y: auto; padding: 6px 10px; font-size: 11px; line-height: 1.4; color: #ffd8d2; background: rgba(0,0,0,.35); border-top: 1px solid rgba(255,51,38,.3); scrollbar-width: thin; scrollbar-color: var(--red-dim) transparent; }

/* ---- World Monitor ---- */
.wmon { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 320px; grid-template-rows: minmax(0, 1fr) 28px; background: #050000; font-size: 11px; }
.wm-map { position: relative; overflow: hidden; min-width: 0; }
.wm-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.wm-map canvas.drag { cursor: grabbing; }
.wm-map canvas.hot { cursor: pointer; }
.wm-map button, .wm-side button { font: inherit; }
.wm-hud { position: absolute; left: 10px; top: 8px; display: flex; flex-direction: column; gap: 3px; letter-spacing: 1px; color: #f3c9c4; pointer-events: none; text-shadow: 0 0 4px #000; }
.wm-hud b { font-family: var(--disp); font-size: 12px; letter-spacing: 3px; color: #fff; text-shadow: var(--glow); }
.wm-up { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: rgba(255,200,190,.6); }
.wm-up i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; border: 1px solid rgba(255,51,38,.5); vertical-align: 0; }
.wm-up i.ok { background: var(--red); border-color: var(--red); box-shadow: 0 0 6px var(--red); }
.wm-up i.stale { background: #7a1812; }
.wm-up i.err { animation: blink 1s steps(2) infinite; border-color: #fff; }
.wm-bar { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.wm-modes, .wm-chips { display: flex; }
.wm-chips { gap: 4px; }
.wm-modes button, .wm-chips button, .wm-layers button, .wm-zoom button { background: rgba(8,0,0,.85); border: 1px solid rgba(255,51,38,.3); color: rgba(255,200,190,.6); letter-spacing: 2px; }
.wm-modes button { padding: 6px 16px; font-size: 11px; }
.wm-modes button + button { border-left: 0; }
.wm-modes button.on { color: #fff; border-color: var(--red); background: rgba(255,51,38,.2); box-shadow: inset 0 0 10px rgba(255,51,38,.35); }
.wm-layers { position: absolute; left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 3px; }
.wm-chips button, .wm-layers button { display: flex; align-items: center; gap: 8px; padding: 5px 9px; font-size: 10px; text-align: left; }
.wm-layers button { min-width: 150px; }
.wm-layers button span { flex: 1; }
.wm-chips b { color: rgba(255,200,190,.5); font-weight: normal; }
.wm-chips button.on b { color: #fff; }
.wm-chips button i, .wm-layers button i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(255,51,38,.6); }
.wm-chips button.on, .wm-layers button.on { color: #fff; border-color: rgba(255,51,38,.6); }
.wm-chips button.on { background: rgba(255,51,38,.16); }
.wm-chips button.on i, .wm-layers button.on i { background: var(--red); box-shadow: 0 0 6px var(--red); }
.wm-ports { display: flex; flex-direction: column; gap: 3px; }
.wm-port { display: grid; grid-template-columns: 44px 62px 1fr 64px; align-items: center; gap: 6px; font-size: 10px; }
.wm-port b { color: #fff; font-weight: normal; font-size: 11px; }
.wm-port span { color: rgba(255,200,190,.55); letter-spacing: 1px; }
.wm-port i { height: 5px; background: rgba(255,51,38,.12); }
.wm-port s { display: block; height: 100%; background: var(--red); box-shadow: 0 0 6px var(--red); }
.wm-port em { font-style: normal; text-align: right; color: rgba(255,216,210,.8); }
.wm-infocon { font-weight: normal; padding: 1px 6px; border: 1px solid currentColor; }
.wm-infocon.green { color: #9dff9d; } .wm-infocon.yellow { color: #ffe066; } .wm-infocon.orange { color: #ffa040; } .wm-infocon.red { color: #ff3326; background: rgba(255,51,38,.2); }
.wmon:not(.globe) .wm-spin { display: none; }
.wm-cybermap { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; padding-top: 44px; background: #050000; }
.wm-cybermap iframe { flex: 1; width: 100%; border: 0; border-top: 1px solid rgba(255,51,38,.3); background: #000; }
.wm-cybermap iframe.tint { filter: grayscale(1) sepia(1) hue-rotate(-38deg) saturate(5) brightness(.9) contrast(1.1); }
.wm-cm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 10px; font-size: 10px; letter-spacing: 1px; color: rgba(255,200,190,.55); border-top: 1px solid rgba(255,51,38,.3); }
.wm-cm-bar span { flex: 1; }
.wm-cm-main { flex: 1; min-height: 0; display: flex; }
.wm-cm-bar a { color: var(--red-hi); text-decoration: none; letter-spacing: 2px; }
.wm-cm-bar a:hover { color: #fff; }
.wmon.cybermap .wm-bar { z-index: 2; }
.wmon.cybermap .wm-chips { visibility: hidden; }
.wmon.cybermap .wm-layers, .wmon.cybermap .wm-zoom, .wmon.cybermap .wm-card, .wmon.cybermap .wm-tip, .wmon.cybermap .wm-hud { display: none; }
.wm-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.wm-zoom div { display: flex; gap: 3px; }
.wm-zoom button { width: 30px; height: 26px; font-size: 15px; color: #fff; letter-spacing: 0; }
.wm-modes button:hover, .wm-layers button:hover, .wm-zoom button:hover { background: rgba(255,51,38,.22); }
.wm-coord { min-width: 170px; padding: 4px 8px; text-align: right; font-size: 10px; letter-spacing: 1px; color: rgba(255,215,208,.75); background: rgba(8,0,0,.85); border: 1px solid rgba(255,51,38,.25); }
.wm-tip { position: absolute; z-index: 3; max-width: 280px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; background: rgba(6,0,0,.94); border: 1px solid var(--red-dim); box-shadow: 0 0 14px rgba(255,51,38,.3); pointer-events: none; }
.wm-tip small { font-size: 9px; letter-spacing: 2px; color: var(--red-hi); }
.wm-tip b { color: #fff; font-weight: normal; font-size: 12px; }
.wm-tip span { font-size: 10px; color: rgba(255,200,190,.65); }
.wm-card { position: absolute; z-index: 2; right: 10px; top: 10px; width: min(340px, calc(100% - 20px)); max-height: calc(100% - 80px); display: flex; flex-direction: column; background: rgba(7,0,0,.95); border: 1px solid var(--red-dim); box-shadow: 0 0 24px rgba(255,51,38,.25); animation: fadeIn .2s both; }
.wm-card-h { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid rgba(255,51,38,.3); font-size: 10px; letter-spacing: 2px; color: var(--red-hi); }
.wm-card-h button { margin-left: auto; font-size: 15px; color: #f3c9c4; }
.wm-card-h button:hover { color: #fff; }
.wm-card-b { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; scrollbar-color: var(--red-dim) transparent; }
.wm-card h3 { margin: 0; font-size: 19px; font-weight: normal; color: #fff; }
.wm-card h3 small { margin-left: 8px; font-size: 11px; color: rgba(255,200,190,.6); }
.wm-card h4 { margin: 4px 0 0; font-size: 10px; font-weight: normal; letter-spacing: 2px; color: var(--red-hi); }
.wm-mono { font-size: 10px; letter-spacing: 1px; color: rgba(255,200,190,.6); }
.wm-kv { display: grid; grid-template-columns: 100px 1fr; gap: 6px; }
.wm-kv span { font-size: 10px; letter-spacing: 1px; color: rgba(255,200,190,.55); }
.wm-kv b { font-weight: normal; color: #ffd8d2; }
.wm-meter { height: 4px; background: rgba(255,51,38,.15); }
.wm-meter i { display: block; height: 100%; background: var(--red); box-shadow: 0 0 6px var(--red); }
.wm-disc { margin: 4px 0 0; font-size: 10px; line-height: 1.5; color: rgba(255,200,190,.42); }
.wm-link { align-self: flex-start; font-size: 10px; letter-spacing: 2px; color: var(--red-hi); text-decoration: none; border-bottom: 1px dotted var(--red-dim); }
.wm-link:hover { color: #fff; }
.wm-links { display: flex; flex-wrap: wrap; gap: 14px; }
.wm-follow { align-self: flex-start; }
.wm-follow.on { background: var(--red); color: #000; }
.wm-badge { display: inline-block; margin-right: 4px; padding: 2px 5px; font-style: normal; font-size: 9px; letter-spacing: 1px; color: #f3c9c4; border: 1px solid rgba(255,200,190,.3); }
.wm-badge.lv-high { background: var(--red); border-color: var(--red); color: #000; }
.wm-badge.lv-elevated { border-color: var(--red); color: var(--red-hi); }
.wm-badge.lv-moderate { border-color: rgba(255,51,38,.35); color: rgba(255,180,170,.7); }
.wm-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; font-style: normal; }
.wm-dot.lv-high { background: var(--red); box-shadow: 0 0 8px var(--red); }
.wm-dot.lv-elevated { background: #b3261b; }
.wm-dot.lv-moderate { background: #4d110c; border: 1px solid #a8231b; }
.wm-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid rgba(255,51,38,.3); background: rgba(10,0,0,.6); }
.wm-tabs { flex: none; display: flex; border-bottom: 1px solid rgba(255,51,38,.3); }
.wm-tabs button { flex: 1; padding: 8px 2px; font-size: 10px; letter-spacing: 1px; color: #f3c9c4; border-right: 1px solid rgba(255,51,38,.2); }
.wm-tabs button:last-child { border-right: 0; }
.wm-tabs button:hover { background: rgba(255,51,38,.1); }
.wm-tabs button.active { color: #fff; background: rgba(255,51,38,.18); box-shadow: inset 0 -2px 0 var(--red); }
.wm-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: var(--red-dim) transparent; }
.wm-sec { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 10px; letter-spacing: 2px; color: rgba(255,200,190,.55); }
.wm-lv { display: flex; gap: 12px; font-size: 10px; letter-spacing: 1px; }
.wm-lv .h { color: var(--red-hi); text-shadow: var(--glow); }
.wm-lv .e { color: #e0473a; }
.wm-lv .o { color: rgba(255,200,190,.55); }
.wm-search { width: 100%; padding: 6px 8px; font: inherit; font-size: 11px; letter-spacing: 1px; color: #fff; background: rgba(0,0,0,.5); border: 1px solid rgba(255,51,38,.35); outline: none; }
.wm-search:focus { border-color: var(--red); }
.wm-top { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; }
.wm-top button { width: 100%; display: grid; grid-template-columns: 14px 9px 1fr auto; align-items: center; gap: 6px; padding: 4px 3px; text-align: left; color: #ffd8d2; }
.wm-top button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-top small { color: rgba(255,200,190,.45); }
.wm-top em { font-style: normal; font-size: 9px; letter-spacing: 1px; color: var(--red-hi); }
.wm-list { display: flex; flex-direction: column; gap: 5px; }
.wm-item { display: block; width: 100%; padding: 7px 8px; text-align: left; color: #ffd8d2; background: rgba(255,51,38,.03); border: 1px solid rgba(255,51,38,.15); }
.wm-item:hover, .wm-top button:hover { background: rgba(255,51,38,.12); border-color: rgba(255,51,38,.4); }
.wm-item.sel, .wm-top button.sel { background: rgba(255,51,38,.18); border-color: var(--red); }
.wm-item-h { display: flex; align-items: center; gap: 7px; }
.wm-item-h b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; font-size: 13px; color: #fff; }
.wm-item-h time { flex: none; font-size: 10px; color: rgba(255,200,190,.45); }
.wm-item-m { margin: 4px 0 0 14px; font-size: 10px; color: rgba(255,200,190,.55); }
.wm-item p { margin: 4px 0 0 14px; line-height: 1.4; color: rgba(255,216,210,.8); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-ic { font-style: normal; color: #ff6b4f; }
.wm-mag { flex: none; padding: 0 4px; font-style: normal; font-size: 10px; color: #fff; background: rgba(255,51,38,.2); border: 1px solid var(--red-dim); }
.wm-mag.big { background: var(--red); color: #000; }
.wm-news { display: block; padding: 6px 8px; color: #ffd8d2; text-decoration: none; background: rgba(255,51,38,.03); border-left: 2px solid rgba(255,51,38,.35); }
.wm-news:hover { background: rgba(255,51,38,.12); border-left-color: var(--red); }
.wm-news span { margin-right: 6px; font-size: 9px; letter-spacing: 1px; color: var(--red-hi); }
.wm-news time { font-size: 9px; color: rgba(255,200,190,.45); }
.wm-news p { margin: 3px 0 0; line-height: 1.4; }
.wm-empty { padding: 16px 6px; text-align: center; font-size: 10px; letter-spacing: 2px; color: rgba(255,200,190,.45); }
.wm-ticker { grid-column: 1 / -1; display: flex; align-items: stretch; overflow: hidden; background: #0a0000; border-top: 1px solid rgba(255,51,38,.35); letter-spacing: 1px; }
.wm-live { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px; font-family: var(--disp); font-size: 10px; letter-spacing: 2px; color: var(--red-hi); border-right: 1px solid rgba(255,51,38,.35); }
.wm-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1s steps(2) infinite; }
.wm-tk { flex: 1; display: flex; align-items: center; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.wm-tk-in { display: inline-block; padding-left: 100%; animation: wmTick var(--dur, 240s) linear infinite; }
.wm-tk:hover .wm-tk-in { animation-play-state: paused; }
.wm-tk a { color: #ffd8d2; text-decoration: none; }
.wm-tk a:hover { color: #fff; }
.wm-tk a b { font-weight: normal; color: var(--red-hi); }
.wm-tk i { margin: 0 14px; font-style: normal; color: var(--red-dim); }
@keyframes wmTick { to { transform: translateX(-100%); } }
@media (max-width: 720px) {
  .wmon { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 40% 28px; }
  .wm-side { border-left: 0; border-top: 1px solid rgba(255,51,38,.3); }
  .wm-layers { flex-direction: row; flex-wrap: wrap; right: 10px; bottom: 44px; }
  .wm-layers button { min-width: 0; }
  .wm-card { top: auto; bottom: 10px; max-height: 70%; }
}

/* ---- Screensaver ---- */
.saver { position: absolute; inset: 0; z-index: 200; background: #000; cursor: none; animation: fadeIn 1s both; }
.saver canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.saver-logo { position: absolute; left: 50%; top: 45%; width: min(40vw, 320px); aspect-ratio: 500/430; transform: translate(-50%, -50%); background: url("../img/Skynet_logo.webp") top / 100% auto no-repeat; mix-blend-mode: screen; opacity: .9; animation: saverFloat 6s ease-in-out infinite; }
.saver-txt { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; font-family: var(--disp); letter-spacing: 10px; color: #fff; text-shadow: 0 0 10px var(--red), 0 0 30px var(--red); font-size: clamp(14px, 2.4vw, 26px); animation: blink 2s steps(2) infinite; }
@keyframes saverFloat { 50% { transform: translate(-50%, -54%) scale(1.04); } }
