/* --- CONFIGURACIÓN BASE --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body, html { 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background: #000; 
    font-family: 'Courier New', monospace; 
}

#escenario { 
    width: 100vw; 
    height: 100vh; 
    position: relative; 
}

#imagen-fondo { 
    width: 100%; 
    height: 100%; 
    object-fit: fill; 
    position: absolute; 
    z-index: 1; 
    transition: opacity 0.3s ease; 
}

/* --- BOTÓN SECRETO (Actualizado según tu posición) --- */
#boton-secreto {
    position: absolute;
    top: 0;
    left: 20%;      /* Posición según tu indicación */
    width: 20%;     /* Eliminado 'px' para que funcione */
    height: 5%;      /* Eliminado 'px' para que funcione */
    z-index: 100;
    cursor: pointer;
    background: transparent;
}

/* --- CAPA INTERACTIVA --- */
#capa-interactiva { 
    position: absolute; 
    inset: 0; 
    z-index: 10; 
    pointer-events: none; 
}

.click-area { 
    position: absolute; 
    pointer-events: auto; 
    cursor: pointer; 
}

/* --- POSICIONES DE OBJETOS --- */
#objeto-pistola { 
    top: 19%; 
    right: 15%; 
    width: 45%; 
    z-index: 11; 
}

#objeto-libros { 
    left: -2%; 
    top: 30%; 
    transform: translateY(-50%); 
    width: 40%; 
    z-index: 11; 
}

#objeto-lupa { 
    bottom: 20%; 
    left: -2%; 
    width: 15%; 
    z-index: 15; 
    overflow: visible; 
}

/* --- POSICIÓN DEL SOBRE CON ANIMACIÓN --- */
#objeto-sobre {
    position: absolute;
    top: 45%;           
    left: 50%;          
    width: 40%;         
    z-index: 12;
    transform: translate(-50%, -50%);
    
    /* ANIMACIÓN: nombre, duración (3s), suavizado, infinita */
    animation: latido 3s ease-in-out infinite; 
}

#objeto-sobre img {
    width: 100%;        
    height: auto;
    display: block;
    transition: filter 0.3s, transform 0.3s;
}

/* --- IMÁGENES Y EFECTOS --- */
#objeto-pistola img, #objeto-libros img, #objeto-sobre img { 
    width: 100%; 
    transition: filter 0.3s, transform 0.3s; 
}

#objeto-lupa img { 
    width: 200%; 
    transition: filter 0.3s, transform 0.3s; 
}

.click-area:hover img { 
    filter: drop-shadow(0 0 15px gold); 
    transform: scale(1.05); 
}

/* --- VISORES / MODALES --- */
.oculto { display: none !important; }

.overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.85); 
    z-index: 100; 
}

.btn-cerrar-x {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    background: rgba(0,0,0,0.7);
    border: 1px solid gold; 
    color: gold; 
    font-size: 35px; 
    width: 50px; 
    height: 50px;
    cursor: pointer; 
    z-index: 1100; 
    border-radius: 50%; 
    display: flex;
    justify-content: center; 
    align-items: center;
}

/* --- MESA DE EVIDENCIAS (DIARIO CENTRADO) --- */
.mesa-evidencias {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 110;
    padding: 20px;
}

.fila-diario {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.diario-img {
    max-height: 45vh;
    width: auto;
    object-fit: contain;
    cursor: pointer;
    transition: filter 0.3s, transform 0.3s;
}

.diario-img:hover {
    filter: drop-shadow(0 0 20px white);
    transform: scale(1.05);
}

.fila-fotos {
    width: 100%;
    display: flex;
    justify-content: center;
}

.contenedor-fotos-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.foto-evidencia {
    width: 18vw;
    max-width: 220px;
    height: auto;
    cursor: pointer;
    transition: 0.3s;
}

.f1 { transform: rotate(-5deg); }
.f2 { transform: rotate(3deg); }
.f3 { transform: rotate(-2deg); }

.foto-evidencia:hover {
    transform: scale(1.4) rotate(0deg) !important;
    z-index: 300;
}

/* --- VISOR LUPA (LIMPIO) --- */
.contenedor-limpio {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.imagen-expediente {
    max-width: 85vw;
    max-height: 75vh;
    cursor: pointer;
    transition: 0.3s;
}

.mensaje-investigacion {
    margin-top: 25px;
    color: gold;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 10px #000;
}

/* --- CONTENEDORES DRIVE Y 3D --- */
.contenedor-modelo, .contenedor-drive {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 1000px;
    height: 85vh;
    background: #000;
    border: 2px solid gold;
    z-index: 500;
}

/* Definición de la animación de latido */
@keyframes latido {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05); /* Crece un 5% */
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}