:root {
    --rojo: #e50914;
    --negro: #0b0b0b;
    --gris: #999;
}

body {
    background: var(--negro);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Header Compacto */
header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
}

header img { height: 30px; width: auto; }

/* Contenedor Principal */
.main-container {
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Reproductor con Parche de Seguridad */
.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* El Parche que tapa el link de Drive */
.parche-protector {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px; /* Tamaño fijo para que no falle */
    height: 50px;
    z-index: 99;
    pointer-events: auto;
}

.parche-protector img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Galería de Películas (Cards) */
.gallery-title {
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
    color: var(--gris);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery {
    display: grid;
    /* Esto hace que las cards no sean gigantes */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 12px;
    padding-bottom: 50px;
}

.item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.item:hover {
    transform: translateY(-5px);
    border-color: var(--rojo);
}

.item img {
    width: 100%;
    aspect-ratio: 2 / 3; /* Formato póster vertical */
    object-fit: cover;
    display: block;
}

/* Icono Play sobre la card */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.2s;
}

.item:hover .overlay { opacity: 1; }

.overlay img { 
    width: 35px !important; 
    height: 35px !important; 
}

/* Ajustes para pantallas pequeñas e IFRAMES */
@media (max-width: 480px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    .parche-protector { width: 120px; height: 35px; }
    .gallery-title { font-size: 0.9rem; }
}