/* Premium OTT-Style Glassmorphic Player Card */
.ott-glass-panel {
    background: rgba(11, 18, 32, 0.65) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

.dekho-player-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dekho-player-16-9 {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
}

.dekho-player-video,
.dekho-player-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background-color: transparent;
}

/* Glassmorphic Loader & Error Overlays */
.dekho-player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(4, 8, 17, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 10;
    color: white;
    text-align: center;
    transition: opacity 0.3s ease;
}

.dekho-player-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Spinner */
.dekho-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: dekho-spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes dekho-spin {
    to { transform: rotate(360deg); }
}

/* Dynamic Player Modal Sizing & Adaptive Layouts */
#playerModalContent {
    background: rgba(8, 12, 21, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), height 0.35s ease;
}

/* Compact Modal: Movies, Sports, IPTV */
.modal-type-compact {
    width: 100%;
}
@media (min-width: 768px) {
    .modal-type-compact {
        width: 80vw;
        max-width: 900px;
    }
}
@media (min-width: 1280px) {
    .modal-type-compact {
        width: 70vw;
        max-width: 1024px;
    }
}

/* Large Modal: Series with Sidebar */
.modal-type-series {
    width: 100%;
}
@media (min-width: 768px) {
    .modal-type-series {
        width: 95vw;
        max-width: 1200px;
    }
}
@media (min-width: 1280px) {
    .modal-type-series {
        width: 90vw;
        max-width: 1360px;
    }
}

/* Fullscreen modal on mobile devices */
@media (max-width: 767px) {
    #playerModalContent {
        height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
        padding: 0.75rem !important;
    }
}

/* Seasons & Episodes Sidebar OTT Styling */
#episodesSidebar, #watchEpisodesSidebar {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    overflow: hidden;
}

.episode-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    color: #9ca3af;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 2.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
}

.episode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.episode-btn.active-episode {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

/* Sticky Headers with Blur for Modern UI */
.season-section > div.sticky {
    background: rgba(8, 12, 21, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
