.style.display = 'none';
            }
        });
    });

    confirmDeleteBtn.addEventListener('click', async () => {
        if (!deleteProjectName) return;
        const response = await fetch(`/delete_project/${deleteProjectName}`, { method: 'POST' });
        const result = await response.json();
        if (result.success) {
            location.reload();
        } else {
            alert(result.error);
        }
    });

    cancelDeleteBtns.forEach(btn => {
        btn.addEventListener('click', (