:root {
    --neon: #00f2ff;
    --accent: #ffaa00;
    --bg-terminal: rgba(5, 5, 15, 0.98);
}

body, html {
    margin: 0; padding: 0; overflow: hidden;
    background-color: #000000 !important; /* Negro absoluto forzado */
    font-family: 'JetBrains Mono', monospace;
}

#ui-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10; pointer-events: none;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 15px; box-sizing: border-box; color: var(--neon);
}

header, aside, footer {
    pointer-events: auto; background: var(--bg-terminal);
    border: 1px solid var(--neon); padding: 10px; backdrop-filter: blur(15px);
}

header { border-bottom: 2px solid var(--neon); }

#nav-instruction {
    font-size: 0.55em; color: var(--neon); text-align: right;
    line-height: 1.2; animation: blink-soft 3s infinite;
}

@keyframes blink-soft { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

#visitor-counter {
    font-size: 0.75em; color: var(--accent); border: 1px solid var(--accent);
    padding: 2px 8px; border-radius: 4px; min-width: 130px; text-align: center;
}

#video-access {
    position: absolute; top: 80px; right: 15px;
    width: 180px; height: 100px; border: 1px solid var(--accent);
    cursor: pointer; overflow: hidden; pointer-events: auto;
    background: #000; transition: 0.3s;
}

#video-access:hover { box-shadow: 0 0 15px var(--accent); transform: scale(1.05); }

.video-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.5; filter: grayscale(100%) sepia(100%) hue-rotate(10deg) saturate(3);
}

#video-access:hover img { filter: none; opacity: 1; }

.scanline {
    position: absolute; width: 100%; height: 2px;
    background: rgba(255, 170, 0, 0.4); top: 0; z-index: 2;
    animation: scan 4s linear infinite;
}

@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }

.play-label {
    position: absolute; bottom: 0; width: 100%;
    background: var(--accent); color: #000;
    font-size: 0.6em; text-align: center; font-weight: bold; padding: 2px 0;
}

.nav-menu { width: 175px; display: flex; flex-direction: column; gap: 8px; }

button {
    background: transparent; border: 1px solid var(--neon);
    color: var(--neon); padding: 8px; cursor: pointer;
    text-align: left; font-family: inherit; font-size: 0.75em; transition: 0.3s;
}

button:hover { background: var(--neon); color: #000; }

footer { height: 115px; display: flex; flex-direction: column; border-top: 2px solid var(--neon); }

#log-output { flex-grow: 1; overflow-y: auto; font-size: 0.8em; color: #fff; margin-bottom: 5px; }

.sugg-bar { font-size: 0.65em; margin-bottom: 5px; display: flex; gap: 10px; }
.sugg-btn {
    background: none !important; border: none !important;
    color: var(--accent) !important; text-decoration: underline;
    cursor: pointer; padding: 0 !important;
}

.input-line { display: flex; gap: 8px; border-top: 1px solid #333; padding-top: 5px; }
input { background: transparent; border: none; color: var(--neon); outline: none; flex-grow: 1; font-family: inherit; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px);
    display: none; justify-content: center; align-items: center;
    z-index: 100; pointer-events: auto;
}

.modal-content {
    background: #050505; border: 1px solid var(--neon);
    padding: 15px; width: 85%; max-width: 900px;
}

.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

#container3d { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }



/* ... (Mantén tu CSS anterior y reemplaza/agrega esto) ... */

footer {
    height: auto; /* Se adapta al contenido */
    min-height: 80px;
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--neon);
    padding: 15px;
}

#log-output {
    font-size: 0.85em;
    margin-top: 8px;
    max-height: 60px;
    overflow-y: auto;
}

/* --- AJUSTES RESPONSIVE --- */
@media (max-width: 768px) {
    #ui-layer { padding: 10px; }
    
    header { flex-direction: column; gap: 10px; align-items: flex-start; }
    #nav-instruction { text-align: left; }
    
    .nav-menu {
        width: 140px;
        position: absolute;
        top: 140px; /* Baja para no tapar el header en móvil */
    }
    
    #video-access {
        width: 120px; height: 70px;
        top: auto; bottom: 180px; /* Lo movemos abajo para que sea fácil de tocar con el pulgar */
        right: 10px;
    }

    .sugg-bar {
        flex-wrap: wrap; /* Los botones se envuelven si no caben */
        gap: 8px;
    }
    
    .modal-content { width: 95%; }
}