﻿/* Variables de Color */
:root {
    --bg: #0a0a0d;
    --card: #121212;
    --text: #e5e5e5;
    --text-muted: #a0a0a0;
    --accent: #00ff66;          /* Verde brillante */
    --accent-dark: #00cc55;     /* Verde más oscuro */
    --bg-primary: #0a0a0a;
    --bg-secondary: #151515;
    --bg-card: #1a1a1a;
    --bg-card-hover: #202020;
    --text-primary: #e8e8e8;
    --text-secondary: #9e9e9e;
    --accent-primary: #00e676;  /* Verde neón */
    --accent-secondary: #4caf50;/* Verde más suave */
    --accent-gradient: linear-gradient(135deg, #00e676 0%, #4caf50 100%);
    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 10px rgba(0, 255, 102, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 255, 102, 0.3);
    --shadow-lg: 0 8px 35px rgba(0, 255, 102, 0.4);
    --font-main: 'Outfit', 'Inter', -apple-system, sans-serif;
}


/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    font-family: var(--font-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container Principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
}

/* Enlaces Globales */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #33e0ff;
}

/* Imágenes Responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==============================================
   HEADER STICKY MODERNO
   ============================================== */
#menu_top {
    background: linear-gradient(180deg, rgba(26,26,26,0.98) 0%, rgba(15,15,15,0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Logo con Gradiente */
#logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

#logo:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 12px var(--accent-primary));
}

#logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-gradient); /* tu gradiente verde-azul */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

#logo i {
    color: var(--accent); /* verde brillante */
    font-size: 26px;
    text-shadow: 0 0 18px rgba(0, 255, 102, 0.6);
    -webkit-text-fill-color: var(--accent); /* evita heredar gradiente */
}


/* Navegación Desktop */
#main_nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav_menu {
    list-style: none;
    display: flex;
    gap: 4px;
}

.nav_menu li a {
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.nav_menu li a:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
}

.nav_menu li a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav_menu li a:hover::after {
    transform: scaleX(1);
}

/* Buscador Mejorado */
#search_form {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#search_form:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

#search_form input {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 220px;
    font-size: 14px;
}

#search_form input::placeholder {
    color: var(--text-secondary);
}

#search_form input:focus {
    outline: none;
}

#search_form button {
    background: var(--accent-gradient);
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

#search_form button:hover {
    transform: scale(1.05);
}

/* Botón Hamburguesa */
#nav_toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

#nav_toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Barra de Color Decorativa */
.barColor {
    height: 3px;
    background: var(--accent-gradient);
}

/* ==============================================
   MOVIE CARDS - GRID PRINCIPAL
   ============================================== */

/* Título Principal */
main.container > h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 30px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* Layout Principal con Sidebar */
.main-box {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-bottom: 50px;
}
/* Grid de Películas Destacadas */
/* Grid estilo YouTube */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
}

/* Card estilo YouTube */
.movies-grid .movie-card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.movies-grid .movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

/* Miniatura (poster) rectangular */
.movies-grid .poster-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9; /* formato YouTube */
    background: var(--bg-card);
}

.movies-grid .poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* recorta exceso de altura */
    display: block;
    transition: transform 0.4s ease;
}

.movies-grid .movie-card:hover .poster-wrapper img {
    transform: scale(1.05);
}

/* Info debajo del thumbnail */
.movies-grid .movie-info {
    padding: 12px;
    text-align: left;
}

.movies-grid .movie-title-card {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movies-grid .movie-title-card a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.movies-grid .movie-title-card a:hover {
    color: var(--accent-primary);
}

/* Sub-info estilo YouTube (ej: canal, views, fecha) */
.movie-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.title-link-top {
    color: inherit;                        /* hereda el color del h3 */
    text-decoration: none;
    background: linear-gradient(90deg,
                var(--accent-primary) 0%,     /* #00d9ff */
                var(--accent) 100%);          /* #00ffaa → toque verde-azul bonito */
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.4s ease, color 0.25s ease;
    padding-bottom: 2px;                   /* espacio para el subrayado */
}

.title-link-top:hover {
    color: #ffffff;
    background-size: 100% 2px;             /* subrayado que crece al hover */
}

.title-link-top:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
    border-radius: 4px;
}
  /* Título */
.movies-grid .movie-info {
    padding: 14px 10px 16px;
    text-align: center;
}

.movies-grid .movie-title-card {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.movie-title-card a{
    font-size: 16px !important;
    color: #fff;
    overflow: hidden;
    display: block;
    height: 50px;
}
.movies-grid .title-link {
    color: var(--text);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.movies-grid .title-link:hover {
    color: var(--accent);
}


/* Grid de Películas Nuevas */
.new-films {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

/* Movie Card - Estilo Moderno */
.new-films .movie-card {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeIn 0.6s ease;
}

.new-films .movie-card:hover {
    transform: translateY(-10px);
    z-index: 10;
}

/* Link Contenedor */
.new-films .movie-link {
    display: block;
    text-decoration: none;
}

/* Poster Container */
.new-films .movie-poster {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    margin: 0;
}

.new-films .movie-card:hover .movie-poster {
    box-shadow: var(--shadow-lg);
}

/* Overlay Gradiente en Hover */
.new-films .movie-poster::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.new-films .movie-card:hover .movie-poster::before {
    opacity: 1;
}

/* Imagen del Poster */
.new-films .movie-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.new-films .movie-card:hover .movie-poster img {
    transform: scale(1.08);
}
/* Badge de Calidad con tus colores */
.new-films .poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    background: var(--accent-gradient); /* gradiente verde-azul */
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 8px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 255, 102, 0.4); /* sombra verde */
    text-transform: uppercase;
}

/* Año del Poster con borde verde */
.new-films .poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: var(--accent); /* verde brillante */
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    z-index: 2;
    border: 1px solid var(--accent-primary); /* borde verde neón */
}

/* Info de la Película */
.movie-info {
    padding: 12px 8px 0;
}

.movie-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.movie-title a,
.movie-title-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.movie-title a:hover,
.movie-title-link:hover {
    color: var(--accent-primary);
}

/* Truncar texto a una línea */
.one-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==============================================
   SLIDER NETFLIX STYLE
   ============================================== */
.netflix-slider {
    margin: 50px 0;
}

.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.slider-title {
    font-size: 26px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slider-buttons {
    display: flex;
    gap: 12px;
}

.slider-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--accent-primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.slider-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 10px 0 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-card) transparent;
}

.slider-row::-webkit-scrollbar {
    height: 8px;
}

.slider-row::-webkit-scrollbar-track {
    background: transparent;
}

.slider-row::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 10px;
}

.slider-row::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card-hover);
}

/* Poster Card Mejorada */
.poster-card {
    flex: 0 0 auto;
    width: 200px;
    scroll-snap-align: start;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.poster-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.poster-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.9) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.poster-card:hover::before {
    opacity: 1;
}

.poster-image {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #111;
}

.poster-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.poster-card:hover .poster-image img {
    transform: scale(1.1);
}

.poster-card .rating {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
    color: #000;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.poster-card {
    position: relative;
    display: inline-block;
    width: 180px;
    text-decoration: none;
}

.poster-image {
    position: relative;
    display: block;
}

.poster-image img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* TÍTULO SOBRE EL POSTER (BOTTOM OVERLAY) */
.card-title-float {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6); /* semitransparente */
    color: #fff;
    text-align: center;
    padding: 6px 4px;
    font-size: 14px;
    font-weight: bold;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.pagenavi {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
    font-family: var(--font-main);
    font-weight: 500;

    /* Funciona con cualquier número de columnas */
    grid-column: 1 / -1;
    /* Alternativa equivalente que también es muy usada */
    /* grid-column: span all; */

    /* Asegura que no herede anchuras raras */
    width: 100%;
    min-width: 0;
}

.pagenavi a,
.pagenavi span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
}

/* Página actual */
.pagenavi span.current {
    background: var(--accent-primary);
    color: #000;
    font-weight: 600;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
    transform: scale(1.05);
}

/* Enlaces normales */
.pagenavi a.single_page {
    color: var(--text-muted);
    border-color: transparent;
}

.pagenavi a.single_page:hover {
    color: #fff;
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.25);
    transform: translateY(-2px);
}

/* Flechas siguiente/anterior */
.pagenavi a.single_page[href*="page"]:not([href*="page/1"]):not([class*="single_page number"]) {
    font-weight: 700;
    font-size: 18px;
    color: var(--accent-primary);
    border-color: transparent;
    background: rgba(0, 217, 255, 0.1);
}

.pagenavi a.single_page[href*="page"]:hover {
    background: var(--accent-primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.4);
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .pagenavi {
        gap: 8px;
    }

    .pagenavi a,
    .pagenavi span {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
        border-radius: 10px;
    }
}
/* ==============================================
   SIDEBAR MODERNA
   ============================================== */
.sidebar {
    margin-top: 2px;
}

/* Widget con bordes triangulares */
.widget {
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    clip-path: polygon(
        0% 10px, 10px 0%, calc(100% - 10px) 0%, 100% 10px,
        100% calc(100% - 10px), calc(100% - 10px) 100%,
        10px 100%, 0% calc(100% - 10px)
    );
}

.widget:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

/* Título con borde inferior triangular */
.widget h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.widget h3::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--border-color);
}

/* Lista con efecto triangular en hover */
.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li:hover {
    padding-left: 10px;
}

.widget ul li:hover::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--accent-primary);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.widget ul li a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.widget ul li:hover a {
    color: var(--accent-primary);
}

.widget ul li span {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}


/* ==============================================
   PÁGINA DE PELÍCULA (ver.html)
   ============================================== */

.movie-page {
    margin-top: 30px;
}

.movie-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 30px;
}

/* Sidebar Izquierda */
.movie-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Poster con efecto moderno */
.movie-poster {
    margin-bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.movie-poster:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.movie-poster img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tabs con estilo pill */
.movie-tabs ul {
    list-style: none;
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.movie-tabs ul li {
    flex: 1;
}

.movie-tabs ul li a {
    display: block;
    padding: 12px;
    background: rgba(30,30,30,0.6);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}

.movie-tabs ul li.active a,
.movie-tabs ul li a:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Estadísticas con glassmorphism */
.movie-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat {
    background: rgba(20,20,20,0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-4px);
}

.stat h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.stat span {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Contenido Principal */
.movie-main {
    min-width: 0;
}

/* Header con overlay moderno */
.movie-header {
    position: relative;
    padding: 80px 50px;
    border-radius: 20px;
    margin-bottom: 30px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.movie-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%);
    backdrop-filter: blur(4px);
}

.movie-header * {
    position: relative;
    z-index: 1;
}

.movie-title {
    font-size: 46px;
    font-weight: 700;
    color: white;
    text-shadow: 0 6px 25px rgba(0,0,0,0.9);
    margin-bottom: 12px;
}

.movie-title .year {
    font-weight: 400;
    opacity: 0.7;
}

.original-title {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
}

/* Contenido con efecto tarjeta */
.movie-content {
    background: rgba(25,25,25,0.7);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.movie-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.movie-content p {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* ---------------------------------- */
/*        REPRODUCTOR GENERAL         */
/* ---------------------------------- */

.player-container {
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* ---------------------------------- */
/*            IDIOMAS                 */
/* ---------------------------------- */

.lang {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.lang div {
    background: var(--bg-card);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: 0.25s ease;
}

.lang div:hover,
.lang div.active {
    background: var(--accent-secondary);
    color: #fff;
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-sm);
}

/* ---------------------------------- */
/*       CAJA DEL VIDEO               */
/* ---------------------------------- */

.player-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Botón circular grande */
.play-button {
    width: 100px;
    height: 100px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.7);
}

/* ---------------------------------- */
/*        OPCIONES DE VIDEO           */
/* ---------------------------------- */

.player-options {
    margin: 20px 0;
}

.player-options ul {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0;
}

.player-options ul li {
    padding: 9px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;

    /* IMPORTANTE */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    max-width: 100%;
    color: var(--text-primary);
}

.player-options ul li:hover,
.player-options ul li.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.player-options .server {
    font-size: 10px;
    background: #444;
    color: #aaa;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.player-options ul li:hover .server,
.player-options ul li.active .server {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ---------------------------------- */
/*          TIP / CONSEJO             */
/* ---------------------------------- */

.tip {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    border-left: 4px solid #ffc107;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.tip strong {
    color: #ffc107;
}

/* ---------------------------------- */
/*           RESPONSIVO               */
/* ---------------------------------- */

@media (max-width: 600px) {
    .lang {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lang div {
        flex: 1 1 calc(33% - 6px);
        text-align: center;
    }

    .play-button {
        width: 80px;
        height: 80px;
        font-size: 14px;
    }
}


/* Información de Película */
dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    margin: 20px 0;
}

dt {
    font-weight: 700;
    color: var(--text-primary);
}

dd {
    color: var(--text-secondary);
}

dd a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-card);
    border-radius: 6px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

dd a:hover {
    background: var(--accent-primary);
    color: #000;
}

/* Sidebar Derecha */
.movie-sidebar-right {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.trailer,
.related-movies,
.top-movies {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.trailer h3,
.related-movies h3,
.top-movies h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Items Relacionados */
.related-item {
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateX(5px);
}

.related-item a {
    display: flex;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.related-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Top Movies */
.top-movies ol {
    list-style: none;
    counter-reset: movie-counter;
}

.top-movies ol li {
    counter-increment: movie-counter;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 40px;
}

.top-movies ol li:last-child {
    border-bottom: none;
}

.top-movies ol li::before {
    content: counter(movie-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.top-movies ol li a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.top-movies ol li:hover a {
    color: var(--accent-primary);
}

/* ==============================================
   FOOTER
   ============================================== */
footer,
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
}

footer p,
.site-footer p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */
@media (max-width: 1200px) {
    .movie-layout {
        grid-template-columns: 250px 1fr;
    }

    .movie-sidebar-right {
        display: none;
    }

    .main-box {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 900px) {
    .header-container {
        padding: 14px 16px;
    }

    #main_nav {
        order: 3;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    #main_nav.open {
        max-height: 300px;
    }

    .nav_menu {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
        gap: 0;
        padding: 12px 0;
        align-items: stretch;
    }

    .nav_menu li {
        width: 100%;
        list-style: none;
    }

    .nav_menu li a {
        display: block !important;
        width: 100%;
        text-align: left;
        padding: 14px 12px;
        border-bottom: 1px solid var(--border-color);
        box-sizing: border-box;
    }

    .nav_menu li a::after {
        display: none;
    }

    #search_form {
        order: 2;
        width: 100%;
    }

    #search_form input {
        width: 100%;
    }

    #nav_toggle {
        display: flex;
        order: 1;
    }

    #nav_toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #nav_toggle.open span:nth-child(2) {
        opacity: 0;
    }

    #nav_toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .movie-layout {
        grid-template-columns: 1fr;
    }

    .movie-sidebar,
    .movie-sidebar-right {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 18px;
    }

    .movie-poster {
        grid-column: 1 / -1;
    }
    .ocultar{
        display: none;
    }
    /* Responsive para cards */
    .main-box {
        grid-template-columns: 1fr;
    }

    .posthome,
    .new-films {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    main.container > h1 {
        font-size: 24px;
        margin: 30px 0 20px;
    }
    .poster-card {
        max-width: 150px;
    }
}
@media (max-width: 600px) {
    .slider-title {
        font-size: 20px;
    }

    .slider-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    }
    .poster-card {
        max-width: 130px;
    }

    .card-title-float {
        font-size: 12px;
        padding: 5px 4px;
    }

    .poster-card .rating {
        font-size: 11px;
        padding: 4px 8px;
        top: 6px;
        right: 6px;
    }
    .movie-header {
        padding: 40px 20px;
    }

    .movie-title {
        font-size: 28px;
    }

    .movie-content {
        padding: 24px 20px;
    }

    dl {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    dd {
        margin-bottom: 16px;
    }

    /* Cards más pequeñas en móvil */
    .posthome,
    .new-films {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .poster-badge {
        font-size: 9px;
        padding: 4px 10px;
        top: 8px;
        left: 8px;
    }

    .poster-year {
        font-size: 11px;
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }

    .movie-info {
        padding: 8px 4px 0;
    }

    .movie-title {
        font-size: 13px;
    }
    main.container > h1 {
      font-size: 24px;
      font-weight: 700;
      margin: 20px 0 15px;
    }
}

/* ==============================================
   ANIMACIONES
   ============================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: #000;
}
.s-related {
    margin: 60px 0;
    padding: 0 20px;
}

.s-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-left: 4px;
}

/* GRID con wrap automático → se adapta al ancho disponible */
.s-movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* Tarjeta horizontal recortada */
.s-movie-card {
    position: relative;
    aspect-ratio: 16 / 9;           /* perfecto 16:9 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    display: block;
    text-decoration: none;
}

.s-movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.s-overlay {
    position: absolute;
    inset: 0;
    padding: 30px 16px 16px;
    background: linear-gradient(to top, rgba(10,10,13,0.98) 0%, transparent 70%);
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: end;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

/* Hover → brutal */
.s-movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 217, 255, 0.4);
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

.s-movie-card:hover img {
    transform: scale(1.15);
}

.s-movie-card:hover .s-overlay {
    opacity: 1;
}

/* Responsive perfecto */
@media (max-width: 1024px) {
    .s-movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .s-movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    .s-title {
        font-size: 1.3rem;
    }
    .s-related {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .s-movies-grid {
        grid-template-columns: 1fr 1fr;   /* fuerza 2 por fila en móvil */
        gap: 12px;
    }
}
.chapter-list {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    width: 100%;
    font-family: var(--font-main);
}

.chapter-list h2 {
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
}

.chapter-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-list li {
    margin: 10px 0;
}

.chapter-list a {
    display: block;
    padding: 10px 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s ease;
    border: 1px solid transparent;
}

.chapter-list a:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}
.mostrar {
  display: flex !important;
}
.lat, .esp, .sub, .dn {
  display: none;
}
/* menu anterior lista siguiente */
.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-main);
}

.nav-btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s ease;
}

.nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.nav-btn:active {
    transform: scale(0.97);
}
