@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');

/* ============================================= */
/* SCROLLBARS PERSONALIZADAS - ROJO NETFLIX PRO */
/* ============================================= */
::-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;
}

@media (max-width: 768px) {
    .back-btn {width: 36px;height: 36px;}
    .back-btn svg {width: 16px;height: 16px;}
}

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-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-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-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-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-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #030303;
    padding: 0;
    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-color: transparent;
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    height: auto;
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

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

.modal-header { display: flex; gap: 30px; margin-bottom: 20px; align-items: flex-start; }
.modal-header img { flex: 0 0 250px; width: 250px; height: 375px; object-fit: cover; border-radius: 5px; }
.modal-info { flex: 1; min-width: 0; }
.modal-info h1 { font-family: 'Bebas Neue', cursive; font-size: 50px; margin-bottom: 10px; color: #ff2f28; line-height: 1; }
.modal-info .meta-info { color: #cfcfcf; font-size: 18px; margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; }

.genre-tag {
    display: inline-block;
    color: #cfcfcf;
    background-color: #ff2f2830;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    padding: 5px 10px;
    margin: 0 5px 5px 0;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.genre-tag:hover { background-color: #ff2f2880; color: #ffffff; }

.description-section { display: flex; flex-direction: column; gap: 0; margin-bottom: -40px; padding-left: 280px; margin-top: -280px; }
.description-section h3 { font-family: 'Bebas Neue', cursive; font-size: 32px; color: #ff2f28; margin: 0 0 10px 0; padding: 0; line-height: 1; }
#modal-description { font-family: 'Poppins', sans-serif !important; font-size: 16px !important; line-height: 1.6 !important; color: #ffffff !important; max-height: 220px !important; height: 220px !important; overflow-y: auto !important; padding: 0 !important; background: transparent !important; border: none !important; }

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

/* ==================== SERVIDORES UNIFICADOS - ESTILO NETFLIX 2025 ==================== */
#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; }

/* ========================================================================= */
/* NUEVO DISEÑO DE SERIES - ESTILO NETFLIX 2025 (COMPACTO Y PERFECTO)       */
/* ========================================================================= */

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

#series-servers {
    margin-bottom: 20px;
}

#season-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 10px 0;
}

.season-btn {
    padding: 9px 22px;
    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: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

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

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

.episodes-container {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    margin-top: 10px;
}

.episodes-container.active {
    opacity: 1;
    max-height: 3000px;
    margin-top: 20px;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    padding: 0 4px;
}

.episode-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 16px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    backdrop-filter: blur(8px);
}

.episode-btn:hover {
    background: rgba(255,47,40,0.18);
    border-color: #ff2f28;
    transform: translateY(-2px);
}

.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 6px 20px rgba(255,47,40,0.3);
}

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

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

/* RESPONSIVE SERIES - PERFECTO EN MÓVIL */
@media (max-width: 768px) {
    .episodes-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .episode-btn {
        padding: 12px 14px;
    }
    .ep-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .ep-title {
        font-size: 14px;
    }
    .server-btn,
    .server-tab,
    .season-btn {
        padding: 8px 18px;
        font-size: 13.5px;
    }
    #series-servers,
    #modal-servers-container,
    #season-selector {
        justify-content: center;
    }
}

/* MEDIA QUERIES ORIGINALES (100% intactas) */
@media (max-width: 768px) {
    .back-btn {width: 36px;height: 36px;}
    .back-btn svg {width: 16px;height: 16px;}
    .menu {padding:15px 20px;}
    .menu .navbar {display: none;position: absolute;top: 100%;left: 0;right: 0;background-color: #030303;z-index: 999;box-shadow: 0 4px 10px rgba(0,0,0,0.5);}
    .menu input[type="checkbox"]:checked ~ .navbar {display: block !important;}
    .menu label {display: block;cursor: pointer;z-index: 1000;}
    .search-login-group {display:none !important;}
    .search-box-container.active .search-input {width:150px;}
    .menu .navbar ul li {width:100%;padding: 12px 20px;border-bottom: 1px solid #333;}
    #main-logo-container img {width:120px !important;height:67px !important;}

    .slider-container {height: 500px !important;min-height: unset !important;}
    .slide {height: 500px !important;background-position: center 15% !important;}
    .slide-content-wrapper {padding: 0 20px 60px 20px !important;justify-content: flex-end !important;}
    .slide-content {max-width: 100%;padding: 18px 20px !important;background: rgba(0, 0, 0, 0.85) !important;border-radius: 18px !important;backdrop-filter: blur(12px) !important;transform: translateY(-80px) !important;box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);}
    .slide-content h1 {font-size: 32px !important;margin-bottom: 8px !important;line-height: 1.1 !important;}
    .slide-content .meta {font-size: 14px !important;margin-bottom: 10px !important;}
    .slide-content p {font-size: 15px !important;line-height: 1.45 !important;-webkit-line-clamp: 6 !important;margin-bottom: 16px !important;}
    .slide-content .btn-1,.slide-content a.btn-1 {padding: 12px 32px !important;font-size: 16px !important;}

    .modal-content {padding:10px;margin-top:10px;}
    .close-btn {top:10px;right:10px;width:40px;height:40px;font-size:18px;}
    .modal-header {flex-direction:column;gap:15px;margin-bottom:15px;}
    .modal-header img {width:150px;height:225px;margin:0 auto;}
    .modal-info h1 {font-size:35px;text-align:center;}
    .modal-info .meta-info {justify-content:center;}
    .description-section {padding-left: 0 !important;margin-top: 10px !important;margin-bottom: 20px !important;}
    .description-section h3 {margin-bottom: 8px !important;}
    #modal-description {max-height: 150px !important;height: 150px !important;margin-top: 0 !important;}
    .modal-body {padding-left: 0 !important;margin-top: 15px !important;}
    .modal-body h3 {margin-bottom: 10px !important;}
    #modal-servers-container {justify-content: center;margin-top: 0 !important;margin-bottom: 15px !important;}
    #modal-iframe-container {margin-top: 0 !important;}
    .movies {padding:30px 20px;}

    .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: 9px !important;
        padding: 0 6px !important;
        justify-content: center !important;
        margin: 20px 0 !important;
    }
    .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(16.666666% - 7.5px) !important;
        min-width: 98px !important;
        max-width: 118px !important;
        height: 188px !important;
        flex: 0 0 calc(16.666666% - 7.5px) !important;
        border-radius: 9px !important;
        overflow: hidden !important;
        background: #111 !important;
    }
    .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: 135px !important;
        object-fit: cover !important;
        border-radius: 9px 9px 0 0 !important;
    }
    .content h3 {font-size: 10.2px !important;line-height: 1.15 !important;padding: 4px !important;text-align: center !important;}
    .load-more-section {margin: 25px 10px 0 0 !important;padding-right: 10px !important;}
    .btn-1 {padding:10px 25px;font-size:14px;}
    .footer {margin-top:30px;padding:30px 20px;flex-direction:column;text-align:center;}
    .footer ul {margin-top:15px;justify-content:center;}
}