/* ==========================================================================
   DISEÑO FÍSICO DE CONSOLA HOLOGRÁFICA (LOGIN PREMIUM)
   ========================================================================== */

:root {
    --bg-space: #030611;
    --cyan-neon: #00f2fe;
    --cyan-shadow: rgba(0, 242, 254, 0.4);
    --magenta-neon: #ff00de;
    --magenta-shadow: rgba(255, 0, 222, 0.35);
    
    --orange-btn: #ff9500;
    --orange-glow: rgba(255, 149, 0, 0.4);
    --yellow-btn: #ffd60a;
    --yellow-glow: rgba(255, 214, 10, 0.4);
    
    --bezel-metal: #10141f;
    --bezel-border: #1f293d;
    --keycap-dark: #0a0d14;
    --keycap-border: #1a2233;
    
    --font-mono: 'Courier New', Courier, monospace;
}

body {
    background-color: var(--bg-space);
    background-image: radial-gradient(circle at 50% 50%, #0c142c 0%, #030611 100%);
    color: #e1e6f0;
    font-family: var(--font-mono);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    user-select: none;
}

/* --- Canvas de Red de Datos Flotante Superior (Holograma de Fondo) --- */
#hologramCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- Estructura del Deck de la Consola --- */
.console-deck {
    width: 95vw;
    max-width: 1050px;
    background: #07090f;
    border: 4px solid var(--bezel-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 
                inset 0 0 30px rgba(0, 242, 254, 0.05);
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: boot-panel 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-control-row {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
}

/* --- Paneles del Control Row --- */
.side-panel {
    width: 220px;
    background: #0a0d15;
    border: 2px solid var(--bezel-border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.panel-label {
    font-size: 0.75rem;
    color: #4f5d75;
    font-weight: bold;
    letter-spacing: 2px;
    border-bottom: 1px solid #1a2233;
    padding-bottom: 0.3rem;
}

/* --- Panel Izquierdo: Faders y Dials --- */
.faders-container {
    display: flex;
    justify-content: space-around;
    height: 120px;
}

.fader-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.vertical-fader {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 8px;
    height: 90px;
    background: #141923;
    outline: none;
    border-radius: 4px;
    appearance: none;
}

.vertical-fader::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 12px;
    background: #2a354d;
    border: 1px solid var(--cyan-neon);
    box-shadow: 0 0 8px var(--cyan-neon);
    cursor: pointer;
    border-radius: 2px;
}

.fader-label {
    font-size: 0.65rem;
    color: #8c9ba5;
    margin-top: 0.25rem;
}

.dials-grid {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
}

.dial-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.6rem;
    color: #8c9ba5;
}

.dial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1c2333 0%, #090c12 100%);
    border: 2px solid #2e3b52;
    position: relative;
    cursor: pointer;
}

.dial::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 14px;
    width: 2px;
    height: 8px;
    background: var(--cyan-neon);
    box-shadow: 0 0 5px var(--cyan-neon);
}

/* --- Panel Derecho: Botones e Indicadores --- */
.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.grid-btn {
    padding: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: bold;
    background: #0f131f;
    border: 1px solid #232c3f;
    color: #4f5d75;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grid-btn.orange.active {
    background: var(--orange-btn);
    color: #000;
    box-shadow: 0 0 10px var(--orange-glow);
    border-color: var(--orange-btn);
}

.grid-btn.yellow.active {
    background: var(--yellow-btn);
    color: #000;
    box-shadow: 0 0 10px var(--yellow-glow);
    border-color: var(--yellow-btn);
}

.indicator-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    font-size: 0.7rem;
}

.ind-row {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0.4rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    border-left: 2px solid #232c3f;
}

.ind-row .val.cyan {
    color: var(--cyan-neon);
    text-shadow: 0 0 5px var(--cyan-shadow);
}

.ind-row .val.magenta {
    color: var(--magenta-neon);
    text-shadow: 0 0 5px var(--magenta-shadow);
}

/* --- Panel Central: La Pantalla --- */
.center-panel {
    flex: 1;
}

.screen-bezel {
    background-color: var(--bezel-metal);
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--bezel-border);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
}

.screen-glass {
    position: relative;
    background-color: #000;
    border: 2px solid var(--cyan-shadow);
    border-radius: 4px;
    height: 250px;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.15);
}

/* Vórtice Animado de Fondo */
#vortexCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.screen-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.4) 100%);
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px dashed var(--cyan-shadow);
    padding-bottom: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--cyan-neon);
    box-shadow: 0 0 8px var(--cyan-neon);
    animation: heartbeat 2s infinite;
}

.system-title {
    font-size: 0.85rem;
    color: var(--cyan-neon);
    font-weight: bold;
    text-shadow: 0 0 5px var(--cyan-shadow);
}

.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.cyber-input-wrapper {
    display: flex;
    align-items: center;
}

.input-label {
    color: var(--magenta-neon);
    font-size: 0.85rem;
    text-shadow: 0 0 5px var(--magenta-shadow);
    width: 85px;
    font-weight: bold;
}

.input-glow-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(0, 242, 254, 0.03);
    border: 1px solid rgba(0, 242, 254, 0.2);
    padding: 0.35rem 0.6rem;
    border-radius: 3px;
    transition: all 0.2s;
}

.input-glow-box:focus-within {
    border-color: var(--cyan-neon);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
    background: rgba(0, 242, 254, 0.07);
}

.input-glow-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--cyan-neon);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.input-glow-box input::placeholder {
    color: rgba(0, 242, 254, 0.25);
}

.cursor {
    color: var(--cyan-neon);
    animation: cursor-blink 1s infinite;
    font-weight: bold;
}

.cyber-submit-btn {
    width: 100%;
    background: transparent;
    border: 1.5px solid var(--cyan-neon);
    color: var(--cyan-neon);
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.85rem;
    padding: 0.6rem;
    cursor: pointer;
    border-radius: 4px;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-shadow: 0 0 4px var(--cyan-shadow);
}

.cyber-submit-btn:hover {
    background: var(--cyan-shadow);
    box-shadow: 0 0 15px var(--cyan-neon);
}

.cyber-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.screen-footer {
    font-size: 0.7rem;
    color: rgba(225, 230, 240, 0.4);
    margin-top: 0.5rem;
}

/* --- Panel del Teclado Mecánico --- */
.keyboard-panel {
    background-color: var(--bezel-metal);
    border: 2px solid var(--bezel-border);
    border-radius: 8px;
    padding: 12px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.keyboard-bezel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #04060b;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #141926;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key {
    background: var(--keycap-dark);
    border: 1px solid var(--keycap-border);
    border-radius: 4px;
    color: #65758c;
    font-size: 0.65rem;
    font-weight: bold;
    width: 48px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 3px 0 #000;
}

.key:hover {
    color: #e1e6f0;
    border-color: #3b4e70;
}

.key.active-press {
    background: rgba(0, 242, 254, 0.1) !important;
    border-color: var(--cyan-neon) !important;
    color: var(--cyan-neon) !important;
    transform: translateY(2px);
    box-shadow: 0 1px 0 #000, 0 0 12px var(--cyan-shadow) !important;
}

/* Teclas Especiales */
.key.wide { width: 70px; }
.key.extra-wide { width: 90px; }
.key.double-wide { width: 110px; }
.key.space-key { 
    flex-grow: 1;
    max-width: 320px;
}

/* Retroiluminación Neon por fila del teclado */
#kb-row-1 .key { border-bottom: 2px solid rgba(0, 242, 254, 0.2); }
#kb-row-2 .key { border-bottom: 2px solid rgba(255, 0, 222, 0.2); }
#kb-row-3 .key { border-bottom: 2px solid rgba(255, 149, 0, 0.2); }
#kb-row-4 .key { border-bottom: 2px solid rgba(255, 214, 10, 0.2); }
#kb-row-5 .key { border-bottom: 2px solid rgba(0, 242, 254, 0.2); }

/* --- Animaciones --- */
@keyframes cursor-blink {
    50% { opacity: 0; }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes boot-panel {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- ADAPTACIÓN RESPONSIVA (TABLETS Y MÓVILES) --- */

@media (max-width: 900px) {
    .console-deck {
        width: 96vw;
        padding: 1rem;
        gap: 1rem;
    }
    
    .deck-control-row {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .side-panel {
        width: 100%;
        max-width: 500px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: auto;
    }
    
    .faders-container {
        height: auto;
        flex-direction: row;
        width: 50%;
        gap: 1rem;
        align-items: center;
    }
    
    .vertical-fader {
        writing-mode: horizontal-tb;
        direction: ltr;
        width: 100px;
        height: 8px;
    }
    
    .dials-grid {
        margin-top: 0;
        gap: 1rem;
    }
    
    .buttons-grid {
        grid-template-columns: repeat(4, 1fr);
        width: 100%;
    }
    
    .indicator-group {
        display: none; /* Ocultar datos de texto secundarios en pantallas medianas */
    }
}

@media (max-width: 768px) {
    /* En móviles ocultamos el teclado físico virtual para dejar paso al teclado nativo táctil */
    .keyboard-panel {
        display: none;
    }
    
    /* Ocultamos el panel izquierdo de faders para no saturar la pantalla */
    .side-panel.left-panel {
        display: none;
    }
    
    /* El panel derecho se vuelve transparente y sirve como barra de botones compacta */
    .side-panel.right-panel {
        background: transparent;
        border: none;
        padding: 0;
        max-width: 380px;
        box-shadow: none;
    }
    
    .buttons-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .center-panel {
        width: 100%;
        max-width: 380px;
    }
    
    .screen-glass {
        height: 230px;
    }
    
    .data-stream-left, .data-stream-right {
        display: none; /* Ocultar flujos de fondo flotantes en el móvil */
    }
}

