@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --terminal-green: #33ff33;
    --terminal-dark: #020802;
    --text-shadow-glow: 0 0 8px rgba(51, 255, 51, 0.65);
}

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

body, html {
    background-color: var(--terminal-dark);
    color: var(--terminal-green);
    font-family: 'VT323', monospace;
    font-size: 24px;
    height: 100%;
    width: 100%;
    overflow-y: auto; /* Allow scrolling if history gets long */
    letter-spacing: 1px;
}

.text-white { color: #ffffff; text-shadow: 0 0 8px #ffffff; }
.text-error { color: #ff3333; text-shadow: 0 0 8px #ff3333; }

/* CRT Emulation */
.crt-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
    background-size: 100% 5px; 
    z-index: 9999;
    pointer-events: none; 
    animation: monitor-flicker 0.2s infinite;
}
.crt-overlay::after {
    content: " "; display: block; position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: radial-gradient(circle, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
}
@keyframes monitor-flicker {
    0% { opacity: 0.985; } 50% { opacity: 1; } 100% { opacity: 0.99; }
}

/* Layout */
.terminal {
    width: 100%;
    min-height: 100%;
    padding: 40px;
    text-shadow: var(--text-shadow-glow);
}

p, .input-line {
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-all;
}

.prompt-prefix {
    color: #88ff88;
    margin-right: 10px;
}

/* Interactive Invisible Input Trick */
.input-line {
    display: flex;
    align-items: center;
    position: relative;
}

#texter {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0; /* Fully transparent but physically present */
    width: 100%;
    background: transparent;
    border: none;
    color: transparent;
    outline: none;
    font-family: inherit;
    font-size: inherit;
}

/* Blinking Interactive Cursor */
.terminal-cursor {
    display: inline-block;
    width: 12px;
    height: 20px;
    background-color: var(--terminal-green);
    animation: steady-blink 1.0s step-end infinite;
    margin-left: 2px;
}

@keyframes steady-blink {
    from, to { background-color: transparent; }
    50% { background-color: var(--terminal-green); }
}
