/* Custom Netflix-style components */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Global styles */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Global Uniform Red Scrollbar for All Pages and Elements */
* {
    scrollbar-width: thin;
    scrollbar-color: #E50914 rgba(20, 20, 20, 0.5);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #E50914 0%, #B8070F 100%);
    border-radius: 10px;
    border: 2px solid rgba(20, 20, 20, 0.5);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF1E2D 0%, #C8081F 100%);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

*::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #C8071F 0%, #9A0610 100%);
}

/* Body scrollbar - Main page scroll */
body {
    scrollbar-width: thin;
    scrollbar-color: #E50914 rgba(20, 20, 20, 0.8);
}

body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.8);
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #E50914 0%, #B8070F 100%);
    border-radius: 6px;
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF1E2D 0%, #C8081F 100%);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.6);
}

/* Glassmorphism Header Styles */
.navbar-glass {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

/* Enhanced glassmorphism on scroll */
.navbar-glass.scrolled {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3) !important;
}

/* Fade effect for header */
.navbar-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.05) 80%,
        transparent 100%
    );
    pointer-events: none;
    z-index: -1;
}

/* Search input glassmorphism */
.search-input {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(229, 9, 20, 0.5) !important;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.3) !important;
}

/* Custom scrollbar for better UX */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Line clamp utility for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced movie card hover effects */
.movie-card:hover,
.series-card:hover,
.anime-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
    z-index: 50;
    transition: all 0.3s ease-in-out;
    border-radius: 30px; /* Maintain rounded corners on hover */
    overflow: hidden; /* Ensure content stays within rounded bounds */
}

/* Base card styling for consistent rounded corners */
.movie-card,
.series-card,
.anime-card {
    border-radius: 30px;
    overflow: hidden; /* Ensure all cards have overflow hidden */
    transition: all 0.3s ease-in-out;
}

/* Smooth backdrop transitions */
.backdrop-slider {
    transition: opacity 1s ease-in-out, background-image 0.5s ease-in-out;
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Custom gradient overlays */
.hero-gradient {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.3) 70%,
        transparent 100%
    );
}

.card-gradient {
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* Enhanced focus states for accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #E50914;
    outline-offset: 2px;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .movie-card,
    .series-card,
    .anime-card {
        width: 140px;
        border-radius: 20px; /* Slightly smaller radius for mobile */
    }
    
    .movie-card img,
    .series-card img,
    .anime-card img {
        height: 200px;
    }

    .movie-card:hover,
    .series-card:hover,
    .anime-card:hover {
        border-radius: 20px; /* Maintain mobile radius on hover */
    }
}

/* Smooth page transitions */
.page-transition {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Netflix-style button animations */
.netflix-button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.netflix-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.netflix-button:active {
    transform: translateY(0);
}

/* Enhanced navbar glass effect */
.navbar-glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom search input styles */
.search-input {
    background: rgba(51, 51, 51, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    background: rgba(51, 51, 51, 0.95);
    border-color: #E50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

/* Professional Modal Scrollbar */
.modal-scrollable-content {
    scrollbar-width: thin;
    scrollbar-color: #E50914 rgba(20, 20, 20, 0.5);
}

.modal-scrollable-content::-webkit-scrollbar {
    width: 10px;
}

.modal-scrollable-content::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
    border-radius: 10px;
}

.modal-scrollable-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #E50914 0%, #B8070F 100%);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.modal-scrollable-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FF1E2D 0%, #C8081F 100%);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.modal-scrollable-content::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #C8071F 0%, #9A0610 100%);
}

/* Modal animations */
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content.show {
    transform: scale(1);
    opacity: 1;
}

/* Smooth content scrolling */
.modal-scrollable-content {
    scroll-behavior: smooth;
}

/* Enhanced smooth scrolling for movie containers */
.movie-container,
.series-container,
.anime-container {
    scroll-behavior: smooth;
    scroll-padding: 20px;
    overscroll-behavior-x: contain;
}

/* Improve scroll performance */
.scroll-wrapper {
    will-change: scroll-position;
}