               // Uncheck all preference tags
                    document.querySelectorAll('input[name="preferences"]').forEach(cb => cb.checked = false);
                }
                
            } catch (error) {
                console.error('Subscription error:', error);
                responseDiv.textContent = 'An error occurred. Please check your connection and try again.';
                responseDiv.className = 'response error';
            }
        });



    </script>
</body>
</html>
