// Resultado — celebration screen after a game
const Resultado = ({ result, profile, onAgain, onHome, onShare, onDiploma }) => {
const t = window.MP_I18N.t;
const [showConfetti, setShow] = React.useState(true);
React.useEffect(() => {
window.MP_SOUND.celebrate();
const timer = setTimeout(() => setShow(false), 2400);
return () => clearTimeout(timer);
}, []);
const { score, correct, total, mode, perfect, isBest, newBadges, newMascots } = result;
const headline =
perfect ? t('perfect') :
score > 100 ? t('amazing') :
score > 50 ? t('great_job') :
t('well_done');
return (
<>