:root {
    --main-color: #ffffff;
    --red: #ff003c;
    --bg-color: #050505;
}

body {
    background-color: #000;
    margin: 0;
    overflow: hidden;
    font-family: 'VT323', monospace;
    color: var(--main-color);
    font-size: 1.5rem;
    text-shadow: 0 0 5px var(--main-color);
}

/* Classic CRT effects */
.crt::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: radial-gradient(circle, rgba(18, 16, 16, 0) 60%, rgba(0, 0, 0, 0.5) 100%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 100%, 100% 2px, 3px 100%;
    pointer-events: none;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
    animation: scanline 10s linear infinite;
    opacity: 0.6;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100vh;
    }
}

.terminal {
    padding: 2rem;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 5;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.terminal::-webkit-scrollbar {
    display: none;
}

#output {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.input-line {
    display: flex;
    align-items: center;
}

.prompt {
    margin-right: 10px;
}

input {
    background: transparent;
    border: none;
    color: var(--main-color);
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    outline: none;
    flex-grow: 1;
    text-shadow: 0 0 5px var(--main-color);
    text-transform: uppercase;
    caret-color: var(--main-color);
}

.hidden {
    display: none !important;
}

/* Crash style (Subject 39) */
body.crash {
    color: var(--red);
    text-shadow: 0 0 10px var(--red);
}

body.crash input {
    color: var(--red);
    text-shadow: 0 0 10px var(--red);
    caret-color: var(--red);
}

@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-3px, 3px)
    }

    40% {
        transform: translate(-3px, -3px)
    }

    60% {
        transform: translate(3px, 3px)
    }

    80% {
        transform: translate(3px, -3px)
    }

    100% {
        transform: translate(0)
    }
}

/* Arasaka right-click popup */
#arasaka-context-msg {
    border: 1px solid var(--red);
    background-color: #050000;
    color: var(--red);
    padding: 10px 15px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.4);
    z-index: 9999;
    text-transform: uppercase;
    text-shadow: 0 0 3px var(--red);
    pointer-events: none;
    /* Let clicks pass through and dismiss the menu */
    animation: glitch 0.3s linear infinite alternate;
}

/* --- BOOT SCREEN (LOGIN) --- */
#boot-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 50;
    background-color: var(--bg-color);
}

.boot-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#boot-logo {
    max-width: 300px;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

#boot-logo.fade-in {
    opacity: 1;
}

#boot-login {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glitch-title {
    font-size: 12rem;
    /* margin-bottom: 2rem; */
    letter-spacing: 10px;
}

.password-container {
    display: flex;
    align-items: center;
    font-size: 2rem;
}

.password-container input {
    font-size: 2rem;
    width: 250px;
    border-bottom: 2px solid var(--main-color);
    margin-left: 10px;
    text-align: center;
    color: var(--main-color);
    text-shadow: 0 0 5px var(--main-color);
}