index + 1) * 200);
            });
        }

        function clearMessages() {
            document.getElementById('messages').innerHTML = '';
            messagesSent = 0;
            messagesReceived = 0;
            updateStats();
        }

        // Auto-connect on page load
        window.onload = function () {
            addMessage('system', 'ðŸ”Œ Osprey WebSocket Test Lab loaded');
            addMessage('system', 'Click "Connect to WebSocket" to start testing');
        };

        // Hand