/* ...existing code... */
body {
    background-color: #1a1a1a; /* Dark background */
    color: #e0e0e0; /* Light text color */
    font-family: 'Fira Code', 'Source Code Pro', 'Consolas', monospace; /* Monospaced font */
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent body scrollbars from appearing on the entire page */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure body takes full viewport height */
    position: relative; /* Needed for CRT overlay */
}

/* CRT side background effect */
.crt-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(to right, 
            #003800 0%, 
            transparent 10%, 
            transparent 90%, 
            #003800 100%);
}


/* Optional: CRT scanlines overlay */
body::before {
    content: "";
    pointer-events: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,255,0,0.03) 0px,
        rgba(0,255,0,0.03) 1px,
        transparent 2px,
        transparent 4px
    );
    z-index: 2;
    mix-blend-mode: lighten;
}

/* ...existing code... */
#terminal {
    width: 90%; /* Responsive width */
    max-width: 800px; /* Maximum width for larger screens */
    height: 80vh; /* Responsive height */
    background-color: #000; /* Terminal background color */
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4); /* Green glow effect */
    display: flex;
    flex-direction: column; /* Stacks children (output and input) vertically */
    overflow: hidden; /* Important: Prevents terminal itself from scrolling, its children manage overflow */
    line-height: 1.4; /* Improve readability of text */
    border: 1px solid rgba(0, 255, 0, 0.2);
}

/* NEW: Header for the toggle button */
#terminal-header {
    background: rgba(0, 255, 0, 0.1);
    padding: 5px 15px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #00ff00;
    font-size: 0.9em;
}

/* NEW: Style for the toggle button */
.toggle-button {
    color: #00ff00;
    text-decoration: none;
    border: 1px solid #00ff00;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.toggle-button:hover {
    background-color: #00ff00;
    color: #000;
}


#output {
    flex-grow: 1; /* Makes the output area take up all available vertical space */
    overflow-y: auto; /* THIS IS WHERE VERTICAL SCROLLING IS ENABLED */
    overflow-x: hidden; /* Hide horizontal overflow within the output area */
    padding: 15px; /* Add some padding inside the output area */
}

#output pre { /* Styles for the <pre> tags within the output div */
    white-space: pre-wrap; /* Preserves whitespace and wraps lines */
    word-break: break-word; /* Breaks long words if they don't fit */
    margin: 0; /* Remove default margin for <pre> */
    padding: 0; /* Remove default padding for <pre> */
    line-height: inherit; /* Inherit line height from parent */
}

#input-area {
    display: flex; /* Align prompt and input horizontally */
    align-items: baseline; /* Aligns text baselines for cleaner look */
    margin-top: 10px; /* Space above the input area */
    flex-shrink: 0; /* Prevents this area from shrinking */
    padding: 0 15px 15px 15px; /* Add padding to the input area */
}

#prompt {
    color: #00ff00; /* Distinct green color for the prompt */
    margin-right: 8px; /* Space between prompt and input field */
    flex-shrink: 0; /* Prevents the prompt from shrinking */
}

#command-input {
    flex-grow: 1; /* Input field takes up remaining horizontal space */
    background-color: transparent; /* Transparent background */
    border: none; /* No border */
    outline: none; /* No outline when focused */
    color: inherit; /* Inherit text color from terminal */
    caret-color: #00ff00; /* Blinking cursor color */
    font-family: inherit; /* Inherit font from terminal */
    font-size: inherit; /* Inherit font size */
    min-width: 0; /* Allows the input field to shrink properly within flex container */
}

/* Optional: Custom scrollbar styling for WebKit browsers */
#output::-webkit-scrollbar {
    width: 8px;
}

#output::-webkit-scrollbar-track {
    background: #2b2b2b;
}

#output::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

#output::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}
