lay = "none";
            }
        }

        // Update the window click handler to handle multiple modals
        window.onclick = function(event) {
            const teamModal = document.getElementById('teamModal');
            const addMemberModal = document.getElementById('addMemberModal');
            const kudosModal = document.getElementById('kudosModal');

            if (event.target === teamModal) {
                teamModal.style.display = "none";
            }
            if (event.target === a