Improve video card hover effects for a better viewing experience

Update CSS and component logic to enhance the visual feedback when hovering over video cards, ensuring they layer correctly and scale smoothly.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/kdQ95gE
This commit is contained in:
sebastjanartic
2025-08-29 18:14:22 +00:00
parent df5be7285c
commit b08924650b
4 changed files with 23 additions and 11 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse
}, [category.videos.length]);
return (
<div className="relative group mb-8" style={{ overflow: 'visible' }}>
<div className="relative group mb-8 carousel-track" style={{ overflow: 'visible' }}>
<h2 className="text-2xl font-bold text-bunny-light mb-6 px-4">
{category.title}
</h2>
+4 -3
View File
@@ -163,13 +163,14 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
return (
<div
data-testid={`card-video-${video.id}`}
className={`video-card transition-all duration-500 ease-out hover:scale-[1.35] p-1 md:p-2 ${className}`}
className={`video-card transition-all duration-500 ease-out p-1 md:p-2 ${className}`}
style={{
transformStyle: 'preserve-3d',
transition: 'transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), z-index 0.1s ease',
willChange: 'transform',
zIndex: isHovered ? 5 : 1,
position: isHovered ? 'relative' : 'static'
zIndex: isHovered ? 999999 : 1,
position: 'relative',
transform: isHovered ? 'scale(1.35) translateZ(0)' : 'scale(1) translateZ(0)'
}}
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}