// Main script for interactive elements document.addEventListener('DOMContentLoaded', function() { // Simulate alarm status for demo purposes const alarmDemoBtn = document.createElement('button'); alarmDemoBtn.className = 'fixed bottom-4 right-4 bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-full shadow-lg flex items-center'; alarmDemoBtn.innerHTML = ' Demo Alarm'; alarmDemoBtn.addEventListener('click', function() { const alarmBox = document.createElement('div'); alarmBox.className = 'fixed inset-0 bg-red-500 bg-opacity-90 flex items-center justify-center z-50 alarm-active'; alarmBox.innerHTML = `

FIRE ALARM

This is a simulation of the fire alarm activation. The system would now be sounding the alarm bell.

`; document.body.appendChild(alarmBox); feather.replace(); // Add event listeners to demo buttons alarmBox.querySelector('button:first-child').addEventListener('click', () => { alarmBox.querySelector('h2').textContent = 'ALARM SILENCED'; alarmBox.classList.remove('alarm-active'); }); alarmBox.querySelector('button:last-child').addEventListener('click', () => { document.body.removeChild(alarmBox); }); }); document.body.appendChild(alarmDemoBtn); feather.replace(); });