/* Terminal Emulator - Full Screen */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --bg: #0c0c0c;
    --text: #cccccc;
    --text-bright: #ffffff;
    --text-dim: #666666;
    --accent: #3794ff;
    --error: #f14c4c;
    --success: #89d185;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
}

body {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 18px;
    line-height: 1.4;
    color: var(--text);
}

/* Subtle Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* Subtle Flicker */
.flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    animation: flicker 10s infinite;
    opacity: 0;
    background: rgba(255, 255, 255, 0.01);
}

@keyframes flicker {
    0%, 100% { opacity: 0; }
    3% { opacity: 0.015; }
    6% { opacity: 0; }
    45% { opacity: 0.01; }
    47% { opacity: 0; }
    93% { opacity: 0.015; }
    95% { opacity: 0; }
}

/* Terminal Container */
.terminal {
    width: 100%;
    height: 100%;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.terminal::-webkit-scrollbar {
    width: 8px;
}

.terminal::-webkit-scrollbar-track {
    background: var(--bg);
}

.terminal::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.terminal::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Terminal Output */
.terminal-output {
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-line {
    margin-bottom: 2px;
}

.output-line.error {
    color: var(--error);
}

.output-line.success {
    color: var(--success);
}

.output-line.accent {
    color: var(--accent);
}

.output-line.dim {
    color: var(--text-dim);
}

.output-line.bright {
    color: var(--text-bright);
}

/* Input Line */
.terminal-input-line {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-top: 4px;
}

.prompt {
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-bright);
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 18px;
    outline: none;
    caret-color: transparent;
    min-width: 0;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--text-bright);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    .terminal {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    .terminal {
        padding: 8px;
    }
}

/* Prevent text selection issues on mobile */
.terminal-output {
    -webkit-user-select: text;
    user-select: text;
}

/* Password input masking */
.command-input.password-mode {
    -webkit-text-security: disc;
    text-security: disc;
}
