/* ]H.C[ hacked.computer — 1995 edition */
/* self-hosted fonts (SIL OFL 1.1, see fonts/) — no third-party requests */
@font-face { font-family: 'VT323'; src: url('fonts/vt323.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Anonymous Pro'; src: url('fonts/anonymous-pro-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Anonymous Pro'; src: url('fonts/anonymous-pro-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #0a090a;
  --crt: #0d0c0d;
  --fg: #A3FF60;            /* phosphor */
  --fg-dim: #5f9a36;
  --fg-glow: rgba(163, 255, 96, .55);
  --accent: #C77DFF;        /* brighter purple — readable on black */
  --accent-glow: rgba(199, 125, 255, .5);
  --warn: #FF5F56;
  --bezel: #c9c3b4;         /* beige plastic */
  --bezel-dark: #8d8778;
  --font-term: 'VT323', 'Anonymous Pro', 'Courier New', monospace;
  --font-body: 'Anonymous Pro', 'Courier New', monospace;
}
body.amber  { --fg: #FFB000; --fg-dim: #a06e00; --fg-glow: rgba(255,176,0,.55); }
body.purple { --fg: #D7A6FF; --fg-dim: #8a5fb0; --fg-glow: rgba(215,166,255,.55); --accent: #A3FF60; --accent-glow: rgba(163,255,96,.5); }
body.white  { --fg: #E8F0FF; --fg-dim: #8a93a3; --fg-glow: rgba(232,240,255,.45); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(ellipse at center, #1a161a 0%, var(--bg) 70%);
  color: var(--fg);
  font-family: var(--font-body);
  font-variant-ligatures: none;
  font-size: 16px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 18px 16px 10px;
}
a { color: var(--accent); text-decoration: none; text-shadow: 0 0 6px var(--accent-glow); }
a:hover, a:focus-visible { color: var(--bg); background: var(--accent); text-shadow: none; outline: none; }
::selection { background: var(--fg); color: var(--bg); }

/* ---------- top bar ---------- */
.topbar {
  width: min(1100px, 100%);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-term); font-size: 23px; color: var(--fg-dim);
}
.topbar .ticker { overflow: hidden; white-space: nowrap; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.topbar .ticker span { display: inline-block; padding-left: 100%; animation: marquee 38s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Win95 bevel button */
.btn95 {
  font-family: 'Tahoma', 'MS Sans Serif', 'Segoe UI', sans-serif; font-size: 13px; font-weight: 700;
  color: #000; background: #c0c0c0; padding: 5px 12px; white-space: nowrap;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf;
  text-shadow: none; cursor: pointer;
}
.btn95:hover, .btn95:focus-visible { background: #c0c0c0; color: #000; outline: 1px dotted #000; outline-offset: -5px; }
.btn95:active { border-color: #404040 #fff #fff #404040; box-shadow: inset 1px 1px #808080; }

/* ---------- CRT monitor ---------- */
.monitor {
  width: min(1100px, 100%);
  background: linear-gradient(160deg, #dcd6c6, var(--bezel) 40%, var(--bezel-dark));
  border-radius: 22px;
  padding: 26px 26px 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(0,0,0,.2);
}
.screen {
  position: relative;
  background: var(--crt);
  border-radius: 18px / 14px;
  min-height: 70vh;
  overflow: hidden;
  box-shadow: inset 0 0 80px rgba(0,0,0,.95), inset 0 0 14px rgba(0,0,0,.9), 0 0 0 3px #3a372f;
}
/* scanlines + vignette + flicker */
.screen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.28) 2px 3px);
}
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.035) 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
  animation: flicker 6s infinite steps(1);
}
@keyframes flicker { 0%,100% { opacity: 1; } 47% { opacity: .85; } 48% { opacity: 1; } 82% { opacity: .9; } 83% { opacity: 1; } }
.rollbar { position: absolute; left: 0; right: 0; height: 120px; z-index: 4; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.035), transparent);
  animation: roll 9s linear infinite; }
@keyframes roll { from { top: -120px; } to { top: 100%; } }

.bezel-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 6px 0;
  font-family: 'Tahoma', sans-serif; font-size: 12px; color: #4a463c; letter-spacing: .12em; }
.bezel-foot .brand { font-weight: 700; font-style: italic; }
.led { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #39ff14;
  box-shadow: 0 0 8px #39ff14; margin-left: 8px; vertical-align: middle; animation: led 2.4s infinite; }
@keyframes led { 50% { opacity: .55; } }

.term {
  position: relative; z-index: 2;
  padding: 26px 30px 30px;
  font-family: var(--font-term); font-size: 26px; line-height: 1.18;
  text-shadow: 0 0 2px var(--fg), 0 0 9px var(--fg-glow);
  height: 70vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--fg-dim) transparent;
}
.term p { margin: 0 0 .5em; }
.dim { color: var(--fg-dim); text-shadow: none; }
.acc { color: var(--accent); text-shadow: 0 0 8px var(--accent-glow); }
.err { color: var(--warn); text-shadow: 0 0 8px rgba(255,95,86,.6); }
.inv { background: var(--fg); color: var(--crt); text-shadow: none; padding: 0 .3ch; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- boot ---------- */
#boot { white-space: pre-wrap; }
#boot .skip { position: sticky; top: 0; display: block; text-align: right; }

/* ---------- desktop / hero ---------- */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 14px; }
.banner { margin: 0; font-family: 'Courier New', monospace; font-weight: 700; line-height: 1.02;
  font-size: clamp(5px, 1.18vw, 13.5px); white-space: pre; color: var(--fg);
  text-shadow: 0 0 4px var(--fg-glow), 0 0 14px var(--fg-glow); }
.banner .b2 { color: var(--accent); text-shadow: 0 0 4px var(--accent-glow), 0 0 14px var(--accent-glow); }
.logo { width: 190px; height: 190px; border: 1px solid var(--fg-dim); image-rendering: pixelated;
  filter: contrast(1.15) saturate(1.1); box-shadow: 0 0 22px var(--fg-glow); }
body.amber .logo, body.white .logo, body.purple .logo { filter: grayscale(1) sepia(1) hue-rotate(var(--hue, 0deg)) contrast(1.2); }
body.amber .logo { --hue: -15deg; } body.purple .logo { --hue: 230deg; } body.white .logo { filter: grayscale(1) contrast(1.3); }
.tagline { font-size: 23px; color: var(--fg-dim); margin: 6px 0 0; }
.rule { color: var(--fg-dim); overflow: hidden; white-space: nowrap; margin: 6px 0 12px; }

.intro p { margin: 0 0 .55em; max-width: 72ch; }
.intro .glitchchar { color: var(--accent); font-weight: 700; }

/* ---------- shell ---------- */
#out .line { white-space: pre-wrap; word-break: break-word; }
.prompt-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1ch; margin-top: 4px; }
.ps1 { color: var(--accent); text-shadow: 0 0 8px var(--accent-glow); white-space: nowrap; }
.ps1 b { color: var(--fg); font-weight: normal; text-shadow: inherit; }
.cmdwrap { position: relative; flex: 1; min-width: 8ch; }
#cmd { position: absolute; inset: 0; width: 100%; opacity: 0; font: inherit; border: 0; background: transparent; color: transparent; caret-color: transparent; }
#typed { white-space: pre; }
.cursor { display: inline-block; width: .6em; height: 1em; background: var(--fg); vertical-align: text-bottom;
  box-shadow: 0 0 8px var(--fg-glow); animation: blink 1s steps(1) infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip { font-family: var(--font-term); font-size: 23px; color: var(--fg); background: transparent; border: 1px solid var(--fg-dim);
  padding: 0 10px; cursor: pointer; text-shadow: inherit; }
.chip:hover, .chip:focus-visible { background: var(--fg); color: var(--crt); text-shadow: none; outline: none; }
.chip::before { content: "> "; color: var(--fg-dim); }
.chip:hover::before { color: var(--crt); }

pre.ascii { margin: .2em 0 .6em; font-family: 'Courier New', monospace; font-size: .62em; line-height: 1.05; white-space: pre; overflow-x: auto; }
table.ls { border-collapse: collapse; } table.ls td { padding: 0 2ch 0 0; }

/* ---------- status bar (DOS) ---------- */
.statusbar { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 0 2ch; padding: 2px 12px;
  background: var(--fg); color: var(--crt); font-family: var(--font-term); font-size: 22px; text-shadow: none; }
.statusbar b { background: var(--crt); color: var(--fg); padding: 0 .4ch; font-weight: normal; }
.statusbar .right { margin-left: auto; }

/* ---------- geocities footer ---------- */
.footer { width: min(1100px, 100%); margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-term); font-size: 22px; color: var(--fg-dim); text-align: center; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge { display: inline-flex; align-items: stretch; height: 31px; width: 88px; border: 1px solid #555; font-family: 'Tahoma', 'Verdana', sans-serif;
  font-size: 9px; font-weight: 700; line-height: 1.05; text-transform: uppercase; overflow: hidden; color: #fff; text-shadow: none; }
.badge .l { background: #000; color: var(--fg); display: flex; align-items: center; justify-content: center; width: 34px; font-size: 15px; font-family: var(--font-term); }
.badge .r { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 3px; text-align: center; }
.badge.b1 .r { background: linear-gradient(#2b2bd6, #11117a); }
.badge.b2 .r { background: linear-gradient(#d62b2b, #7a1111); }
.badge.b3 .r { background: linear-gradient(#5a5a5a, #1d1d1d); }
.badge.b4 .r { background: linear-gradient(#6b2bd6, #34117a); }
.badge.b5 .r { background: linear-gradient(#e8c400, #8a6d00); color: #000; }
.counter { display: inline-flex; gap: 2px; vertical-align: middle; }
.counter span { background: #000; color: #ff3b30; border: 1px solid #333; font-family: var(--font-term); font-size: 22px; width: 18px; text-align: center;
  text-shadow: 0 0 6px rgba(255,59,48,.8); }
.webring a { margin: 0 .5ch; }
.construction { display: inline-block; padding: 2px 10px; color: #000; font-weight: 700; text-shadow: none;
  background: repeating-linear-gradient(-45deg, #ffd400 0 12px, #000 12px 24px); }
.construction span { background: #ffd400; padding: 0 6px; }

/* ---------- full-screen overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.overlay.on { display: flex; }
#matrix { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s; }
#matrix.on { opacity: .35; }
#planet { background: #000; font-family: var(--font-term); }
#planet h1 { font-size: clamp(42px, 11vw, 150px); margin: 0; line-height: .95; letter-spacing: .04em;
  background: linear-gradient(90deg, #ff00e1, #00f0ff, #a3ff60, #ffe600, #ff00e1); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbow 2s linear infinite, shake .12s infinite; }
#planet p { color: #fff; font-size: 26px; }
@keyframes rainbow { to { background-position: 300% 0; } }
@keyframes shake { 0% { transform: translate(0,0); } 25% { transform: translate(2px,-2px); } 50% { transform: translate(-2px,1px); } 75% { transform: translate(1px,2px); } }

#ransom { background: #8b0000; color: #fff; font-family: var(--font-body); padding: 16px; }
#ransom .box { max-width: 720px; width: 100%; border: 3px double #fff; padding: 24px; background: rgba(0,0,0,.25); text-align: left; }
#ransom h2 { font-family: var(--font-term); font-size: 40px; margin: 0 0 8px; text-align: center; }
#ransom .clock { font-family: var(--font-term); font-size: 64px; text-align: center; margin: 8px 0; color: #ffe600; }
#ransom .bar { height: 18px; border: 1px solid #fff; margin: 8px 0 14px; } #ransom .bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s linear; }
#ransom .reveal { display: none; color: #ffe600; } #ransom.revealed .reveal { display: block; }
#ransom a { color: #ffe600; text-shadow: none; } #ransom a:hover { background: #ffe600; color: #000; }

.glitch-all .term { animation: glitchShift .25s steps(2) 3; }
@keyframes glitchShift { 0% { transform: translate(0); filter: none; } 33% { transform: translate(-4px, 1px) skewX(-3deg); filter: hue-rotate(90deg); } 66% { transform: translate(4px,-1px); filter: invert(1); } }

/* ---------- NFO page ---------- */
.nfo { font-family: 'Courier New', monospace; font-size: 15px; line-height: 1.45; white-space: normal; text-shadow: 0 0 6px var(--fg-glow); max-width: 82ch; margin: 0 auto; }
.nfo .box { white-space: pre; overflow-x: auto; font-weight: 700; }
.nfo h3 { font-family: var(--font-term); font-size: 24px; font-weight: normal; margin: 1.1em 0 .2em; color: var(--accent); text-shadow: 0 0 8px var(--accent-glow); }
.nfo h3::before { content: "[»] "; color: var(--fg-dim); }
.nfo p { margin: 0 0 .8em; }
.scan-term { font-size: 23px; height: auto; min-height: 70vh; }

/* ---------- responsive ---------- */
@media (max-width: 780px) {
  body { padding: 10px 10px 8px; }
  .monitor { padding: 12px 12px 8px; border-radius: 14px; }
  .term { padding: 16px 14px 18px; font-size: 22px; height: 72vh; }
  .hero { grid-template-columns: 1fr; }
  .logo { width: 120px; height: 120px; order: -1; }
  .banner { font-size: 1.55vw; }
  .topbar { font-size: 17px; }
  .statusbar .hide-sm { display: none; }
  .nfo { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 780px) { .construction { font-size: 14px; } .footer { font-size: 16px; } }

/* ---------- standalone ransom page ---------- */
body.ransom-page { background: #8b0000; padding: 0; }
.ransom-page #ransom { position: static; min-height: 100vh; padding: 24px 16px; }
.ransom-page #ransom .box { max-width: 760px; }
.ransom-page #ransom ul { margin: 0 0 1em; padding-left: 1.4em; }
.ransom-page #ransom li { margin-bottom: .35em; }
.ransom-page #ransom hr { border: 0; border-top: 1px dashed rgba(255,255,255,.6); margin: 16px 0; }
#ransom .dim-r { opacity: .7; font-size: 14px; }
#ransom code { background: rgba(0,0,0,.35); padding: 0 4px; word-break: break-all; }

.listing { white-space: pre; overflow-x: auto; margin: 0 0 .5em; }
