ntListener('DOMContentLoaded', async function() {
            // Get PIN length from server
            const pinContainer = document.querySelector('.pin-input-container');
            const pinForm = document.getElementById('pinForm');
            const errorDisplay = document.querySelector('.pin-error');
            let pinLength = 4; // Default

            const submitPin = async () => {
                // Collect PIN from inputs
                const inputs = Array.from(pinContainer.querySelectorAll('i