// Main JavaScript for BavulumKatar'da document.addEventListener('DOMContentLoaded', function() { // Initialize animations const animateElements = document.querySelectorAll('.animate-fade-in'); animateElements.forEach((element, index) => { element.style.animationDelay = `${index * 0.1}s`; }); // Form validation for signup const signupForm = document.getElementById('signup-form'); if (signupForm) { signupForm.addEventListener('submit', function(e) { e.preventDefault(); const password = document.getElementById('password').value; const confirmPassword = document.getElementById('confirmPassword').value; if (password !== confirmPassword) { alert('Passwords do not match!'); return; } if (password.length < 8) { alert('Password must be at least 8 characters long!'); return; } // Form is valid, proceed with submission alert('Account created successfully! Redirecting...'); window.location.href = 'dashboard.html'; // This would be replaced with actual form submission }); } // Form validation for login const loginForm = document.getElementById('login-form'); if (loginForm) { loginForm.addEventListener('submit', function(e) { e.preventDefault(); const email = document.getElementById('email').value; const password = document.getElementById('password').value; if (!email || !password) { alert('Please fill in all fields!'); return; } // Form is valid, proceed with submission alert('Login successful! Redirecting...'); window.location.href = 'dashboard.html'; // This would be replaced with actual form submission }); } });