/* Retro Terminal Styling */
:root {
    --terminal-green: #33ff33;
    --terminal-bg: #0a0a0a;
    --terminal-glow: 0 0 10px rgba(51, 255, 51, 0.7);
}

body {
    background-color: var(--terminal-bg);
    color: var(--terminal-green);
    font-family: 'VT323', monospace;
    font-size: 24px;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.terminal {
    width: 80%;
    max-width: 800px;
    height: 80%;
    padding: 20px;
    border: 2px solid var(--terminal-green);
    border-radius: 5px;
    box-shadow: var(--terminal-glow);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: flicker 0.15s infinite;
    scroll-behavior: smooth;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 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));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0.15;
}

.crt-overlay::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 11;
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

#output {
    white-space: pre-wrap;
    flex-grow: 1;
}

.input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
}

input[type="text"] {
    background: transparent;
    border: none;
    color: var(--terminal-green);
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
    outline: none;
    caret-color: var(--terminal-green);
}

.cli-note {
    color: #33bbff;
    margin-top: 10px;
    font-style: italic;
    font-size: 0.9em;
}

/* Animations */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes flicker {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.98;
    }

    100% {
        opacity: 1;
    }
}

@keyframes scanline {
    0% {
        transform: translateY(0);
        background: linear-gradient(to bottom, transparent 0%, rgba(51, 255, 51, 0.05) 0.5%, transparent 1%);
    }

    100% {
        transform: translateY(100%);
        background: linear-gradient(to bottom, transparent 0%, rgba(51, 255, 51, 0.05) 0.5%, transparent 1%);
    }
}