<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Mindful Garden</title>
    <meta name="description" content="A relaxing productivity app to grow a virtual garden by completing tasks.">

    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap" rel="stylesheet">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">

    <!-- html2canvas for sharing -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js" integrity="sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoVXM5RqaClp1MAJJStqyJubBCFpwg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body data-theme="minimal">

    <div class="app-container">
        <!-- Task Manager Panel -->
        <div class="panel task-panel">
            <header>
                <h1>Mindful Garden</h1>
                <h2>Tasks</h2>
            </header>
            <form id="task-form">
                <input type="text" id="task-input" placeholder="Add a new task..." required>
                <button type="submit">Add Task</button>
            </form>
            <ul id="task-list"></ul>
        </div>

        <!-- Garden Panel -->
        <div class="panel garden-panel">
            <header>
                <h2>Your Garden</h2>
                <div class="theme-switcher">
                    <button class="theme-btn" data-theme="zen">Japanese Zen</button>
                    <button class="theme-btn" data-theme="fantasy">Fantasy Forest</button>
                    <button class="theme-btn active" data-theme="minimal">Modern Minimal</button>
                </div>
            </header>
            <div id="garden">
                <div class="sky">
                    <div class="cloud cloud-1"></div>
                    <div class="cloud cloud-2"></div>
                </div>
                <div class="hills">
                    <div class="hill hill-1"></div>
                    <div class="hill hill-2"></div>
                </div>
                <div class="ground"></div>

                <!-- FANTASY SCENE -->
                <div class="fantasy-scene">
                    <div class="fantasy-moon"></div>
                    <div class="stars-container">
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                        <div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div><div class="star"></div>
                    </div>
                    <div class="fantasy-trees">
                        <div class="tree tree-1"></div>
                        <div class="tree tree-2"></div>
                        <div class="tree tree-3"></div>
                        <div class="tree tree-4"></div>
                        <div class="tree tree-5"></div>
                        <div class="tree tree-6"></div>
                    </div>
                    
                </div>

                <!-- Garden elements will be loaded here -->
            </div>
            <div class="garden-controls">
                <audio id="ambient-sound" loop src="https://www.soundjay.com/nature/rain-01.mp3"></audio>
                <button id="sound-toggle">Play Sound</button>
                <button id="share-btn">Share Garden</button>
            </div>
        </div>
    </div>

    <!-- Custom JS -->
    <script src="assets/js/main.js?v=<?php echo time(); ?>"></script>

    <script>
        document.addEventListener('DOMContentLoaded', () => {
            const themeButtons = document.querySelectorAll('.theme-btn');
            const body = document.body;

            themeButtons.forEach(button => {
                button.addEventListener('click', () => {
                    const theme = button.getAttribute('data-theme');
                    
                    // Set theme on body
                    body.setAttribute('data-theme', theme);

                    // Update active button
                    themeButtons.forEach(btn => btn.classList.remove('active'));
                    button.classList.add('active');
                });
            });
        });
    </script>
</body>
</html>