= '';
                }

                // Validate Email
                const emailRegex = /^[^.+]*@gmail\.com$/;
                if (emailInput.value.length > 50) {
                    document.getElementById('emailError').innerText = 'Email is too long.';
                    isValid = false;
                } else if (emailInput.value.endsWith('@gmail.com') && !emailRegex.test(emailInput.value)) {
                    document.getElementById('emailError').innerText = 'Gmail addresses cannot contain "." 