:root {
    --bg-color: #050505;
    --text-color: #00FF41;
    --glow-color: rgba(0, 255, 65, 0.4);
    --font-main: 'VT323', monospace;
    --font-code: 'Source Code Pro', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1.25rem;
    line-height: 1.4;
    overflow-x: hidden;
    height: 100vh;
}

/* CRT Effect */
.crt::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    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));
    z-index: 10;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.crt::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: 10;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.27861; }
    5% { opacity: 0.34769; }
    10% { opacity: 0.23604; }
    15% { opacity: 0.90626; }
    20% { opacity: 0.18128; }
    25% { opacity: 0.83891; }
    30% { opacity: 0.65583; }
    35% { opacity: 0.57807; }
    40% { opacity: 0.26559; }
    45% { opacity: 0.84693; }
    50% { opacity: 0.96019; }
    55% { opacity: 0.08523; }
    60% { opacity: 0.71056; }
    65% { opacity: 0.73437; }
    70% { opacity: 0.28557; }
    75% { opacity: 0.96303; }
    80% { opacity: 0.2268; }
    85% { opacity: 0.03445; }
    90% { opacity: 0.7834; }
    95% { opacity: 0.35613; }
    100% { opacity: 0.25529; }
}

.scanlines {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(
        to bottom,
        transparent,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.1)
    );
    background-size: 100% 4px;
    z-index: 5;
    pointer-events: none;
}

.terminal-container {
    padding: 2rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 5px var(--glow-color);
}

#terminal-output {
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

#terminal-output::-webkit-scrollbar {
    display: none;
}

#input-area {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.prompt {
    color: var(--text-color);
    margin-right: 10px;
    font-weight: bold;
}

#terminal-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-code);
    font-size: 1.2rem;
    flex-grow: 1;
    outline: none;
    caret-color: transparent;
}

.cursor {
    animation: blink 1s infinite steps(2);
    display: inline-block;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.command-line {
    margin-bottom: 0.5rem;
}

.command-output {
    margin-bottom: 1rem;
    color: #fff; /* White for content to make it readable */
    font-family: var(--font-code);
    font-size: 1rem;
    opacity: 0.9;
}

.error {
    color: #ff5555;
}

.keyword { color: #8BE9FD; }
.url { color: #BD93F9; text-decoration: underline; cursor: pointer; }
.url:hover { color: #50FA7B; }

@media (max-width: 768px) {
    .terminal-container {
        padding: 1rem;
        font-size: 1rem;
    }
    #terminal-input {
        font-size: 1rem;
    }
}
