:root {
    --bg-color: #0d0d0d;
    --text-primary: #00ff41; /* Classic Matrix Green */
    --text-secondary: #008F11; /* Darker Green */
    --text-highlight: #e0e0e0;
    --error-color: #ff3333;
    --font-stack: 'Fira Code', 'Courier New', monospace;
    --glow-spread: 5px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    height: 100vh;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
    text-shadow: 0 0 var(--glow-spread) var(--text-secondary);
}

/* CRT Scanline Effect */
.monitor-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

/* Glow animation for text */
@keyframes text-flicker {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

#terminal {
    height: 100%;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
#terminal::-webkit-scrollbar {
    width: 10px;
}
#terminal::-webkit-scrollbar-track {
    background: #001100;
}
#terminal::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border: 1px solid var(--text-primary);
}

#output {
    margin-bottom: 1rem;
    white-space: pre-wrap; /* Preserve whitespace for ASCII art */
}

.input-line {
    display: flex;
    align-items: center;
    width: 100%;
    padding-bottom: 2rem; /* Spacing at bottom */
}

.prompt {
    color: var(--text-primary);
    margin-right: 0.5rem;
    font-weight: 700;
    white-space: nowrap;
}

#command-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 16px;
    width: 100%;
    outline: none;
    text-shadow: 0 0 var(--glow-spread) var(--text-secondary);
    caret-color: transparent; /* Custom caret */
}

/* Custom Block Caret Animation */
.caret {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--text-primary);
    animation: blink 1s step-end infinite;
    margin-left: -10px; /* Overlap input slightly if needed, but simple block after is cleaner. */
    pointer-events: none;
}
/* Adjust caret position relative to input logic if input is hidden, but here we style input visible. 
   Actually, standard input caret is hard to style as a block in all browsers. 
   Let's keep the native caret invisible and use a block span that follows text? 
   For simplicity in this MV, let's just use the blinking block at the end of the input line visually. 
   A more robust way is to hide input and render value in span, but let's stick to simple first.
*/

/* Simpler approach for caret: standard input with custom color */
#command-input {
    caret-color: var(--text-primary);
}
.caret { display: none; } /* Hide custom caret for now to avoid sync issues */


@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Classes for content styling */
.command-echo {
    color: var(--text-highlight);
    margin-bottom: 1rem;
}

.response-block {
    margin-bottom: 1.5rem;
    animation: text-flicker 0.1s infinite alternate; /* Very subtle flicker */
    animation-duration: 4s;
}

.ascii-art {
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.2;
}

.heading {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px dashed var(--text-secondary);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.list-item {
    margin-left: 1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.list-item:hover {
    color: #fff;
    text-decoration: underline;
}

.success { color: var(--text-primary); }
.error { color: var(--error-color); }
.info { color: #5ea1ff; } /* Light blue for info unrelated to main matrix theme */

a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted;
}
a:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
}
