/* ----- DOS CRT look ----- */

.dos-wrap {
    height: 100%;
    width: 100%;
    background: #000;
    display: grid;
    place-items: stretch;
    outline: none;
    background: radial-gradient(ellipse at center, #050 0%, #000 65%);
}

.dos-screen {
    color: #26ff5c;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 16px;
    line-height: 1.25;
    padding: 18px 18px 14px 18px;
    height: 100%;
    overflow: auto;
    position: relative;
    /* Soft glow */
    text-shadow: 0 0 6px rgba(38, 255, 92, 0.35), 0 0 14px rgba(38, 255, 92, 0.18);
}

/* Scanlines */
.dos-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient( to bottom, rgba(0,0,0,0.00) 0px, rgba(0,0,0,0.00) 2px, rgba(0,0,0,0.18) 3px );
    mix-blend-mode: multiply;
    opacity: 0.55;
}

/* Subtle flicker */
.dos-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(38, 255, 92, 0.06);
    opacity: 0.10;
    animation: dosFlicker 6s infinite;
}

@keyframes dosFlicker {
    0% { opacity: 0.06; }
    7% { opacity: 0.10; }
    10% { opacity: 0.05; }
    20% { opacity: 0.09; }
    35% { opacity: 0.06; }
    55% { opacity: 0.11; }
    70% { opacity: 0.07; }
    100% { opacity: 0.06; }
}

.dos-header {
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.dos-history {
    white-space: pre-wrap;
}

.dos-line {
    white-space: pre;
}

.dos-line.dos-system {
    color: #ffcc00;
    opacity: 0.8;
}

.dos-line.dos-waiting {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

/* Input row */
.dos-input-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 6px;
    padding-bottom: 10px;
}

.dos-prompt {
    flex: 0 0 auto;
}

.dos-input {
    flex: 1 1 auto;
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font: inherit;
    padding: 0;
    margin: 0;
    caret-color: transparent; /* we draw our own cursor */
}

/* Block cursor */
.dos-cursor {
    width: 10px;
    height: 18px;
    background: #26ff5c;
    display: inline-block;
    transform: translateY(2px);
    box-shadow: 0 0 10px rgba(38, 255, 92, 0.35);
    animation: dosBlink 1s steps(1) infinite;
}

@keyframes dosBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Theme toggle button for CRT mode */
.dos-theme-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 1px solid #26ff5c;
    color: #26ff5c;
    font-family: inherit;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.dos-theme-toggle:hover {
    opacity: 1;
}

/* Default theme container */
.ai-chat-default {
    position: relative;
}
