@font-face {
    font-family: 'JetBrainsMono';
    src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

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

html, body {
    background: #000;
    color: #00ff88;
    font-family: 'JetBrainsMono', 'Courier New', monospace;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ── CRT scan lines (always on top, no interaction) ───────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 255, 136, 0.04) 2px,
        rgba(0, 255, 136, 0.04) 3px
    );
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: screen;
}

/* ── CRT phosphor flicker (subtle) ────────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 255, 136, 0.02);
    pointer-events: none;
    z-index: 99;
    animation: flicker 4s steps(8) infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    25%      { opacity: 0.97; }
    50%      { opacity: 1; }
    75%      { opacity: 0.95; }
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

/* ── AHAKON.IO ASCII logo ─────────────────────────────────────────────── */
.logo {
    color: #00ff88;
    font-size: 14px;
    line-height: 1.1;
    margin-bottom: 3rem;
    text-shadow:
        0 0 4px #00ff88,
        0 0 12px rgba(0, 255, 136, 0.55),
        0 0 24px rgba(0, 255, 136, 0.25);
    white-space: pre;
}

/* ── Boot terminal (typed by terminal.js) ─────────────────────────────── */
.boot {
    color: #88ffaa;
    font-size: 14px;
    line-height: 1.6;
    text-shadow:
        0 0 3px #00ff88,
        0 0 8px rgba(0, 255, 136, 0.45);
    white-space: pre;
    min-height: 17em;        /* reserves vertical room so layout doesn't jump as text types in */
    max-width: 100%;
    overflow-x: auto;
    align-self: stretch;
    text-align: left;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ── Blinking block cursor ────────────────────────────────────────────── */
.cursor {
    display: inline-block;
    color: #00ff88;
    font-size: 14px;
    line-height: 1;
    margin-top: -1.4em;          /* tucks it just below the last typed line */
    margin-left: 2rem;
    align-self: flex-start;
    text-shadow:
        0 0 3px #00ff88,
        0 0 8px rgba(0, 255, 136, 0.45);
    animation: blink 1.05s steps(2) infinite;
}

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

@media (max-width: 700px) {
    .logo { font-size: 8px; }
    .boot { font-size: 11px; padding-left: 1rem; padding-right: 1rem; }
    .cursor { font-size: 11px; margin-left: 1rem; }
}
