class ActivityLog extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); this.maxLogs = 8; } connectedCallback() { this.render(); this.attachEvents(); // Add initial log this.addLog("System initialized. Welcome, Architect.", true); } attachEvents() { document.addEventListener('add-log-entry', (e) => { this.addLog(e.detail.message); }); } addLog(msg, isSystem = false) { const list = this.shadowRoot.getElementById('log-list'); const item = document.createElement('div'); const time = new Date().toISOString().split('T')[1].split('.')[0]; item.innerHTML = `