diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 55ad200..49d7153 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -136,20 +136,9 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { const scroll = (direction: 'left' | 'right') => { if (scrollRef.current) { - // 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; - } + // Viewport-based scroll amount for full-width cards + const containerWidth = scrollRef.current.clientWidth; + const scrollAmount = containerWidth * 0.8; // Scroll 80% of visible area const currentScroll = scrollRef.current.scrollLeft; const targetScroll = direction === 'left' @@ -188,14 +177,14 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { - {/* Scrollable video row */} + {/* Scrollable video row - full width edge to edge */}
{category.videos.map((video, index) => ( -
+
{/* Top 10 Number overlay for first category */} {category.title.includes("Top 10") && index < 10 && (