:root {
    --terminal-green: #00ff00; /* Matrix-like green */
    --terminal-bg: #000000;
    --terminal-green-darker: #00cc00; /* START ADDED TERMINAL GREEN DARKER VARIABLE */
}

[data-theme="light"] {
    --terminal-green: #008000; /* Darker green for contrast on light background */
    --terminal-bg: #ebebeb; /* Lighter background for terminal in light mode */
    --terminal-green-darker: #006600; /* TERMINAL GREEN DARKER VARIABLE FOR LIGHT THEME */
    #command-input {
        background-color: #1a1a1a;
        color: #00cc00;
    }

    /* Style the placeholder text for visibility */
    #command-input::placeholder {
        color: #666;
    }
    /* Caution Text for visibility */
    .caution-text {
        color: orange;
    }
}
/* Caution Text */
.caution-text {
    text-align: center;
    color: rgb(238, 238, 124);
    font-family: 'Courier New', Courier, monospace;
}

/* Run Terminal Button */
.run-terminal-btn {
    display: block; /* Make it a block element to center */
    margin: 40px auto; /* Center horizontally */
    background: none;
    border: 1px solid var(--border-color);
    color: var(--color-primary);
    padding: 15px 30px;
    cursor: pointer;
    font-family: var(--font-family-header); /* Use header font for distinguished look */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}
.run-terminal-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}
.run-terminal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* START STOP TERMINAL BUTTON STYLES: Styles for the button when it's in "Stop Terminal" mode */
.stop-terminal-btn {
    /* START CHANGE: Stop button styling when not hovered, matching run button default */
    background: none;
    color: var(--color-primary);
    border-color: var(--border-color);
    /* END CHANGE */
}

.stop-terminal-btn:hover {
    background-color: #ff0000; /* Red background on hover */
    color: #ffffff; /* White text on red background */
    border-color: #ff0000; /* Red border on hover */
}
/* END STOP TERMINAL BUTTON STYLES */

/* Terminal Output Area */
#terminal-output {
    background-color: var(--terminal-bg);
    border: 1px solid var(--terminal-green);
    color: var(--terminal-green);
    font-family: 'monospace', 'Courier New', Courier, monospace;
    font-size: calc(0.8rem + 0.5vw); /* This sets a responsive font size with a minimum of 0.8rem */
    max-width: 90%; /* The container can now be the full width */
    width: fit-content; /* Ensure the container stretches to its parent's width */
    margin: 10px auto; /* Centers the block horizontally and provides vertical spacing */
    padding: 15px; /* Adjust padding to control the space between text and border */
    margin-top: 50px;
    min-height: 300px; /* Ensure some visible area even when empty */
    white-space: nowrap; /* Forces text onto a single line */
    line-height: 1.4;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3); /* Subtle green glow */
    position: relative; /* For cursor positioning */
    display: none; /* Hidden until terminal runs */

}

/* Blinking Cursor */
.blinking-cursor {
    font-weight: bold;
    animation: blink-caret 1s infinite;
}

@keyframes blink-caret {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

/* Styling for hyperlinks within the terminal */
#terminal-output a {
    color: var(--terminal-green); /* Keep links green */
    text-decoration: none; /* Removed underline from links */
    transition: color 0.2s ease;
}
#terminal-output a:hover {
    color: #00ffcc; /* Slightly different green on hover */
}
/* Ensure visited links remain the same color */
#terminal-output a:visited {
    color: var(--terminal-green);
    text-decoration: none;
}

.terminal-input {
    text-align: center;
}

#command-line {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px; /* Adjust as needed */
}

#prompt {
    color: var(--color-primary);
    white-space: pre; /* Keeps the spacing of the prompt */
}

#command-input {
    background: transparent;
    background-color: #1a1a1a;    
    border: var(white);
    color: #00cc00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    outline: none;
    padding-left: 5px; /* Adds space between prompt and input */
}

/* Footer */
footer {
    margin-top: 60px;
}

/* Responsive Design - Consistent with Société il Noir homepage */
@media (max-width: 768px) {
    .run-terminal-btn { padding: 12px 25px; font-size: 1em; }
    #terminal-output { padding: 15px; font-size: 0.9em; }
}

/* Landscape/Portrait adaptation (subtle changes) - Consistent with Société il Noir homepage */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #terminal-output { min-height: 200px; } /* Adjust terminal height for narrow landscape */
}

@media screen and (orientation: portrait) and (max-width: 500px) {
    #terminal-output { padding: 10px; }
}

/* Media query for very small screens to prevent wrapping */
@media (max-width: 515px) {
    #terminal-output {
        font-size: 1.8vw; /* A more aggressive scale for very small screens */
        white-space: nowrap; /* Ensures text stays on a single line */
    }
}

/* Media query for smaller viewports */
@media (max-width: 450px) {
    #command-input {
        width: 55%;
        font-size: 0.8em;
    }
}