:root {
    --phosphor:   #4AF626;
    --bg:         #0D0D0D;
    --glow:       rgba(74, 246, 38, 0.4);

    --font-mono: 'VT323', 'Courier New', monospace;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--phosphor);
    font-family: var(--font-mono);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    /* scan-line overlay */
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.12) 2px,
        rgba(0, 0, 0, 0.12) 4px
    );
    pointer-events: none;
    z-index: 10;
}

main {
    text-align: center;
    position: relative;
    z-index: 1;
}

h1 {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--phosphor);
    text-shadow:
        0 0 4px var(--phosphor),
        0 0 12px var(--glow),
        0 0 24px var(--glow);
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Error pages */
p {
    font-family: var(--font-mono);
    color: var(--phosphor);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

p:last-child {
    margin-bottom: 0;
}

a.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.4rem 1.25rem;
    background-color: transparent;
    color: var(--phosphor);
    text-decoration: none;
    border: 1px solid var(--phosphor);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    transition: background-color 0.15s ease;
    box-shadow: 0 0 6px var(--glow);
}

a.back-link:hover,
a.back-link:focus {
    background-color: var(--phosphor);
    color: var(--bg);
    outline: none;
}

/* Error page variant */
body.error h1 {
    font-size: clamp(3rem, 10vw, 5rem);
    color: var(--phosphor);
    opacity: 0.5;
}
