:root {
    --terminal-green: #33ff00;
    --terminal-dim: #1a8000;
    --bg-color: #0d0d0d;
    --font-stack: 'Courier New', Courier, monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--terminal-green);
    font-family: var(--font-stack);
    height: 100vh;
    overflow: hidden;
}

/* CRT Scanline Effect */
.crt-overlay {
    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;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    border-bottom: 2px solid var(--terminal-green);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.main-interface {
    display: flex;
    flex: 1;
    gap: 20px;
    overflow: hidden;
}

/* ASCII Video Feeds */
.video-section {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-box {
    flex: 1;
    border: 1px solid var(--terminal-dim);
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.label {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--terminal-dim);
    color: #000;
    padding: 2px 5px;
    font-size: 12px;
    font-weight: bold;
}

.ascii-feed {
    font-family: 'Courier New', monospace;
    font-size: 8px; /* Critical for resolution */
    line-height: 8px;
    white-space: pre;
    overflow: hidden;
    text-align: center;
}

/* Terminal Chat */
.terminal-section {
    flex: 1;
    border: 2px solid var(--terminal-green);
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: rgba(0, 20, 0, 0.8);
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    font-size: 14px;
}

.sys-msg { color: #888; font-style: italic; }
.chat-msg { margin: 5px 0; }
.chat-msg .user { font-weight: bold; }
.game-msg { color: cyan; }
.err-msg { color: red; }

.input-line {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--terminal-dim);
    padding-top: 10px;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
}

input[type="text"] {
    background: transparent;
    border: none;
    color: var(--terminal-green);
    font-family: var(--font-stack);
    font-size: 16px;
    flex: 1;
    outline: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-interface { flex-direction: column; }
    .video-section { width: 100%; height: 200px; flex-direction: row; }
    .feed-box { height: 100%; }
    .ascii-feed { font-size: 5px; line-height: 5px; }
}
