document.addEventListener('DOMContentLoaded', function() { // Password visibility toggle const togglePassword = document.querySelector('#togglePassword'); const password = document.querySelector('#password'); togglePassword.addEventListener('click', function() { const icon = this.querySelector('i'); const type = password.getAttribute('type') === 'password' ? 'text' : 'password'; password.setAttribute('type', type); // Toggle eye icon if (type === 'password') { icon.setAttribute('data-feather', 'eye'); } else { icon.setAttribute('data-feather', 'eye-off'); } feather.replace(); }); // Form submission const form = document.querySelector('form'); form.addEventListener('submit', function(e) { e.preventDefault(); // Simple validation const email = document.getElementById('email').value; const password = document.getElementById('password').value; if (!email || !password) { alert('Please fill in all fields'); return; } // Here you would typically make an API call console.log('Login attempt with:', { email, password }); // Simulate successful login with branded message setTimeout(() => { alert('✨ Welcome to AJ Studioz! ✨\nAccess granted to creative wonderland!'); // window.location.href = '/dashboard'; // Uncomment for real redirect }, 1000); }); });