 = function(event) {
                const data = JSON.parse(event.data);
                const logEntry = document.createElement('div');
                logEntry.className = 'log-entry';
                logEntry.innerHTML = `
                    <div class="log-message">${data.message}</div>
                    <div class="log-time">${data.time}</div>
                `;
                logsContainer.insertBefore(logEntry, logsContainer.firstChild);
            };

            ws.onerror = function(error) {