"use client" import { useEffect, useRef } from "react" import { motion } from "framer-motion" export default function FlameAnimation() { const flameRef = useRef(null) useEffect(() => { const flame = flameRef.current if (!flame) return const createFlameParticle = () => { const particle = document.createElement("div") particle.className = "flame-particle" particle.style.cssText = ` position: absolute; width: ${Math.random() * 6 + 2}px; height: ${Math.random() * 6 + 2}px; background: radial-gradient(circle, #ff6b35, #f7931e); border-radius: 50%; bottom: 0; left: ${Math.random() * 100}%; animation: flameRise ${Math.random() * 2 + 1}s ease-out forwards; pointer-events: none; ` flame.appendChild(particle) setTimeout(() => { if (particle.parentNode) { particle.parentNode.removeChild(particle) } }, 3000) } const interval = setInterval(createFlameParticle, 100) return () => clearInterval(interval) }, []) return (
{/* Core flame */}
) }