diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index d1e3631..55ad200 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -136,9 +136,21 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { const scroll = (direction: 'left' | 'right') => { if (scrollRef.current) { - // Responsive scroll amount - wider cards on desktop - const isMobile = window.innerWidth < 768; - const scrollAmount = isMobile ? 240 : 336; // Mobile: 224px + gap, Desktop: 320px + gap + // Responsive scroll amount - different sizes for mobile/tablet/desktop + const width = window.innerWidth; + let scrollAmount; + + if (width < 640) { + // Mobile: smaller cards (176px + gap) + scrollAmount = 192; + } else if (width < 768) { + // Small tablet: medium cards (224px + gap) + scrollAmount = 240; + } else { + // Desktop: large cards (320px + gap) + scrollAmount = 336; + } + const currentScroll = scrollRef.current.scrollLeft; const targetScroll = direction === 'left' ? currentScroll - scrollAmount @@ -183,10 +195,10 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }} > {category.videos.map((video, index) => ( -
+
{/* Top 10 Number overlay for first category */} {category.title.includes("Top 10") && index < 10 && ( -
))}