1000);
    updateTime(); // Initial display

    // Fullscreen toggle on click
    document.body.addEventListener('click', () => {
      if (!document.fullscreenElement) {
        document.documentElement.requestFullscreen();
      } else {
        document.exitFullscreen();
      }
    });

    // Adjust font size on resize
    window.addEventListener('resize', () => {
      document.getElementById('clock').style.fontSize = `${Math.min(window.innerWidth, window.innerHeight) * 0.2}px`;
    });
  </script>

