/**
 * ------------------------------------------------------------
 * Project   : Chubasco Terminal
 * File      : terminal.css
 * Location  : public/assets/css/terminal.css
 * Version   : 0.3.0
 * PHP       : N/A
 * ------------------------------------------------------------
 *
 * Estilos base del terminal tipo UNIX.
 *
 * Principios de esta versión:
 *  - Usar el caret NATIVO del navegador
 *  - No simular cursor con CSS o JS
 *  - Layout simple, estable y predecible
 *  - Monospace real
 *  - Compatibilidad desktop y mobile
 *
 * Esta hoja es la BASE estable para futuras versiones.
 * ------------------------------------------------------------
 */

:root {
    --ibm-beige: #c7c1b1;
    --ibm-dark-bezel: #2a2a2a;
    --ibm-green: #33ff33;
    --ibm-green-glow: rgba(51, 255, 51, 0.2);
}

body.ibm-3270-layout {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--ibm-beige);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
}

/* Header & Footer */
.ibm-header {
    height: 50px;
    background: #e0d9c8;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-bottom: 3px solid #9e9788;
    justify-content: space-between;
}

.ibm-nav a { margin-right: 20px; text-decoration: none; color: #444; font-size: 13px; font-weight: bold; }

.ibm-power-btn {
    width: 30px; height: 15px; background: #ff4400; border: 1px solid #000;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.5); cursor: pointer;
}

/* El Marco del Monitor */
.ibm-monitor-frame {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.monitor-bezel {
    background: var(--ibm-dark-bezel);
    padding: 30px;
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 10px #000;
    width: 90%;
    max-width: 1000px;
    height: 80%;
    position: relative;
}

/* La Pantalla */
.ibm-screen {
    height: 100%;
    background-color: #050a05;
    position: relative;
    overflow-y: auto;
    padding: 20px;
    color: var(--ibm-green);
    text-shadow: 0 0 8px var(--ibm-green-glow);
}

/* --- EFECTOS CRT --- */

/* Líneas de escaneo */
.crt-scanlines {
    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.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

/* Efecto de Parpadeo (Flicker) */
.crt-flicker {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(18, 16, 16, 0.02);
    opacity: 0;
    pointer-events: none;
    z-index: 11;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.1; }
    50% { opacity: 0.05; }
    100% { opacity: 0.1; }
}

/* Input y Scroll */
.prompt-line { display: flex; align-items: center; }
#command-input {
    background: transparent; border: none; outline: none;
    color: var(--ibm-green); font-family: inherit; font-size: 1.1rem;
    flex: 1; padding-left: 10px;
}

.ibm-screen::-webkit-scrollbar { width: 8px; }
.ibm-screen::-webkit-scrollbar-thumb { background: #1a331a; border: 1px solid var(--ibm-green); }

.ibm-footer {
    height: 35px; background: #e0d9c8; border-top: 2px solid #9e9788;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; font-size: 12px; color: #555;
}