/* the site's machine units (style.css): bezel, screws, dark screen, green lamp; Silkscreen and Rubik Mono One */
:root {
  --face: #d7dcd3; --ink: #121212; --lit: #3ecf7a; --short: #e8703a; --screen: #090909; --term: #9fb3a4; --term-hi: #e4f5e7;
  --pixel: "Silkscreen", monospace; --mono: "IBM Plex Mono", monospace; --head: "Rubik Mono One", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #120f1c; color: var(--term-hi); font-family: var(--mono); user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: crosshair; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }

.unit { position: fixed; background: var(--face); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 7px;
  box-shadow: 0 0 0 3px #2a2a28, 0 10px 30px rgba(0, 0, 0, 0.55);
  background-image: radial-gradient(circle at 7px 7px, #3b3b39 2px, transparent 2.5px), radial-gradient(circle at calc(100% - 7px) 7px, #3b3b39 2px, transparent 2.5px),
    radial-gradient(circle at 7px calc(100% - 7px), #3b3b39 2px, transparent 2.5px), radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), #3b3b39 2px, transparent 2.5px); }
.unit-top { display: flex; align-items: center; gap: 9px; padding: 2px 8px 7px; }
.unit-title b { display: block; font-family: var(--head); font-size: 11px; letter-spacing: 0.14em; }
.unit-title small { font-family: var(--pixel); font-size: 8px; letter-spacing: 0.16em; color: #5d605a; }
.lamp { width: 16px; height: 16px; border-radius: 4px; background: #1b1d1b; border: 2px solid var(--ink); box-shadow: inset 0 0 0 3px #2c2f2c; flex: none; }
.lamp.on { background: var(--lit); box-shadow: 0 0 10px var(--lit), inset 0 0 0 3px #1d6e40; }
.screen { background: var(--screen); color: var(--term); border: 2px solid var(--ink); border-radius: 5px; box-shadow: inset 0 0 0 3px #1e211e, inset 0 0 24px rgba(62, 207, 122, 0.08); padding: 8px 10px; }

.card { top: 12px; left: 12px; width: 300px; }
.card .row { display: flex; gap: 7px; }
#portrait { width: 84px; height: 84px; image-rendering: pixelated; background: #10140f; border: 2px solid var(--ink); border-radius: 5px; }
.stats { flex: 1; display: grid; gap: 2px; }
.stats .k { font-family: var(--pixel); font-size: 8px; letter-spacing: 0.16em; color: var(--term); margin-right: 6px; }
.stats .v { font-family: var(--pixel); font-size: 18px; color: var(--lit); text-shadow: 0 0 10px rgba(62, 207, 122, 0.5); }
.stats .v.small { font-size: 12px; }

.mapunit { top: 12px; right: 12px; }
#minimap { display: block; width: 168px; height: 168px; image-rendering: pixelated; border: 2px solid var(--ink); border-radius: 5px; background: #10140f; }

.chat { left: 12px; bottom: 12px; width: 320px; }
.log { height: 128px; overflow: hidden; font-size: 11px; line-height: 1.5; display: flex; flex-direction: column-reverse; }
.log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log .n { color: var(--lit); } .log .sys { color: #e8c13a; } .log .r { color: var(--short); }

.quests { right: 12px; bottom: 12px; width: 340px; }
.qlist { font-size: 11px; line-height: 1.6; min-height: 60px; }
.qlist .q b { color: var(--term-hi); } .qlist .q.on b { color: var(--lit); }
.qlist .bar { display: block; height: 4px; background: #1f2a22; margin: 2px 0 5px; } .qlist .bar i { display: block; height: 100%; background: var(--lit); }
.keys { font-family: var(--pixel); font-size: 8px; letter-spacing: 0.08em; padding: 6px 4px 1px; color: #3b3b39; }
.keys b { color: var(--ink); }

/* over the scene */
.bubble { position: absolute; transform: translate(-50%, -100%); background: #f4efe0; color: #1a1410; font-family: var(--pixel); font-size: 10px; padding: 3px 7px;
  border: 2px solid #1a1410; border-radius: 4px; white-space: nowrap; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; border: 4px solid transparent; border-top-color: #1a1410; transform: translateX(-50%); }
.marker { position: absolute; transform: translate(-50%, -100%); font-family: var(--pixel); font-size: 10px; letter-spacing: 0.08em; padding: 3px 7px;
  background: var(--screen); color: var(--lit); border: 2px solid var(--lit); border-radius: 4px; box-shadow: 0 0 12px rgba(62, 207, 122, 0.5); white-space: nowrap; }
.marker .bar { display: block; height: 3px; margin-top: 2px; background: #1f2a22; } .marker .bar i { display: block; height: 100%; background: var(--lit); }
.nametag { position: absolute; transform: translate(-50%, -100%); font-family: var(--pixel); font-size: 9px; color: var(--lit); text-shadow: 0 1px 0 #000, 0 0 6px rgba(62, 207, 122, 0.8); white-space: nowrap; }
.pop { position: absolute; transform: translate(-50%, -100%); font-family: var(--head); font-size: 14px; color: #ffe08a; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255, 200, 90, 0.9); animation: pop 1.4s ease-out forwards; }
@keyframes pop { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -50px; } }

/* loading: a pixel logo and a green bar */
#loading { position: fixed; inset: 0; background: #000; display: grid; place-content: center; justify-items: center; gap: 26px; z-index: 10; transition: opacity 0.6s; }
.logo { display: grid; justify-items: center; line-height: 0.95; font-family: var(--head); }
.logo span { color: #9be33a; -webkit-text-stroke: 3px #1b2410; paint-order: stroke fill;
  text-shadow: 0 4px 0 #2a5a12, 0 8px 0 #1b2410, 0 0 30px rgba(120, 230, 60, 0.35); background: linear-gradient(#d8ff7a 0 18%, #8fdc2e 18% 70%, #5aa01e 70%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo .l1 { font-size: 74px; letter-spacing: 0.08em; } .logo .l2 { font-size: 46px; letter-spacing: 0.06em; }
.loadframe { width: 420px; height: 46px; border: 5px solid #b9b9b9; border-radius: 9px; background: #000; padding: 4px; }
.loadframe i { display: block; height: 100%; width: 0; background: linear-gradient(#36ff00 0 70%, #24b800 70%); border-radius: 3px; transition: width 0.2s; }
.loadtxt { font-family: var(--pixel); font-size: 11px; letter-spacing: 0.2em; color: #6a7a6a; }
@media (max-width: 800px) { .chat, .quests .keys { display: none; } .quests { width: calc(100% - 24px); } .card { width: 240px; } }

.connect { display: block; width: 100%; margin-top: 7px; font-family: var(--pixel); font-size: 10px; letter-spacing: 0.12em; background: var(--lit); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: 7px; cursor: pointer; box-shadow: 0 2px 0 var(--ink); }
.connect:disabled { background: #cfcfca; cursor: default; box-shadow: none; transform: translateY(1px); }
.netline { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: 8px; letter-spacing: 0.1em; color: #5d605a; padding: 5px 2px 0; }
.say { width: 100%; margin-top: 5px; background: #0b0d0b; color: var(--term-hi, #e4f5e7); border: 1px solid #2c3a2f; border-radius: 3px; font-family: var(--mono, monospace); font-size: 11px; padding: 4px 6px; }
.say:focus { outline: 1px solid var(--lit); }
.log .y { color: #e8b24c; }
.nametag.me { color: #e8b24c; text-shadow: 0 1px 0 #000, 0 0 6px rgba(232, 178, 76, 0.8); }

/* Habbo's chat: each line a bubble over the one who said it, the older ones rising up the room */
#bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.hb { position: absolute; transform: translateX(-50%); background: #f4f4ef; color: #121212; border: 2px solid #121212; border-radius: 6px; padding: 3px 8px 3px 6px; font-family: var(--mono, monospace); font-size: 11px; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 0 #121212; transition: top 0.35s steps(4), opacity 0.6s; }
.hb b { font-family: var(--pixel); font-size: 9px; margin-right: 5px; color: #2a7a4b; }
.hb.me b { color: #b07a10; } .hb.sys { background: #121212; color: #e8c13a; border-color: #3a3a38; }
.hb::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 8px; height: 8px; background: inherit; border-right: 2px solid #121212; border-bottom: 2px solid #121212; transform: translateX(-50%) rotate(45deg); }
.hb.up::after { display: none; }
.hovertag { position: fixed; transform: translate(-50%, -100%); pointer-events: none; z-index: 7; background: #090909; color: #e4f5e7; border: 1px solid #3ecf7a; border-radius: 3px; padding: 2px 6px; font-family: var(--pixel); font-size: 9px; letter-spacing: 0.06em; white-space: nowrap; }
.prompt { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 7; background: #090909; color: #3ecf7a; border: 2px solid #3ecf7a; border-radius: 5px; padding: 8px 14px; font-family: var(--pixel); font-size: 11px; letter-spacing: 0.12em; box-shadow: 0 0 18px rgba(62, 207, 122, 0.45); }
.brains { position: fixed; inset: 0; z-index: 20; background: rgba(5, 8, 6, 0.55); }
.brains iframe { width: 100%; height: 100%; border: 0; background: transparent; }
.connect.alt { background: #cfcfca; margin-top: 5px; }
body.fp #minimap { opacity: 0.85; }

/* the way in */
.gate { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(9, 12, 10, 0.35), rgba(5, 7, 6, 0.82)); transition: opacity 0.5s; }
.gate[hidden] { display: none; }
.gate.out { opacity: 0; pointer-events: none; }
.gate .unit { position: relative; width: min(460px, calc(100vw - 32px)); }
.gate-screen { padding: 12px 14px; }
.gate-stats { font-family: var(--pixel); font-size: 10px; letter-spacing: 0.14em; color: var(--lit); margin-bottom: 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.steps li { display: flex; gap: 9px; align-items: center; font-family: var(--pixel); font-size: 9px; letter-spacing: 0.08em; color: #6f7a70; }
.steps li i { width: 11px; height: 11px; border: 2px solid #3a463c; border-radius: 3px; flex: none; }
.steps li.now { color: #e4f5e7; } .steps li.now i { border-color: var(--lit); animation: blink 0.8s steps(2) infinite; }
.steps li.done { color: var(--lit); } .steps li.done i { background: var(--lit); border-color: var(--lit); }
@keyframes blink { 50% { background: var(--lit); } }
.gate-msg { min-height: 16px; margin-top: 10px; font-size: 11px; color: #e8c13a; }
.gate-msg.err { color: var(--short); } .gate-msg a { color: var(--lit); }
.gate-keys { display: grid; grid-template-columns: 1.6fr 1fr; gap: 7px; padding-top: 7px; }
.gate-keys .connect { margin-top: 0; padding: 10px; font-size: 11px; }
