:root {
    --terminal-cyan: #00f2ff;
    --danger-red: #ff0033;
    --bg-black: #010101;
    font-size: 16px;
}

body {
    background: var(--bg-black);
    color: var(--terminal-cyan);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow: hidden;
}

.monitor_frame {
    width: 90vw;
    height: 85vh;
    border: 0.125em solid var(--terminal-cyan);
    background: radial-gradient(circle, rgba(0,242,255,0.05) 0%, rgba(0,0,0,1) 100%);
    box-shadow: 0 0 1.875em rgba(0, 242, 255, 0.2), inset 0 0 1.25em rgba(0, 242, 255, 0.1);
    backdrop-filter: blur(0.625em);
    padding: 2em;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

.crt_overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 0.125em, 0.125em 100%;
    pointer-events: none;
    z-index: 5;
}

.terminal_header {
    display: flex;
    justify-content: space-between;
    border-bottom: 0.06em solid var(--terminal-cyan);
    padding-bottom: 0.625em;
    font-size: 0.8rem;
    letter-spacing: 0.125em;
    opacity: 0.7;
}

.output_container {
    flex: 1;
    overflow-y: auto;
    margin: 1.25em 0;
    padding-right: 0.625em;
    scrollbar-width: none;
}

.log_entry {
    margin-bottom: 0.625em;
    font-size: 1.1rem;
    text-shadow: 0 0 0.5em var(--terminal-cyan);
    line-height: 1.4;
}

pre.log_entry {
    font-family: 'JetBrains Mono', monospace;
    white-space: pre-wrap;
    margin: 0.625em 0;
    line-height: 1.2;
}

/* --- THE PRECISION INPUT STACK --- */
.input_wrapper {
    display: flex;
    align-items: center;
    gap: 0.5em;
    border-top: 0.06em solid rgba(0, 242, 255, 0.2);
    padding-top: 1.25em;
    position: relative;
}

.prompt_symbol {
    white-space: nowrap;
    color: var(--terminal-cyan);
    font-weight: bold;
    font-size: 1.1rem;
}

.typing_zone {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
    height: 1.2em;
}

.visual_layer {
    display: flex;
    align-items: center;
    pointer-events: none;
    white-space: pre;
    z-index: 1;
}

#ghost {
    color: #fff;
    text-shadow: 0 0 0.5em #fff;
    font-size: 1.1rem;
    line-height: 1;
}

.cursor_block {
    width: 0.6em;
    height: 1.1em;
    background: var(--terminal-cyan);
    box-shadow: 0 0 0.6em var(--terminal-cyan);
    animation: blink 0.8s infinite;
    margin-left: 0.1em;
}

#userIn {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: transparent !important;
    font-family: inherit;
    font-size: 1.1rem;
    caret-color: transparent !important;
    z-index: 10;
}

@keyframes blink { 50% { opacity: 0; } }

.state_danger {
    border-color: var(--danger-red);
    color: var(--danger-red);
    box-shadow: 0 0 2.5em rgba(255, 0, 51, 0.3);
}
.state_danger .cursor_block { background: var(--danger-red); }