:root {
    --term-color: #33ff00; 
    --term-glow: rgba(51, 255, 0, 0.5);
    --term-bg: #0d0d0d;
}

body.amber-theme {
    --term-color: #ffb000;
    --term-glow: rgba(255, 176, 0, 0.5);
}

body {
    background-color: var(--term-bg);
    color: var(--term-color);
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    height: 100vh; /* Full screen height */
    width: 100vw;
    overflow: hidden; /* PREVENTS the body from scrolling behind URL bar */
    
    /* Flexbox to Center the Monitor "Game Box" */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The "Game Box" Container */
.monitor {
    width: 95%;
    max-width: 900px;
    height: 85vh; /* Leaves space for URL bars so nothing gets cut off */
    
    border: 2px solid var(--term-color); /* The Bounding Box */
    background-color: rgba(13, 13, 13, 0.9);
    box-shadow: 0 0 20px var(--term-glow), inset 0 0 20px rgba(0,0,0,0.5);
    
    padding: 1rem;
    overflow-y: auto; /* SCROLLING HAPPENS HERE NOW */
    position: relative;
    z-index: 2;
    border-radius: 4px;
}

/* Scrollbar Styling (Webkit) */
.monitor::-webkit-scrollbar { width: 8px; }
.monitor::-webkit-scrollbar-track { background: #000; }
.monitor::-webkit-scrollbar-thumb { background: var(--term-color); border-radius: 4px; }

/* CRT Overlay (Sits on top of everything) */
.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    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));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

.line {
    margin-bottom: 5px;
    text-shadow: 0 0 5px var(--term-glow);
    white-space: pre-wrap;
    line-height: 1.4;
}

.input-line { display: flex; align-items: center; min-height: 1.5rem; }

.prompt {
    margin-right: 10px;
    color: var(--term-color);
    flex-shrink: 0;
}

input#cmd {
    background: transparent;
    border: none;
    color: var(--term-color);
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
    outline: none;
    text-shadow: 0 0 5px var(--term-glow);
    caret-color: var(--term-color);
    width: 100%;
}