@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* ============================================= */
/* SCROLL ROW — FILA HORIZONTAL ESTILO NETFLIX   */
/* ============================================= */
.scroll-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    gap: 10px !important;
    padding: 10px 20px 20px 20px !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    cursor: grab;
    padding-top: 16px !important;
    padding-bottom: 24px !important;
}
.scroll-row.row-dragging { cursor: grabbing; }
.scroll-row::-webkit-scrollbar { height: 5px; }
.scroll-row::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 10px; }
.scroll-row::-webkit-scrollbar-thumb { background: #ff2f28; border-radius: 10px; }

/* Tarjetas dentro de fila scroll — ancho fijo */
.box-scroll {
    flex: 0 0 140px !important;
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
}

/* ============================================= */
/* MEJORAS DE TARJETA — BADGE + HOVER OVERLAY    */
/* ============================================= */
.content {
    position: relative !important;
}

/* Badge de año o temporadas */
.card-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(229,9,20,0.92);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.3px;
    pointer-events: none;
}

/* Overlay de play al hacer hover */
.card-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 6px 6px 0 0;
    z-index: 1;
    pointer-events: none;
}
.box-1:hover .card-hover-overlay,
.box-2:hover .card-hover-overlay,
.box-3:hover .card-hover-overlay,
.box-4:hover .card-hover-overlay,
.box-5:hover .card-hover-overlay,
.box-6:hover .card-hover-overlay,
.box-7:hover .card-hover-overlay,
.box-8:hover .card-hover-overlay,
.box-9:hover .card-hover-overlay,
.box-10:hover .card-hover-overlay,
.box-11:hover .card-hover-overlay,
.box-12:hover .card-hover-overlay,
.box-13:hover .card-hover-overlay,
.box-14:hover .card-hover-overlay,
.box-15:hover .card-hover-overlay,
.box-16:hover .card-hover-overlay,
.box-17:hover .card-hover-overlay,
.box-18:hover .card-hover-overlay,
.box-19:hover .card-hover-overlay,
.box-20:hover .card-hover-overlay,
.box-0:hover .card-hover-overlay { opacity: 1; }

/* ============================================= */
/* BOTÓN COMPARTIR EN MODAL                      */
/* ============================================= */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 9px 20px;
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}
.share-btn:hover {
    background: rgba(255,47,40,0.25);
    border-color: #ff2f28;
    color: #fff;
}

/* ── Botón Descargar (modal) ── */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    margin-right: 10px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #e50914, #ff2336);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(229,9,20,0.35);
}
.download-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 6px 22px rgba(229,9,20,0.55);
    transform: translateY(-1px);
}


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #ff2f28;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background: #e02020;
    border-color: transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-corner {
    background: transparent;
}
* { scrollbar-width: thin; scrollbar-color: #ff2f28 rgba(0, 0, 0, 0.4); }
* { scrollbar-color: #ff2f28 #111 !important; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #030303;
    font-family: 'Bebas Neue', cursive;
    color: #ffffff;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
}

.header {
    position: relative;
    width: 100vw; 
    height: auto; 
    background-color: #030303;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    overflow: hidden; 
    align-items: center;
}

.menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw; 
    display: flex;
    align-items: center;
    justify-content: space-between; 
    padding: 5px 20px;
    background-color: rgba(3, 3, 3, 0.5); 
    z-index: 100; 
}

#main-logo-container {
    font-size: 35px;
    color: #ffffff;
    max-height: 60px; 
    display: flex;
    align-items: center;
    flex-shrink: 0; 
    position: relative;
}

#main-logo-container img {
    width: 160px !important;
    height: 90px !important;
    object-fit: contain;
}

#main-logo-container span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bebas Neue', cursive;
    font-size: 24px;
}

.menu .navbar {
    margin: 0 auto; 
}

.menu .navbar ul li {
    position: relative;
    float: left;
}

.menu .navbar ul li a {
    font-size: 22px;
    padding: 15px 20px; 
    color: #ffffff;
    display: block;
}

.menu .navbar ul li a:hover {
    color: #ff2f28;
}

.search-login-group {
    display: flex !important;
    align-items: center;
    gap: 20px; 
    flex-shrink: 0; 
}

.search-box-container {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.search-input {
    width: 0; 
    padding: 0;
    height: 100%;
    background-color: #2a2a2a;
    border: none;
    border-radius: 20px;
    color: #ffffff;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    outline: none;
}

.search-box-container.active .search-input {
    width: 250px; 
    padding: 0 15px 0 45px; 
    opacity: 1;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #cfcfcf;
    font-size: 22px;
    position: absolute;
    right: 5px; 
    z-index: 10;
    transition: color 0.3s;
}

.search-box-container.active .search-button {
    right: auto;
    left: 10px; 
    color: #ff2f28; 
}

.search-button:hover {
    color: #ff2f28;
}

#menu { display: none; }
.menu-icono { width: 25px; }
.menu label { cursor: pointer; display: none; }
.header-content, .header-1, .header-2 { display: none; }

.slider-container {
    position: relative;
    width: 100vw;           
    height: 700px; 
    overflow: hidden; 
    z-index: 1;
    left: 50%;
    transform: translateX(-50%);  
}

.slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    flex: 0 0 100%;
    width: 100%; 
    height: 100%;
    background-position: top center; 
    background-size: cover;      
    background-repeat: no-repeat;
    position: relative;
    padding: 0 0 70px;
}

.slide-content-wrapper {
    width: 100%;
    padding: 0 50px 0 50px;     
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 30px !important;
}

.slide::after {
    content: '';
    position: absolute;
    inset: 0; 
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 50%);
}

.slide-content {
    position: relative;
    z-index: 2; 
    max-width: 600px;
    color: #ffffff;
    text-align: left;
    padding: 0; 
}

.slide-content h1 {
    font-size: 70px;
    line-height: 1;
    margin-bottom: 15px;
    color: #ffffff; 
}

.slide-content .meta {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.slide-content .rating {
    background-color: #ffc107;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Poppins', sans-serif;
}

.slide-content p {
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
    margin-bottom: 30px !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-height: none !important;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 10px;
}

.btn-1 {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, #ff0000, #cc0000);
    color: #ffffff;
    font-size: 16px;
    font-family: 'Bebas Neue', cursive;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-1:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: 0.3s;
    cursor: pointer;
}

.dot.active {
    background: #ff2f28;
    transform: scale(1.2);
}

.movies {
    padding: 50px 0 0 0; 
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

.section-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
}

.back-btn {
    background: #ff2f28;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 47, 40, 0.4);
    z-index: 10;
}

.back-btn:hover {
    background: #e02020;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 47, 40, 0.6);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

h2 {
    font-size: 35px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: color 0.3s;
    padding-left: 20px;
}
h2:hover { color: #ff2f28; }
hr {
    border: 1px solid #ff2f28;
    width: 50%;
    margin-bottom: 40px;
    margin-left: 20px;
}

.box-container-0,.box-container-1,.box-container-2,.box-container-3,.box-container-4,.box-container-5,
.box-container-6,.box-container-7,.box-container-8,.box-container-9,.box-container-10,
.box-container-11,.box-container-12,.box-container-13,.box-container-14,.box-container-15,
.box-container-16,.box-container-17,.box-container-18,.box-container-19,.box-container-20 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin: 20px 0 !important;
    padding: 0 20px !important;
    justify-content: flex-start !important;
    transition: none !important;
}

.box-0, .box-1, .box-2, .box-3, .box-4, .box-5, .box-6, .box-7, .box-8, .box-9, .box-10,
.box-11, .box-12, .box-13, .box-14, .box-15, .box-16, .box-17, .box-18, .box-19, .box-20 {
    width: 140px !important;
    height: 240px !important;
    border-radius: 6px !important;
    background-color: #111 !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: transform 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 140px !important;
}

.box-0 img, .box-1 img, .box-2 img, .box-3 img, .box-4 img, .box-5 img, .box-6 img,
.box-7 img, .box-8 img, .box-9 img, .box-10 img, .box-11 img, .box-12 img,
.box-13 img, .box-14 img, .box-15 img, .box-16 img, .box-17 img, .box-18 img,
.box-19 img, .box-20 img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    border-radius: 6px 6px 0 0 !important;
}

.content {
    padding: 6px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.content h3 {
    font-size: 12px !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.content p { display: none !important; }

.load-more-section {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin: 30px 20px 0 0 !important;
    width: auto !important;
    max-width: calc(100% - 40px) !important;
    padding-right: 20px !important;
}

.load-more-section .btn-1 {
    min-width: 120px !important;
    font-size: 15px !important;
    padding: 10px 24px !important;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.box-0:hover, .box-1:hover, .box-2:hover, .box-3:hover, .box-4:hover, .box-5:hover, .box-6:hover,
.box-7:hover, .box-8:hover, .box-9:hover, .box-10:hover, .box-11:hover, .box-12:hover,
.box-13:hover, .box-14:hover, .box-15:hover, .box-16:hover, .box-17:hover, .box-18:hover,
.box-19:hover, .box-20:hover { transform: scale(1.02) !important; }

.footer {
    display: flex;
    justify-content: space-between;
    padding: 100px 20px;
    margin-top: 100px;
    border-top: 1px solid #ff2f283d;
}

.footer ul { display: flex; }
.footer h3 { font-size: 30px; }
.footer a { color: #ffffff; font-size: 20px; margin-right: 20px; display: block; }
.footer a:hover { color: #ff2f28; }

/* ============================================================ */
/* MODAL — REDISEÑO COMPLETO ESTILO NETFLIX                    */
/* ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: #0a0a0a;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    scroll-behavior: smooth;
}
.modal-overlay.visible { opacity: 1; pointer-events: auto; display: flex; }

.modal-content {
    background: transparent;
    padding: 30px 40px 60px;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff2f28;
    color: #fff;
    border: none;
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2100;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(255,47,40,0.5);
}
.close-btn:hover { background: #e02020; transform: scale(1.1); }

.modal-header {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 36px;
    align-items: start;
    margin-bottom: 32px;
}

.modal-poster {
    width: 240px;
    height: 360px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
    flex-shrink: 0;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding-top: 4px;
}

.modal-info h1 {
    font-family: 'Bebas Neue', cursive;
    font-size: 54px;
    color: #ff2f28;
    line-height: 1;
    margin: 0;
}

.modal-info .meta-info {
    color: #aaa;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.modal-info .meta-info .modal-year-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ddd;
}

.modal-genres-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.genre-tag {
    display: inline-block;
    color: #ddd;
    background: rgba(255,47,40,0.15);
    border: 1px solid rgba(255,47,40,0.3);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.genre-tag:hover { background: rgba(255,47,40,0.4); border-color: #ff2f28; color: #fff; }

.modal-description-inline {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: #ccc;
    max-height: 130px;
    overflow-y: auto;
    padding-right: 4px;
    margin: 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 9px 22px;
    background: rgba(255,255,255,0.07);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
    margin-top: 4px;
}
.share-btn:hover { background: rgba(255,47,40,0.25); border-color: #ff2f28; color: #fff; }

.description-section { display: none !important; }

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-left: 0;
    margin-top: 0;
}
.modal-body h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: 32px;
    color: #ff2f28;
    margin-bottom: 5px;
}

/* ==================== SERVIDORES ==================== */
#modal-servers-container,
#series-servers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    justify-content: flex-start;
}

.server-btn,
.server-tab {
    padding: 10px 24px;
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.server-btn:hover,
.server-tab:hover {
    background: rgba(255,47,40,0.25);
    border-color: #ff2f28;
    color: #fff;
}

.server-btn.active,
.server-tab.active {
    background: #ff2f28;
    color: #fff;
    border-color: #ff2f28;
    box-shadow: 0 0 16px rgba(255,47,40,0.5);
}

#modal-iframe-container { 
    background-color: #000; 
    border-radius: 5px; 
    overflow: hidden; 
    position: relative; 
    width: 100%; 
    padding-bottom: 56.25%; 
    margin-top: -30px !important; 
}
#movie-iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; }

/* ================================================================ */
/* SERIES — ACORDEÓN DE TEMPORADAS + BARRA DE NAVEGACIÓN           */
/* ================================================================ */

#series-player-controls {
    margin: 10px 0 20px;
}

#series-servers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

#season-selector {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
}

.season-accordion-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.04);
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: #bbb;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.season-accordion-btn:last-of-type { border-bottom: none; }
.season-accordion-btn:hover { background: rgba(255,47,40,0.12); color: #fff; }
.season-accordion-btn.active {
    background: rgba(255,47,40,0.18);
    color: #ff2f28;
    border-left: 3px solid #ff2f28;
}
.season-accordion-btn .season-ep-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: #666;
    margin-right: 6px;
}
.season-accordion-btn.active .season-ep-count { color: #ff2f28aa; }
.season-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.season-accordion-btn.active .season-chevron { transform: rotate(180deg); }

.season-episodes-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0,0,0,0.3);
}
.season-episodes-panel.open {
    max-height: 1200px;
}
.season-episodes-panel .episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    padding: 14px;
}

.ep-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 0 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 16px;
}

.ep-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.07);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.ep-nav-btn:hover:not(:disabled) {
    background: rgba(255,47,40,0.25);
    border-color: #ff2f28;
    color: #fff;
}
.ep-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ep-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

#ep-current-label {
    font-family: 'Bebas Neue', cursive;
    font-size: 20px;
    color: #fff;
    letter-spacing: 1px;
}

.ep-chapters-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255,47,40,0.15);
    color: #ff2f28;
    border: 1px solid rgba(255,47,40,0.3);
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.ep-chapters-btn:hover,
.ep-chapters-btn.active {
    background: #ff2f28;
    color: #fff;
    border-color: #ff2f28;
}

.episodes-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.episodes-container.chapters-visible {
    max-height: 2000px;
    margin-top: 4px;
}

.episode-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 11px 14px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}
.episode-btn:hover {
    background: rgba(255,47,40,0.15);
    border-color: #ff2f28;
    transform: translateY(-1px);
}
.episode-btn.active {
    background: linear-gradient(135deg, rgba(255,47,40,0.35), rgba(255,47,40,0.2));
    border-color: #ff2f28;
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,47,40,0.25);
}

.ep-number {
    background: #ff2f28;
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.episode-btn.active .ep-number {
    background: #fff;
    color: #ff2f28;
}

.ep-title {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    line-height: 1.3;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================== */
/* MOBILE — max-width: 768px  — VERSIÓN FINAL COMBINADA       */
/* =========================================================== */

@media (max-width: 768px) {

    /* ─────────────────────────────────────────────── */
    /* BARRA SUPERIOR                                  */
    /* ─────────────────────────────────────────────── */
    .menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 58px !important;
        padding: 0 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: rgba(4, 4, 4, 0.97) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(229, 9, 20, 0.3) !important;
        z-index: 10000 !important;
    }

    /* Empujar el header para que el menú fijo no tape el slider */
    .header {
        padding-top: 58px !important;
    }

    /* Logo */
    #main-logo-container img {
        width: 108px !important;
        height: 58px !important;
        object-fit: contain !important;
    }

    /* Icono hamburguesa */
    .menu-icono {
        width: 24px !important;
        display: block !important;
        transition: opacity 0.2s ease !important;
    }

    /* Label hamburguesa */
    .menu label {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        height: 36px !important;
        cursor: pointer !important;
        z-index: 10002 !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }

    /* X cuando está abierto */
    .menu label::after {
        content: '' !important;
        position: absolute !important;
        font-size: 18px !important;
        font-family: 'Poppins', sans-serif !important;
        font-weight: 700 !important;
        color: #ff2f28 !important;
        opacity: 0 !important;
        transition: opacity 0.2s ease !important;
        pointer-events: none !important;
    }
    #menu:checked ~ label::after {
        content: '✕' !important;
        opacity: 1 !important;
    }
    #menu:checked ~ label .menu-icono {
        opacity: 0 !important;
    }

    /* ─────────────────────────────────────────────── */
    /* NAVBAR — DESPLEGABLE HACIA ABAJO                */
    /* Técnica: max-height 0 → auto con transición     */
    /* ─────────────────────────────────────────────── */
    .menu .navbar {
        display: block !important;          /* siempre en DOM */
        position: fixed !important;
        top: 58px !important;               /* justo debajo del header */
        left: 0 !important;
        right: 0 !important;
        background: rgba(6, 6, 6, 0.98) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border-bottom: 1px solid rgba(229, 9, 20, 0.25) !important;
        z-index: 9999 !important;
        overflow: hidden !important;
        max-height: 0 !important;
        transition: max-height 0.35s ease !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
    }

    #menu:checked ~ .navbar {
        max-height: 400px !important;       /* suficiente para todos los links */
    }

    .menu .navbar ul {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 6px 0 10px !important;
    }

    .menu .navbar ul li {
        width: 100% !important;
        float: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }

    .menu .navbar ul li:last-child {
        border-bottom: none !important;
    }

    .menu .navbar ul li a {
        display: flex !important;
        align-items: center !important;
        padding: 14px 24px !important;
        font-size: 20px !important;
        letter-spacing: 1.5px !important;
        color: #c8c8c8 !important;
        transition: color 0.2s, padding-left 0.2s, background 0.2s !important;
        border-left: 3px solid transparent !important;
    }

    .menu .navbar ul li a:active,
    .menu .navbar ul li a:hover {
        color: #ff2f28 !important;
        background: rgba(229, 9, 20, 0.07) !important;
        padding-left: 32px !important;
        border-left-color: #ff2f28 !important;
    }

    /* ─────────────────────────────────────────────── */
    /* BÚSQUEDA                                        */
    /* ─────────────────────────────────────────────── */
    .search-login-group {
        display: flex !important;
        margin-left: auto !important;
        margin-right: 8px !important;
    }

    .search-box-container.active .search-input {
        width: 150px !important;
        padding: 0 12px 0 36px !important;
    }

    .search-button {
        font-size: 18px !important;
        color: #bbb !important;
    }

    /* Ocultar buscador dentro del modal */
    body.modal-open .search-login-group {
        display: none !important;
    }

    /* ─────────────────────────────────────────────── */
    /* SLIDER — sin caja gris, datos encima del banner */
    /* ─────────────────────────────────────────────── */
    .slider-container {
        height: 480px !important;
        min-height: unset !important;
        margin-top: 0 !important;
    }

    .slide {
        height: 480px !important;
        background-position: center 15% !important;
    }

    /* Gradiente oscuro más pronunciado abajo */
    .slide::after {
        background: linear-gradient(
            to top,
            rgba(0,0,0,0.92) 0%,
            rgba(0,0,0,0.5)  40%,
            rgba(0,0,0,0)    70%
        ) !important;
    }

    .slide-content-wrapper {
        padding: 0 16px 200px 16px !important;
        align-items: flex-end !important;
        height: 100% !important;
        display: flex !important;
    }

    /* Contenido SIN caja gris — va directo sobre el gradiente */
    .slide-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        background: none !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .slide-content h1 {
        font-size: 26px !important;
        line-height: 1.05 !important;
        margin-bottom: 4px !important;
        color: #fff !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
    }

    .slide-content .meta {
        font-size: 12px !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        display: flex !important;
        margin-bottom: 4px !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.9) !important;
    }

    /* Descripción: 3 líneas, sin scroll, sin fondo */
    .slide-content p {
        font-size: 12.5px !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
        max-height: none !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        text-overflow: ellipsis !important;
        overflow-y: hidden !important;
        color: #ddd !important;
        text-shadow: 0 1px 4px rgba(0,0,0,0.9) !important;
        padding-right: 0 !important;
    }

    /* Botón VER AHORA — siempre visible */
    .slide-content .btn-1,
    .slide-content a.btn-1 {
        display: inline-block !important;
        padding: 10px 26px !important;
        font-size: 14px !important;
        border-radius: 22px !important;
        align-self: flex-start !important;
        flex-shrink: 0 !important;
        margin-top: 2px !important;
    }

    .slider-dots {
        bottom: 12px !important;
        gap: 7px !important;
    }
    .dot {
        width: 7px !important;
        height: 7px !important;
    }

    /* ─────────────────────────────────────────────── */
    /* SECCIONES                                       */
    /* ─────────────────────────────────────────────── */
    .movies {
        padding: 22px 0 0 0 !important;
    }

    h2 {
        font-size: 20px !important;
        padding-left: 12px !important;
        margin-bottom: 8px !important;
        letter-spacing: 0.8px !important;
    }

    hr {
        width: 36% !important;
        margin-left: 12px !important;
        margin-bottom: 14px !important;
        border-color: rgba(229, 9, 20, 0.65) !important;
    }

    .section-header {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* ─────────────────────────────────────────────── */
    /* TARJETAS — 5 POR FILA                           */
    /* ─────────────────────────────────────────────── */
    .box-container-0,.box-container-1,.box-container-2,.box-container-3,.box-container-4,.box-container-5,
    .box-container-6,.box-container-7,.box-container-8,.box-container-9,.box-container-10,
    .box-container-11,.box-container-12,.box-container-13,.box-container-14,.box-container-15,
    .box-container-16,.box-container-17,.box-container-18,.box-container-19,.box-container-20 {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        padding: 0 8px !important;
        justify-content: flex-start !important;
        margin: 10px 0 !important;
    }

    .box-0,.box-1,.box-2,.box-3,.box-4,.box-5,.box-6,.box-7,.box-8,.box-9,.box-10,
    .box-11,.box-12,.box-13,.box-14,.box-15,.box-16,.box-17,.box-18,.box-19,.box-20 {
        width: calc(20% - 4px) !important;
        min-width: 60px !important;
        max-width: 100px !important;
        height: auto !important;
        flex: 0 0 calc(20% - 4px) !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        background: #111 !important;
    }

    .box-0 img,.box-1 img,.box-2 img,.box-3 img,.box-4 img,.box-5 img,.box-6 img,
    .box-7 img,.box-8 img,.box-9 img,.box-10 img,.box-11 img,.box-12 img,
    .box-13 img,.box-14 img,.box-15 img,.box-16 img,.box-17 img,.box-18 img,
    .box-19 img,.box-20 img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 2 / 3 !important;
        object-fit: cover !important;
        border-radius: 6px 6px 0 0 !important;
        display: block !important;
    }

    .content {
        padding: 3px 4px 4px !important;
    }

    .content h3 {
        font-size: 9px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        -webkit-line-clamp: 2 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        color: #ddd !important;
    }

    .card-badge {
        font-size: 8px !important;
        padding: 1px 4px !important;
        border-radius: 3px !important;
        top: 4px !important;
        left: 4px !important;
    }

    /* ─────────────────────────────────────────────── */
    /* SCROLL ROW — anulado en móvil                   */
    /* Todas las secciones usan grid de 5 columnas     */
    /* ─────────────────────────────────────────────── */
    .scroll-row {
        display: flex !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        gap: 5px !important;
        padding: 0 8px !important;
        cursor: default !important;
        scrollbar-width: none !important;
    }
    .scroll-row::-webkit-scrollbar { display: none !important; }

    .box-scroll {
        flex: 0 0 calc(20% - 4px) !important;
        width: calc(20% - 4px) !important;
        min-width: 60px !important;
        max-width: 100px !important;
        height: auto !important;
    }

    .box-scroll img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 2 / 3 !important;
        object-fit: cover !important;
        border-radius: 6px 6px 0 0 !important;
        display: block !important;
    }

    /* ─────────────────────────────────────────────── */
    /* VER MÁS                                         */
    /* ─────────────────────────────────────────────── */
    .load-more-section {
        margin: 16px 8px 0 0 !important;
        padding-right: 8px !important;
    }

    .load-more-section .btn-1 {
        min-width: 100px !important;
        font-size: 13px !important;
        padding: 9px 20px !important;
    }

    /* ─────────────────────────────────────────────── */
    /* MODAL — BOTÓN X SIEMPRE ENCIMA DE TODO          */
    /* ─────────────────────────────────────────────── */
    .modal-overlay {
        z-index: 50000 !important;
    }

    .close-btn {
        position: fixed !important;
        top: 14px !important;
        right: 14px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        z-index: 99999 !important;
        background: #ff2f28 !important;
        box-shadow: 0 4px 20px rgba(255,47,40,0.7) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        border: none !important;
        color: #fff !important;
        cursor: pointer !important;
    }

    .modal-content {
        padding: 16px 14px 50px !important;
    }

    .modal-header {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin-bottom: 18px !important;
    }

    .modal-poster {
        width: 130px !important;
        height: 195px !important;
        margin: 0 auto !important;
        display: block !important;
    }

    .modal-info {
        gap: 10px !important;
        align-items: center !important;
        text-align: center !important;
    }

    .modal-info h1 {
        font-size: 30px !important;
        text-align: center !important;
    }

    .modal-info .meta-info {
        justify-content: center !important;
    }

    .modal-genres-row {
        justify-content: center !important;
    }

    .modal-description-inline {
        text-align: left !important;
        max-height: 110px !important;
    }

    .share-btn {
        align-self: center !important;
    }

    .description-section {
        display: none !important;
    }

    .modal-body {
        padding-left: 0 !important;
        margin-top: 14px !important;
    }

    .modal-body h3 {
        margin-bottom: 10px !important;
    }

    /* ─────────────────────────────────────────────── */
    /* SERIES                                          */
    /* ─────────────────────────────────────────────── */
    .season-episodes-panel .episodes-grid {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
        padding: 10px !important;
    }

    .ep-nav-bar {
        padding: 8px 10px !important;
    }

    .ep-nav-btn {
        padding: 7px 12px !important;
        font-size: 12px !important;
    }

    #ep-current-label {
        font-size: 17px !important;
    }

    .season-accordion-btn {
        padding: 12px 14px !important;
        font-size: 14px !important;
    }

    #series-servers {
        justify-content: center !important;
    }

    /* ─────────────────────────────────────────────── */
    /* BOTÓN CERRAR SESIÓN                             */
    /* ─────────────────────────────────────────────── */
    #logout-btn-fixed {
        top: 66px !important;
    }

    /* ─────────────────────────────────────────────── */
    /* FOOTER                                          */
    /* ─────────────────────────────────────────────── */
    .footer {
        margin-top: 30px !important;
        padding: 28px 20px !important;
        flex-direction: column !important;
        text-align: center !important;
    }

    .footer ul {
        margin-top: 14px !important;
        justify-content: center !important;
    }

    .back-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .back-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* ─────────────────────────────────────────────── */
/* TABLETS (769px – 1024px)                        */
/* ─────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    .box-0,.box-1,.box-2,.box-3,.box-4,.box-5,.box-6,.box-7,.box-8,.box-9,.box-10,
    .box-11,.box-12,.box-13,.box-14,.box-15,.box-16,.box-17,.box-18,.box-19,.box-20 {
        width: 120px !important;
        flex: 0 0 120px !important;
    }

    .slider-container {
        height: 560px !important;
    }

    .slide {
        height: 560px !important;
    }

    .slide-content h1 {
        font-size: 48px !important;
    }
}