document.addEventListener('DOMContentLoaded', () => {
    // Theme toggling
    const themeToggle = document.querySelector('.theme-toggle');
    themeToggle.addEventListener('click', () => {
        document.body.dataset.theme = 
            document.body.dataset.theme === 'dark' ? 'light' : 'dark';
    });

    // Feature card interactions
    const featureCards = document.querySelectorAll('.feature-card');
    featureCards.forEach(card => {
        card.addEventListener('click', () => {
            const feature = card.dataset.feature;
            const progressBar = card.querySelector('.progress-bar');
            
            // Animate progress bar
            progressBar.style.width = '100%';
            
            // Simulate loading
            setTimeout(() => {
                // Here you would typically navigate to the feature page
                window.location.href = `/${feature}`;
                progressBar.style.width = '0%';
            }, 1000);
        });
    });
});
