* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #0f0f0f;
    font-family: Arial, sans-serif;
    color: #fff;
}

.header {
    background: linear-gradient(180deg, #000, #0a0a0a);
    padding: 25px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* LOGO PRINCIPAL */
.logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

/* Parte roja */
.resaltado {
    color: red;
    text-shadow: 0 0 10px red,
                 0 0 20px red,
                 0 0 40px rgba(255,0,0,0.7);
    animation: neonFlicker 2.5s infinite alternate;
}

/* Icono con pequeña animación */
.icono {
    animation: bounce 2s infinite ease-in-out;
}

/* Animación rebote suave */
@keyframes bounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Efecto parpadeo neon elegante */
@keyframes neonFlicker {
    0% {
        text-shadow: 0 0 5px red,
                     0 0 10px red,
                     0 0 20px rgba(255,0,0,0.6);
    }
    50% {
        text-shadow: 0 0 15px red,
                     0 0 30px red,
                     0 0 60px rgba(255,0,0,0.9);
    }
    100% {
        text-shadow: 0 0 8px red,
                     0 0 18px red,
                     0 0 35px rgba(255,0,0,0.7);
    }
}

/* Línea inferior animada estilo cine */
.header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 200%;
    height: 3px;
    background: linear-gradient(90deg, transparent, red, transparent);
    animation: lineaMovimiento 4s linear infinite;
}

@keyframes lineaMovimiento {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 1.8rem;
    }
}

/* Grid de películas */
.grupo-contenido {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
    gap: 20px;
    padding: 30px;
    justify-content: center;
}

/* Card */
.card-pelicula {
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s ease;
}

.card-pelicula:hover {
    transform: scale(1.05);
}

.card-pelicula img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(0,0,0,0.7);
}

.card-pelicula h3 {
    margin-top: 10px;
    font-size: 16px;
    text-align: center;
}

/* FILTRO SUPERIOR */
.filtro-layout {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.filtro-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    background-color: #1a1a1a;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtro-btn:hover {
    background-color: #333;
    color: #fff;
}

.filtro-btn.activo {
    background-color: #e50914;
    color: white;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.6);
}

/* CONTROL VISIBILIDAD */
.oculto {
    display: none;
}

.grupo-contenido {
    transition: opacity 0.3s ease;
}

.oculto {
    display: none;
    opacity: 0;
}

.layout-principal {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {

    .filtro-layout {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        background: transparent;
        padding: 0;
        z-index: 1000;
        gap: 15px;
    }

}

.filtro-btn {
    backdrop-filter: blur(10px);
    background-color: rgba(20, 20, 20, 0.6);
}

@media (max-width: 768px) {

    #peliculas,
    #series {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* BUSCADOR */
.buscador-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#buscador {
    width: 100%;
    max-width: 300px;
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid #333;
    background-color: #1a1a1a;
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.3s ease;
}

#buscador:focus {
    border-color: #e50914;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}

/* SECCION GENERAL */
.estrenos-section {
    position: relative;
    margin: 40px 20px;
    padding: 30px;
    border-radius: 15px;
    background: #0f0f0f;
    overflow: hidden;
}

.estrenos-section {
    position: relative;
    margin: 40px 20px;
    padding: 30px;
    border-radius: 15px;
    background: #0f0f0f;
    overflow: hidden;
    z-index: 0;
}

/* Marco animado tipo líneas girando */
.estrenos-section::before {
    content: "";
    position: absolute;
    inset: -2px; /* un poco afuera para que se vea el borde */
    border-radius: 18px;
    background: repeating-conic-gradient(
    red 0deg 5deg,
    transparent 5deg 15deg
    );
    animation: girarBorde 4s linear infinite, neonBlink 1.5s infinite alternate;
    z-index: -1;
}

/* Fondo interno para que solo se vea el borde */
.estrenos-section::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: #0f0f0f;
    border-radius: 12px;
    z-index: -1;
}

@keyframes girarBorde {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bordeMovimiento {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* TITULO NEON */
.titulo-estrenos {
    text-align: center;
    font-size: 60px;
    letter-spacing: 15px;
    color: red;
    margin-bottom: 25px;
    animation: neonBlink 1.5s infinite alternate;
}

@keyframes neonBlink {
    from {
        text-shadow:
            0 0 5px red,
            0 0 10px red,
            0 0 20px red,
            0 0 40px #ff0000;
        opacity: 1;
    }
    to {
        text-shadow: none;
        opacity: 0.6;
    }
}

/* CARRUSEL */
.estrenos-wrapper {
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.estrenos-carrusel {
    display: flex;
    gap: 20px;
    transition: transform 0.8s ease;
}

.card-estreno {
    position: relative;
    min-width: 180px;
}

.card-estreno img {
    width: 180px;
    height: 260px;
    border-radius: 10px;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: red;
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 5px;
    font-weight: bold;
}