document.addEventListener('DOMContentLoaded', function() {
                                const chatArea = document.getElementById('nexdirectory-chat-scroll-area');
                                if (chatArea) { chatArea.scrollTop = chatArea.scrollHeight; }
                            });
