sswordInput.addEventListener('input', validateForm);
            confirmPasswordInput.addEventListener('input', validateForm);

            function validateForm() {
                let isValid = true;

                // Validate Username
                if (usernameInput.value.length < 5) {
                    document.getElementById('usernameError').innerText = 'Username must be at least 5 characters long.';
                    isValid = false;
                } else if (usernameInput.value.length > 50) 