/* style.css */
 
   :root {
            --primary: #E50914;
            --primary-dark: #B2070F;
            --secondary: #00A8FF;
            --accent: #FFD700;
            --dark: #0A0A0F;
            --darker: #050508;
            --light: #FFFFFF;
            --gray: #8C8C8C;
            --gray-dark: #333333;
            --card-bg: #141414;
            --card-hover: #1F1F1F;
            --success: #00C851;
            --warning: #FFBB33;
            --error: #FF4444;
            --gradient: linear-gradient(135deg, #E50914 0%, #B2070F 100%);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: var(--dark);
            color: var(--light);
            line-height: 1.7;
            min-height: 100vh;
            overflow-x: hidden;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 15px;
        }

        /* Header & Navigation */
        .header {
            background: linear-gradient(180deg, rgba(10,10,15,0.95) 0%, transparent 100%);
            padding: 15px 0;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(10px);
        }

        .nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.5rem;
            font-weight: 800;
            color: var(--primary);
            text-decoration: none;
        }

        .logo-icon {
            width: 35px;
            height: 35px;
            background: var(--gradient);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: white;
        }

        .nav-links {
            display: flex;
            gap: 15px;
            list-style: none;
            flex-wrap: wrap;
        }

        .nav-links a {
            color: var(--light);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            transition: color 0.3s ease;
        }

        .nav-links a:hover {
            color: var(--primary);
        }

        .search-box {
            display: flex;
            gap: 8px;
            width: 100%;
            max-width: 400px;
        }

        .search-input {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 20px;
            padding: 10px 15px;
            color: var(--light);
            flex: 1;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
        }

        .search-input::placeholder {
            color: var(--gray);
        }

        .search-btn {
            background: var(--gradient);
            border: none;
            border-radius: 20px;
            padding: 10px 20px;
            color: white;
            cursor: pointer;
            font-weight: 600;
            transition: transform 0.3s ease;
            min-width: 60px;
        }

        .search-btn:hover {
            transform: translateY(-2px);
        }

        /* Hero Section */
        .hero {
            height: 70vh;
            min-height: 500px;
            background: linear-gradient(135deg, rgba(10,10,15,0.8) 0%, rgba(20,20,20,0.6) 100%),
                        url('https://images.unsplash.com/photo-1489599809505-7c8e45128ffd?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: center;
            position: relative;
            margin-top: 70px;
            overflow: hidden;
        }

        /* Floating Icon Animations */
        .floating-icons {
            position: absolute;
            width: 100%;
            height: 100%;
            overflow: hidden;
            pointer-events: none;
            z-index: 1;
        }

        .float-icon {
            position: absolute;
            animation-timing-function: ease-in-out;
            animation-iteration-count: infinite;
            opacity: 0.7;
            filter: drop-shadow(0 0 25px currentColor);
            transition: all 0.3s ease;
        }

        .float-icon:hover {
            opacity: 1;
            filter: drop-shadow(0 0 35px currentColor);
        }

        .icon-1 {
            top: 10%;
            left: 5%;
            animation: float1 6s infinite;
        }

        .icon-2 {
            top: 15%;
            right: 10%;
            animation: float2 7s infinite;
        }

        .icon-3 {
            top: 60%;
            left: 15%;
            animation: float3 8s infinite;
        }

        .icon-4 {
            top: 70%;
            right: 20%;
            animation: float4 6.5s infinite;
        }

        .icon-5 {
            top: 30%;
            left: 50%;
            animation: float5 7.5s infinite;
        }

        .icon-6 {
            top: 45%;
            right: 5%;
            animation: float6 8.5s infinite;
        }

        @keyframes float1 {
            0%, 100% { 
                transform: translateY(0px) rotate(0deg) scale(1);
                opacity: 0.7;
            }
            25% { 
                transform: translateY(-50px) rotate(8deg) scale(1.15);
                opacity: 0.9;
            }
            50% { 
                transform: translateY(-70px) rotate(0deg) scale(1.2);
                opacity: 1;
            }
            75% { 
                transform: translateY(-50px) rotate(-8deg) scale(1.15);
                opacity: 0.9;
            }
        }

        @keyframes float2 {
            0%, 100% { 
                transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
                opacity: 0.7;
            }
            33% { 
                transform: translateY(-60px) translateX(-30px) rotate(-12deg) scale(1.2);
                opacity: 1;
            }
            66% { 
                transform: translateY(-80px) translateX(30px) rotate(12deg) scale(1.1);
                opacity: 0.85;
            }
        }

        @keyframes float3 {
            0%, 100% { 
                transform: translateY(0px) rotate(0deg) scale(1);
                opacity: 0.7;
            }
            25% {
                transform: translateY(-40px) rotate(15deg) scale(1.25);
                opacity: 0.9;
            }
            50% { 
                transform: translateY(-75px) rotate(30deg) scale(1.35);
                opacity: 1;
            }
            75% {
                transform: translateY(-40px) rotate(15deg) scale(1.25);
                opacity: 0.9;
            }
        }

        @keyframes float4 {
            0%, 100% { 
                transform: translateY(0px) translateX(0px) scale(1);
                opacity: 0.7;
            }
            50% { 
                transform: translateY(-65px) translateX(40px) scale(1.3);
                opacity: 1;
            }
        }

        @keyframes float5 {
            0%, 100% { 
                transform: translateY(0px) rotate(0deg) scale(1);
                opacity: 0.7;
            }
            30% {
                transform: translateY(-55px) rotate(-15deg) scale(1.2);
                opacity: 0.95;
            }
            50% { 
                transform: translateY(-85px) rotate(-20deg) scale(1.25);
                opacity: 1;
            }
            70% {
                transform: translateY(-55px) rotate(-10deg) scale(1.15);
                opacity: 0.9;
            }
        }

        @keyframes float6 {
            0%, 100% { 
                transform: translateY(0px) scale(1) rotate(0deg);
                opacity: 0.7;
            }
            25% {
                transform: translateY(-45px) scale(1.3) rotate(10deg);
                opacity: 0.9;
            }
            50% { 
                transform: translateY(-70px) scale(1.4) rotate(0deg);
                opacity: 1;
            }
            75% {
                transform: translateY(-45px) scale(1.25) rotate(-10deg);
                opacity: 0.85;
            }
        }

        .hero-content {
            max-width: 600px;
            z-index: 2;
            text-align: center;
            width: 100%;
        }

        .hero h1 {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 15px;
            background: linear-gradient(135deg, var(--light) 0%, var(--gray) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero-subtitle {
            font-size: 1.1rem;
            color: var(--gray);
            margin-bottom: 25px;
            line-height: 1.6;
            padding: 0 10px;
        }

        .hero-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn {
            padding: 12px 25px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 0.9rem;
        }

        .btn-primary {
            background: var(--gradient);
            color: white;
            box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(229, 9, 20, 0.6);
        }

        .btn-secondary {
            background: rgba(255,255,255,0.1);
            color: white;
            border: 1px solid rgba(255,255,255,0.2);
            backdrop-filter: blur(10px);
        }

        .btn-secondary:hover {
            background: rgba(255,255,255,0.2);
            transform: translateY(-2px);
        }

        /* Content Sections */
        .section {
            padding: 50px 0;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .section-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--light);
        }

        .view-all {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.9rem;
        }

        /* Movies Grid */
        .movies-grid {
            display: grid !important;
            grid-template-columns: repeat(3, 1fr) !important;
            gap: 20px !important;
            margin-bottom: 30px;
            width: 100%;
            grid-auto-rows: auto;
            grid-auto-flow: dense;
            align-content: start;
        }

        .movie-card {
            background: var(--card-bg);
            border-radius: 10px;
            overflow: hidden;
            transition: all 0.3s ease;
            position: relative;
            cursor: pointer;
            width: 100%;
            height: auto;
        }

        .movie-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.5);
        }

        .movie-poster {
            width: 100% !important;
            aspect-ratio: 1 / 1 !important;
            object-fit: cover;
            background: linear-gradient(135deg, #333 0%, #555 100%);
            display: block;
        }

        .movie-info {
            padding: 12px;
        }

        .movie-title {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 5px;
            color: var(--light);
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .movie-meta {
            display: flex;
            justify-content: space-between;
            color: var(--gray);
            font-size: 0.8rem;
            margin-bottom: 10px;
        }

        .movie-actions {
            display: flex;
            gap: 8px;
        }

        .action-btn {
            flex: 1;
            padding: 8px;
            border: none;
            border-radius: 5px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            min-height: 32px;
        }

        .watch-btn {
            background: var(--gradient);
            color: white;
        }

        .download-btn {
            background: rgba(255,255,255,0.1);
            color: var(--light);
        }

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

        /* Watchlist Toggle Button */
        .watchlist-toggle {
            transition: all 0.3s ease !important;
        }

        .watchlist-toggle:hover {
            background: rgba(229, 9, 20, 0.9) !important;
            transform: scale(1.1);
        }

        .watchlist-toggle.active {
            background: rgba(229, 9, 20, 0.95) !important;
            color: #FFD700 !important;
        }

        .watchlist-toggle.active i {
            color: #FFD700;
        }

        /* Loading States */
        .loading {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 40px;
            color: var(--gray);
            grid-column: 1 / -1;
            flex-direction: column;
            gap: 15px;
        }

        .spinner {
            width: 30px;
            height: 30px;
            border: 3px solid rgba(255,255,255,0.1);
            border-left: 3px solid var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.98);
            z-index: 2000;
            backdrop-filter: blur(15px);
            padding: 0;
        }

       .modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0;
    width: 100%;
    max-width: 1000px;
    max-height: 95vh;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Add this new CSS to make movie info scrollable */
.movie-info-below {
    flex: 1;
    overflow-y: auto;
    max-height: 40vh;
}

/* Ensure video container doesn't grow too much */
.video-container {
    flex-shrink: 0;
}

        .close-modal {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(0,0,0,0.7);
            border: none;
            color: white;
            padding: 10px;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2001;
            cursor: pointer;
        }

        /* Professional Video Player */
        .video-container {
            position: relative;
            width: 100%;
            background: #000;
            display: flex;
            flex-direction: column;
            border-radius: 12px;
            overflow: hidden;
            min-height: 300px;
            touch-action: pan-x pan-y;
        }

        .video-wrapper {
            position: relative;
            width: 100%;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #000;
        }

        .video-player {
            width: 100%;
            height: auto;
            max-height: 70vh;
            display: block;
            object-fit: contain;
            object-position: center;
            touch-action: manipulation;
        }

        /* Custom Controls - BELOW VIDEO */
        .custom-controls {
            background: var(--card-bg);
            padding: 15px 20px;
            border-top: 1px solid rgba(255,255,255,0.1);
            width: 100%;
            display: block;
            opacity: 1;
            position: relative;
            z-index: 10;
        }

        .progress-container {
            width: 100%;
            height: 8px;
            background: rgba(255,255,255,0.2);
            border-radius: 4px;
            margin-bottom: 15px;
            cursor: pointer;
            position: relative;
        }

        .progress-bar {
            height: 100%;
            background: var(--primary);
            border-radius: 4px;
            width: 0%;
            transition: width 0.1s ease;
        }

        .controls-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 15px;
        }

        .controls-left, .controls-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .control-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 1rem;
            backdrop-filter: blur(10px);
            min-width: 44px;
            min-height: 44px;
            justify-content: center;
        }

        .control-btn:hover {
            background: rgba(255,255,255,0.2);
            transform: translateY(-2px);
        }

        .quality-selector {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
            min-width: 120px;
            min-height: 44px;
        }

        .quality-selector option {
            background: var(--card-bg);
            color: white;
        }

        .big-play-btn {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100px;
            height: 100px;
            background: rgba(229, 9, 20, 0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 2.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            z-index: 15;
            border: 3px solid rgba(255,255,255,0.2);
            pointer-events: auto;
        }

        .big-play-btn:hover {
            background: var(--primary);
            transform: translate(-50%, -50%) scale(1.1);
            border-color: rgba(255,255,255,0.4);
        }

        .video-container.playing .big-play-btn {
            display: none;
        }

        .time-display {
            color: white;
            font-size: 1rem;
            font-weight: 600;
            min-width: 120px;
        }

        /* Movie Info Below Video */
        .movie-info-below {
            padding: 20px;
            background: var(--card-bg);
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .movie-info-below h3 {
            font-size: 1.5rem;
            margin-bottom: 12px;
            color: var(--light);
            font-weight: 700;
        }

        .movie-meta-below {
            display: flex;
            gap: 20px;
            color: var(--gray);
            font-size: 1rem;
            margin-bottom: 18px;
            flex-wrap: wrap;
        }

        .movie-description {
            color: var(--gray);
            line-height: 1.6;
            margin-bottom: 20px;
            font-size: 1rem;
        }

        /* Modal improvements */
        .modal-content {
            position: relative;
            background: var(--card-bg);
            border-radius: 12px;
            padding: 0;
            width: 100%;
            max-width: 95vw;
            max-height: 95vh;
            overflow: hidden;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }

        /* Mobile Responsive Design */
        @media (max-width: 768px) {
    .modal {
        padding: 0;
    }
    /* Mobile specific fixes for movie actions */
@media (max-width: 768px) {
    .movie-actions {
        margin-top: 25px;
        padding: 15px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .action-btn {
        min-height: 55px;
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    /* Make sure movie info section is scrollable */
    .movie-info-below {
        padding: 20px 15px;
        overflow-y: auto;
        max-height: 50vh;
    }
}
    
    .modal-content {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    
    .video-container {
        min-height: 50vh;
        flex: 1;
    }
    
    .video-wrapper {
        min-height: 50vh;
        flex: 1;
    }
    
    .video-player {
        max-height: 60vh;
        height: 100%;
        width: 100%;
        object-position: center;
    }
    
    .custom-controls {
        padding: 10px 12px;
    }
    
    .control-btn {
        padding: 8px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.9rem;
        flex: 1;
    }
    
    .quality-selector {
        min-width: 90px;
        min-height: 40px;
        font-size: 0.8rem;
        padding: 8px 6px;
        flex: 1;
    }
    
    .big-play-btn {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .movie-info-below {
        padding: 15px;
    }
    
    .movie-info-below h3 {
        font-size: 1.3rem;
    }
    
    .movie-meta-below {
        font-size: 0.9rem;
        gap: 15px;
    }
    
    .controls-bottom {
        flex-direction: column;
        gap: 8px;
    }
    
    .controls-left, .controls-right {
        width: 100%;
        justify-content: space-between;
        gap: 5px;
    }
    
    .time-display {
        font-size: 0.85rem;
        min-width: 85px;
        text-align: center;
    }
    
    .progress-container {
        height: 8px;
        margin-bottom: 12px;
    }
    
    .skip-btn {
        min-width: 50px;
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    /* Hide less important buttons on mobile */
    .translation-btn,
    .pip-btn {
        display: none;
    }
}

        @media (max-width: 480px) {
            .video-player {
                max-height: 50vh;
            }
            
            .video-container {
                min-height: 40vh;
            }
            
            .video-wrapper {
                min-height: 40vh;
            }
            
            .quality-selector {
                min-width: 100px;
                font-size: 0.8rem;
            }
            
            .control-btn {
                padding: 10px;
                min-width: 44px;
                min-height: 44px;
                font-size: 1rem;
            }
            
            .big-play-btn {
                width: 70px;
                height: 70px;
                font-size: 1.8rem;
            }
            
            .movie-info-below h3 {
                font-size: 1.2rem;
            }
            
            .movie-meta-below {
                font-size: 0.85rem;
                gap: 12px;
            }
        }

   
        /* Error Message */
        .error-message {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
            color: var(--error);
            text-align: center;
        }

        .success-message {
            background: rgba(0, 200, 81, 0.1);
            border: 1px solid rgba(0, 200, 81, 0.3);
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
            color: var(--success);
            text-align: center;
        }

       /* Search Page */
.search-page {
    display: none;
    padding: 100px 0 50px;
}

.search-results-header {
    margin-bottom: 30px;
    position: relative;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 12px 20px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(229, 9, 20, 0.1);
    position: sticky;
    top: 80px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

/* Mobile improvements for back button */
@media (max-width: 768px) {
    .search-page {
        padding: 80px 0 30px;
    }
    
    .search-results-header {
        margin-bottom: 20px;
        padding: 0 15px;
    }
    
    .back-btn {
        position: fixed;
        top: 70px;
        left: 15px;
        right: 15px;
        margin-bottom: 0;
        padding: 12px 16px;
        font-size: 0.9rem;
        background: rgba(229, 9, 20, 0.95);
        color: white;
        border: none;
        border-radius: 10px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        justify-content: center;
    }
    
    .back-btn:hover {
        background: var(--primary);
        transform: translateY(-1px);
    }
    
    .search-results-header .section-title {
        margin-top: 60px;
        text-align: center;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .search-page {
        padding: 70px 0 20px;
    }
    
    .back-btn {
        top: 60px;
        left: 10px;
        right: 10px;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .search-results-header .section-title {
        margin-top: 50px;
        font-size: 1.2rem;
    }
}

        /* Footer */
        .footer {
            background: var(--darker);
            padding: 40px 0 30px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
            margin-bottom: 30px;
        }

        .footer-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--primary);
        }

        .footer p {
            color: var(--gray);
            margin-bottom: 8px;
            font-size: 0.9rem;
        }

        .creator {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 20px;
            font-size: 1rem;
            font-weight: 600;
            color: var(--light);
            text-align: center;
        }

        .heart {
            color: var(--primary);
            animation: pulse 2s infinite;
        }

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

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 25px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .social-link {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--gray);
            text-decoration: none;
            padding: 8px 15px;
            border-radius: 8px;
            transition: all 0.3s ease;
            border: 1px solid rgba(255,255,255,0.1);
            font-size: 0.9rem;
        }

        .social-link:hover {
            color: var(--primary);
            border-color: rgba(229, 9, 20, 0.3);
            background: rgba(229, 9, 20, 0.05);
            transform: translateY(-2px);
        }

        /* Mobile Menu */
        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: var(--light);
            font-size: 1.2rem;
            cursor: pointer;
        }

        /* Download Options */
        .download-option {
            padding: 15px;
            margin: 10px 0;
            background: var(--card-bg);
            border-radius: 8px;
            cursor: pointer;
            border: 1px solid rgba(255,255,255,0.1);
            transition: all 0.3s ease;
        }

        .download-option:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .nav-links {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background: var(--dark);
                flex-direction: column;
                padding: 20px;
                border-top: 1px solid rgba(255,255,255,0.1);
            }

            .nav-links.active {
                display: flex;
            }

            .mobile-menu-btn {
                display: block;
            }

            .hero h1 {
                font-size: 2rem;
            }

            .hero-subtitle {
                font-size: 1rem;
            }

            .movies-grid {
                display: grid !important;
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 15px !important;
                grid-auto-rows: auto !important;
                grid-auto-flow: dense !important;
                align-content: start !important;
            }

            .movie-poster {
                aspect-ratio: 1 / 1 !important;
                width: 100% !important;
            }

            .section-title {
                font-size: 1.5rem;
            }

            .modal {
                padding: 5px;
            }

            .modal-content {
                max-height: 100vh;
                border-radius: 8px;
            }

            .custom-controls {
                padding: 10px 15px;
            }

            .control-btn {
                padding: 6px 10px;
                font-size: 0.8rem;
            }

            .quality-selector {
                min-width: 100px;
                font-size: 0.8rem;
                padding: 6px 8px;
            }

            .big-play-btn {
                width: 60px;
                height: 60px;
                font-size: 1.5rem;
            }

            .movie-info-below {
                padding: 15px;
            }

            .movie-info-below h3 {
                font-size: 1.1rem;
            }

            .controls-bottom {
                flex-direction: column;
                gap: 10px;
            }

            .controls-left, .controls-right {
                width: 100%;
                justify-content: space-between;
            }
        }

        @media (max-width: 480px) {
            .hero {
                height: 60vh;
                min-height: 400px;
                margin-top: 60px;
            }

            .hero h1 {
                font-size: 1.8rem;
            }

            .movies-grid {
                display: grid !important;
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 15px !important;
                grid-auto-rows: auto !important;
                grid-auto-flow: dense !important;
                align-content: start !important;
            }

            .movie-poster {
                aspect-ratio: 1 / 1 !important;
                width: 100% !important;
            }

            .movie-actions {
                flex-direction: column;
            }

            .action-btn {
                font-size: 0.7rem;
                padding: 6px;
            }

            .footer-content {
                grid-template-columns: 1fr;
                text-align: center;
            }

            .video-player {
                max-height: 50vh;
            }

            .quality-selector {
                min-width: 80px;
            }
        }

        /* Fullscreen styles */
        .video-container:fullscreen {
            width: 100vw !important;
            height: 100vh !important;
            max-height: 100vh !important;
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            z-index: 9999 !important;
        }

        .video-container:fullscreen .video-wrapper {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100% !important;
            height: 100% !important;
            background: #000 !important;
        }

        .video-container:fullscreen .video-player {
            max-height: 100vh !important;
            height: 100% !important;
            width: 100% !important;
            object-fit: contain;
            object-position: center;
        }

        .video-container:fullscreen .custom-controls {
            padding: 20px 30px;
            width: 100%;
            flex-shrink: 0;
            max-height: auto;
            transition: opacity 0.3s ease;
        }

        .video-container:fullscreen .custom-controls[style*="opacity: 0"] {
            pointer-events: none;
            max-height: 0;
            overflow: hidden;
            padding: 0;
        }

        body:fullscreen {
            overflow: hidden !important;
            width: 100vw !important;
            height: 100vh !important;
        }

        body.landscape-mode:fullscreen {
            width: 100vw !important;
            height: 100vh !important;
        }

        /* Prevent body scroll when modal is open */
        body.modal-open {
            overflow: hidden;
        }

        /* Episode Selection Modal */
        .episode-selection {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.95);
            z-index: 3000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .episode-modal-content {
            background: var(--card-bg);
            border-radius: 12px;
            padding: 30px;
            max-width: 500px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
        }

        .episode-title {
            font-size: 1.5rem;
            margin-bottom: 20px;
            color: var(--light);
            text-align: center;
        }

        .season-section {
            margin-bottom: 25px;
        }

        .season-title {
            font-size: 1.2rem;
            color: var(--primary);
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--primary);
        }

        .episodes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
            gap: 10px;
            margin-bottom: 15px;
        }

        .episode-btn {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: var(--light);
            padding: 12px 8px;
            border-radius: 8px;
            cursor: pointer;
            text-align: center;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .episode-btn:hover {
            background: var(--primary);
            transform: translateY(-2px);
            border-color: var(--primary);
        }

        .episode-btn.selected {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        /* Download button at top */
        .download-top-btn {
            position: absolute;
            top: 15px;
            left: 15px;
            background: rgba(0, 200, 81, 0.9);
            border: none;
            color: white;
            padding: 10px 15px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 600;
            z-index: 2001;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .download-top-btn:hover {
            background: rgba(0, 200, 81, 1);
            transform: translateY(-2px);
        }

        /* Translation button */
        .translation-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
        }

        .translation-btn.active {
            background: var(--secondary);
        }

        /* Landscape rotation button */
        .rotate-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
        }

        .rotate-btn.active {
            background: var(--accent);
            color: var(--dark);
        }

        /* Skip buttons */
        .skip-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
        }

        .skip-btn:hover {
            background: rgba(255,255,255,0.2);
            transform: translateY(-2px);
        }

        /* Zoom controls */
        .zoom-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
        }

        .zoom-btn.active {
            background: var(--accent);
            color: var(--dark);
        }

        /* PiP button */
        .pip-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
        }

        .pip-btn.active {
            background: var(--secondary);
        }
        .load-more-container {
    grid-column: 1 / -1;
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    width: 100%;
}

.load-more-container .btn {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--light);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.load-more-container .btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.load-more-container .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
/* Subtitle Selector Styles */
.subtitle-selector-container {
    position: relative;
    display: inline-block;
}

.subtitle-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 8px;
    min-width: 150px;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.subtitle-dropdown.show {
    display: block;
}

.subtitle-option {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--light);
}

.subtitle-option:hover {
    background: rgba(255,255,255,0.1);
}

.subtitle-option.active {
    background: var(--primary);
    color: white;
}

.subtitle-options-list {
    max-height: 200px;
    overflow-y: auto;
}

.subtitle-btn.active {
    background: var(--secondary);
}

/* Mobile responsive for subtitle dropdown */
@media (max-width: 768px) {
    .subtitle-dropdown {
        position: fixed;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        min-width: 200px;
        max-width: 80vw;
    }
    
    .subtitle-options-list {
        max-height: 150px;
    }
}
/* Enhanced Movie Info Styles */
.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.genre-tag {
    background: linear-gradient(135deg, #00C851, #007E33);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 200, 81, 0.3);
}

/* Alternative: If you want different colors for different genres */
.genre-tag:nth-child(3n+1) {
    background: linear-gradient(135deg, #00C851, #007E33);
}
.genre-tag:nth-child(3n+2) {
    background: linear-gradient(135deg, #00A8FF, #0077B6);
}
.genre-tag:nth-child(3n+3) {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
}

/* Enhanced Cast Section - Larger Photos, No Circles */
.cast-section {
    margin: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
}

.cast-section h4 {
    color: var(--light);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    max-height: none;
    overflow-y: visible;
}

.cast-card {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.cast-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.2);
}

.cast-avatar {
    width: 100px;
    height: 100px;
    border-radius: 12px; /* Nice rounded corners, not circles */
    object-fit: cover;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.cast-card:hover .cast-avatar {
    border-color: var(--primary);
    transform: scale(1.05);
}

.cast-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cast-character {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile responsive for cast */
@media (max-width: 768px) {
    .cast-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 15px;
        max-height: none;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
    }
    
    .cast-card {
        flex: 0 0 180px;
        padding: 15px;
        scroll-snap-align: start;
    }
    
    .cast-avatar {
        width: 150px;
        height: 180px;
        border-radius: 12px;
    }
    
    .cast-name {
        font-size: 0.9rem;
    }
    
    .cast-character {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .cast-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
    }
    
    .cast-card {
        flex: 0 0 170px;
        padding: 15px;
        scroll-snap-align: start;
    }
    
    .cast-avatar {
        width: 140px;
        height: 170px;
        border-radius: 12px;
    }
    
    .cast-name {
        font-size: 0.85rem;
    }
    
    .cast-character {
        font-size: 0.75rem;
    }
}

/* Scrollbar styling for cast grid */
.cast-grid::-webkit-scrollbar {
    width: 6px;
}

.cast-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.cast-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}
.additional-info {
    margin: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item strong {
    color: var(--light);
    font-size: 0.9rem;
}

.info-item span {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Scrollbar styling for cast grid */
.cast-grid::-webkit-scrollbar {
    width: 6px;
}

.cast-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.cast-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .movie-meta-below {
        flex-wrap: wrap;
        gap: 8px;
    }
}
/* Quick fix for mobile scrolling */
@media (max-width: 768px) {
    .modal-content {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }
    
    .video-container {
        flex-shrink: 0;
    }
    
    .movie-info-below {
        flex: 1;
        overflow-y: visible;
    }
}
/* Enhanced Progress Bar and Timer Toast Styles */
.seek-timer-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 100;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
}

.seek-timer-toast.show {
    opacity: 1;
}

.seek-timer-toast .time-display {
    font-size: 1.4rem;
    color: var(--primary);
    white-space: nowrap;
}

.seek-timer-toast .time-remaining {
    font-size: 0.9rem;
    color: var(--gray);
    white-space: nowrap;
}

/* Enhanced progress bar styles */
.progress-container {
    cursor: pointer;
    position: relative;
}

.progress-container:active {
    cursor: grabbing;
}

/* Mobile responsive for timer toast */
@media (max-width: 768px) {
    .seek-timer-toast {
        flex-direction: row;
        padding: 10px 14px;
        font-size: 1rem;
        gap: 6px;
    }
    
    .seek-timer-toast .time-display {
        font-size: 1.1rem;
    }
    
    .seek-timer-toast .time-remaining {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .seek-timer-toast {
        padding: 8px 12px;
        font-size: 0.9rem;
        gap: 4px;
    }
    
    .seek-timer-toast .time-display {
        font-size: 1rem;
    }
    
    .seek-timer-toast .time-remaining {
        font-size: 0.75rem;
    }
}
/* Enhanced progress bar styles */
.progress-container {
    cursor: pointer;
    position: relative;
}

.progress-container:active {
    cursor: grabbing;
}
.external-btn {
    background: rgba(0, 168, 255, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(0, 168, 255, 0.3);
}

.external-btn:hover {
    background: rgba(0, 168, 255, 0.3);
    transform: translateY(-2px);
}
/* Fix modal scrolling on mobile - Simple approach */
@media (max-width: 768px) {
    .modal#videoModal .modal-content {
        overflow-y: auto !important;
        max-height: 100vh !important;
        height: auto !important; /* Change from height to max-height */
    }
    
    .modal#videoModal .video-container {
        flex-shrink: 0;
        min-height: 40vh;
    }
    
    .modal#videoModal .movie-info-below {
        flex: 1;
        overflow-y: visible;
        max-height: none;
        min-height: auto;
    }
    
    /* Make movie actions like the retry button was */
    .modal#videoModal .movie-actions {
        margin-top: 30px;
        padding: 20px 0 40px 0; /* Add more bottom padding */
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .modal#videoModal .movie-actions .action-btn {
        min-height: 55px;
        font-size: 1.1rem;
        font-weight: 700;
        width: 100%;
    }
}
/* Mobile App Download Section Styles */
.app-download-btn {
    background: linear-gradient(135deg, #3DDC84 0%, #2BB673 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(61, 220, 132, 0.4);
}

.app-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 220, 132, 0.6);
    color: white;
}

/* Mobile responsive adjustments for app section */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .app-download-section {
        padding: 20px 15px;
    }
    
    .app-features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .app-download-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .app-features-grid {
        grid-template-columns: 1fr;
    }
}
/* FAQ Modal Styles */
.faq-content::-webkit-scrollbar {
    width: 6px;
}

.faq-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.faq-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateX(5px);
}

/* Mobile responsive for FAQ modal */
@media (max-width: 768px) {
    .modal-content[style*="max-width: 800px"] {
        max-width: 95vw !important;
        max-height: 90vh !important;
        margin: 20px auto;
    }
    
    .faq-content {
        max-height: 50vh !important;
        padding-right: 5px !important;
    }
    
    .faq-item h3 {
        font-size: 1rem !important;
    }
    
    .faq-item p {
        font-size: 0.9rem !important;
    }
}
/* Contact Modal Styles */
.contact-email-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    border: none;
    cursor: pointer;
}

.contact-email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
    color: white;
}

.contact-profile {
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.contact-icon i {
    color: white;
    font-size: 1.5rem;
}

/* Mobile responsive for contact modal */
@media (max-width: 768px) {
    .modal-content[style*="max-width: 600px"] {
        max-width: 95vw !important;
        max-height: 90vh !important;
        margin: 20px auto;
    }
    
    .contact-email-btn {
        padding: 12px 20px;
        font-size: 1rem !important;
        width: 100%;
        justify-content: center;
    }
    
    .contact-profile {
        padding: 20px 15px;
    }
}
/* FIXED: Consistent 3-column grid with equal height cards */
@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .movie-card {
        display: flex;
        flex-direction: column;
        height: auto;
        break-inside: avoid; /* Prevent cards from breaking across columns */
    }
    
    .movie-poster {
        aspect-ratio: 1 / 1;
        object-fit: cover;
        width: 100%;
        flex-shrink: 0; /* Prevent image from shrinking */
    }
    
    .movie-info {
        padding: 8px;
        flex: 1; /* Take remaining space */
        display: flex;
        flex-direction: column;
    }
    
    .movie-title {
        font-size: 0.8rem;
        height: 2.4em;
        line-height: 1.2;
        margin-bottom: 5px;
        flex-shrink: 0; /* Fixed height */
    }
    
    .movie-meta {
        font-size: 0.7rem;
        margin-bottom: 8px;
        flex-shrink: 0; /* Fixed height */
    }
    
    .movie-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-top: auto; /* Push to bottom */
        flex-shrink: 0; /* Fixed height */
    }
    
    .action-btn {
        padding: 6px;
        font-size: 0.65rem;
        min-height: 28px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* For very small phones */
@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .movie-poster {
        aspect-ratio: 1 / 1;
        object-fit: cover;
        width: 100%;
    }
    
    .action-btn {
        font-size: 0.6rem;
        padding: 4px;
        min-height: 26px;
    }
    
    .movie-title {
        font-size: 0.75rem;
    }
}

/* FIX: Ensure all sections use the same grid */
#trendingGrid,
#moviesGrid, 
#tvGrid,
#newReleasesGrid,
#searchResultsGrid {
    display: grid;
}

@media (max-width: 768px) {
    #trendingGrid,
    #moviesGrid,
    #tvGrid,
    #newReleasesGrid, 
    #searchResultsGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* YOUR ADDITIONAL STYLES - Integrated */
/* Prevent layout shift during loading */
.movies-grid {
    min-height: 200px; /* Prevent collapse during load */
}

.movie-card {
    break-inside: avoid; /* Prevent cards from breaking across columns */
}

/* Ensure all grid containers behave the same */
.section .movies-grid {
    display: grid;
}

/* Loading state should span all columns */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

/* Favorite & Share Button Styles */
.favorite-btn {
    background: rgba(229, 9, 20, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(229, 9, 20, 0.3) !important;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: rgba(229, 9, 20, 0.2) !important;
    color: var(--primary) !important;
}

.favorite-btn.active {
    background: rgba(229, 9, 20, 0.5) !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.5) !important;
}

.share-btn {
    background: rgba(0, 168, 255, 0.1) !important;
    color: var(--secondary) !important;
    border: 1px solid rgba(0, 168, 255, 0.3) !important;
}

.share-btn:hover {
    background: rgba(0, 168, 255, 0.2) !important;
    color: var(--secondary) !important;
}

/* Homepage Card Styles - Square layout */
.homepage-card {
    transition: all 0.3s ease;
}

.homepage-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(229, 9, 20, 0.4);
}

.homepage-card .movie-poster {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
}

/* Movie Action Modal Buttons */
.action-modal-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
}

.action-modal-btn i {
    font-size: 1.1rem;
}

.watch-action-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #CC0813 100%);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

.watch-action-btn:hover {
    background: linear-gradient(135deg, #FF1525 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.5);
}

.download-action-btn {
    background: linear-gradient(135deg, #0088FF 0%, #0066CC 100%);
    box-shadow: 0 5px 15px rgba(0, 136, 255, 0.3);
}

.download-action-btn:hover {
    background: linear-gradient(135deg, #00A3FF 0%, #0088FF 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 255, 0.5);
}

.external-action-btn {
    background: linear-gradient(135deg, #00C851 0%, #007E33 100%);
    box-shadow: 0 5px 15px rgba(0, 200, 81, 0.3);
}

.external-action-btn:hover {
    background: linear-gradient(135deg, #00E676 0%, #00C851 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 200, 81, 0.5);
}

.favorite-action-btn {
    background: rgba(229, 9, 20, 0.2);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.favorite-action-btn:hover {
    background: rgba(229, 9, 20, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

.share-action-btn {
    background: rgba(0, 168, 255, 0.2);
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.share-action-btn:hover {
    background: rgba(0, 168, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3);
}