/* Custom Styles for StreamHub */

.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}

.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.custom-scroll::-webkit-scrollbar { 
    width: 4px; 
}

.custom-scroll::-webkit-scrollbar-track { 
    background: transparent; 
}

.custom-scroll::-webkit-scrollbar-thumb { 
    background-color: rgba(255,255,255,0.3); 
    border-radius: 10px; 
}

@keyframes fadeIn { 
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

@keyframes slideDown { 
    from { 
        opacity: 0; 
        transform: translateY(-100%); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

.card-anim { 
    animation: fadeIn 0.4s ease-out forwards; 
}

.animate-slide-down { 
    animation: slideDown 0.5s ease-out forwards; 
}

.player-ui { 
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

.ui-hidden { 
    opacity: 0 !important; 
    pointer-events: none; 
}

/* Drawer Animation */
.drawer-closed { 
    transform: translateY(100%); 
}

.drawer-open { 
    transform: translateY(0); 
}

/* Desktop: Slide dari Kanan */
@media (min-width: 1024px) {
    .drawer-closed { 
        transform: translateX(100%); 
    }
    .drawer-open { 
        transform: translateX(0); 
    }
}

/* Video Subtitle Styling */
video::cue {
    background-color: rgba(0, 0, 0, 0.6) !important; 
    color: #ffffff !important;
    font-family: system-ui, -apple-system, sans-serif !important; 
    font-weight: 600 !important;
    text-shadow: 0px 1px 3px rgba(0,0,0,0.9) !important;
    font-size: clamp(16px, 5vw, 24px) !important; 
    line-height: 1.4 !important;
    transform: none !important; 
}

/* Force hide VIP button when hidden class is applied */
#vipTabBtn.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Modern Loading Overlay */
#movieLoadingOverlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

.loading-dots span {
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Video Loading Overlay Animations */
@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.circle-ripple {
    position: absolute;
    border: 2px solid rgba(234, 179, 8, 0.3);
    border-radius: 50%;
    animation: ripple 3s ease-out infinite;
}

.circle-1 {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 130px;
    height: 130px;
    animation-delay: 0.3s;
}

.circle-3 {
    width: 160px;
    height: 160px;
    animation-delay: 0.6s;
}

.circle-4 {
    width: 190px;
    height: 190px;
    animation-delay: 0.9s;
}

.circle-5 {
    width: 220px;
    height: 220px;
    animation-delay: 1.2s;
}

.circle-6 {
    width: 250px;
    height: 250px;
    animation-delay: 1.5s;
}

.circle-7 {
    width: 280px;
    height: 280px;
    animation-delay: 1.8s;
}

.circle-8 {
    width: 310px;
    height: 310px;
    animation-delay: 2.1s;
}

/* Loading Dots Animation for Video Loading */
@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
}

.loading-dot-1 {
    animation: dotPulse 1.4s ease-in-out infinite;
    animation-delay: 0s;
}

.loading-dot-2 {
    animation: dotPulse 1.4s ease-in-out infinite;
    animation-delay: 0.2s;
}

.loading-dot-3 {
    animation: dotPulse 1.4s ease-in-out infinite;
    animation-delay: 0.4s;
}

/* Smooth fade in for video loading overlay */
#videoLoadingOverlay {
    transition: opacity 0.3s ease-in-out;
}

#videoLoadingOverlay.show {
    display: flex !important;
    opacity: 1;
}

/* Hero Section Styles */
#heroSection {
    position: relative;
    overflow: hidden;
}

#heroSection img {
    transition: transform 0.3s ease;
}

#heroSection:hover img {
    transform: scale(1.05);
}

/* Hero fade-in animation */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#heroSection.show {
    animation: heroFadeIn 0.6s ease-out forwards;
}

/* Hero content animations */
#heroTitle, #heroDescription, #heroWatchBtn, #heroInfoBtn {
    animation: heroFadeIn 0.8s ease-out forwards;
}

#heroDescription {
    animation-delay: 0.1s;
}

#heroWatchBtn {
    animation-delay: 0.2s;
}

#heroInfoBtn {
    animation-delay: 0.3s;
}

/* Responsive hero section */
@media (max-width: 768px) {
    #heroSection {
        height: 450px !important;
    }
    
    #heroTitle {
        font-size: 2rem !important;
    }
    
    #heroDescription {
        font-size: 0.875rem !important;
    }
}

/* Text shadow for better readability */
#heroTitle {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
}

#heroDescription {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Desktop Search Slide Animation */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.search-slide-in {
    animation: slideInFromLeft 0.3s ease-out forwards;
}

.search-slide-out {
    animation: slideOutToLeft 0.3s ease-out forwards;
}

/* Desktop Search Overlay Styles */
#desktopSearchOverlay {
    transition: opacity 0.3s ease-in-out;
}

#desktopSearchOverlay.show {
    display: flex !important;
    opacity: 1;
}

#desktopSearchContainer {
    transition: transform 0.3s ease-out;
}

/* Responsive adjustments for desktop search */
@media (max-width: 768px) {
    #desktopSearchContainer {
        max-width: 100% !important;
    }
}

/* Smooth backdrop blur transition */
#desktopSearchOverlay {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#desktopSearchOverlay:not(.hidden) {
    backdrop-filter: blur(4px);
}
