/* ============================================================
   ARNIE 3.1 — vaporwave Windows 3.1 operating environment
   ============================================================ */

:root {
  /* chrome (battleship grey + classic bevels) */
  --grey:    #c3c3c3;
  --grey-l:  #dfdfdf;
  --grey-d:  #808080;
  --grey-dd: #000000;
  --white:   #ffffff;
  --ink:     #0b0b0b;
  /* active title bar — authentic 3.1 navy→blue */
  --title1:  #00007b;
  --title2:  #1086d0;
  /* vaporwave desktop */
  --vp-pink: #ff71ce;
  --vp-cyan: #01cdfe;
  --vp-lilac:#b967ff;
  --vp-deep: #2b1055;
  --inst: 0;   /* 0..1 instability, set live by desktop.js */
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #008080;            /* the haunted-office teal behind everything */
  /* Silkscreen for Latin chrome; DotGothic16 catches Japanese glyphs as fallback */
  font-family: "Silkscreen", "DotGothic16", "MS Sans Serif", system-ui, sans-serif;
  color: var(--ink);
  cursor: default;
  -webkit-font-smoothing: none;
  user-select: none;
}
.hidden { display: none !important; }

/* ---- bevels (the whole Win3.1 look comes from these) ---- */
.outset { border: 2px solid; border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: inset -1px -1px 0 var(--grey-d), inset 1px 1px 0 var(--grey-l); }
.inset  { border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd);
  box-shadow: inset 1px 1px 0 var(--grey-d), inset -1px -1px 0 var(--grey-l); }

/* ============================================================
   CRT + GLITCH overlays (never block clicks)
   ============================================================ */
.crt {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.12) 3px 4px);
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 140px rgba(0,0,0,0.55);
}
.glitch {
  position: fixed; inset: 0; z-index: 9001; pointer-events: none;
  opacity: calc(var(--inst) * 0.9);
  background:
    repeating-linear-gradient(to bottom, rgba(255,0,128,0.05) 0 1px, rgba(0,255,255,0.05) 2px 3px);
  mix-blend-mode: screen;
  animation: glitchSlide 0.9s steps(8) infinite;
}
@keyframes glitchSlide { to { background-position: 0 -40px; } }

/* instability ramps a chromatic shimmer + jitter across the desktop */
.desktop { transition: filter 0.3s; }
body[style*="--inst"] .desktop {
  filter: saturate(calc(1 + var(--inst) * 1.4)) hue-rotate(calc(var(--inst) * 18deg));
}
.unstable .window { animation: jit 0.18s steps(2) infinite; }
@keyframes jit { 50% { transform: translate(0.6px, -0.6px); } }

/* full meltdown on a BLOW UP */
body.blowup { animation: meltShake 0.45s steps(3) 2; }
body.blowup .crt { background: repeating-linear-gradient(to bottom, rgba(255,0,0,0.18) 0 3px, rgba(0,0,0,0.2) 4px 6px); }
body.blowup .desktop { filter: invert(1) hue-rotate(90deg) saturate(2); }
@keyframes meltShake {
  0% { transform: translate(0,0); }
  25% { transform: translate(-6px,2px) skewX(-2deg); }
  50% { transform: translate(5px,-3px) skewX(2deg); }
  75% { transform: translate(-3px,4px); }
  100% { transform: translate(0,0); }
}

/* ============================================================
   POWER ON
   ============================================================ */
.power { position: fixed; inset: 0; z-index: 8000; background: #000;
  display: grid; place-items: center; }
.power-inner { text-align: center; }
.power-badge {
  font-family: "DotGothic16", sans-serif; font-size: 40px; letter-spacing: 6px;
  color: var(--vp-cyan); text-shadow: 3px 3px 0 var(--vp-pink), 0 0 22px var(--vp-cyan);
  margin-bottom: 28px;
}
.power-btn {
  font-family: "Silkscreen"; font-size: 18px; padding: 16px 26px; cursor: pointer;
  background: #111; color: var(--vp-cyan); border: 2px solid var(--vp-cyan);
  text-shadow: 0 0 8px var(--vp-cyan); animation: blink 1.1s steps(2) infinite;
}
.power-btn:hover { background: var(--vp-cyan); color: #000; }
.power-sub { margin-top: 22px; color: #6a6a6a; font-size: 11px; letter-spacing: 2px; }
@keyframes blink { 50% { opacity: 0.45; } }

/* ============================================================
   BOOT
   ============================================================ */
.boot { position: fixed; inset: 0; z-index: 7000; background: #000; padding: 26px; overflow: hidden; cursor: pointer; }
.boot pre {
  font-family: "VT323", monospace; font-size: clamp(14px, 2.1vw, 20px);
  color: #cfcfcf; line-height: 1.25; white-space: pre-wrap; margin: 0;
  text-shadow: 0 0 6px rgba(200,200,200,0.25);
}
.boot pre::after { content: "▮"; animation: blink 1s steps(2) infinite; color: #fff; }
.boot pre.bootglitch { color: #ff4dff; text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff; animation: bootGlitch 0.18s steps(2); }
@keyframes bootGlitch { 50% { transform: translateX(4px) skewX(-3deg); } }
.boot::after { content: "▸ click to skip"; position: absolute; bottom: 16px; right: 20px;
  font-family: "VT323", monospace; font-size: 15px; color: #555; }

/* ---- BSOD ---- */
.bsod { position: fixed; inset: 0; z-index: 9500; background: #0000aa; color: #fff; cursor: pointer;
  display: grid; place-items: center; padding: 6vh 6vw; }
.bsod pre { font-family: "VT323", "DotGothic16", monospace; font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.35; white-space: pre-wrap; margin: 0; max-width: 760px;
  text-shadow: 0 0 8px rgba(255,255,255,0.3); }

/* ============================================================
   DESKTOP
   ============================================================ */
.desktop { position: fixed; inset: 0; overflow: hidden; }
.desk-bg { position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, var(--vp-deep) 0%, #5b2a86 35%, #c774e8 58%, var(--vp-pink) 100%); }
.sun {
  position: absolute; left: 50%; top: 26%; width: 320px; height: 320px; transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff7b0 0%, #ffd36e 30%, #ff8c42 60%, #ff5d8f 100%);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 10px, transparent 10px 16px);
  mask-image: repeating-linear-gradient(to bottom, #000 0 10px, transparent 10px 16px);
  filter: drop-shadow(0 0 60px rgba(255,120,180,0.6));
}
.grid {
  position: absolute; left: -20%; right: -20%; bottom: -10%; height: 55%;
  background-image:
    linear-gradient(rgba(255,113,206,0.55) 2px, transparent 2px),
    linear-gradient(90deg, rgba(1,205,254,0.45) 2px, transparent 2px);
  background-size: 100% 36px, 44px 100%;
  transform: perspective(320px) rotateX(74deg);
  transform-origin: bottom; opacity: 0.85;
}
.bust { position: absolute; left: 50%; bottom: 30px; width: 230px; height: 280px;
  transform: translateX(-50%); z-index: 0; filter: drop-shadow(0 0 30px rgba(255,255,255,0.15)); opacity: 0.9; }

/* drifting vaporwave watermark text */
.drift { position: absolute; font-family: "DotGothic16", sans-serif; white-space: nowrap;
  color: rgba(255,255,255,0.12); font-size: 30px; pointer-events: none; will-change: transform; }
.drift1 { top: 30%; left: -10%; animation: drift 38s linear infinite; }
.drift2 { top: 64%; left: -10%; font-size: 22px; animation: drift 52s linear infinite reverse; }
@keyframes drift { to { transform: translateX(120vw); } }

/* desktop icons */
.icons { position: absolute; top: 16px; left: 16px; z-index: 2;
  display: flex; flex-direction: column; gap: 18px; }
.icon { background: none; border: 1px dotted transparent; width: 88px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: #fff; }
.icon:focus, .icon:hover { border: 1px dotted #fff; background: rgba(0,0,128,0.25); }
.icon label { font-size: 11px; text-align: center; text-shadow: 1px 1px 0 #000; line-height: 1.2; }
.icon.danger label { color: #ffe14d; }

.ico { width: 38px; height: 38px; display: inline-block; image-rendering: pixelated;
  background-size: contain; background-repeat: no-repeat; background-position: center; }
.ico-arnie { background-image: url(/static/sprites/menacing/mouth_2.png);
  image-rendering: pixelated; border: 2px solid #000; box-shadow: 2px 2px 0 rgba(0,0,0,0.4); }
.ico-arnie.big { width: 56px; height: 56px; }

/* ASCII program-icon tiles — reliable everywhere (no emoji font needed) */
.ico-doc, .ico-ctrl, .ico-bin, .ico-skull {
  display: grid; place-items: center; font-family: "Silkscreen"; font-size: 11px; color: #000;
  background: var(--grey); border: 2px solid;
  border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: inset -1px -1px 0 var(--grey-d), inset 1px 1px 0 var(--grey-l), 2px 2px 0 rgba(0,0,0,0.4);
}
.ico-doc  { background: #fff; }
.ico-doc::after  { content: "TXT"; }
.ico-ctrl::after { content: "SET"; }
.ico-bin::after  { content: "BIN"; }
.ico-skull { background: #ffcc00; }
.ico-skull::after{ content: "!"; color: #b00; font-size: 22px; }
.ico-mine::after { content: "◆"; color: #000; font-size: 20px; }
.ico-mine { background: #c3c3c3; }
.tb-ico { width: 16px; height: 16px; display: grid; place-items: center; font-size: 9px;
  background-size: contain; background-repeat: no-repeat; }
.tb-ico.ico-doc::after { content: ""; }   /* keep title-bar icons minimal */

/* ============================================================
   WINDOWS
   ============================================================ */
.window {
  position: absolute; z-index: 10; width: var(--w, 360px); max-width: 94vw;
  background: var(--grey); border: 2px solid;
  border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: inset -1px -1px 0 var(--grey-d), inset 1px 1px 0 var(--grey-l), 3px 3px 0 rgba(0,0,0,0.45);
  padding: 3px;
}
.window.modal { left: 50%; top: 44%; transform: translate(-50%,-50%); z-index: 50; }

/* default desktop positions so windows don't stack on top of each other */
#win-arnie     { left: 30px;  top: 24px; }
#win-log       { right: 30px; top: 24px; }
#win-readme    { left: 380px; top: 90px; }
#win-control   { left: 430px; top: 140px; }
#win-recycle   { left: 480px; top: 190px; }
#win-donotopen { left: 530px; top: 240px; }
/* the app windows cascade so they don't all stack at the origin */
#win-net     { left: 70px;  top: 36px; }
#win-encarta { left: 110px; top: 70px; }
#win-defrag  { left: 150px; top: 104px; }
#win-media   { right: 60px; top: 70px; }
#win-av      { left: 200px; top: 130px; }
#win-calc    { right: 130px; top: 150px; }
#win-mycomp  { left: 250px; top: 90px; }
#win-board   { left: 130px; top: 50px; }
.window.dragging { opacity: 0.97; }
.window.focused .titlebar { background: linear-gradient(90deg, var(--title1), var(--title2)); }

.titlebar {
  display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 3px;
  background: linear-gradient(90deg, var(--grey-d), #b0b0b0);  /* inactive */
  color: #fff; cursor: grab; user-select: none;
}
.titlebar.danger { background: linear-gradient(90deg, #7a0000, #d23030) !important; }
.tb-title { flex: 1; font-size: 12px; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-controls { display: flex; gap: 2px; }
.tb-btn {
  width: 18px; height: 18px; line-height: 14px; font-size: 12px; cursor: pointer;
  background: var(--grey); color: #000; border: 2px solid;
  border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  display: grid; place-items: center; padding: 0;
}
.tb-btn:active { border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }

.menubar { display: flex; gap: 2px; padding: 2px 4px; background: var(--grey); font-size: 12px; }
.menu { padding: 1px 8px; cursor: pointer; }
.menu:hover, .menu.open { background: var(--title1); color: #fff; }
.dropdown { position: absolute; z-index: 200; background: var(--grey); min-width: 150px; padding: 2px;
  border: 2px solid; border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.4); }
.dropdown div { padding: 3px 14px; font-size: 12px; cursor: pointer; }
.dropdown div:hover { background: var(--title1); color: #fff; }

.win-body { background: var(--grey); padding: 12px; }

/* ---- buttons / fields ---- */
.btn {
  font-family: "Silkscreen"; font-size: 12px; padding: 7px 14px; cursor: pointer; color: #000;
  background: var(--grey); border: 2px solid;
  border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: inset -1px -1px 0 var(--grey-d), inset 1px 1px 0 var(--grey-l);
}
.btn:active, .btn.down { border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd);
  box-shadow: inset 1px 1px 0 var(--grey-d); transform: translate(1px,1px); }
.row { display: flex; gap: 8px; margin-top: 10px; }
.row.right { justify-content: flex-end; }

.field { display: block; font-size: 12px; margin: 10px 0; }
input[type="text"], input[type="password"] {
  width: 100%; margin-top: 5px; padding: 6px; font-family: "VT323", monospace; font-size: 18px;
  background: #fff; color: #000; border: 2px solid;
  border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); outline: none;
}

/* ---- login ---- */
.login-body { display: flex; gap: 14px; align-items: center; }
.login-art { padding: 4px; }
.login-form { flex: 1; }
.login-lead { font-size: 12px; line-height: 1.5; margin: 0 0 4px; }
.login-lead b { font-family: "DotGothic16"; color: #00007b; }
.login-error { color: #b00; font-size: 11px; min-height: 14px; margin-top: 8px; }

/* ---- Talk to Arnie ---- */
.arnie-body { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.monitor {
  position: relative; padding: 14px; background: #2b2b2b;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd);
  box-shadow: inset 0 0 24px #000;
}
#arnie { display: block; width: 240px; height: 240px; image-rendering: pixelated;
  background: #0c120a; box-shadow: 0 0 20px rgba(1,205,254,0.25); }
.heatbar { width: 240px; height: 12px; margin-top: 10px; background: #111;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); overflow: hidden; }
.heatbar i { display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #2ecc71, #f1c40f 55%, #e74c3c); transition: width 0.25s; }
.subtitle { font-family: "VT323", monospace; font-size: 22px; text-align: center; min-height: 26px;
  max-width: 460px; color: #00007b; }
.talk { font-size: 15px; padding: 14px 22px; }
.talk.recording { background: #d23030; color: #fff; animation: blink 0.8s steps(2) infinite; }
.text-form { display: flex; gap: 6px; width: 100%; }
.text-form input { flex: 1; margin: 0; }

/* ---- log / notepad ---- */
.log { height: 300px; overflow-y: auto; padding: 8px; background: #fff;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd);
  font-family: "VT323", monospace; font-size: 16px; color: #000; }
.exchange { border-bottom: 1px dashed #aaa; padding: 6px 0; }
.exchange .you { color: #555; }
.exchange .arnie { color: #00007b; margin-top: 2px; }
.notepad { background: #fff; padding: 10px; margin: 0; font-family: "VT323", monospace; font-size: 17px;
  color: #000; height: 320px; overflow-y: auto; white-space: pre-wrap;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }

/* ---- control panel ---- */
.control-body .cp-lead { font-size: 12px; margin: 0 0 12px; }
.control-body .cp-lead, .cp-note { font-family: "Silkscreen"; }
.slider { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; margin: 12px 0; }
.slider input { width: 150px; accent-color: var(--vp-lilac); }
.cp-note { font-size: 10px; color: #800; margin-top: 14px; }

/* ---- recycle / do not open ---- */
.filelist { list-style: none; margin: 0 0 10px; padding: 8px; background: #fff; height: 120px;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd);
  font-family: "VT323", monospace; font-size: 16px; }
.filelist li { padding: 2px 0; }
.dno-body { background: #000; text-align: center; padding: 24px; }
.dno-text { font-family: "VT323", monospace; color: #ff3b3b; font-size: 22px; margin: 6px 0;
  text-shadow: 0 0 10px #ff3b3b; }
.dno-text.small { color: #888; font-size: 16px; }

/* ============================================================
   MINESWEEPER
   ============================================================ */
.ms-body { padding: 8px; }
.ms-frame { padding: 6px; background: var(--grey);
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.ms-hud { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; margin-bottom: 8px;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.ms-led { font-family: "VT323", monospace; font-size: 28px; line-height: 1; letter-spacing: 2px;
  color: #ff2d2d; background: #000; padding: 2px 6px; min-width: 56px; text-align: center;
  text-shadow: 0 0 6px rgba(255,45,45,0.6);
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.ms-face { width: 36px; height: 36px; padding: 3px; cursor: pointer; background: var(--grey);
  border: 2px solid; border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: inset -1px -1px 0 var(--grey-d), inset 1px 1px 0 var(--grey-l); }
.ms-face:active { border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.ms-face .ico { width: 100%; height: 100%; border: 1px solid #000; background-size: cover;
  image-rendering: pixelated; }

.ms-grid { display: grid; gap: 0; }
.ms-cell {
  width: 26px; height: 26px; padding: 0; cursor: pointer; font-family: "Silkscreen"; font-size: 14px;
  font-weight: 700; line-height: 1; background: var(--grey);
  border: 2px solid; border-color: var(--white) var(--grey-d) var(--grey-d) var(--white);
  display: grid; place-items: center;
}
.ms-cell:active { border-color: var(--grey-d) var(--white) var(--white) var(--grey-d); }
.ms-cell.open { border: 1px solid #9a9a9a; background: #bdbdbd; cursor: default; }
.ms-cell.flag { position: relative; }
.ms-cell.flag::before { content: ""; position: absolute; left: 11px; top: 5px; width: 2px; height: 14px; background: #000; }
.ms-cell.flag::after  { content: ""; position: absolute; left: 6px; top: 5px;
  border: 5px solid transparent; border-left-color: #d40000; border-top-color: #d40000; }
.ms-cell.mine { background: #bdbdbd; }
.ms-cell.mine::after { content: "◆"; color: #000; font-size: 16px; }
.ms-cell.boom { background: #ff2d2d; }

/* ============================================================
   DESKTOP APP ICONS (ASCII tiles) + icon grid reflow
   ============================================================ */
.ico-net, .ico-enc, .ico-dfg, .ico-amp, .ico-av, .ico-calc, .ico-comp, .ico-board {
  display: grid; place-items: center; font-family: "Silkscreen"; font-size: 10px; color: #000;
  background: var(--grey); border: 2px solid;
  border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: inset -1px -1px 0 var(--grey-d), inset 1px 1px 0 var(--grey-l), 2px 2px 0 rgba(0,0,0,0.4);
}
.ico-net::after  { content: "WWW"; color: #0000a0; }
.ico-enc::after  { content: "ENC"; }
.ico-dfg::after  { content: "DFG"; }
.ico-amp::after  { content: "AMP"; color: #008000; }
.ico-av::after   { content: "AV"; color: #b00; font-size: 13px; }
.ico-calc::after { content: "="; font-size: 22px; }
.ico-comp::after { content: "PC"; color: #0000a0; font-size: 13px; }
.ico-board::after{ content: "SND"; }
/* tile ~14 icons into 2 columns of 7 so they never overflow */
.icons { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto);
  gap: 12px 6px; align-content: start; justify-items: center; }

/* ============================================================
   ARNIE NAVIGATOR (browser)
   ============================================================ */
.net-body { padding: 0 !important; display: flex; flex-direction: column; height: 440px; }
.net-toolbar { display: flex; gap: 4px; align-items: center; padding: 4px; background: var(--grey); }
.net-btn { padding: 4px 8px; font-size: 12px; }
.net-url { flex: 1; margin: 0; font-size: 14px; padding: 4px; min-width: 60px; }
.net-throb { width: 26px; height: 26px; flex: none; border: 2px solid #000; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff71ce, #01cdfe); }
.net-throb.spin { animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.net-marks { display: flex; gap: 8px; padding: 3px 6px; background: #dcdcdc; border-top: 1px solid #fff; }
.net-mark { background: none; border: none; cursor: pointer; color: #0000a0; text-decoration: underline; font-family: "VT323"; font-size: 15px; }
.net-page { flex: 1; overflow: auto; background: #fff;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.net-status { padding: 3px 6px; font-size: 11px; background: var(--grey); border-top: 1px solid var(--grey-d); }
.geo { padding: 16px; color: #ffff66; text-align: center; min-height: 100%; font-family: "VT323"; font-size: 18px;
  background: #000080; background-image: repeating-linear-gradient(45deg, rgba(255,113,206,0.12) 0 12px, transparent 12px 24px); }
.geo-h1 { font-family: "DotGothic16"; color: #01cdfe; text-shadow: 2px 2px #ff00ff; }
.geo-p { color: #fff; }
.geo-construction { background: repeating-linear-gradient(45deg, #000 0 10px, #ffcc00 10px 20px);
  color: #fff; padding: 4px; font-weight: bold; margin: 10px 0; text-shadow: 1px 1px #000; }
.geo-counter { display: inline-block; background: #000; color: #0f0; font-family: "VT323"; padding: 0 4px; letter-spacing: 2px; }
.geo-rings { margin-top: 12px; color: #9ad; font-size: 13px; }
.marquee { overflow: hidden; white-space: nowrap; background: #000; color: #0f0; padding: 3px 0; }
.marquee span { display: inline-block; padding-left: 100%; animation: mq 13s linear infinite; }
@keyframes mq { to { transform: translateX(-100%); } }
.net-404 { padding: 30px; text-align: center; color: #b00; font-family: "VT323"; }
.net-404 h1 { font-size: 64px; margin: 0; }
.net-hell { padding: 24px; background: #110000; color: #f33; text-align: center; min-height: 100%; font-family: "VT323"; }
.net-hell h1 { font-family: "DotGothic16"; font-size: 40px; }
.ask { padding: 30px; text-align: center; }
.ask-logo { font-family: "DotGothic16"; font-size: 40px; color: #0000a0; }
.ask-bar { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.ask-res { color: #333; font-family: "VT323"; font-size: 16px; }
.net-brokenimg { display: inline-block; border: 2px solid #888; background: #eee; color: #888; padding: 22px; margin: 10px; }

/* ============================================================
   ARNCARTA '92 (encyclopedia)
   ============================================================ */
.enc-wrap { display: flex; height: 380px; }
.enc-list { width: 150px; overflow: auto; background: #fff;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.enc-topic { display: block; width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  padding: 6px 8px; font-family: "VT323"; font-size: 15px; border-bottom: 1px solid #eee; }
.enc-topic:hover { background: var(--title1); color: #fff; }
.enc-view { flex: 1; padding: 12px; overflow: auto; background: #fff;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); border-left: none; }
.enc-head { display: flex; justify-content: space-between; align-items: center; }
.enc-title { font-family: "DotGothic16"; font-size: 22px; margin: 0; color: #0000a0; }
.enc-img { width: 90px; height: 90px; float: right; margin: 0 0 8px 10px; image-rendering: pixelated;
  background-size: cover; border: 2px solid #000; }
.enc-body { font-family: "VT323"; font-size: 17px; line-height: 1.35; color: #000; }
.enc-foot { margin-top: 12px; color: #888; font-size: 11px; clear: both; }

/* ============================================================
   MUSCLE DEFRAG
   ============================================================ */
.dfg-wrap { padding: 8px; }
.dfg-status { font-family: "VT323"; font-size: 16px; margin-bottom: 6px; }
.dfg-grid { display: grid; gap: 1px; padding: 4px; background: #000;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.dfg-cell { width: 12px; height: 12px; background: #c3c3c3; }
.dfg-cell.used { background: #5a6b8c; }
.dfg-cell.opt { background: #1a3a8c; }
.dfg-cell.read { background: #fff; }
.dfg-cell.bad { background: #d40000; }
.dfg-legend { display: flex; gap: 16px; margin: 8px 0; font-size: 11px; }
.dfg-key { display: flex; align-items: center; gap: 5px; }
.dfg-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dfg-pct { font-family: "VT323"; font-size: 22px; }

/* ============================================================
   ARNIE MEDIA PLAYER
   ============================================================ */
.amp { padding: 8px; width: 320px; }
.amp-screen { background: #000; padding: 6px;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.amp-eq { display: block; width: 100%; height: 70px; background: #000; }
.amp-title { overflow: hidden; white-space: nowrap; color: #01cdfe; font-family: "VT323"; font-size: 16px; margin-top: 4px; }
.amp-title span { display: inline-block; animation: mq 11s linear infinite; }
.amp-time { color: #0f0; font-family: "VT323"; font-size: 14px; }
.amp-controls { display: flex; gap: 4px; align-items: center; margin-top: 8px; }
.amp-btn { font-size: 14px; padding: 6px 10px; }
.amp-vol { width: 70px; accent-color: var(--vp-lilac); }
.amp-vol-l { font-size: 10px; margin-left: 6px; }

/* ============================================================
   ARNIE ANTIVIRUS
   ============================================================ */
.av-wrap { padding: 10px; }
.av-title { font-family: "Silkscreen"; font-size: 12px; margin-bottom: 8px; }
.av-bar { height: 16px; background: #000; margin-bottom: 6px;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.av-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0a0, #0f0); transition: width 0.1s; }
.av-log { font-family: "VT323"; font-size: 14px; height: 20px; color: #333; }
.av-threats { margin-top: 8px; font-family: "VT323"; font-size: 15px; }
.av-threat { color: #b00; padding: 2px 0; }

/* ============================================================
   CALCULATOR
   ============================================================ */
.calc { padding: 8px; width: 200px; }
.calc-disp { background: #cfe3d8; font-family: "VT323"; font-size: 24px; text-align: right; padding: 4px 8px;
  margin-bottom: 8px; overflow: hidden; white-space: nowrap;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.calc-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.calc-key { font-size: 16px; padding: 10px 0; }
.calc-eq { background: var(--amber); }

/* ============================================================
   MY COMPUTER
   ============================================================ */
.mc-path { font-family: "VT323"; font-size: 14px; padding: 4px 8px; background: #fff; margin: 8px;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.mc-list { margin: 0 8px; background: #fff; min-height: 180px;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.mc-item { display: block; width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  padding: 5px 8px; font-family: "VT323"; font-size: 16px; }
.mc-item.sel, .mc-item:hover { background: var(--title1); color: #fff; }
.mc-status { font-size: 11px; padding: 6px 8px; }

/* ============================================================
   SOUNDBOARD
   ============================================================ */
.sb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; width: 340px; }
.sb-btn { padding: 14px 2px; font-size: 11px; }
.sb-foot { text-align: center; font-size: 11px; padding: 0 0 8px; color: #444; }

/* ============================================================
   ASSISTANT (clippy)
   ============================================================ */
.assistant { position: absolute; right: 26px; bottom: 56px; z-index: 400; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bubble { position: relative; max-width: 220px; background: #ffffcc; color: #000; padding: 10px 12px;
  font-family: "VT323", monospace; font-size: 17px; line-height: 1.25;
  border: 2px solid #000; box-shadow: 3px 3px 0 rgba(0,0,0,0.4); }
.bubble::after { content: ""; position: absolute; right: 26px; bottom: -10px; border: 6px solid transparent;
  border-top-color: #000; }
.bubble-x { position: absolute; top: 2px; right: 3px; border: none; background: none; cursor: pointer; font-size: 12px; }
.helper { width: 54px; height: 54px; background: var(--grey); padding: 4px;
  border: 2px solid; border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.4); }
.helper .ico { width: 100%; height: 100%; }

/* ============================================================
   TASKBAR
   ============================================================ */
.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; z-index: 500;
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: var(--grey);
  border-top: 2px solid var(--white); box-shadow: inset 0 1px 0 var(--grey-l); }
.programs { font-weight: 700; }
.tasks { flex: 1; display: flex; gap: 4px; overflow: hidden; }
.task { font-size: 11px; padding: 5px 10px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task.active { border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); box-shadow: inset 1px 1px 0 var(--grey-d); }
.clock { font-family: "VT323", monospace; font-size: 16px; padding: 4px 10px;
  border: 2px solid; border-color: var(--grey-dd) var(--white) var(--white) var(--grey-dd); }
.startmenu { position: absolute; bottom: 38px; left: 6px; width: 200px; z-index: 600; background: var(--grey);
  border: 2px solid; border-color: var(--white) var(--grey-dd) var(--grey-dd) var(--white);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4); padding: 3px; }
.startmenu div { padding: 7px 12px; font-size: 12px; cursor: pointer; }
.startmenu div:hover { background: var(--title1); color: #fff; }

/* ============================================================
   SCREENSAVER
   ============================================================ */
.screensaver { position: fixed; inset: 0; z-index: 8500; background: #000; overflow: hidden; }
.saver-logo { position: absolute; font-family: "DotGothic16"; font-size: 34px; white-space: nowrap;
  color: var(--vp-cyan); text-shadow: 3px 3px 0 var(--vp-pink); will-change: transform; }

/* ============================================================
   RESPONSIVE — small screens: maximize the Arnie window, no drag
   ============================================================ */
@media (max-width: 720px) {
  .icons { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; width: 100%; }
  .window { width: 96vw !important; left: 2vw !important; top: 8px !important; transform: none !important; }
  #win-log, #win-readme, #win-control, #win-recycle, #win-donotopen { display: none !important; }
  .bust { display: none; }
}
