* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    font-family: "Courier New", Courier, monospace;
    background: #050505;
    color: #e5e5e5;
}

html {
    min-height: 100%;
    background: #050505;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.018) 0,
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px,
            transparent 4px
        ),
        #050505;
}

body::after {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    content: "";
    background: radial-gradient(
        ellipse at center,
        transparent 58%,
        rgba(0, 0, 0, 0.38) 100%
    );
}

.terminal {
    width: min(920px, 100%);
    min-height: 100vh;
    padding: 40px;
    font-size: 18px;
    line-height: 1.35;
    text-shadow: 0 0 7px rgba(255, 255, 255, 0.12);
}

.terminal-header {
    margin-bottom: 28px;
    color: #fff;
}

.screen {
    margin-top: 12px;
}

.prompt-line {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
}

input {
    flex: 1;
    min-width: 8ch;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    caret-color: #fff;
}

.message {
    min-height: 1.35em;
    margin-top: 7px;
}

.error {
    color: #ff6464;
}

.success {
    color: #97ff97;
}

.report p {
    margin: 1.35em 0;
}

.quit-menu {
    margin-top: 28px;
}

.menu-options {
    margin-top: 8px;
}

.menu-option {
    width: max-content;
    padding: 2px 0;
}

.menu-option::before {
    display: inline-block;
    width: 2ch;
    content: "  ";
}

.menu-option.selected::before {
    content: "> ";
}

.help-text {
    margin-top: 14px;
    color: #aaa;
    font-size: 0.85em;
}

.terminated-screen {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    color: #ff4b4b;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(24px, 5vw, 54px);
    letter-spacing: 0.12em;
    text-align: center;
    text-shadow: 0 0 14px rgba(255, 65, 65, 0.35);
}

.cursor {
    animation: blink 0.9s steps(2, start) infinite;
}

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

[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .terminal {
        padding: 24px 18px;
        font-size: 15px;
    }

    .prompt-line {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor {
        animation: none;
    }
}
