import { useState } from "react"; const schedule = [ { time: "5:30 AM", label: "Wake Up Ritual", emoji: "🌅", type: "ritual", color: "#FF6B35", items: [ { name: "Copper Water", amount: "1 glass (250ml)", benefit: "Boosts metabolism, aids digestion", calories: 0 }, { name: "Warm Lemon Water", amount: "1 glass with ½ lemon", benefit: "Detox, vitamin C, kickstarts digestion", calories: 5 }, ], note: "Drink copper water first (stored overnight), then lemon water after 5 mins" }, { time: "6:00 AM", label: "Morning Boost", emoji: "🫚", type: "ritual", color: "#F7C59F", items: [ { name: "Apple Cider Vinegar", amount: "1 tbsp in 1 glass warm water", benefit: "Controls blood sugar, reduces appetite", calories: 3 }, ], note: "Always dilute ACV — never drink straight. Use a straw to protect teeth enamel." }, { time: "6:30 AM", label: "Exercise / Walk", emoji: "🏃‍♀️", type: "activity", color: "#4ECDC4", items: [ { name: "30–45 min brisk walk / yoga / home workout", amount: "", benefit: "Burns ~150–200 cal, boosts metabolism", calories: -180 }, ], note: "Fasted cardio in morning maximizes fat burn" }, { time: "7:30 AM", label: "Post-Workout Drink", emoji: "🍵", type: "ritual", color: "#96CEB4", items: [ { name: "Ginger Green Tea", amount: "1 cup (unsweetened)", benefit: "Anti-inflammatory, fat burn, digestion", calories: 2 }, ], note: "Add 1 inch grated ginger + 1 green tea bag. No sugar or milk." }, { time: "8:00 AM", label: "Breakfast", emoji: "🍳", type: "meal", color: "#FFEAA7", items: [ { name: "Boiled Eggs", amount: "2 whole eggs", benefit: "High protein, keeps you full", calories: 140 }, { name: "Vegetable Oats / Upma", amount: "½ cup dry oats (cooked)", benefit: "Fiber, slow carbs, energy", calories: 150 }, { name: "Mixed Veggies (spinach, tomato, cucumber)", amount: "1 cup", benefit: "Fiber, vitamins, low cal", calories: 30 }, ], note: "Total ~320 cal | ~20g protein. Chew slowly. No white bread or paratha." }, { time: "10:30 AM", label: "Mid-Morning", emoji: "🫖", type: "snack", color: "#DDA0DD", items: [ { name: "Hibiscus Tea", amount: "1 cup (unsweetened)", benefit: "Lowers blood pressure, rich in antioxidants", calories: 2 }, { name: "A small fruit (apple / guava / papaya)", amount: "1 medium or 1 cup", benefit: "Natural sugar, fiber, vitamins", calories: 60 }, ], note: "Total ~62 cal. Hibiscus tea is great for bloating and water retention." }, { time: "1:00 PM", label: "Lunch", emoji: "🥗", type: "meal", color: "#98D8C8", items: [ { name: "Brown Rice / Roti (multigrain)", amount: "½ cup rice OR 1 roti", benefit: "Complex carbs, energy", calories: 110 }, { name: "Dal (moong / masoor / chana)", amount: "1 cup cooked", benefit: "Plant protein, fiber", calories: 130 }, { name: "Sabzi (any vegetable curry — low oil)", amount: "1 cup", benefit: "Vitamins, minerals", calories: 80 }, { name: "Salad (cucumber, tomato, onion, lemon)", amount: "1 large bowl", benefit: "Fiber, hydration, digestive enzymes", calories: 30 }, ], note: "Total ~350 cal | ~18g protein. Eat salad first before dal & rice." }, { time: "3:00 PM", label: "Afternoon Ritual", emoji: "🍋", type: "ritual", color: "#F0E68C", items: [ { name: "Jeera / Ginger Water", amount: "1 glass warm water with ½ tsp jeera", benefit: "Reduces bloating, aids digestion", calories: 3 }, ], note: "Boil jeera in water for 5 mins, strain and sip warm. Great for afternoon energy dip." }, { time: "4:00 PM", label: "Evening Snack", emoji: "🥜", type: "snack", color: "#FFB347", items: [ { name: "Roasted Chana / Makhana", amount: "30g (small handful)", benefit: "Protein, fiber, keeps hunger away", calories: 100 }, { name: "Green Tea", amount: "1 cup (unsweetened)", benefit: "Metabolism boost, antioxidants", calories: 2 }, ], note: "Total ~102 cal. Avoid biscuits, chips, or chai with milk & sugar." }, { time: "7:00 PM", label: "Dinner", emoji: "🥦", type: "meal", color: "#90EE90", items: [ { name: "Grilled / Stir-fried Veggies", amount: "2 cups (broccoli, zucchini, bell pepper, cabbage)", benefit: "Low cal, high fiber, vitamins", calories: 80 }, { name: "Paneer / Tofu", amount: "80g (low fat paneer or tofu)", benefit: "Protein, calcium", calories: 120 }, { name: "Moong Dal Soup / Clear Vegetable Soup", amount: "1 bowl", benefit: "Light, protein-rich, filling", calories: 80 }, ], note: "Total ~280 cal | ~20g protein. Keep dinner light. No roti or rice at night." }, { time: "8:30 PM", label: "Post Dinner", emoji: "🌸", type: "ritual", color: "#FFB6C1", items: [ { name: "Hibiscus / Chamomile Tea", amount: "1 cup (unsweetened)", benefit: "Reduces bloating, aids sleep, antioxidants", calories: 2 }, ], note: "Walk for 10–15 mins after dinner before this tea." }, { time: "9:30 PM", label: "Bedtime", emoji: "🌙", type: "ritual", color: "#B0C4DE", items: [ { name: "Warm turmeric milk (plant-based) OR plain warm water", amount: "1 small cup", benefit: "Anti-inflammatory, aids deep sleep", calories: 30 }, ], note: "Sleep by 10 PM. 7–8 hrs sleep is CRUCIAL for weight loss — it regulates hunger hormones." }, ]; const typeColors = { meal: { bg: "#fff8e1", border: "#f59e0b", badge: "#f59e0b" }, ritual: { bg: "#f0fdf4", border: "#22c55e", badge: "#22c55e" }, snack: { bg: "#fdf4ff", border: "#a855f7", badge: "#a855f7" }, activity: { bg: "#eff6ff", border: "#3b82f6", badge: "#3b82f6" }, }; const typeLabel = { meal: "MEAL", ritual: "RITUAL", snack: "SNACK", activity: "ACTIVITY" }; export default function App() { const [expanded, setExpanded] = useState({}); const [checked, setChecked] = useState({}); const toggle = (i) => setExpanded(e => ({ ...e, [i]: !e[i] })); const check = (i, j) => setChecked(c => ({ ...c, [`${i}-${j}`]: !c[`${i}-${j}`] })); const totalCalories = schedule .flatMap(s => s.items) .reduce((sum, item) => sum + (item.calories > 0 ? item.calories : 0), 0); const completedMeals = Object.values(checked).filter(Boolean).length; const totalItems = schedule.reduce((s, m) => s + m.items.length, 0); return (
{/* Header */}
Your Personalized Plan

Weight Loss Schedule

Vegetarian + Eggs • 70kg → 50kg Goal

{/* Stats Bar */}
{[ { label: "Daily Calories", value: `~${totalCalories}`, unit: "kcal", color: "#FF6B35" }, { label: "Protein Target", value: "110–120", unit: "g", color: "#4ECDC4" }, { label: "Completed", value: `${completedMeals}/${totalItems}`, unit: "items", color: "#96CEB4" }, ].map((s, i) => (
{s.value}{s.unit}
{s.label}
))}
{/* Schedule */}
{schedule.map((slot, i) => { const tc = typeColors[slot.type]; const isOpen = expanded[i]; const allChecked = slot.items.every((_, j) => checked[`${i}-${j}`]); return (
{/* Timeline */}
{allChecked ? "✓" : slot.emoji}
{i < schedule.length - 1 && (
)}
{/* Card */}
{/* Card Header */}
toggle(i)} style={{ padding: "12px 14px", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", }} >
{typeLabel[slot.type]} {slot.time}
{slot.label}
{/* Expanded */} {isOpen && (
{slot.items.map((item, j) => (
check(i, j)} style={{ display: "flex", gap: 10, alignItems: "flex-start", marginBottom: 10, cursor: "pointer", opacity: checked[`${i}-${j}`] ? 0.5 : 1, }} >
{checked[`${i}-${j}`] ? "✓" : ""}
{item.name} {item.calories > 0 && ( {item.calories} cal )}
{item.amount && (
{item.amount}
)}
{item.benefit}
))}
{/* Note */}
💡 {slot.note}
)}
); })}
{/* Footer */}
⚡ Daily Water Goal
Drink 2.5–3 litres of water throughout the day.
Start with copper water, sip warm water between meals.
Avoid cold water — it slows digestion.
Tap each card to expand • Check items as you complete them
); }