1].focus();
                    } else if (index === pinDigits.length - 1) {
                        // If this is the last digit and it's filled
                        const pin = Array.from(pinDigits).map(digit => digit.value).join('');
                        if (pin.length === pinLength) {
                            // Add a small delay to show the last digit being filled
                            setTimeout(() => {
                                verifyPin(pin);
                            }, 150);