/* HackmeOS — the page runs the game's own theme.
   Colours are the "Matrix Green" defaults from the game's shared/theme.ts,
   the type is the same monospace stack the client uses, and the panels wear
   the same thin window chrome. */

:root {
    --bg: #0a0e14;
    --bg-panel: #0f141b;
    --bg-panel-2: #131a23;
    --border: #1f2a38;
    --text: #c9d1d9;
    --text-dim: #6b7785;
    --accent: #39ff14;
    --accent-dim: #1a8a08;
    --danger: #ff4d4d;
    --warn: #ffb84d;
    --info: #4d9fff;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* The grid the server map is drawn on, faintly, under everything. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(57, 255, 20, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

body.lightbox-open { overflow: hidden; }

/* `height: auto` is load-bearing: the <img> tags carry width/height
   attributes for layout stability, and without it the intrinsic height
   wins over the constrained width and every screenshot comes out squeezed. */
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Top bar, like the client's ──────────────── */

.topbar {
    border-bottom: 1px solid var(--border);
    background: var(--bg-panel);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    font-size: 0.82rem;
}

.topbar__brand { color: var(--accent); }

.back-home {
    color: var(--text-dim);
    text-decoration: none;
}

.back-home:hover { color: var(--accent); }

/* ── Hero ────────────────────────────────────── */

.hero { padding: 3.5rem 0 3rem; }

.tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.hero h1 {
    margin: 1.1rem 0 0.4rem;
    font-family: var(--mono);
    font-size: clamp(2.2rem, 7vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 0 26px rgba(57, 255, 20, 0.28);
}

.hero__tagline { color: var(--accent); font-size: 1.05rem; }

.hero__lead {
    max-width: 44rem;
    margin-top: 1.4rem;
    color: var(--text-dim);
}

.hero__lead em { color: var(--text); font-style: normal; }

/* The boot lines under the headline — the same shape the client prints. */
.boot {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    background: #000;
    font-size: 0.85rem;
    overflow-x: auto;
}

.boot div { white-space: pre; }
.boot .ok { color: var(--accent); }
.boot .dim { color: var(--text-dim); }
.boot .val { color: var(--info); }
.boot .cursor { color: var(--accent); animation: blink 1.1s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }

/* ── Buttons ─────────────────────────────────── */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--accent-dim);
    background: rgba(57, 255, 20, 0.06);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.btn:not(.btn--off):hover {
    background: rgba(57, 255, 20, 0.14);
    border-color: var(--accent);
}

/* Locked: the door exists, it is just not open. Grey, flat, unfocusable. */
.btn--off {
    border-color: var(--border);
    background: var(--bg-panel-2);
    color: var(--text-dim);
    cursor: not-allowed;
}

.btn__note { opacity: 0.7; }

/* ── Sections ────────────────────────────────── */

section { padding-bottom: 3.5rem; }

.section-head {
    margin-bottom: 1.5rem;
    color: var(--text-dim);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.section-head::before { content: "# "; color: var(--accent-dim); }

/* ── Gallery: each shot in window chrome ─────── */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.win {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.win:hover,
.win:focus-visible {
    border-color: var(--accent-dim);
    transform: translateY(-3px);
}

.win__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.win:hover .win__bar { color: var(--accent); }

.win__bar span:last-child { opacity: 0.5; }

.win__body { display: block; padding: 0.6rem; }

.win__caption {
    display: block;
    padding: 0 0.6rem 0.7rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ── Panels ──────────────────────────────────── */

.panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.panel {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent-dim);
    background: var(--bg-panel);
}

.panel h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.panel p { color: var(--text-dim); font-size: 0.88rem; }

/* ── Closing ─────────────────────────────────── */

.closing .actions { margin-top: 1.25rem; }
.closing > p { color: var(--text-dim); }

/* ── Footer: the client's status bar ─────────── */

footer {
    border-top: 1px solid var(--border);
    background: var(--bg-panel);
    padding: 0.75rem 0;
    font-size: 0.78rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-dim);
}

.footer-content img { height: 1.1rem; opacity: 0.5; }

.footer-content a { color: var(--text-dim); text-decoration: none; }
.footer-content a:hover { color: var(--accent); }

.online::before {
    content: "● ";
    color: var(--accent);
}

/* ── Lightbox ────────────────────────────────── */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(3, 6, 10, 0.94);
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
    max-width: min(1200px, 94vw);
    padding: 0.5rem;
    border: 1px solid var(--accent-dim);
    background: var(--bg-panel);
}

.lightbox__img { max-height: 78vh; width: auto; }

.lightbox__caption {
    padding-top: 0.6rem;
    color: var(--text-dim);
    font-size: 0.82rem;
    text-align: center;
}

.lightbox__close,
.lightbox__nav {
    flex: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: var(--bg-panel-2);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
}

.lightbox__close:hover,
.lightbox__nav:hover { border-color: var(--accent); }

@media (max-width: 640px) {
    .lightbox { padding: 0.75rem; }
    .lightbox__nav { width: 34px; height: 34px; }
    .btn { width: 100%; justify-content: center; }
}
