console.log('HydroFlux Initialized');

// Simple Navigation Logic
document.querySelectorAll('.nav-btn').forEach(btn => {
    btn.addEventListener('click', (e) => {
        // Toggle Active State
        document.querySelectorAll('.nav-btn').forEach(b => b.classList.remove('active'));
        e.currentTarget.classList.add('active');

        const view = e.currentTarget.dataset.view;

        // Hide all sections
        document.querySelectorAll('section').forEach(el => el.style.display = 'none');

        // Show target section
        const target = document.getElementById(`${view}-section`);
        if (target) target.style.display = 'block';
    });
});

// Initialize Modules
import { WaterTracker } from './modules/water.js?v=2';
import { StreakTracker } from './modules/streak.js?v=2';
import { FitnessDashboard } from './modules/fitness.js?v=2';

const waterTracker = new WaterTracker('water-section');
const streakTracker = new StreakTracker('streak-section');
const fitnessDashboard = new FitnessDashboard('fitness-section');
