led to copy link');
            });
        }

        function switchLayout(layout) {
            const cardsLayout = document.querySelector('.links-grid');
            const compactLayout = document.querySelector('.links-list');
            const toggleBtns = document.querySelectorAll('.toggle-btn');
            
            toggleBtns.forEach(btn => btn.classList.remove('active'));
            
            if (layout === 'cards') {
                cardsLayout.classList.add('active');
                comp