"use client"; import { useBackgroundImage } from "@/hooks/usePreferences"; import Link from "next/link"; import { useState, useEffect } from "react"; interface Particle { width: number; height: number; left: number; top: number; duration: number; delay: number; shadow: number; fadeIn: number; fadeOut: number; visibleDuration: number; moveY1: number; moveX1: number; moveY2: number; moveX2: number; moveY3: number; moveX3: number; moveY4: number; moveX4: number; moveY5: number; moveX5: number; moveY6: number; moveX6: number; } interface Orb { width: number; height: number; left: number; top: number; duration: number; delay: number; } export default function HeroSection() { const backgroundImage = useBackgroundImage("home", "/got-2.jpg"); const [particles, setParticles] = useState([]); const [orbs, setOrbs] = useState([]); const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); // Generate particles - more visible and dynamic setParticles( Array.from({ length: 30 }, () => { const fadeIn = Math.random() * 5 + 2; // 2-7% of animation - faster fade in const visibleDuration = Math.random() * 30 + 20; // 20-50% of animation const fadeOut = Math.random() * 5 + 2; // 2-7% of animation - faster fade out return { width: Math.random() * 6 + 3, height: Math.random() * 6 + 3, left: Math.random() * 100, top: Math.random() * 100, duration: 10 + Math.random() * 15, delay: Math.random() * 8, shadow: Math.random() * 15 + 8, fadeIn: fadeIn, fadeOut: fadeOut, visibleDuration: visibleDuration, moveY1: 20 + Math.random() * 20, moveX1: Math.random() * 10 - 5, moveY2: 40 + Math.random() * 20, moveX2: Math.random() * 15 - 7, moveY3: 60 + Math.random() * 20, moveX3: Math.random() * 10 - 5, moveY4: 80 + Math.random() * 20, moveX4: Math.random() * 10 - 5, moveY5: 100 + Math.random() * 20, moveX5: Math.random() * 10 - 5, moveY6: 120 + Math.random() * 20, moveX6: Math.random() * 10 - 5, }; }) ); // Generate orbs setOrbs( Array.from({ length: 4 }, () => ({ width: 100 + Math.random() * 200, height: 100 + Math.random() * 200, left: Math.random() * 80, top: Math.random() * 80, duration: 20 + Math.random() * 15, delay: Math.random() * 10, })) ); }, []); return (
{/* Background Image */}
{/* Dark overlay for readability */}
{/* Animated particles */} {mounted && (
{particles.map((particle, i) => (
))}
)} {/* Animated light rays */}
{[...Array(3)].map((_, i) => { const rotation = -15 + i * 15; return (
); })}
{/* Glowing orbs */} {mounted && (
{orbs.map((orb, i) => (
))}
)} {/* Shimmer effect */}
{/* Hero Content */}
{/* Game Title */}

GAME.OF.TECH

{/* Subtitle */}
Peaksys
{/* Description */}

Dans un monde numérique de technologie de pointe, où les systèmes d'IA évoluent et où d'anciens codes attendent d'être découverts. Partez pour un voyage épique pour forger des alliances, conquérir des défis et raconter votre histoire d'innovation au sein d'une communauté de gaming tech florissante.

{/* Call-to-Action Buttons */}
); }