:root {
    --color-bg: #101010;
    --color-amber: #ffb000;
    --color-amber-dim: rgba(255, 176, 0, 0.4);
    --color-amber-glow: rgba(255, 176, 0, 0.6);

    --crt-curvature: 3px;
    --font-stack: 'Fira Code', 'Courier New', monospace;
}

body {
    background-color: #000;
    margin: 0;
    padding: 0;
    height: 100vh;
    /* Full viewport height */
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* The curved screen container */
#screen {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    /* Constrain width for better read on wide screens */
    background-color: var(--color-bg);
    position: relative;
    padding: 3rem 2rem 2rem 2rem;
    /* More top padding for header */
    color: var(--color-amber);

    /* CRT Transforms */
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9);
    text-shadow: 0 0 2px var(--color-amber-dim), 0 0 8px var(--color-amber-glow);

    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;

    /* Scroll behavior inside the screen */
    overflow-y: auto;
    scrollbar-width: none;
}

#content-wrapper {
    /* Container for all dynamic TUI content */
    padding-bottom: 4rem;
}

/* --- CRT Post-Processing Layers (Fixed covering screen) --- */

.crt-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 999;
}

.vignette {
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.6) 100%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.scanlines {
    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;
}

/* --- TUI Elements --- */

.tui-box {
    margin-bottom: 2rem;
    white-space: pre-wrap;
}

.tui-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed var(--color-amber-dim);
    display: inline-block;
}

.clickable {
    cursor: pointer;
    font-weight: bold;
}

.clickable:hover {
    background: var(--color-amber);
    color: var(--color-bg);
    text-shadow: none;
}

/* --- Components --- */

/* Lang Switcher - Fixed positioning fix */
.lang-switcher {
    position: absolute;
    top: 4rem;
    right: 4rem;
    /* Moved further in */
    z-index: 1001;
    /* Above vignette */
    border: 1px solid var(--color-amber);
    padding: 0.2rem 0.5rem;
    background: var(--color-bg);
    /* Ensure readability over content */
}

/* Console Area */
.cmd-line {
    margin-top: 2rem;
    border-top: 1px double var(--color-amber);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    /* Stack logs above input */
}

#terminal-logs {
    margin-bottom: 0.5rem;
    color: var(--color-amber);
}

.log-entry {
    margin-bottom: 0.2rem;
    display: block;
}

.input-row {
    display: flex;
    width: 100%;
}

input.raw-input {
    background: transparent;
    border: none;
    color: var(--color-amber);
    font-family: inherit;
    font-size: inherit;
    flex: 1;
    outline: none;
    text-transform: uppercase;
    text-shadow: inherit;
    margin-left: 0.5rem;
}