html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    background: #050000;
    color: #c93232;

    font-family:
        "Courier New",
        Courier,
        monospace;

    overflow: hidden;
}

body {
    position: relative;
}

/*
    CRT scanlines
*/

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 40, 40, 0.035) 0px,
            rgba(255, 40, 40, 0.035) 1px,
            transparent 1px,
            transparent 4px
        );

    z-index: 10;
}

/*
    CRT vignette
*/

body::after {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.95),
        inset 0 0 30px rgba(80, 0, 0, 0.25);

    z-index: 11;
}

/*
    Terminal body
*/

#terminal {

    box-sizing: border-box;

    width: 100%;
    height: 100%;

    padding: 24px 28px;

    overflow-y: auto;
    overflow-x: hidden;

    text-shadow:
        0 0 4px rgba(255, 20, 20, 0.30);

    scrollbar-width: thin;
    scrollbar-color: #401010 #080000;
}

/*
    Main terminal text
*/

#screen {

    white-space: pre-wrap;

    line-height: 1.32;

    font-size:
        clamp(
            13px,
            1.15vw,
            18px
        );

    max-width: 1200px;

    min-height: calc(100% - 45px);
}

/*
    Command line
*/

#command-form {

    display: flex;

    align-items: center;

    margin-top: 6px;

    max-width: 1200px;

    position: relative;
}

/*
    Terminal prompt
*/

.prompt {

    margin-right: 8px;

    color: #e04444;

    text-shadow:
        0 0 5px rgba(255, 20, 20, 0.4);
}

/*
    Command input
*/

#command-input {

    flex: 1;

    min-width: 0;

    border: none;
    outline: none;

    background: transparent;

    color: #e04444;

    font:
        inherit;

    text-shadow:
        inherit;

    caret-color: transparent;
}

/*
    Mainframe block cursor
*/

#terminal-cursor {

    position: absolute;

    width: 0.55em;
    height: 1em;

    background: #d83a3a;

    pointer-events: none;

    animation:
        terminal-cursor-blink 1s steps(1, end) infinite;
}

@keyframes terminal-cursor-blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/*
    Text selection
*/

#command-input::selection {

    background: #7c1010;

    color: #ffffff;
}


/*
    Text classes
*/

.dim {

    color: #752222;
}

.bright {

    color: #ef5555;
}

.warn {

    color: #ff7777;
}

.good {

    color: #bd4444;
}

.header {

    color: #e34a4a;

    text-shadow:
        0 0 7px rgba(255, 30, 30, 0.45);
}

/*
    Scrollbar
*/

::-webkit-scrollbar {

    width: 8px;
}

::-webkit-scrollbar-track {

    background: #080000;
}

::-webkit-scrollbar-thumb {

    background: #481010;
}

::-webkit-scrollbar-thumb:hover {

    background: #661515;
}

/*
    Mobile adjustments
*/

@media (max-width: 600px) {

    #terminal {

        padding:
            16px 14px;
    }

    #screen {

        font-size: 12px;

        line-height: 1.3;
    }
}