ement('div');
            messageEl.className = `message ${type}`;

            const timestamp = new Date().toLocaleTimeString();
            let messageContent = `<div class="timestamp">${timestamp}</div>`;

            if (isJson) {
                try {
                    const formatted = JSON.stringify(JSON.parse(content), null, 2);
                    messageContent += `<div class="json-display">${formatted}</div>`;
                } catch (e) {
                    messageContent += `<div>${content}