cument.addEventListener('DOMContentLoaded', function() {
            // Image loading handler
            document.querySelectorAll('.avatar-container img').forEach(img => {
                // Check if image is already cached
                if (img.complete) {
                    if (img.naturalHeight === 0) {
                        // Image failed to load
                        img.style.display = 'none';
                        img.nextElementSibling.style.display = 'flex';
                    } else {