🛒 Diet-Based Grocery List GeneratorThis is a single-page web application that helps users generate a tailored grocery shopping list based on a selected diet plan (Keto, Vegan, Mediterranean, etc.), duration, and number of servings. The application is built using a minimal stack (HTML, Tailwind CSS, and pure JavaScript) and incorporates the Gemini API to optionally generate a comprehensive meal plan based on the calculated shopping list.✨ FeaturesDiet Selection: Choose from predefined popular diets (Keto, Vegan, Mediterranean, High-Protein, Standard).Scaled Quantities: Automatically scales the grocery item quantities based on the specified duration (days) and number of people.Categorized List: Organizes the generated list into standard grocery sections (Produce, Protein/Meat, Dairy/Eggs, etc.) for efficient shopping.Interactive Checklist: Allows users to check off items as they shop.AI-Powered Meal Planning: Uses the Gemini API to generate a structured, day-by-day meal plan that utilizes the generated grocery list items.Single-File Deployment: The entire application is contained within a single index.html file, making it easy to host or embed.🛠️ Technology StackFrontend: HTML5, CSS (via Tailwind CSS CDN)Logic: Pure JavaScript (ES6 Modules)External APIs:Gemini API: Used for complex text generation (meal planning) and returning structured JSON data.Firebase/Firestore: Used for initial authentication setup (as required by the hosting environment).🚀 Getting StartedSince the application utilizes a specific environment for running the Gemini API and Firebase, the easiest way to run this code is within a compatible environment.Local Setup (Conceptual)To run this locally or host it yourself, you would need to:Save the provided HTML code as index.html.Ensure your environment can handle the fetch calls to the Gemini API endpoint. This typically requires a backend proxy to securely manage the API key or running it within a secure, authenticated context.The application expects global environment variables (__app_id, __firebase_config, __initial_auth_token) for the Firebase setup.How to UseSelect Plan: Choose your desired Diet Plan, Duration (in days), and Servings (number of people) in the Plan Setup panel.Generate List: Click "Generate Shopping List". The list will appear, grouped by category, on the right.Generate Meal Plan (Optional): Click the "✨ Generate Meal Plan" button to call the AI and receive a suggested meal schedule based on your generated list.Shop: Click on list items to check them off as you go.Copy: Use the "Copy List to Clipboard" button to grab the unchecked items for easy sharing or use on a mobile device.