diff --git a/frontend/src/components/WinnerCelebration.jsx b/frontend/src/components/WinnerCelebration.jsx index d69aecd..ec2244c 100644 --- a/frontend/src/components/WinnerCelebration.jsx +++ b/frontend/src/components/WinnerCelebration.jsx @@ -18,31 +18,40 @@ export default function WinnerCelebration({ open, winnerName, onClose }) { if (!reduceMotion) { const end = Date.now() + 4500; + // WICHTIG: über dem Overlay rendern + const TOP_Z = 2147483647; + + // hellere Farben damit’s auch auf dark overlay knallt + const bright = ["#ffffff", "#ffd166", "#06d6a0", "#4cc9f0", "#f72585"]; + // 2 große Bursts confetti({ - particleCount: 150, + particleCount: 170, spread: 95, - startVelocity: 38, + startVelocity: 42, origin: { x: 0.12, y: 0.62 }, - zIndex: 999999, + zIndex: TOP_Z, + colors: bright, }); confetti({ - particleCount: 150, + particleCount: 170, spread: 95, - startVelocity: 38, + startVelocity: 42, origin: { x: 0.88, y: 0.62 }, - zIndex: 999999, + zIndex: TOP_Z, + colors: bright, }); // “Rain” über die Zeit (function frame() { confetti({ - particleCount: 6, - spread: 70, - startVelocity: 32, + particleCount: 8, + spread: 75, + startVelocity: 34, origin: { x: Math.random(), y: Math.random() * 0.18 }, - scalar: 1.0, - zIndex: 999999, + scalar: 1.05, + zIndex: TOP_Z, + colors: bright, }); if (Date.now() < end) requestAnimationFrame(frame); })(); @@ -73,24 +82,27 @@ export default function WinnerCelebration({ open, winnerName, onClose }) { position: "fixed", inset: 0, zIndex: 2147483646, - display: "grid", - placeItems: "center", - background: "rgba(0,0,0,0.58)", + display: "flex", + alignItems: "center", + justifyContent: "center", + // weniger dunkel -> Confetti wirkt heller + background: "rgba(0,0,0,0.42)", backdropFilter: "blur(10px)", WebkitBackdropFilter: "blur(10px)", - padding: 12, + padding: 14, }} onMouseDown={onClose} >