let timeLeft = 20000; // Total seconds
const display = document.getElementById('timer-display');
const countdown = setInterval(() => {
if (timeLeft <= 0) {
clearInterval(countdown);
display.innerHTML = "We're Live!";
return;
}
timeLeft--;
// Calculate hours, minutes, seconds
const h = Math.floor(timeLeft / 3600);
const m = Math.floor((timeLeft % 3600) / 60);
const s = timeLeft % 60;
// Format with leading zeros
display.innerHTML =
`${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`;
}, 1000);