* {
    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:flex;
    flex-direction:column;
    gap:40px;
}

/* Card */
.card-pelicula{
    position:relative;
    text-decoration:none;
    color:#fff;
    overflow:hidden;
    border-radius:14px;
    transition:transform .35s ease, box-shadow .35s ease;
    cursor: pointer;
}

.card-pelicula img{
    width:100%;
    border-radius:14px;
    aspect-ratio:2/3;
    object-fit:cover;
    transition:transform .5s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,.6);
}

/* overlay oscuro elegante */

.card-pelicula::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(
        to top,
        rgba(0,0,0,.85) 0%,
        rgba(0,0,0,.2) 50%,
        rgba(0,0,0,0) 70%
    );
    opacity:.9;
    transition:opacity .3s;
}

/* titulo sobre imagen */

.card-pelicula h3{
    position:absolute;
    bottom:10px;
    left:10px;
    right:10px;
    font-size:15px;
    font-weight:600;
    text-align:center;
    z-index:2;
    margin:0;
}

/* hover PC */

.card-pelicula:hover{
    transform:scale(1.08);
    z-index:5;
    box-shadow:
        0 10px 25px rgba(0,0,0,.8),
        0 0 15px rgba(229,9,20,.4);
}

.card-pelicula:hover img{
    transform:scale(1.12);
}

.card-pelicula:hover::after{
    opacity:1;
}

/* 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);
}

/* BUSCADOR */
.buscador-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#buscador {
    width: 100%;
    max-width: 300px;
    padding: 12px 40px;
    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: 20px;
    padding: 30px;
    border-radius: 10px;
    background: #0f0f0f;
    overflow: hidden;
    z-index: 0;

    box-shadow:
    0 0 10px #ff0000,
    0 0 25px #ff0000,
    0 0 50px #ff0000;
}

/* Marco animado tipo líneas girando */
.estrenos-section::before{

    content:"";
    position:absolute;
    inset:-6px;
    border-radius:25px;

    background: repeating-linear-gradient(
        90deg,
        #ff0000 0px,
        #ff0000 8px,
        transparent 8px,
        transparent 18px
    );

    filter: drop-shadow(0 0 6px #ff0000)
            drop-shadow(0 0 12px #ff0000)
            drop-shadow(0 0 20px #ff0000);

    animation: lucesCine 6s linear infinite;

    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 lucesCine{

    from{
        background-position:0 0;
    }

    to{
        background-position:200px 0;
    }

}

/* 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;
}

.estrenos-carrusel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    cursor: grab;
    scroll-snap-type: x mandatory;
}

.estrenos-carrusel.active {
    cursor: grabbing;
}

.estrenos-carrusel::-webkit-scrollbar {
    display: none;
}

.card-estreno {
    min-width: 160px;
    width: 160px;
    height: 240px;
    flex: 0 0 auto;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
}

.card-estreno img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-estreno,
.card-estreno *{
    user-select: none;
    -webkit-user-drag: none;
}

.card-estreno:hover {
    transform: scale(1.08);
    box-shadow:
        0 0 10px rgba(255,0,0,0.7),
        0 0 25px rgba(255,0,0,0.5);
    z-index: 3;
}

/* SOMBRA LATERAL (EFECTO STREAMING) */
.estrenos-wrapper::before,
.estrenos-wrapper::after{
    content:"";
    position:absolute;
    top:0;
    width:80px;
    height:100%;
    z-index:2;
    pointer-events:none;
}

.estrenos-wrapper::before{
    left:0;
    background:linear-gradient(to right,#0f0f0f,transparent);
}

.estrenos-wrapper::after{
    right:0;
    background:linear-gradient(to left,#0f0f0f,transparent);
}

.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: red;
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 5px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .card-estreno {
        width: 120px;
        height: 180px;
    }
}

/* ========================= */
/* BOTON WHATSAPP FLOTANTE  */
/* ========================= */

.whatsapp-float {
    position: fixed;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.6);
    animation: levitar 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

/* Hover PC */
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.9);
}

/* 📱 En móvil → esquina inferior derecha */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 120px;
        right: 20px;
    }
}

/* 💻 En PC → esquina inferior derecha */
@media (min-width: 769px) {
    .whatsapp-float {
        bottom: 30px;
        right: 30px;
    }
}

/* Animación levitar */
@keyframes levitar {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.search-box {
    width: 90%;
    max-width: 600px;
    animation: fadeIn 0.3s ease;
}

.search-box input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border-radius: 10px;
    border: none;
    outline: none;
}

#resultadosBusqueda {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

#resultadosBusqueda a {
    display: block;
    padding: 10px;
    background: #111;
    color: white;
    text-decoration: none;
    margin-bottom: 5px;
    border-radius: 8px;
    transition: 0.3s;
}

#resultadosBusqueda a:hover {
    background: red;
}

.cerrar {
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    font-size: 20px;
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BOTÓN FLOTANTE BUSCADOR */
.btn-busqueda-flotante {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 9999;
    cursor: pointer;
    animation: levitar 3s ease-in-out infinite;
    background: red;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Imagen interna */
.btn-busqueda-flotante img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover efecto glow */
.btn-busqueda-flotante:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
}

/* Animación levitar */
@keyframes levitar {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* 📱 Móvil: arriba derecha */
@media (max-width: 768px) {
    .btn-busqueda-flotante {
        top: 40px;
        right: 20px;
    }
}

/* 💻 PC: arriba derecha */
@media (min-width: 769px) {
    .btn-busqueda-flotante {
        top: 40px;
        right: 20px;
    }
}

#resultadosBusqueda {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.card-busqueda {
    text-align: center;
    transition: transform 0.3s ease;
}

.card-busqueda img {
    width: 100%;
    border-radius: 10px;
}

.card-busqueda p {
    margin-top: 8px;
    font-size: 14px;
    color: white;
}

.card-busqueda:hover {
    transform: scale(1.05);
}

@media (max-width: 768px){

    .titulo-estrenos{
        font-size: 35px;
        letter-spacing: 8px;
    }

    .estrenos-section{
        padding: 20px;
    }

    .card-estreno{
        min-width: 140px;
    }

    .card-estreno img{
        width: 140px;
        height: 200px;
    }

}

.play-icon{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    
    width:55px;
    height:55px;

    background:#ff0000;
    color:white;

    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;

    border-radius:50%;
    font-size:22px;

    box-shadow:
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 35px #ff0000;

    z-index:3;

    transition:0.3s;
}

.card-pelicula:hover .play-icon{
    transform:translate(-50%, -50%) scale(1.2);
    opacity:1;
}

/* CONTENEDOR GENERAL */

#peliculas{
    width:100%;
    max-width:1200px;
    margin:auto;
    padding:30px 20px;
}

#series{
    width:100%;
    max-width:1200px;
    margin:auto;
    padding:30px 20px;
}

/* FILA */

.fila-peliculas{
    width:100%;
}

/* HEADER */

.fila-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.fila-header h3{
    font-size:22px;
    margin:0;
}

.ver-mas{
    font-size:14px;
    opacity:.8;
    cursor:pointer;
}

.ver-mas:hover{
    opacity:1;
}

/* CARRUSEL */

.fila-carrusel{
    display:flex;
    gap:20px;
    overflow-x:auto;
    scroll-behavior:smooth;
    padding-bottom:10px;
}

/* scrollbar bonito */

.fila-carrusel::-webkit-scrollbar{
    height:6px;
}

.fila-carrusel::-webkit-scrollbar-track{
    background:transparent;
}

.fila-carrusel::-webkit-scrollbar-thumb{
    background:#444;
    border-radius:10px;
}

.fila-carrusel::-webkit-scrollbar-thumb:hover{
    background:red;
}

/* TARJETAS */

.fila-carrusel .card-pelicula{
    flex:0 0 auto;
    width:180px;
}

/* IMAGEN */

.fila-carrusel .card-pelicula img{
    width:100%;
    height:260px;
    object-fit:cover;
}

/* RESPONSIVE TABLET */

@media (max-width:1024px){

.fila-carrusel .card-pelicula{
    width:160px;
}

.fila-carrusel .card-pelicula img{
    height:230px;
}

}

/* RESPONSIVE MOVIL */

@media (max-width:768px){

#peliculas{
    padding:25px 10px;
}

#series{
    padding:25px 10px;
}

.fila-header h3{
    font-size:20px;
}

.fila-carrusel{
    gap:14px;
}

.fila-carrusel .card-pelicula{
    flex:0 0 45%;
}

.fila-carrusel .card-pelicula img{
    width:100%;
    height:auto;
}

}

.btn-ayuda{
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 9999;
    cursor: pointer;
    animation: levitar 3s ease-in-out infinite;
    background: white;
    box-shadow: 0 0 15px #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-ayuda img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover efecto glow */
.btn-ayuda:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px #fff;
}

/* 📱 Móvil: abajo izquierda */
@media (max-width: 768px) {
    .btn-ayuda {
        bottom: 120px;
        left: 20px;
    }
}

/* 💻 PC: arriba izquierda */
@media (min-width: 769px) {
    .btn-ayuda {
        top: 40px;
        left: 20px;
    }
}

/* Animación levitar */
@keyframes levitar {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}