@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: #a855f7;
    font-family: 'JetBrainsMono', 'Courier New', monospace;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* ── CRT scan lines ──────────────────────────────────────────────────── */
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(168, 85, 247, 0.06) 2px,
        rgba(168, 85, 247, 0.06) 3px
    );
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: screen;
}

/* ── CRT phosphor flicker (subtle) ───────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(168, 85, 247, 0.025);
    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;
}

/* ── Purple gradient applied to ASCII via background-clip: text ──────── */
/* Light lavender at top, saturated mid, deep violet at bottom.           */

.logo,
.boot {
    background: linear-gradient(180deg,
        #d8b4fe 0%,
        #c084fc 25%,
        #a855f7 55%,
        #7c3aed 85%,
        #6b21a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ── AHAKON.IO ASCII logo ─────────────────────────────────────────────── */
.logo {
    font-size: 14px;
    line-height: 1.1;
    margin-bottom: 3rem;
    text-shadow:
        0 0 4px rgba(168, 85, 247, 0.7),
        0 0 12px rgba(168, 85, 247, 0.45),
        0 0 24px rgba(168, 85, 247, 0.2);
    white-space: pre;
}

/* ── Boot terminal (typed by terminal.js) ─────────────────────────────── */
.boot {
    font-size: 14px;
    line-height: 1.6;
    text-shadow:
        0 0 3px rgba(168, 85, 247, 0.65),
        0 0 8px rgba(168, 85, 247, 0.35);
    white-space: pre;
    min-height: 17em;
    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: #d8b4fe;
    font-size: 14px;
    line-height: 1;
    margin-top: -1.4em;
    margin-left: 2rem;
    align-self: flex-start;
    text-shadow:
        0 0 3px rgba(168, 85, 247, 0.7),
        0 0 8px rgba(168, 85, 247, 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; }
}
