/* =========================================
   WebCMD - Interactive Terminal Stylesheet
   ========================================= */

/* --- Global Resets & Scrollbar Hiding --- */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    box-sizing: border-box; /* Ensures padding doesn't break the full width */
}
*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* --- Base Body Styling --- */
body {
    background-color: #0c0c0c;
    color: #cccccc;
    font-family: Consolas, "Courier New", monospace;
    padding: 20px;
    margin: 0;
    display: flex;
    justify-content: flex-start; /* Aligns terminal text to the left */
    transition: color 0.3s, background-color 0.3s;
    height: 100vh; /* Full viewport height */
    width: 100vw;  /* Full viewport width */
    overflow: hidden; /* Prevents the body itself from scrolling */
}

/* --- Theme Overrides --- */
body.theme-hacker { color: #00ff00; background-color: #051405; }
body.theme-retro { color: #ffb000; background-color: #2b1d00; }
body.theme-light { color: #000000; background-color: #ffffff; font-weight: bold; }

/* --- CRT Theme (Cinematic Polish) --- */
body.theme-crt { 
    color: #33ff00; 
    background-color: #000000; 
    text-shadow: 0 0 3px #33ff00; 
}
body.theme-crt::after {
    content: " "; 
    display: block; 
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    /* Creates the retro scanline overlay */
    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: 20; 
    background-size: 100% 2px, 3px 100%; 
    pointer-events: none;
}
@keyframes flicker { 
    0% { opacity: 0.95; } 
    5% { opacity: 0.85; } 
    10% { opacity: 0.95; } 
}
body.theme-crt #terminal-container { 
    animation: flicker 0.15s infinite; 
}

/* --- Main Terminal Container --- */
#terminal-container {
    width: 100%;
    height: 100%; /* Takes up full available vertical space */
    background-color: transparent;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Allows scrolling inside the terminal only */
    z-index: 10;
}

#output { 
    margin-bottom: 10px; 
}

.line { 
    min-height: 1.2em; 
    word-wrap: break-word; 
    white-space: pre-wrap; /* Crucial: Keeps ASCII art and multiple spaces perfectly aligned */
}

/* --- Input Area --- */
.input-wrapper { 
    display: flex; 
    align-items: center; 
}
.prompt-path { 
    margin-right: 8px; 
    white-space: nowrap; /* Prevents the C:\ path from wrapping to a new line */
}
input[type="text"] {
    background: transparent; 
    color: inherit; 
    border: none;
    font-family: inherit; 
    font-size: 1em; 
    outline: none; 
    flex-grow: 1; /* Makes the invisible input box stretch to the end of the line */
}

/* --- Matrix Easter Egg Canvas --- */
#matrix-canvas {
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    pointer-events: none; 
    opacity: 0; 
    transition: opacity 2s; 
    z-index: 1;
}

/* --- BIOS Boot Screen --- */
#boot-screen {
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background-color: #000; 
    color: #ccc; 
    font-family: Consolas, "Courier New", monospace;
    padding: 20px; 
    z-index: 100; 
    display: none; 
    flex-direction: column;
}