/* BEAST MODE - NETFLIX STYLE SERIES CSS */
:root {
    --beast-neon-magenta: #e91e63;
    --beast-neon-cyan: #00d4ff;
    --beast-neon-green: #39ff14;
    --beast-dark-bg: #0a0a0a;
    --beast-glass-bg: rgba(20, 20, 20, 0.8);
    --beast-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.series-v-badge {
    color: var(--beast-neon-magenta);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 3px;
    font-size: 13px;
    margin-bottom: 15px;
}

.main-action-buttons {
    display: flex;
    gap: 15px;
}
.series-actions-grid {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 30px; /* Reducido de 50px a 30px */
}
.secondary-action-buttons {
    display: flex;
    gap: 12px;
}

.series-description-large {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.7);
    max-width: 550px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Ajustado a 3 para el look de '3 y media' real */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.beast-mode-body {
    background-color: var(--beast-dark-bg) !important;
    color: #fff !important;
    font-family: 'Inter', sans-serif;
}

/* Immersive Layout Adjustments */
.immersive-wrapper {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.immersive-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.immersive-main .series-hero {
    height: 80vh; /* More height for immersive mode */
}

/* Header Transparency for Series Page */
.beast-mode-body .i_header {
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%) !important;
    border-bottom: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.series-explore-container {
    padding-top: 0;
}

.explore-hero {
    height: 65vh !important;
    margin-bottom: -50px;
}

.series-hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    padding-top: 70px; /* Subido de 120px para que haya más espacio abajo */
    display: flex;
    align-items: flex-start; 
    padding-bottom: 0;
    overflow: hidden;
    background: #000;
}

.beast-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
    animation: beastKenBurns 20s infinite alternate;
    transition: opacity 1s;
}

@keyframes beastKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.15) translateY(10px); }
}

.series-hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 6% 0; /* Eliminado el padding top totalmente */
    width: 100%;
    animation: beastFadeRight 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 🎬 CINEMATIC GRADIENT PROTECTION (The 'Black Fade') */
.series-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Strong left-to-right fade + Bottom-to-top fade */
    background: linear-gradient(90deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 20%, transparent 60%),
                linear-gradient(0deg, var(--beast-dark-bg) 0%, transparent 50%);
    z-index: 1;
}

/* 💎 REMOVING THE BOX - CONTENT NOW FLOATS CINEMATICALLY */
.beast-glass-panel {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 20px 30px;
    max-width: 450px; 
    box-shadow: 0 40px 100px rgba(0,0,0,0.6);
}

.series-title-large {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Evita que el título se coma el espacio inferior */
    max-height: 2.4em; 
}

.details-info-block {
    max-width: 450px; /* Restauramos el ancho compacto para detalles tmb */
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
}
.details-premium-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.series-poster-float {
    flex-shrink: 0;
    width: 220px;
    height: 320px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    animation: beastFadeUp 1s ease-out;
}

.series-poster-float img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.beast-credits-section {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credit-item {
    font-size: 14px;
    color: #fff;
}

.credit-item strong {
    color: #888;
    margin-right: 8px;
    font-weight: 500;
}

.series-premium-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 35px;
}

.btn-play-premium {
    background: linear-gradient(45deg, #6366f1, #a855f7);
    color: #fff !important;
    padding: 15px 40px;
    border-radius: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    transition: 0.3s;
}

.btn-play-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6);
}

.action-icon-group {
    display: flex;
    gap: 20px;
}

.action-btn-item {
    background: transparent;
    border: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.3s;
}

.action-btn-item i {
    font-size: 18px;
    color: var(--beast-neon-cyan);
}

.action-btn-item span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.action-btn-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* TABS */
.tab-item {
    color: #fff !important; /* Blanco sólido para que no se lo trague la sombra */
    opacity: 0.6;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    padding-bottom: 12px;
}

.tab-item:hover, .tab-item.active {
    opacity: 1;
}

.tab-item.active {
    color: var(--beast-neon-magenta) !important;
    text-shadow: 0 0 15px rgba(233, 30, 99, 0.6);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--beast-neon-magenta);
    box-shadow: 0 0 15px var(--beast-neon-magenta);
    border-radius: 4px;
}

@media (max-width: 992px) {
    .details-premium-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .series-page-body-container {
        grid-template-columns: 1fr !important;
    }
    .series-poster-float {
        width: 180px;
        height: 260px;
    }
    .series-premium-actions {
        flex-direction: column;
    }
}

@keyframes beastFadeRight {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 🚀 LIQUID GLASS BUTTONS (Superando a Amazon) */
.btn-hero-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.btn-hero-circle::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #ff007f, #7a00ff);
    transition: all 0.4s;
    z-index: -1;
    opacity: 0;
}

/* --- Trailer Overlay System --- */
.beast-trailer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: none;
    overflow: hidden;
    background: #000;
}

.beast-trailer-overlay iframe {
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 Aspect Ratio */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* No interactable */
    opacity: 0.8;
}

.beast-hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 0;
}

/* Ensure content stays above trailer */
.series-hero-content {
    position: relative;
    z-index: 10;
}

.btn-hero-circle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Reproducir ahora - Estilo Nexus Pulse */
.btn-play-series {
    background: linear-gradient(45deg, #6366f1, #a855f7);
    color: #fff !important;
    padding: 14px 35px; /* Reducido */
    font-weight: 800;
    font-size: 16px;   /* Reducido */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    text-transform: none;
}

.btn-play-series:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 45px rgba(99, 102, 241, 0.6);
    filter: brightness(1.1);
}

/* Episodes Grid */
/* 📱 INFO CAPSULES JUUVIX COLORS */
.data-badge {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 1px 8px; /* Más compacto */
    border-radius: 4px;
    font-size: 11px; /* Más pequeño */
    font-weight: 700;
}

.badge-imdb {
    border-color: #ffb800 !important;
    color: #ffb800 !important;
}

.genre-pill {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.3s;
    cursor: pointer;
}

.genre-pill:hover {
    background: rgba(255,255,255,0.2);
}

/* BOTTOM CAROUSEL */
.hero-mini-carousel {
    position: absolute;
    bottom: 40px;
    right: 5%;
    z-index: 100;
    display: flex;
    gap: 12px;
    animation: beastFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes beastFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.mini-thumb-item {
    width: 96px; /* Reducido 20% de 120px */
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.mini-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5; /* Más oscuras por defecto */
    transition: all 0.4s ease;
}

.mini-thumb-item.active {
    border-color: var(--beast-neon-cyan) !important;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.1);
}

.mini-thumb-item.active img {
    opacity: 1; /* Iluminada cuando está activa */
}

.mini-thumb-item:hover {
    transform: scale(1.1) translateY(-5px);
    border-color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}


/* 🌟 ICON COLORS - JUUVIX BRAND */
.capsule-rating {
    border-color: rgba(57, 255, 20, 0.4);
    color: #39ff14;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}
.capsule-rating i { color: #39ff14; }

.capsule-imdb {
    border-color: rgba(255, 184, 0, 0.4);
    color: #ffb800;
}
.capsule-imdb i { color: #ffb800; }

.capsule-year {
    border-color: rgba(0, 212, 255, 0.4);
    color: #00d4ff;
}
.capsule-year i { color: #00d4ff; }

.capsule-seasonal {
    border-color: rgba(233, 30, 99, 0.4);
    color: #e91e63;
}
.capsule-seasonal i { color: #e91e63; }

/* RE-DISEÑO BOTÓN "VER DETALLES" (Sin el azul feo) */
.btn-more-info {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #fff !important;
    padding: 14px 35px; /* Reducido */
    font-weight: 800;
    font-size: 16px;   /* Reducido */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-more-info:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    border-color: #fff;
}

.series-episodes-section {
    padding: 40px;
}

.section-label {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 30px;
    border-left: 5px solid var(--beast-neon-cyan);
    padding-left: 15px;
}

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

.episode-card {
    background: rgba(40, 40, 40, 0.4);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    position: relative;
}

.episode-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--beast-neon-cyan);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 20px rgba(0, 212, 255, 0.2);
}

.episode-thumb-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.episode-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.episode-card:hover .episode-thumb {
    transform: scale(1.1);
}

.episode-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.episode-card:hover .episode-play-overlay {
    opacity: 1;
}

.episode-play-overlay i {
    font-size: 40px;
    color: #fff;
}

.episode-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.episode-info {
    padding: 15px;
}

.episode-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-desc {
    font-size: 13px;
    opacity: 0.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Explore View */
/* BEAST MODE: THUMBNAILS & BADGES */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}
.explore-grid.horizontal-layout {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.series-item-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s;
    background: #1a1a1a;
    aspect-ratio: 2/3;
}
.series-item-card.horizontal {
    aspect-ratio: 16/9;
}
.series-item-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.series-item-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    color: #000;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 2;
}
.series-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 10px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    opacity: 0;
    transition: 0.3s;
}
.series-item-card:hover .series-item-info {
    opacity: 1;
}
.series-item-title {
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
}

/* Hero Slider Styles */
.beast-hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.beast-slide {
    display: none !important;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.beast-slide.active {
    display: flex !important;
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 40px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.slider-dots .dot {
    width: 30px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: 0.3s;
}

.slider-dots .dot.active {
    background: var(--beast-neon-cyan);
    width: 50px;
    box-shadow: 0 0 10px var(--beast-neon-cyan);
}

/* Purchase Modal Styling */
.beast-purchase-modal {
    background: var(--beast-dark-bg);
    border: 2px solid var(--beast-neon-magenta);
    box-shadow: 0 0 50px rgba(233, 30, 99, 0.4);
}

@media (max-width: 768px) {
    .series-title-large {
        font-size: 36px;
    }
    .series-hero {
        height: 60vh;
    }
    .series-hero-content {
        padding: 0 20px;
    }
    .episodes-grid {
        grid-template-columns: 1fr;
    }
}
