/* ===== MODAL ESTILO NETFLIX ULTRA PREMIUM ===== */

.modal-netflix {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-netflix.show {
    opacity: 1;
}

.modal-netflix-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.modal-close-netflix {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-netflix:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Layout Principal */
.netflix-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Hero Section (Izquierda) */
.netflix-hero-section {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
}

.netflix-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.netflix-backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 10, 15, 0.95), rgba(79, 70, 229, 0.3));
}

.netflix-hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem;
    z-index: 10;
}

.netflix-logo-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    letter-spacing: -1px;
    line-height: 1.2;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
    }
    to {
        filter: drop-shadow(0 0 40px rgba(236, 72, 153, 0.6));
    }
}

.netflix-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.netflix-duration,
.netflix-year {
    font-weight: 600;
}

.netflix-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.imdb-badge {
    background: linear-gradient(135deg, #f5c518, #ffd700);
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(245, 197, 24, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.netflix-genres {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.genre-tag {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.genre-tag:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(124, 58, 237, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.netflix-cast {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.netflix-summary {
    max-width: 600px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.netflix-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.netflix-action-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.netflix-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.netflix-icon-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.netflix-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* Episodes Section (Derecha) */
.netflix-episodes-section {
    flex: 1;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.98), rgba(26, 26, 46, 0.98));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid rgba(139, 92, 246, 0.2);
}

.netflix-episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem 2rem;
    gap: 1rem;
}

.season-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(124, 58, 237, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.season-nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.4), rgba(124, 58, 237, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.season-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.season-title {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    letter-spacing: -0.5px;
}


/* Lista de Episodios */
.netflix-episodes-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 2rem 2rem 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.netflix-episodes-list::-webkit-scrollbar {
    display: none;
}

.netflix-episode-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.netflix-episode-item:first-child {
    margin-top: 10px;
}

.netflix-episode-item:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.15));
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateX(8px) translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.episode-number-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 1rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.6);
}

.episode-thumbnail {
    width: 200px;
    height: 112px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.episode-play-overlay i {
    font-size: 3rem;
    color: white;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
    animation: playPulse 1.5s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Barra de progreso en miniaturas */
.episode-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    display: none;
    z-index: 10;
}

.episode-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
}

.episode-info-netflix {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.episode-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.episode-title-netflix {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.episode-duration-netflix {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.episode-description-netflix {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-date-netflix {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: auto;
}

.episode-watched-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 10px;
    color: #10b981;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.episode-watched-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3));
    border-color: rgba(16, 185, 129, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.episode-watched-btn i {
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .netflix-layout {
        flex-direction: column;
    }
    
    .netflix-hero-section {
        flex: 0 0 50vh;
    }
    
    .netflix-episodes-section {
        flex: 1;
    }
    
    .netflix-logo-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .modal-close-netflix {
        top: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }
    
    .netflix-hero-section {
        flex: 0 0 40vh;
    }
    
    .netflix-hero-content {
        padding: 2rem 1.5rem;
    }
    
    .netflix-logo-title {
        font-size: 2rem;
    }
    
    .netflix-meta-row {
        font-size: 0.85rem;
        gap: 1rem;
    }
    
    .netflix-summary {
        font-size: 0.95rem;
    }
    
    .netflix-episodes-header {
        padding: 1.5rem 1rem 1rem 1rem;
        flex-wrap: wrap;
    }
    
    .season-title {
        font-size: 1.2rem;
        width: 100%;
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .netflix-episodes-list {
        padding: 0 1rem 1rem 1rem;
    }
    
    .netflix-episode-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .episode-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .episode-watched-btn {
        align-self: stretch;
        justify-content: center;
    }
}
