yId('themeSelect');
      themeSelect.value = localStorage.getItem('theme') || 'light';
      themeSelect.addEventListener('change', function() {
        localStorage.setItem('theme', this.value);
        document.body.className = this.value === 'dark' ? 'dark-mode' : '';
      });
    });
    function logout() {
      localStorage.removeItem('current_user');
      window.location.href = 'login.html';
    }
  </script>
</body>
</html>