/* ==========================================
   1. RESETEO Y CONFIGURACIÓN DE TIPOGRAFÍA
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url("fondo3.jpg"); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; 
    color: #e0e0e0; 
    font-family: "VT323", Courier, monospace; 
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    cursor: url('cursor1_32x32.png') 15 15, auto;
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll; 
        padding: 10px;
    }
}

a, button {
    cursor: url('cursor1_32x32.png') 15 15, pointer;
}
/* ==========================================
   2. EL MARCO PRINCIPAL (Estilo Consola)
   ========================================== */
.terminal-frame {
    background-color: #121212;
    border: 3px double #8b0000;
    max-width: 900px;
    width: 100%;
    box-shadow: 0px 0px 25px rgba(139, 0, 0, 0.4); 
}

.top-status-bar {
    background-color: #000000;
    border-bottom: 2px dashed #222;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
}

.window-controls {
    margin-right: 8px; 
    display: flex;
    gap: 4px;
}

.status-blink {
    color: #ff0000; 
    animation: parpadeo 1.5s infinite;
}

.viewer-divider {
    color: #005555;
    margin: 0 6px;
}

#live-counter {
    font-weight: bold;
    color: #ff0000;
}

@keyframes parpadeo {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================
   3. CABECERA Y TITULARES (CON NAV FLOTANTE)
   ========================================== */
.main-header {
    background: linear-gradient(180deg, #100000 0%, #000000 100%); 
    text-align: center;
    border-bottom: 2px dashed #8b0000;
}

.header-logo-img {
    width: 100%;         
    max-width: 98%;      
    height: auto;        
    display: block; 
    margin: 0 auto;
}

.banner-nav {
    position: relative;
    margin-top: 8px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
}

.banner-btn {
    background: none;
    border: none;
    color: #8b0000;
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 2px;
    text-shadow: 0px 0px 3px rgba(139, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.banner-btn:hover {
    color: #ff0000;
    text-shadow: 0px 0px 8px #ff0000;
}

.banner-separator {
    color: #444;
    font-weight: bold;
    font-size: 1rem;
}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #0c0c0c;
    border: 2px solid #8b0000;
    box-shadow: 0px 0px 20px rgba(139, 0, 0, 0.5);
    padding: 20px;
    width: 90%;
    max-width: 450px;
    font-family: "Courier New", Courier, monospace;
    color: #e0e0e0;
    position: relative;
}

.modal-title {
    color: #8b0000;
    font-size: 1rem;
    margin-bottom: 12px;
    border-bottom: 1px dashed #333;
    padding-bottom: 4px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #666;
    cursor: pointer;
    font-weight: bold;
}

.close-modal:hover {
    color: #ff0000;
}

/* ==========================================
   4. DISTRIBUCIÓN EN COLUMNAS (GRID)
   ========================================== */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}

.right-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.content-box {
    background-color: #080808;
    border: 2px solid #1c1c1c;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: inset 0px 0px 10px rgba(139, 0, 0, 0.08);
    border: none !important; 
    background: none !important;
    text-align: center;
    padding: 0.5px;
}

.content-box:last-child {
    margin-bottom: 0;
}

.box-title {
    display: block;         
    width: 100%;
    background: #800000;     
    color: #000000;
    text-align: center;   
    box-sizing: border-box; 
    padding: 1.5px 0; 
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==========================================
   5. PERFIL Y CONTROL DE AVATAR
   ========================================== */
.profile-avatar-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.avatar-frame {
    border: 2px solid #8b0000;
    background-color: #000;
    padding: 4px;
    max-width: 100%;
}

.avatar-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.profile-bio p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.profile-bio strong {
    color: #00cccc;
}

.bio-text {
    color: #aaa;
    margin-top: 10px;
}

/* ==========================================
   6. AUDIO PLAYER (Estilo Consola Integrado)
   ========================================== */
.audio-box {
    border: 2px dashed #8b0000;
    background-color: #050505;
}

.player-interface {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.song-info {
    font-size: 0.85rem;
    color: #00cccc;
}

.player-buttons {
    display: flex;
}

.btn-play {
    background-color: #000;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 8px 16px;
    cursor: pointer;
    font-family: monospace;
    font-weight: bold;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.btn-play:hover, .btn-play.playing {
    background-color: #00ff00;
    color: #000000;
    box-shadow: 0px 0px 8px #00ff00;
}

.btn-play.playing {
    border-color: #8b0000;
    box-shadow: 0px 0px 8px #8b0000;
}

/* ==========================================
   7. MENÚ DE NAVEGACIÓN Y LOGS
   ========================================== */
.menu-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-button, a, button {
    cursor: url('cursor1_32x32.png') 15 15, auto !important;
    display: block;
    background-color: #111;
    border: 2px solid #222;
    padding: 12px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-button:hover {
    border-color: #aa0000;
    background-color: #0f0000;
    transform: translateX(5px);
}

.nav-button .num {
    color: #aa0000;
    font-weight: bold;
    margin-right: 10px;
}

.nav-button .title {
    font-weight: bold;
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.nav-button .desc {
    font-size: 0.75rem;
    color: #777;
}

.log-entry {
    font-size: 0.85rem;
    border-left: 2px solid #00cccc;
    padding-left: 10px;
}

.log-date {
    color: #00cccc;
}

.log-text {
    margin-top: 5px;
    color: #aaa;
    line-height: 1.4;
}

/* ==========================================
   8. PIE DE PÁGINA
   ========================================== */
.main-footer {
    background-color: #000000;
    border-top: 2px dashed #8b0000;
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #8b0000;
}

/* ==========================================
   9. INTERFAZ DE VENTANA INTERACTIVA ARRASTRABLE
   ========================================== */
.draggable-window {
    display: none;
    position: fixed;
    top: 25%;
    left: 35%;
    width: 320px;
    background-color: #0a0a0a;
    border: 2px solid #8b0000;
    box-shadow: 0px 0px 20px rgba(139, 0, 0, 0.6);
    z-index: 10000;
    font-family: "Courier New", Courier, monospace;
}

.window-header {
    background-color: #1a0000;
    border-bottom: 2px solid #8b0000;
    padding: 6px 10px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-title {
    color: #8b0000;
    font-weight: bold;
    font-size: 0.85rem;
}

.window-close {
    color: #555;
    cursor: pointer;
    font-weight: bold;
}

.window-close:hover {
    color: #ff0000;
    text-shadow: 0px 0px 5px #ff0000;
}

.window-body {
    padding: 12px;
}

.player-layout {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.track-cover-mini {
    width: 50px;
    height: 50px;
    background-color: #000;
    border: 1px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cover-art {
    color: #8b0000;
    font-size: 1.2rem;
}

.track-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.track-title {
    font-size: 0.8rem;
    color: #e0e0e0;
    font-weight: bold;
}

.track-artist {
    font-size: 0.7rem;
    color: #666;
}

.progress-container {
    width: 100%;
    height: 6px;
    background-color: #111;
    border: 1px solid #333;
    margin-top: 5px;
    cursor: pointer;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #8b0000;
}

.volume-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 0 5px;
}

.vol-icon {
    font-size: 0.85rem;
    color: #666;
}

.volume-slider-container {
    position: relative;
    width: 100%;
    height: 16px;
    cursor: pointer;
    background-color: #111;
    border: 1px solid #222;
    overflow: hidden;
}

.volume-triangle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, transparent 49%, #222 50%), 
                linear-gradient(to top right, #0a0a0a 100%, transparent 0);
    z-index: 1;
}

.volume-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background-color: #8b0000;
    z-index: 2;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
    opacity: 0.8;
}

.window-controls-footer {
    margin-top: 10px;
}

.win-action-btn {
    width: 100%;
    background-color: #000;
    color: #8b0000;
    border: 1px solid #8b0000;
    padding: 6px;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.win-action-btn:hover {
    background-color: #8b0000;
    color: #000;
    box-shadow: 0px 0px 8px #8b0000;
}

#win-btn-next:hover {
    color: #ff0000 !important;
    border-color: #8b0000 !important;
    text-shadow: 0px 0px 4px #ff0000;
}

/* ==========================================
   10. MARQUESINA DE ESTAMPITAS (FOOTER LOOP)
   ========================================== */
.stamp-marquee-container {
    width: 100%;
    overflow: hidden;
    background-color: #000;
    padding: 8px 0;
    border-bottom: 1px dashed #333;
    position: relative;
}

.stamp-marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-loop 20s linear infinite;
}

.stamp-marquee-track img {
    flex-shrink: 0;
    height: 31px;
    width: 88px;
    margin: 0 6px;
    image-rendering: pixelated;
    border: 1px solid #222;
}

@keyframes marquee-loop {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.33%);
    }
}

.stamp-marquee-container:hover .stamp-marquee-track {
    animation-play-state: paused;
}

/* ==========================================
   11. ALINEACIÓN SIMÉTRICA DE COLUMNAS (PRO)
   ========================================== */
.main-grid-container {
    display: flex !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: stretch !important;
    margin-bottom: 25px !important;
}

.profile-column {
    flex: 1 !important;
    display: flex !important;
}

.profile-column .info-box {
    width: 100% !important;
    height: 100% !important;
}

.navigation-column {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 20px !important;
}

/* ==========================================
   12. DISPOSICIÓN EN TRES COLUMNAS SIMÉTRICAS
   ========================================== */
body {
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
}

.contenedor-sitio {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    max-width: 1420px;
    margin: 20px auto;
    padding: 0 20px;
}

.barra-retro-izq,
.barra-retro-der {
    width: 240px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.6);
    z-index: 5;
    box-sizing: border-box;
    position: relative;
    top: 0;
    height: auto;
}

.barra-retro-der {
    background-color: #080808;
    border: 1px dashed #333333;
}

.barra-retro-izq {
    overflow: hidden;
    background: #000000 url('baizq.png') no-repeat center/cover !important;
    border: 5px solid #000000 !important;
    box-shadow: 0 0 25px #ff0000, inset 0 0 15px #ff0000;
    animation: parpadeo-neon 2s infinite alternate;
    padding: -1px;
    display: flex !important;
    flex-direction: column !important;
}

.img-barra-top {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

.terminal-frame {
    width: 900px !important;
    max-width: 900px !important;
    margin: 0 !important;
    flex-shrink: 0;
    box-sizing: border-box;
}

.spacer {
    flex-grow: 1 !important;
}

/* ==========================================
  13. BLINDAJE DE LA MARQUESINA (ANTI-DESBORDAMIENTO)
   ========================================== */
.stamp-marquee-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

@media (max-width: 1400px) {
    .contenedor-sitio {
        flex-direction: column !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    .barra-retro-izq, 
    .terminal-frame, 
    .barra-retro-der {
        width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .main-content-grid {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .left-panel, .right-panel {
        width: 100% !important;
        flex: none !important;
    }
}

.texto-liminal {
    font-family: 'VT323', sans-serif;
    text-transform: uppercase;
    text-align: center;
    margin: 48px 0;
    display: block;
    overflow: visible;
}

.texto-liminal span {
    display: inline-block;
    color: #ff0000;
    -webkit-text-stroke: 0.3px #ffffff;
    transform: scale(1.55, 4.2);
    line-height: 0.75;
    letter-spacing: 2px;
}

.contenedor-estampas {
    width: 120%;
    overflow: hidden;
    border: 0.5px solid #8b0000;
    margin-left: -15px !important;
    margin-right: -15px !important;
    margin-bottom: -5px !important;
    margin-top: auto !important;
}

.tira-animada {
    white-space: nowrap;
    width: max-content;
    animation: moverTira 20s linear infinite;
}

.contenedor-video-retro {
    width: 100%;
    position: relative;
    padding-bottom: 100%;
    height: 0;
    margin: -2px 0;
}

.contenedor-video-retro iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 115%;
}

.img-inferior-barra {
    display: block !important;
    width: calc(100% + 30px) !important;
    height: 200px !important;
    object-fit: fill !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    margin-bottom: -15px !important;
    margin-top: auto !important;
}

/* 2. Ajuste específico para el widget */
#status-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;          
}

.blink-container {
    animation: parpadeo-suave 2s infinite ease-in-out;
}

/* 3. Estilo del texto */
#status-text {
    font-family: "VT323", Courier, monospace;
    font-size: 2rem !important;
    color: #e0e0e0;
    margin-top: 10px;
    text-align: center;
    line-height: 1;      /* Asegura separación entre líneas si el texto es largo */
    width: 100%;           /* Ocupa el ancho para que no se comprima */
    display: block;        /* Asegura que tome el ancho completo */
}

/* 4. Asegurar que la imagen no tenga bordes extra */
#status-img {
    border: none !important;
    display: block;
    max-width: 100%;
    height: auto;
}

.mobile-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.middle-row {
    display: flex;
    gap: 10px;
}

.mobile-controls button {
    background: #222;
    color: #8b0000;
    border: 1px solid #8b0000;
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
    font-family: monospace;
}

.mobile-controls button:active {
    background: #8b0000;
    color: #000;
}

#startButton {
    background: #5f0000;
    color: #000;
    border: none;
    padding: 5px;
    width: 100%;
    font-family: VT323;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 5px;
}

#startButton:hover {
    background: #5f0000;
}

@keyframes moverTira {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes parpadeo-neon {
    0%, 100% {
        box-shadow: 0 0 20px #ff0000, inset 0 0 10px #ff0000;
    }
    50% {
        box-shadow: 0 0 9px #8b0000, inset 0 0 4px #8b0000;
    }
    98% {
        box-shadow: 0 0 20px #ff0000, inset 0 0 10px #ff0000;
    }
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
}

.modal-contenido {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-height: 33vh;
    background: #000;
    border: 2px solid #8b0000;
    padding: 20px;
    font-family: 'VT323', monospace;
    color: #fff;
    text-align: center;
}

.cerrar-btn {
    background: none;
    border: 1px solid #8b0000;
    color: #8b0000;
    float: right;
    cursor: pointer;
    font-weight: bold;
}

.game-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 50 auto;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.07),
        rgba(255, 255, 255, 0.07) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
}


@media (max-width: 1400px) {
    .modal-overlay {
        display: flex;
    }
}

/* Definimos la animación de parpadeo */
@keyframes parpadeo-suave {
    0%, 100% { opacity: 1; }
    30% { opacity: 0.3; } /* Un parpadeo sutil */
}

.keyboard-hint {
    font-family: 'VT323', monospace; /* La fuente que ya usamos en el sitio */
    color: #666;                     /* Un tono gris oscuro para que parezca un comentario */
    font-size: 0.9rem;               /* Un poco más pequeño que el resto del texto */
    text-align: center;
    margin-top: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: blink 2s infinite;
}

@keyframes blink {
    80% { opacity: 0.5; }
}

.video-containerbd {
    border: 2px solid #8b0000; /* Borde estilo grunge */
    background: #000;
    padding: 10px;
    display: inline-block;
}

.video-controlsbd {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    margin-top: 5px;
    gap: 20px;
}

button {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #8b0000;
    padding: 5px 15px;
    font-family: 'VT323', monospace;
    cursor: url('assets/cursor.png'), auto;
    justify-content: center;
}

.keyboard-hint, .video-containerbd {
    width: 100%;
    margin-bottom: 200px; /* Crea un "espacio de aire" entre el juego y el video */
    display: block;      /* Asegura que cada uno tome su propia línea */
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #ff0000; }
