/* WeatherMate — dynamic animated background */ function WeatherBackground({ condition, isDay, animate, theme, intensity = 1 }) { const [g1, g2, g3] = theme.bg; // stable random particles const rain = React.useMemo(() => Array.from({ length: 70 }).map(() => ({ left: Math.random() * 100, delay: Math.random() * 1.2, dur: 0.5 + Math.random() * 0.5, len: 14 + Math.random() * 22, op: 0.25 + Math.random() * 0.45, })), []); const snow = React.useMemo(() => Array.from({ length: 60 }).map(() => ({ left: Math.random() * 100, delay: Math.random() * 6, dur: 5 + Math.random() * 6, size: 3 + Math.random() * 5, drift: (Math.random() * 2 - 1) * 40, op: 0.4 + Math.random() * 0.5, })), []); const stars = React.useMemo(() => Array.from({ length: 50 }).map(() => ({ left: Math.random() * 100, top: Math.random() * 55, size: Math.random() < 0.8 ? 1.5 : 2.5, delay: Math.random() * 3, op: 0.4 + Math.random() * 0.6, })), []); const isWet = condition === "rain" || condition === "drizzle" || condition === "thunder"; const showClouds = ["partly", "cloudy", "rain", "drizzle", "thunder", "snow"].includes(condition); const showStars = !isDay && (condition === "clear" || condition === "partly"); return (