* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f4f9;
    overflow: hidden; /* Bloquea tanto el scroll vertical como el horizontal inicialmente */
    font-family: sans-serif;
}

/* --- Video Intro --- */
#intro-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; /* Fallback para navegadores antiguos */
    height: 100dvh; /* FIX: Usa el alto dinámico real en móviles, centrando perfectamente el video */
    background-color: #000;
    z-index: 1000; /* Siempre por encima */
    transition: opacity 1s ease-in-out, visibility 1s;
}

/* --- Estilos para el Loader (Ocupa toda la pantalla) --- */
#video-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: white;
    z-index: 2; /* Por encima del video */
    transition: opacity 0.5s ease;
}

#video-loader p {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Clase para ocultar el loader */
#video-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

#intro-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta el video para que llene la pantalla sin deformarse en PC */
    z-index: 1; /* Debajo del loader */
}

/* Ajuste para celulares */
@media (max-width: 768px) {
    #intro-video {
        object-fit: contain; /* Ajusta el video al ancho de la pantalla, revelando el fondo negro arriba y abajo */
        object-position: center center; /* FIX: Fuerza a que los espacios negros sean idénticos arriba y abajo */
    }
}

/* Clase que se añade con JS para desvanecer el contenedor entero */
.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* --- Contenido Principal --- */
#main-content {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* --- Botón de Descarga Moderno --- */
#download-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    font-size: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
}

#download-btn:hover {
    background: #000;
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Renderizado del PDF --- */
#pdf-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

canvas {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* --- Contador de Visitas --- */
#visit-counter {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

#visit-counter i {
    color: #555;
}

#visit-counter:hover {
    transform: translateY(-3px);
}