"use client"; import { CSSProperties, useEffect, useMemo, useState } from "react"; import { useDashboardSelection } from "@/hooks/useDashboardStore"; import { usePrefersReducedMotion } from "@/hooks/usePrefersReducedMotion"; import { getWeatherAuraProfile } from "@/lib/weather-aura"; /* ────────────────────────────────────────────────────────────── Pure-CSS weather-aura particle layer Replaces the former Three.js WebGL implementation with CSS @keyframes animations — no canvas, no WebGL. ────────────────────────────────────────────────────────────── */ function hexToRgba(hex: string, alpha: number) { const sanitized = hex.replace("#", ""); const normalized = sanitized.length === 3 ? sanitized .split("") .map((char) => `${char}${char}`) .join("") : sanitized.padEnd(6, "0"); const numeric = Number.parseInt(normalized, 16); const r = (numeric >> 16) & 255; const g = (numeric >> 8) & 255; const b = numeric & 255; return `rgba(${r}, ${g}, ${b}, ${alpha})`; } /* ── Injection-safe style IDs ── */ const AURA_STYLE_ID = "poly-aura-keyframes"; /* ── CSS @keyframes (injected once via