        const message = input.value.trim();

        if (message) {
          // Add user message
          const userMsg = document.createElement('div');
          userMsg.className = 'chat-message';

          const userLabel = document.createElement('strong');
          userLabel.textContent = 'You:';
          userMsg.appendChild(userLabel);

          const userContent = document.createElement('div');
          userContent.className = 'message-content';
          userContent.textContent = message;
    