// Remove after animation setTimeout(() => { if (document.body.contains(timeTransition)) { document.body.removeChild(timeTransition); } }, 3000); // Additional time particles const timeEmojis = gameState.isNightTime ? ['πŸŒ…', 'β˜€οΈ', 'πŸŒ„'] : ['πŸŒ™', '🌟', '✨']; for (let i = 0; i < 15; i++) { setTimeout(() => { const particle = document.createElement('div'); particle.className = 'particle'; particle.textContent = timeEmojis[Math.floor(Math.random() * timeEmojis.length)]; particle.style.left = Math.random() * window.innerWidth + 'px'; particle.style.top = Math.random() * window.innerHeight + 'px'; particle.style.color = gameState.isNightTime ? '#FFE66D' : '#800080'; document.body.appendChild(particle); setTimeout(() => { if (document.body.contains(particle)) { document.body.removeChild(particle); } }, 3500); }, i * 100); } } function createCelebrationParticles() { const celebrations = ['πŸŽ‰', '🎊', 'πŸ•΅οΈ', 'πŸ’€', 'πŸŒ™', 'πŸŒ…', 'πŸ†', 'πŸ‘‘', '🎭', 'πŸ’Ž']; for (let i = 0; i < 40; i++) { setTimeout(() => { const particle = document.createElement('div'); particle.className = 'particle'; particle.textContent = celebrations[Math.floor(Math.random() * celebrations.length)]; particle.style.left = Math.random() * window.innerWidth + 'px'; particle.style.top = Math.random() * window.innerHeight + 'px'; document.body.appendChild(particle); setTimeout(() => { if (document.body.contains(particle)) { document.body.removeChild(particle); } }, 3500); }, i * 80); } } function showComboEffect() { const comboDisplay = document.getElementById('comboDisplay'); const messages = [ `${gameState.combo} COMBO! MAFIA!`, `${gameState.combo} COMBO! MYSTERY!`, `${gameState.combo} COMBO! λˆ„κ΅¬μΌκΉŒ?`, `${gameState.combo} COMBO! DETECTIVE!` ]; comboDisplay.textContent = messages[Math.floor(Math.random() * messages.length)]; comboDisplay.classList.add('show'); setTimeout(() => { comboDisplay.classList.remove('show'); }, 1800); } function showAchievement(text) { const toast = document.getElementById('achievementToast'); const textElement = document.getElementById('achievementText'); textElement.textContent = text; toast.classList.add('show'); setTimeout(() => { toast.classList.remove('show'); }, 4500); } // Initialize on load document.addEventListener('DOMContentLoaded', initGame); // Console Easter Egg console.log('%cπŸ•΅οΈ MAFIA In the morning Typing Master πŸ’€', 'font-size: 24px; font-weight: bold; color: #800080;'); console.log('%cλˆ„κ΅¬μΌκΉŒ Mafia? Guess who loves you! 🎭', 'font-size: 14px; color: #DAA520;');