:root {
    --bg-color: #0c0c0c;
    --text-color: #00FF41; /* Matrix Green */
    --font-main: 'JetBrains Mono', monospace;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    overflow: hidden;
}

/* CRT and Scanline Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(0,255,65,0.05) 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 10;
    animation: flicker 0.15s infinite;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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: 11;
}

@keyframes flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1; }
    100% { opacity: 0.95; }
}

/* Terminal Container */
.terminal-container {
    padding: 20px;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 5;
}

/* Scrollbar styling for webkit */
.terminal-container::-webkit-scrollbar {
    width: 8px;
}
.terminal-container::-webkit-scrollbar-track {
    background: #000;
}
.terminal-container::-webkit-scrollbar-thumb {
    background: var(--text-color);
}

#output {
    white-space: pre-wrap;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Input Line */
.input-line {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
}

#cli-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    outline: none;
    caret-color: var(--text-color);
}

/* Blinking Cursor for the Typewriter/CLI */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--text-color);
    vertical-align: bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cli-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--text-color);
    vertical-align: bottom;
    animation: blink 1s step-end infinite;
    position: relative;
    left: -2px; /* Adjust based on input width */
}