/* 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: #05050a;
            padding: 10px 0;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid rgba(229, 9, 20, 0.25);
            box-shadow: 0 2px 24px rgba(229, 9, 20, 0.12);
        }

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

        .logo-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 9px;
            text-decoration: none;
            transition: opacity 0.2s ease;
        }

        .logo:hover { opacity: 0.82; }

        .logo-group { flex-shrink: 0; }

        .nav-links {
            display: flex;
            gap: 10px;
            list-style: none;
            flex-wrap: nowrap;
            align-items: center;
        }

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

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

        .mobile-search-row {
            display: none;
        }

        .search-box {
            display: flex;
            gap: 8px;
            flex: 1;
            max-width: 420px;
            margin: 0 20px;
            position: relative;
        }

        .search-suggestions {
            display: none;
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            width: 100%;
            background: #1a1a2e;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            max-height: 380px;
            overflow-y: auto;
            z-index: 9999;
            box-shadow: 0 8px 30px rgba(0,0,0,0.5);
            backdrop-filter: blur(20px);
        }

        .search-suggestions.show {
            display: block;
        }

        .suggestion-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            cursor: pointer;
            transition: background 0.2s ease;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        .suggestion-item:last-child {
            border-bottom: none;
        }

        .suggestion-item:hover {
            background: rgba(229, 9, 20, 0.15);
        }

        .suggestion-item:first-child {
            border-radius: 12px 12px 0 0;
        }

        .suggestion-item:last-child {
            border-radius: 0 0 12px 12px;
        }

        .suggestion-poster {
            width: 40px;
            height: 56px;
            border-radius: 6px;
            object-fit: cover;
            flex-shrink: 0;
        }

        .suggestion-info {
            flex: 1;
            min-width: 0;
        }

        .suggestion-title {
            color: #fff;
            font-size: 0.88rem;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .suggestion-meta {
            color: rgba(255,255,255,0.45);
            font-size: 0.75rem;
            margin-top: 2px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .suggestion-meta .star {
            color: #FFD700;
        }

        .suggestion-type-badge {
            background: var(--primary);
            color: #fff;
            font-size: 0.65rem;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            flex-shrink: 0;
        }

        .suggestion-loading {
            padding: 16px;
            text-align: center;
            color: rgba(255,255,255,0.4);
            font-size: 0.85rem;
        }

        .suggestion-loading i {
            margin-right: 6px;
            animation: spin 1s linear infinite;
        }

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

        .search-all-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px;
            color: var(--primary);
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: background 0.2s ease;
            border-radius: 0 0 12px 12px;
        }

        .search-all-btn:hover {
            background: rgba(229, 9, 20, 0.1);
        }

        .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 Slider Section */
        .hero {
            height: 80vh;
            min-height: 500px;
            background: #000;
            position: relative;
            margin-top: 70px;
            overflow: hidden;
        }

        .hero-slider {
            width: 100%;
            height: 100%;
            position: relative;
        }

        .slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.8s ease-in-out;
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: center;
            z-index: 1;
        }

        .slide.active {
            opacity: 1;
            z-index: 2;
        }

        .slide-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 40px;
            width: 100%;
        }

        .slide-content {
            flex: 1;
            max-width: 560px;
            text-align: left;
            padding: 20px 0;
            animation: slideUp 0.8s ease-out;
        }

        .slide-poster-wrap {
            flex-shrink: 0;
            width: 200px;
            border-radius: 14px;
            overflow: hidden;
            box-shadow: 0 24px 60px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.07);
            transform: perspective(800px) rotateY(-4deg);
            animation: posterFadeIn 0.9s ease-out;
        }

        @keyframes posterFadeIn {
            from { opacity: 0; transform: perspective(800px) rotateY(-4deg) translateY(20px); }
            to   { opacity: 1; transform: perspective(800px) rotateY(-4deg) translateY(0); }
        }

        .slide-poster-img {
            width: 100%;
            height: 300px;
            object-fit: cover;
            display: block;
        }

        @keyframes slideUp {
            from { transform: translateY(30px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .trending-badge {
            display: inline-block;
            background: var(--primary);
            color: white;
            padding: 4px 12px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 15px;
            text-transform: uppercase;
        }

        .slide-title {
            font-size: 3.5rem;
            font-weight: 900;
            margin-bottom: 15px;
            line-height: 1.1;
            text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
        }

        .slide-description {
            font-size: 1.1rem;
            color: #ddd;
            margin-bottom: 25px;
            line-height: 1.6;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .slide-meta {
            display: flex;
            gap: 20px;
            margin-bottom: 30px;
            font-weight: 600;
            font-size: 1rem;
        }

        .slide-meta span {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .watch-now {
            padding: 10px 25px !important;
            font-size: 0.9rem !important;
            border-radius: 50px !important;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .btn-details {
            padding: 10px 25px !important;
            font-size: 0.9rem !important;
            border-radius: 50px !important;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: rgba(128, 128, 128, 0.5) !important;
            color: white !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            backdrop-filter: blur(10px);
            margin-left: 10px;
        }

        .slide-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .slider-controls {
            position: absolute;
            top: 50%;
            width: 100%;
            display: flex;
            justify-content: space-between;
            padding: 0 30px;
            transform: translateY(-50%);
            z-index: 10;
        }

        .slider-btn {
            background: rgba(0,0,0,0.5);
            border: none;
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }

        .slider-btn:hover {
            background: var(--primary);
            transform: scale(1.1);
        }

        .slider-dots {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 10;
        }

        .dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255,255,255,0.3);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .dot.active {
            background: var(--primary);
            width: 30px;
            border-radius: 10px;
        }

        @media (max-width: 768px) {
            .slide-title { font-size: 2.2rem; }
            .hero { height: 60vh; }
            .slider-controls { display: none; }
            .slide-poster-wrap { display: none; }
            .header-tagline { display: none; }
        }

        .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;
        }

        .am-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);
        }

        .am-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;
            aspect-ratio: 16 / 9;
            display: block;
            object-fit: contain;
            object-position: center;
            touch-action: manipulation;
            background: #000;
        }

        /* 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;
            position: relative;
            z-index: 2;
        }

        .buffered-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            width: 0%;
            transition: width 0.3s ease;
            z-index: 1;
        }

        .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);
    }
    
    .am-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: center;
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .time-display {
        font-size: 0.8rem;
        min-width: auto;
        text-align: center;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .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 Quality Modal */
        .dl-modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.85); z-index: 3000;
            display: flex; align-items: flex-end; justify-content: center;
            backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s ease;
        }
        .dl-modal-overlay.dl-modal-visible { opacity: 1; }
        .dl-modal-overlay.dl-modal-visible .dl-modal {
            transform: translateY(0);
        }
        .dl-modal {
            background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
            border-radius: 20px 20px 0 0;
            width: 100%; max-width: 480px;
            padding: 0 0 20px; position: relative;
            transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            max-height: 85vh; overflow-y: auto;
        }
        .dl-modal-poster {
            position: relative; width: 100%; height: 140px;
            background-size: cover; background-position: center top;
            border-radius: 20px 20px 0 0; overflow: hidden;
        }
        .dl-modal-poster-overlay {
            position: absolute; inset: 0;
            background: linear-gradient(to bottom, rgba(30,30,30,0.3) 0%, #1e1e1e 95%);
        }
        .dl-modal-header-with-poster {
            margin-top: -40px; position: relative; z-index: 1;
            border-bottom: none; padding-top: 0;
        }
        .dl-modal-header-with-poster .dl-modal-icon {
            box-shadow: 0 4px 16px rgba(229,9,20,0.3), 0 0 0 3px rgba(30,30,30,0.8);
        }
        .dl-modal-close {
            position: absolute; top: 16px; right: 16px; z-index: 2;
            width: 32px; height: 32px; border-radius: 50%;
            background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.6); font-size: 0.8rem;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: all 0.2s;
        }
        .dl-modal-close:hover { background: rgba(255,255,255,0.15); color: white; }
        .dl-modal-header {
            text-align: center; padding: 28px 24px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .dl-modal-icon {
            width: 48px; height: 48px; border-radius: 14px;
            background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
            display: flex; align-items: center; justify-content: center;
            margin: 0 auto 12px; font-size: 1.1rem; color: white;
            box-shadow: 0 4px 16px rgba(229,9,20,0.3);
        }
        .dl-modal-title {
            color: white; font-size: 1.15rem; font-weight: 700;
            margin: 0 0 4px; letter-spacing: 0.3px;
        }
        .dl-modal-subtitle {
            color: rgba(255,255,255,0.45); font-size: 0.82rem;
            margin: 0; font-weight: 400;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            max-width: 280px; margin: 0 auto;
        }
        .dl-modal-options { padding: 16px 20px 8px; }
        .dl-quality-card {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 16px; margin-bottom: 10px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.07);
            border-radius: 14px; cursor: pointer;
            transition: all 0.25s ease; position: relative; overflow: hidden;
        }
        .dl-quality-card::before {
            content: ''; position: absolute; inset: 0;
            background: linear-gradient(135deg, rgba(229,9,20,0.08) 0%, transparent 60%);
            opacity: 0; transition: opacity 0.25s;
        }
        .dl-quality-card:hover {
            border-color: rgba(229,9,20,0.4);
            background: rgba(255,255,255,0.06);
            transform: translateY(-1px);
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        }
        .dl-quality-card:hover::before { opacity: 1; }
        .dl-quality-card:active { transform: scale(0.98); }
        .dl-quality-card.dl-quality-loading {
            opacity: 0.6; pointer-events: none;
            border-color: rgba(229,9,20,0.3);
        }
        .dl-quality-left { position: relative; z-index: 1; }
        .dl-quality-res {
            display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
        }
        .dl-quality-number {
            color: white; font-size: 1rem; font-weight: 700; letter-spacing: 0.3px;
        }
        .dl-quality-label {
            font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
            background: linear-gradient(135deg, #e50914, #ff4d4d);
            color: white; padding: 2px 7px; border-radius: 4px;
            letter-spacing: 0.8px;
        }
        .dl-quality-meta {
            display: flex; gap: 12px; align-items: center;
        }
        .dl-quality-meta span {
            color: rgba(255,255,255,0.4); font-size: 0.75rem; font-weight: 400;
            display: flex; align-items: center; gap: 4px;
        }
        .dl-quality-meta i { font-size: 0.65rem; opacity: 0.7; }
        .dl-quality-action {
            width: 38px; height: 38px; border-radius: 50%;
            background: rgba(229,9,20,0.12); border: 1px solid rgba(229,9,20,0.25);
            display: flex; align-items: center; justify-content: center;
            color: #e50914; font-size: 0.85rem;
            transition: all 0.25s; position: relative; z-index: 1; flex-shrink: 0;
        }
        .dl-quality-card:hover .dl-quality-action {
            background: #e50914; color: white;
            box-shadow: 0 2px 12px rgba(229,9,20,0.4);
        }
        .dl-modal-cancel {
            display: block; margin: 4px auto 0; padding: 10px 40px;
            background: transparent; border: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.5); font-size: 0.85rem; font-weight: 500;
            border-radius: 10px; cursor: pointer; transition: all 0.2s;
        }
        .dl-modal-cancel:hover {
            border-color: rgba(255,255,255,0.25);
            color: rgba(255,255,255,0.8);
        }

        @media (min-width: 600px) {
            .dl-modal-overlay { align-items: center; }
            .dl-modal {
                border-radius: 20px;
                max-height: 70vh;
            }
        }

        /* 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;
                flex-shrink: 0;
                order: 3;
            }

            .search-box {
                flex: 1;
                min-width: 0;
                margin: 0 8px;
                order: 2;
            }

            .search-box .search-input {
                display: block;
                font-size: 0.8rem;
                padding: 8px 10px;
                min-width: 0;
            }

            .search-box .search-btn {
                padding: 8px 12px;
                min-width: unset;
                flex-shrink: 0;
            }

            .search-box .search-suggestions {
                min-width: 0;
                width: 100%;
                left: 0;
                right: 0;
            }

            .logo-group {
                order: 1;
                flex-shrink: 0;
            }

            .mobile-search-row {
                display: none;
                position: relative;
                padding: 8px 0 10px;
                border-top: 1px solid rgba(255,255,255,0.07);
            }

            .mobile-search-row.open {
                display: block;
            }

            .mobile-search-input {
                width: 100%;
                background: rgba(255,255,255,0.1);
                border: 1px solid rgba(255,255,255,0.2);
                border-radius: 20px;
                padding: 10px 18px;
                color: #fff;
                font-size: 0.9rem;
                outline: none;
                box-sizing: border-box;
                backdrop-filter: blur(10px);
            }

            .mobile-search-input::placeholder {
                color: rgba(255,255,255,0.4);
            }

            .mobile-search-row .search-suggestions {
                left: 0;
                right: 0;
                width: 100%;
            }

            .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;
            }

            .am-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;
            position: relative;
        }

        .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 {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 20px 30px;
            width: 100%;
            max-height: auto;
            transition: opacity 0.3s ease;
            z-index: 10;
            background: linear-gradient(transparent, rgba(0,0,0,0.85));
        }

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

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

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

        /* Landscape mode - fill entire screen including safe areas */
        @media (orientation: landscape) {
            html, body {
                width: 100vw;
                height: 100vh;
                overflow-x: hidden;
            }
            
            body.landscape-mode {
                width: 100vw !important;
                height: 100vh !important;
                background: #000 !important;
                padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
            }
            
            body.landscape-mode .video-container,
            body.landscape-mode .modal-content {
                width: 100vw !important;
                height: 100vh !important;
                max-width: 100vw !important;
                max-height: 100vh !important;
                padding-left: env(safe-area-inset-left);
                padding-right: env(safe-area-inset-right);
                background: #000 !important;
            }
            
            body.landscape-mode .video-wrapper {
                width: 100% !important;
                height: 100% !important;
                background: #000 !important;
            }
            
            body.landscape-mode .video-player {
                width: 100% !important;
                height: 100% !important;
                object-fit: contain;
                background: #000 !important;
            }
            
            body.landscape-mode .custom-controls {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                z-index: 10;
                background: linear-gradient(transparent, rgba(0,0,0,0.85));
                padding: 15px 20px;
                padding-left: calc(15px + env(safe-area-inset-left));
                padding-right: calc(15px + env(safe-area-inset-right));
            }
            
            body.landscape-mode .video-wrapper {
                position: relative;
            }
        }
        
        /* Fullscreen in landscape - cover everything */
        @media (orientation: landscape) {
            .video-container:fullscreen {
                padding-left: env(safe-area-inset-left) !important;
                padding-right: env(safe-area-inset-right) !important;
                background: #000 !important;
            }
            
            .video-container:fullscreen .video-wrapper {
                background: #000 !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(229, 9, 20, 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(229, 9, 20, 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(--primary);
        }

        /* 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;
}

.speed-selector-container {
    position: relative;
    display: inline-block;
}

.speed-btn {
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 36px;
    letter-spacing: 0.5px;
}

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

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

.speed-option {
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: var(--light);
    text-align: center;
    font-weight: 500;
}

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

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

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

/* 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, #e50914, #b2070f);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.genre-tag:nth-child(3n+1) {
    background: linear-gradient(135deg, #e50914, #b2070f);
}
.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 .am-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 */
    }
    
    .am-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%;
    }
    
    .am-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-wrapper {
    position: relative;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    margin: auto;
    background: #0d0d0d;
    box-shadow: 0 25px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.06);
}
.action-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background-size: cover;
    background-position: center;
    filter: blur(0px) brightness(0.35);
    z-index: 0;
    border-radius: 20px 20px 0 0;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}
.action-modal-inner {
    position: relative;
    z-index: 1;
    padding: 24px;
}
.action-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.action-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}
.action-modal-hero {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.action-modal-poster {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    flex-shrink: 0;
}
.action-modal-info {
    flex: 1;
    min-width: 0;
}
.action-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
    line-height: 1.3;
    word-wrap: break-word;
}
.action-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.action-modal-badge {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}
.action-modal-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.action-modal-trailer-container {
    display: none;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #000;
}
.action-modal-trailer-video {
    width: 100%;
    border-radius: 12px;
    background: #000;
    display: block;
}
.action-modal-trailer-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 13px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.am-btn-primary {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ff8c00, #e65100);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
}
.am-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,140,0,0.35);
}
.am-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
.am-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border: none;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
}
.am-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s ease;
}
.am-btn:hover .am-btn-icon {
    transform: scale(1.1);
}
.am-btn:hover {
    transform: translateY(-2px);
}
.am-btn-watch {
    background: linear-gradient(145deg, rgba(229,9,20,0.15), rgba(229,9,20,0.05));
    border: 1px solid rgba(229,9,20,0.25);
}
.am-btn-watch .am-btn-icon {
    background: linear-gradient(135deg, #e50914, #b2070f);
    box-shadow: 0 4px 15px rgba(229,9,20,0.4);
}
.am-btn-download {
    background: linear-gradient(145deg, rgba(0,136,255,0.15), rgba(0,136,255,0.05));
    border: 1px solid rgba(0,136,255,0.25);
}
.am-btn-download .am-btn-icon {
    background: linear-gradient(135deg, #0088ff, #0055cc);
    box-shadow: 0 4px 15px rgba(0,136,255,0.4);
}
.am-btn-external {
    background: linear-gradient(145deg, rgba(229,9,20,0.15), rgba(229,9,20,0.05));
    border: 1px solid rgba(229,9,20,0.25);
}
.am-btn-external .am-btn-icon {
    background: linear-gradient(135deg, #e50914, #b2070f);
    box-shadow: 0 4px 15px rgba(229,9,20,0.4);
}
.am-btn-getapp-wide {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #E50914 0%, #B2070F 100%);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 22px rgba(229,9,20,0.45);
    letter-spacing: 0.3px;
    min-height: 52px;
}
.am-btn-getapp-wide:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(229,9,20,0.6);
}
.am-btn-getapp-wide:active {
    transform: scale(0.97);
}

.am-btn-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
    margin: 4px 0;
}
.am-btn-row-secondary {
    display: flex;
    gap: 10px;
}
.am-btn-flat {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.am-btn-flat:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    border-color: rgba(255,255,255,0.15);
}
.am-btn-flat i {
    font-size: 0.9rem;
}

.old-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, #e50914 0%, #b2070f 100%);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

.external-action-btn:hover {
    background: linear-gradient(135deg, #ff1525 0%, #e50914 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 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);
}

/* Gesture Indicator for Brightness/Volume */
.gesture-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    min-width: 100px;
}

.gesture-indicator.show {
    opacity: 1;
    visibility: visible;
}

.gesture-icon {
    font-size: 28px;
    color: var(--light);
}

.gesture-icon.brightness {
    color: #FFD700;
}

.gesture-icon.volume {
    color: var(--secondary);
}

.gesture-bar {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.gesture-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.1s ease;
}

.gesture-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
}

/* Next/Prev Buttons */
.prev-btn, .next-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--light);
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.prev-btn:disabled, .next-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.prev-btn:disabled:hover, .next-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

/* Skeleton Loading */
.skeleton-card {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    min-height: 200px;
}

.skeleton-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: linear-gradient(90deg, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-info {
    padding: 12px;
}

.skeleton-title {
    height: 14px;
    width: 80%;
    background: linear-gradient(90deg, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-meta {
    height: 12px;
    width: 50%;
    background: linear-gradient(90deg, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9990;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

/* Trailer Preview Overlay */
.trailer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.movie-card:hover .trailer-overlay {
    opacity: 1;
}

.trailer-play-btn {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    animation: trailerPulse 1.5s ease-in-out infinite;
}

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

/* Tap to Play overlay (shown when autoplay is blocked) */
.tap-to-play {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 21;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    pointer-events: auto;
}

.tap-to-play.active {
    display: flex;
}

.tap-to-play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 0 0 8px rgba(229, 9, 20, 0.25);
    animation: tapPulse 1.8s ease-in-out infinite;
}

.tap-to-play-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

@keyframes tapPulse {
    0%, 100% { box-shadow: 0 0 0 8px rgba(229, 9, 20, 0.25); }
    50% { box-shadow: 0 0 0 16px rgba(229, 9, 20, 0.08); }
}

/* Buffering Spinner */
.buffering-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
}

.buffering-spinner.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.buffering-ring {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #e50914;
    animation: ringSpin 0.8s linear infinite;
}

@keyframes ringSpin {
    to { transform: rotate(360deg); }
}

/* Brightness overlay effect */
.video-wrapper {
    position: relative;
}

/* =============================================
   DESKTOP & LARGE SCREEN IMPROVEMENTS
   ============================================= */

@media (min-width: 1024px) {
    /* Wider main container */
    .container {
        max-width: 1400px;
        padding: 0 40px;
    }

    /* More columns on desktop */
    .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 18px !important;
    }

    /* Hero compact on desktop — shows content below without scrolling */
    .hero {
        height: 50vh;
        min-height: 380px;
        max-height: 520px;
    }

    /* Slide content wider */
    .slide-content {
        max-width: 600px;
    }

    /* Smaller title in hero on desktop */
    .slide-title {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .slide-meta {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .hero-btn {
        padding: 10px 22px;
        font-size: 0.88rem;
    }

    /* Smaller poster in hero */
    .slide-poster-wrap {
        width: 130px;
    }

    /* Action modal — wider & horizontal layout on desktop */
    .action-modal-wrapper {
        max-width: 720px;
        width: 80%;
    }

    .action-modal-inner {
        padding: 32px;
    }

    .action-modal-hero {
        gap: 28px;
        align-items: flex-start;
    }

    .action-modal-poster {
        width: 150px;
        height: 220px;
    }

    .action-modal-title {
        font-size: 1.5rem;
    }

    .action-modal-desc {
        -webkit-line-clamp: 5;
        font-size: 0.88rem;
    }

    /* Bigger action buttons on desktop */
    .am-btn {
        padding: 18px 12px;
        font-size: 0.85rem;
    }

    .am-btn-icon {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    /* Always show download button on desktop */
    .am-btn-download {
        display: flex !important;
    }

    /* Video player: always maintain 16:9 aspect ratio during loading AND playing */
    .video-player {
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
        max-height: 72vh;
        min-height: 360px;
        background: #000;
    }

    .video-wrapper {
        min-height: 360px;
        background: #000;
    }

    /* Desktop video modal fills screen properly */
    .modal#videoModal .modal-content {
        max-height: 100vh !important;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
    }

    .modal#videoModal .video-container {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
    }

    .modal#videoModal .video-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000;
    }

    /* Trailer button bigger */
    .am-btn-primary {
        padding: 16px 28px;
        font-size: 1rem;
    }

    /* Section headings */
    .section h2 {
        font-size: 1.4rem;
    }

    /* Movie card hover effect enhanced */
    .homepage-card:hover {
        transform: translateY(-10px) scale(1.03);
        box-shadow: 0 20px 50px rgba(229, 9, 20, 0.45);
    }

    /* Nav spacing */
    .nav-links {
        gap: 28px;
    }

    /* Search bar wider */
    .search-bar {
        width: 420px;
    }
}

@media (min-width: 1440px) {
    /* 6 columns on very large screens */
    .movies-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 20px !important;
    }

    .container {
        max-width: 1600px;
        padding: 0 60px;
    }

    .action-modal-wrapper {
        max-width: 800px;
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

.brightness-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}
/* ─── Live Sports Section ──────────────────────────────────────── */
.sports-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0 16px;
    align-items: center;
}
.sports-tab {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #1a1a2e;
    border: 1px solid #2a2a45;
    color: #888;
    transition: all 0.2s;
}
.sports-tab:hover,
.sports-tab.active {
    background: rgba(19, 207, 207, 0.12);
    border-color: rgba(19, 207, 207, 0.4);
    color: #13CFCF;
}
.sports-refresh {
    margin-left: auto;
    padding: 8px 12px;
}
.sports-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 211, 151, 0.08);
    border: 1px solid rgba(34, 211, 151, 0.25);
    color: #22d397;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.sports-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22d397;
    box-shadow: 0 0 8px #22d397;
    animation: pulse 1.8s infinite;
    flex-shrink: 0;
}
.sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding-bottom: 60px;
}
.sports-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #555;
}
.sports-empty i {
    font-size: 2.5rem;
    margin-bottom: 14px;
    display: block;
    color: #333;
}
.sports-empty p {
    font-size: 15px;
}

/* Match card */
.scard {
    background: #101419;
    border: 1px solid #1e252e;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s, transform 0.15s;
}
.scard:hover {
    border-color: #2e3a47;
    transform: translateY(-2px);
}
.scard-is-live {
    border-color: rgba(34, 211, 151, 0.3);
    box-shadow: 0 0 0 1px rgba(34, 211, 151, 0.1);
}
.scard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 8px;
}
.scard-league {
    font-size: 11px;
    color: #5d7080;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scard-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.scard-live    { background: rgba(34,211,151,.12); color: #22d397; border: 1px solid rgba(34,211,151,.3); }
.scard-upcoming { background: rgba(245,158,11,.1);  color: #f59e0b; border: 1px solid rgba(245,158,11,.25);}
.scard-finished { background: rgba(93,112,128,.12); color: #5d7080; border: 1px solid rgba(93,112,128,.2); }

.scard-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}
.scard-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.scard-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: contain;
    background: #1a2028;
    border: 1px solid #1e252e;
}
.scard-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a2028;
    border: 1px solid #1e252e;
    display: grid;
    place-items: center;
    color: #3a4a5a;
    font-size: 14px;
}
.scard-team-name {
    font-size: 12px;
    font-weight: 600;
    color: #c8d8e8;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.scard-score {
    font-size: 22px;
    font-weight: 800;
    color: #13CFCF;
    font-family: ui-monospace, monospace;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}
.scard-score.muted { color: #3a4a5a; font-size: 18px; }
.scard-score-sep { color: #5d7080; font-size: 18px; margin: 0 2px; }
.scard-kickoff {
    font-size: 13px;
    font-weight: 700;
    color: #f59e0b;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}
.scard-footer {
    border-top: 1px solid #1e252e;
    padding-top: 12px;
    text-align: center;
}
.scard-watch-btn {
    background: linear-gradient(135deg, #13CFCF, #0a8a8a);
    color: #03181a;
    border: none;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.15s;
}
.scard-watch-btn:hover { opacity: 0.85; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ─── Homepage Live Sports Rail ──────────────────────────────────── */
.sports-rail-section .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sports-rail-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3b3b;
    box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.6);
    animation: railPulse 1.6s infinite;
    flex-shrink: 0;
}
@keyframes railPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.55); }
    70%  { box-shadow: 0 0 0 12px rgba(255, 59, 59, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); }
}

.sports-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 280px);
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #2a2a45 transparent;
}
.sports-rail::-webkit-scrollbar { height: 6px; }
.sports-rail::-webkit-scrollbar-track { background: transparent; }
.sports-rail::-webkit-scrollbar-thumb { background: #2a2a45; border-radius: 3px; }
.sports-rail::-webkit-scrollbar-thumb:hover { background: #3a3a5a; }

.srail-card {
    position: relative;
    scroll-snap-align: start;
    background: linear-gradient(160deg, #131922 0%, #0c1118 100%);
    border: 1px solid #1f2630;
    border-radius: 14px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    overflow: hidden;
}
.srail-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 60% at 50% 0%, rgba(19, 207, 207, 0.08), transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.srail-card:hover {
    transform: translateY(-3px);
    border-color: #2e3a47;
    box-shadow: 0 10px 30px -12px rgba(0,0,0,0.6);
}
.srail-card:hover::before { opacity: 1; }

.srail-card-live {
    border-color: rgba(255, 59, 59, 0.35);
    box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.12), 0 8px 22px -10px rgba(255,59,59,0.25);
}
.srail-card-live::before {
    background: radial-gradient(120% 60% at 50% 0%, rgba(255, 59, 59, 0.12), transparent 60%);
    opacity: 1;
}

.srail-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.srail-league {
    font-size: 10.5px;
    color: #6b7d92;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}
.srail-status {
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.04em;
}
.srail-live     { background: rgba(255, 59, 59, 0.14); color: #ff5b5b; border: 1px solid rgba(255, 59, 59, 0.35); }
.srail-upcoming { background: rgba(245, 158, 11, 0.12); color: #ffb547; border: 1px solid rgba(245, 158, 11, 0.3); }
.srail-finished { background: rgba(93, 112, 128, 0.14); color: #7d8fa3; border: 1px solid rgba(93, 112, 128, 0.25); }
.srail-pulse {
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff3b3b;
    box-shadow: 0 0 6px #ff3b3b;
    animation: pulse 1.5s infinite;
}

.srail-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    min-height: 78px;
}
.srail-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.srail-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 4px;
    border: 1px solid #1f2630;
    flex-shrink: 0;
}
.srail-logo-ph {
    background: #1a2028;
    color: #3a4a5a;
    display: grid;
    place-items: center;
    font-size: 16px;
    padding: 0;
}
.srail-name {
    font-size: 12px;
    font-weight: 700;
    color: #d8e2ee;
    text-align: center;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    word-break: break-word;
}
.srail-score {
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
}
.srail-score span {
    color: #ff5b5b;
    font-weight: 700;
}
.srail-vs {
    font-size: 14px;
    font-weight: 800;
    color: #4a5a6e;
    letter-spacing: 0.1em;
    padding: 6px 8px;
    border: 1px dashed #2a3340;
    border-radius: 6px;
}
.srail-kickoff {
    font-size: 12px;
    font-weight: 700;
    color: #ffb547;
    text-align: center;
    line-height: 1.3;
    padding: 6px 10px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    white-space: nowrap;
}

.srail-actions { display: flex; gap: 6px; width: 100%; }
.srail-actions .srail-watch { flex: 1; min-width: 0; padding-left: 5px; padding-right: 5px; font-size: 11px; }

.srail-watch {
    width: 100%;
    background: linear-gradient(135deg, #ff3b3b 0%, #c81e1e 100%);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.18s, opacity 0.18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 14px -4px rgba(255, 59, 59, 0.45);
}
.srail-watch:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -4px rgba(255, 59, 59, 0.6); }
.srail-watch:active { transform: translateY(0); }
.srail-watch i { font-size: 11px; }
.srail-watch-disabled {
    background: #1a2028;
    color: #6b7d92;
    border: 1px solid #25303c;
    box-shadow: none;
    cursor: pointer;
}
.srail-watch-disabled:hover { background: #1f2630; box-shadow: none; transform: none; }

/* Skeleton loading state */
.srail-skeleton { pointer-events: none; }
.srail-skel-line {
    background: linear-gradient(90deg, #161c25 0%, #1e2530 50%, #161c25 100%);
    background-size: 200% 100%;
    animation: skelShine 1.4s infinite linear;
    border-radius: 6px;
    height: 12px;
}
.srail-skel-line-sm { width: 40%; height: 10px; }
.srail-skel-line-md { width: 60px; height: 22px; }
.srail-skel-btn { height: 36px; border-radius: 9px; margin-top: 4px; }
.srail-skel-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    min-height: 78px;
    padding: 0 4px;
}
.srail-skel-circle {
    width: 44px; height: 44px; border-radius: 50%;
    margin: 0 auto;
    background: linear-gradient(90deg, #161c25 0%, #1e2530 50%, #161c25 100%);
    background-size: 200% 100%;
    animation: skelShine 1.4s infinite linear;
}
@keyframes skelShine {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 600px) {
    .sports-rail { grid-auto-columns: minmax(250px, 250px); }
    .srail-score { font-size: 22px; }
    .srail-logo { width: 38px; height: 38px; }
}

/* ─── Dub Language Selector ──────────────────────────────────────────────── */
#dubSelectorContainer .control-btn { font-size: 1.05rem; }
#dubOptionsList div {
    padding: 10px 14px;
    font-size: 13px;
    color: #d1d5db;
    cursor: pointer;
    border-bottom: 1px solid #1f2937;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .15s;
}
#dubOptionsList div:last-child { border-bottom: none; }
#dubOptionsList div:hover { background: #1f2937; }
#dubOptionsList div.dub-active { color: #e50914; }
#dubOptionsList div.dub-active .dub-check { opacity: 1; }
.dub-check { opacity: 0; transition: opacity .15s; font-size: 11px; }
#amDubChips button:hover {
    border-color: #e50914 !important;
    color: #e50914 !important;
    background: rgba(229,9,20,.1) !important;
}

/* ─── Dub chips: 2-column grid in action modal ──────────────────────────── */
#amDubRow {
    margin: 10px 0 0;
    flex-direction: column;
    gap: 6px;
}
#amDubChips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
}
/* Original Audio (first chip) always spans full width */
#amDubChips .dub-chip:first-child {
    grid-column: 1 / -1;
}
#amDubChips .dub-chip {
    width: 100%;
    text-align: center;
    padding: 7px 8px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Player controls: 2-row layout on mobile ───────────────────────────── */
@media (max-width: 768px) {
    /* Dub selector: same size as other control buttons, flexes naturally */
    #dubSelectorContainer .control-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
        font-size: 0.9rem;
    }
    #dubSelectorContainer {
        flex: 1 1 auto;
        min-width: 40px;
    }

    /* Row layout: icon buttons share first row, quality+nav share second row */
    .controls-right {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 5px;
        width: 100%;
    }

    /* Icon buttons (dub, CC, speed, zoom) — first natural row */
    #dubSelectorContainer,
    .subtitle-selector-container,
    .speed-selector-container,
    .zoom-btn {
        order: 1;
        flex: 1 1 auto;
        min-width: 40px;
    }

    /* Quality selector + rotate + fullscreen share second row */
    .quality-selector {
        order: 2;
        flex: 1 1 auto;
        min-width: 80px;
    }
    .rotate-btn, #fullscreenBtn {
        order: 2;
        flex: 1 1 auto;
        min-width: 40px;
    }

    /* Dropdowns open upward */
    #dubDropdown {
        bottom: 48px;
    }
}

@media (max-width: 480px) {
    #amDubChips .dub-chip {
        font-size: 11px !important;
        padding: 6px 4px !important;
    }
}

/* ─── Inline dub panel inside player controls ────────────────────────────── */
#dubPanel {
    width: 100%;
}
#dubPanel #dubOptionsList div {
    padding: 9px 10px;
    border-radius: 8px;
    border: 1.5px solid #374151;
    cursor: pointer;
    font-size: 13px;
    color: #d1d5db;
    background: rgba(255,255,255,.04);
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all .18s;
    text-align: left;
}
#dubPanel #dubOptionsList div:hover {
    background: rgba(255,255,255,.1);
    border-color: #6b7280;
    color: #fff;
}
#dubPanel #dubOptionsList div.dub-active {
    border-color: #e50914;
    background: rgba(229,9,20,.12);
    color: #e50914;
    font-weight: 600;
}
#dubPanel #dubOptionsList .dub-check {
    font-size: 10px;
    visibility: hidden;
}
#dubPanel #dubOptionsList div.dub-active .dub-check {
    visibility: visible;
}
/* dubBtn glow when panel is open */
#dubBtn.active {
    background: rgba(229,9,20,.2) !important;
    border: 1.5px solid #e50914;
    color: #e50914;
}

/* ============================================================
   SLIDE-IN DRAWER MENU — Mobile navigation
   ============================================================ */
.drawer-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.72);z-index:9998;opacity:0;pointer-events:none;transition:opacity .3s ease;backdrop-filter:blur(2px)}
.drawer-overlay.open{opacity:1;pointer-events:all}

.side-drawer{position:fixed;top:0;left:0;bottom:0;width:285px;max-width:85vw;background:#0D0D17;z-index:9999;transform:translateX(-100%);transition:transform .32s cubic-bezier(.4,0,.2,1);overflow-y:auto;display:flex;flex-direction:column;box-shadow:4px 0 30px rgba(0,0,0,.6);border-right:1px solid rgba(255,255,255,.06)}
.side-drawer.open{transform:translateX(0)}

/* Drawer header */
.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:18px 16px 14px;border-bottom:1px solid rgba(255,255,255,.07);flex-shrink:0}
.drawer-logo-wrap{display:flex;align-items:center;gap:10px}
.drawer-logo-seal{width:36px;height:36px;background:linear-gradient(135deg,#e50914,#a0001a);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:900;color:#fff;letter-spacing:-.5px}
.drawer-logo-text{font-size:15px;font-weight:800;color:#fff;letter-spacing:.5px}
.drawer-logo-sub{font-size:9px;color:#888;font-weight:500;letter-spacing:1px;text-transform:uppercase}
.drawer-close-btn{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.08);border:none;color:#aaa;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,color .2s;flex-shrink:0}
.drawer-close-btn:hover{background:rgba(229,9,20,.2);color:#e50914}

/* Nav list */
.drawer-nav{list-style:none;padding:10px 0;margin:0;flex:1}
.drawer-nav-item{margin:2px 10px}
.drawer-nav-item a{display:flex;align-items:center;gap:14px;padding:13px 14px;border-radius:10px;color:#c0c0c0;text-decoration:none;font-size:14.5px;font-weight:500;transition:background .18s,color .18s;cursor:pointer}
.drawer-nav-item a i{width:20px;text-align:center;font-size:15px;flex-shrink:0;color:#888;transition:color .18s}
.drawer-nav-item a:hover{background:rgba(255,255,255,.07);color:#fff}
.drawer-nav-item a:hover i{color:#e50914}
.drawer-nav-item.active a{background:rgba(229,9,20,.15);color:#fff;font-weight:700}
.drawer-nav-item.active a i{color:#e50914}
.drawer-divider{height:1px;background:rgba(255,255,255,.06);margin:8px 14px}

/* Social row at bottom */
.drawer-footer{padding:14px 16px 24px;border-top:1px solid rgba(255,255,255,.07);flex-shrink:0}
.drawer-footer-label{font-size:10px;color:#555;font-weight:600;text-transform:uppercase;letter-spacing:1px;margin-bottom:10px}
.drawer-socials{display:flex;gap:8px;flex-wrap:wrap}
.drawer-social-btn{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);color:#aaa;display:flex;align-items:center;justify-content:center;font-size:14px;text-decoration:none;transition:background .18s,color .18s,border-color .18s}
.drawer-social-btn:hover{background:rgba(229,9,20,.2);color:#e50914;border-color:rgba(229,9,20,.4)}

/* Only show drawer toggle on mobile */
@media(min-width:769px){.drawer-overlay,.side-drawer{display:none!important}}

/* ── Navbar logo (matches drawer style) ── */
.nav-logo-seal{width:34px;height:34px;background:linear-gradient(135deg,#e50914,#a0001a);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:900;color:#fff;letter-spacing:-.5px;flex-shrink:0}
.nav-logo-text{font-size:16px;font-weight:800;color:#fff !important;letter-spacing:.8px;white-space:nowrap;font-family:'Arial Black','Arial Bold',sans-serif}
.logo{display:flex;align-items:center;gap:9px;text-decoration:none;transition:opacity .2s}
.logo:hover{opacity:.82}

/* ── Desktop card hover enhancements ───────────────────── */
@media (hover: hover) and (min-width: 768px) {
    .movie-card {
        position: relative;
        transition: transform .25s ease, box-shadow .25s ease;
    }
    .movie-card:hover {
        transform: translateY(-6px) scale(1.03);
        box-shadow: 0 16px 40px rgba(0,0,0,.65), 0 0 0 1px rgba(229,9,20,.3);
        z-index: 3;
    }
    /* Boost the existing trailer-overlay on hover */
    .movie-card:hover .trailer-overlay {
        background: rgba(0,0,0,0.55);
    }
    .movie-card:hover .trailer-play-btn {
        transform: scale(1.12);
    }
    .trailer-play-btn { transition: transform .2s ease; }
}

/* ── Desktop homepage grid (more columns on wide screens) ── */
@media (min-width: 900px) {
    .movies-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
@media (min-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}
@media (min-width: 1500px) {
    .movies-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}
