@font-face { font-family: linebeam; src: url(fonts/Linebeam.ttf); }
@font-face { font-family: broken; src: url(fonts/broken.ttf); }
@font-face { font-family: infected; src: url(fonts/INFECTED.ttf); }
@font-face { font-family: nervous; src: url(fonts/Nervous.ttf); }

:root {
  --slelo: #c8f230;
  --pink: #ff2ea0;
  --orange: #ffa500;
  --red: #bf2a2a;
  --violet: #c360c8;
  --blue: #3e7fcc;
  --gunmetal: #534f59;
  --silver: #aab0bf;
  --void: #00010d;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--slelo); font-family: var(--mono); }
::selection { background: var(--pink); color: #000; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* boot */
#boot { position: fixed; inset: 0; z-index: 50; background: #000; padding: 24px; font-size: 14px; line-height: 1.5; color: #b8b8b8; cursor: pointer; }
#boot pre { margin: 0; display: inline; white-space: pre-wrap; font-family: var(--mono); }
#boot .ok { color: var(--slelo); }
#boot .warn { color: var(--pink); }
.caret { animation: blink 1s steps(2, start) infinite; color: var(--slelo); }
@keyframes blink { to { visibility: hidden; } }
#boot.gone { animation: crt-off 0.45s forwards; }
@keyframes crt-off {
  60% { transform: scaleY(0.004); filter: brightness(4); }
  100% { transform: scale(0, 0.004); opacity: 0; visibility: hidden; }
}

/* hud */
.hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; text-shadow: 0 0 6px rgba(200, 242, 48, 0.55); }
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.25) 0 1px, transparent 1px 3px); }
.corner { position: absolute; width: 28px; height: 28px; border: 2px solid var(--slelo); }
.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.hud-title { position: absolute; top: 18px; left: 54px; font-size: 15px; font-weight: 700; letter-spacing: 0.2em; }
.hud-mode { position: absolute; top: 40px; left: 54px; font-size: 11px; letter-spacing: 0.16em; color: var(--pink); text-shadow: 0 0 6px rgba(255,46,160,0.7); }
.hud-stats { position: absolute; top: 18px; right: 52px; width: 200px; padding: 8px 10px; border: 1px solid rgba(200,242,48,0.35); background: rgba(0,12,4,0.45); font-size: 11px; letter-spacing: 0.08em; }
.hud-stats > div { display: flex; justify-content: space-between; line-height: 1.6; }
.hud-stats span { opacity: 0.7; }
.hud-stats b { font-variant-numeric: tabular-nums; }
.battery { display: block !important; height: 8px; margin: 4px 0 6px; padding: 1px; border: 1px solid var(--slelo); }
.battery div { height: 100%; width: 0; background: var(--slelo); box-shadow: 0 0 8px var(--slelo); transition: width 0.4s; }
.live { justify-content: flex-end !important; align-items: center; gap: 6px; color: var(--pink); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); animation: blink 1s steps(2, start) infinite; }
.hud-foot { position: absolute; bottom: 20px; left: 54px; font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; }

/* desktop */
#desk { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; pointer-events: none; }
.logo { margin: 0; font-family: linebeam, var(--mono); font-weight: 400; font-size: clamp(20px, 6.2vw, 110px); white-space: nowrap; color: #fff; position: relative; letter-spacing: 0.02em; text-shadow: 3px 0 var(--pink), -3px 0 var(--blue); animation: jitter 3.3s infinite steps(1); pointer-events: auto; }
.logo::before, .logo::after { content: attr(data-text); position: absolute; inset: 0; overflow: hidden; }
.logo::before { color: var(--slelo); clip-path: inset(0 0 62% 0); transform: translateX(-4px); animation: slice 2.7s infinite steps(1); }
.logo::after { color: var(--pink); clip-path: inset(58% 0 0 0); transform: translateX(4px); animation: slice 1.9s infinite reverse steps(1); }
@keyframes jitter { 0%, 92%, 100% { transform: none; } 93% { transform: translate(3px, -2px) skewX(8deg); } 95% { transform: translate(-4px, 1px); } }
@keyframes slice { 0% { clip-path: inset(0 0 70% 0); } 25% { clip-path: inset(40% 0 35% 0); } 50% { clip-path: inset(80% 0 2% 0); } 75% { clip-path: inset(12% 0 75% 0); } }

.icons { display: grid; grid-template-columns: repeat(3, 120px); gap: 18px 26px; pointer-events: auto; }
.icon { background: none; border: 1px dashed transparent; color: var(--slelo); font: 11px var(--mono); letter-spacing: 0.08em; cursor: pointer; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-shadow: 0 0 6px rgba(200,242,48,0.6); }
.icon span { font-size: 34px; filter: drop-shadow(0 0 6px rgba(200,242,48,0.5)); }
.icon:hover, .icon:focus { border-color: var(--pink); color: #fff; outline: none; }

/* windows, win98 by way of a crt */
.win { position: fixed; z-index: 20; width: min(420px, 92vw); background: #000; border: 2px solid var(--slelo); box-shadow: 6px 6px 0 var(--pink), 0 0 24px rgba(200,242,48,0.25); color: #ddd; font-size: 13px; line-height: 1.55; }
.win header { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 10px; background: linear-gradient(90deg, #00136b, var(--blue)); color: #fff; font-weight: 700; letter-spacing: 0.08em; cursor: move; user-select: none; }
.win header button { width: 22px; height: 20px; border: 2px outset #ddd; background: #c0c0c0; color: #000; font: bold 12px var(--mono); line-height: 1; cursor: pointer; padding: 0; }
.win .body { padding: 14px 16px; }
.win p { margin: 0 0 10px; }
.win .dim { color: var(--gunmetal); color: #7d7a85; }
.win .big { font-size: 26px; color: var(--slelo); letter-spacing: 0.3em; }
.win .deny { color: var(--pink); font-size: 20px; letter-spacing: 0.2em; animation: blink 0.8s steps(2, start) 4; }
.win .tag { color: #000; background: var(--orange); padding: 0 4px; font-size: 10px; }
.todo { margin: 0; padding-left: 18px; }
.todo s { color: #666; }

/* terminal */
#term { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(760px, 100vw); height: 46vh; z-index: 40; background: rgba(0,4,0,0.94); border: 1px solid var(--slelo); border-bottom: 0; padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(200,242,48,0.18); }
#term[hidden] { display: none; }
#termOut { flex: 1; overflow-y: auto; white-space: pre-wrap; line-height: 1.45; }
#termOut .me { color: #888; }
#termOut .pk { color: var(--pink); }
.prompt { display: flex; gap: 8px; }
.prompt span { color: var(--pink); }
#termIn { flex: 1; background: none; border: 0; outline: none; color: var(--slelo); font: inherit; caret-color: var(--slelo); }

@media (max-width: 600px) {
  .hud-stats { width: 150px; right: 14px; top: 60px; font-size: 10px; }
  .hud-title { left: 20px; font-size: 12px; }
  .hud-mode { left: 20px; }
  .hud-foot { left: 20px; }
  .icons { grid-template-columns: repeat(2, 120px); }
}
@media (prefers-reduced-motion: reduce) {
  .logo, .logo::before, .logo::after, .deny, .live i, .caret { animation: none; }
}
