import json

UNITS = [
    {
        "code": "U1", "name": "Life Science", "color": "#4CAF50", "icon": "leaf",
        "chapters": [
            {
                "code": "C1", "name": "Plants",
                "sections": [
                    {
                        "code": "1.1", "name": "Needs of Plants",
                        "flashcards": [
                            {"front": "What do plants need to survive?", "back": "Light, water, air, and soil (nutrients)", "image": "plant"},
                            {"front": "Are plants living or nonliving things?", "back": "Plants are living things", "image": "plant"},
                            {"front": "What do plants use food for?", "back": "To get energy to grow and change", "image": "plant"},
                            {"front": "What are nutrients?", "back": "Parts of soil that plants need to make new parts", "image": "roots"},
                            {"front": "Does temperature affect plants?", "back": "Yes! Most plants cannot survive if it is too hot or too cold", "image": "plant"},
                            {"front": "Do plants need space?", "back": "Yes, every plant needs a space to live in. Trees need large spaces", "image": "tree_trunk"},
                        ],
                        "quiz": [
                            {"question": "Plants are ________ things.", "options": ["living", "nonliving", "dead", "plastic"], "correct": 0, "explanation": "Plants are living things!"},
                            {"question": "The parts of soil that plants need to make new parts are called:", "options": ["air", "nutrients", "space", "water"], "correct": 1, "explanation": "Nutrients are the parts of soil plants use to make new parts."},
                            {"question": "Plants need light to make:", "options": ["water", "space", "food", "air"], "correct": 2, "explanation": "Plants use light to make food!"},
                            {"question": "If a plant cannot get what it needs, it may not:", "options": ["keep warm", "keep cool", "survive", "grow tall"], "correct": 2, "explanation": "Without what it needs, a plant may not survive."},
                            {"question": "Some plants need low:", "options": ["temperatures", "nutrients", "spaces", "light"], "correct": 0, "explanation": "Some plants need low temperatures to survive."},
                        ],
                        "truefalse": [
                            {"statement": "Every plant needs a space to live in.", "answer": True, "explanation": "Yes! All plants need space."},
                            {"statement": "A tree needs a small space to live in.", "answer": False, "explanation": "A tree needs a LARGE space!"},
                            {"statement": "Temperature does not affect plants.", "answer": False, "explanation": "Temperature DOES affect plants!"},
                            {"statement": "Most plants cannot survive if it is too hot.", "answer": True, "explanation": "Correct! Too much heat is bad for most plants."},
                        ],
                        "matching": [
                            {"left": "Potted plant", "right": "Needs a small space"},
                            {"left": "Redwood tree", "right": "Needs a large space"},
                            {"left": "Nutrients", "right": "Parts of soil for plants"},
                            {"left": "Light", "right": "Plants use it to make food"},
                        ],
                        "sorting": {
                            "title": "Sort: What do plants NEED vs NOT need?",
                            "categories": ["Plants NEED", "Plants do NOT need"],
                            "items": [
                                {"item": "Light", "category": 0},
                                {"item": "Water", "category": 0},
                                {"item": "Air", "category": 0},
                                {"item": "Soil nutrients", "category": 0},
                                {"item": "Space", "category": 0},
                                {"item": "Plastic", "category": 1},
                                {"item": "Metal", "category": 1},
                                {"item": "Candy", "category": 1},
                            ]
                        },
                        "experiments": [
                            {
                                "title": "What Do Plants Need?",
                                "intro": "Let's discover what plants need to stay alive by observing two plants in different conditions!",
                                "steps": [
                                    {"instruction": "Put one potted plant in a dark place (no light) for a few days. Water it when it gets dry.", "image": "plant"},
                                    {"instruction": "Put a second plant in the light. Do NOT water it.", "image": "plant"},
                                    {"instruction": "After a few days, observe both plants. How do they look?", "image": "plant"},
                                    {"instruction": "Question: What happened to the plant that did not get water?", "answer": "It dried up and wilted", "image": "plant"},
                                    {"instruction": "Question: What happened to the plant that did not get any light?", "answer": "It turned pale and weak", "image": "plant"},
                                    {"instruction": "Question: What are two things a plant needs to stay alive?", "answer": "Water and light", "image": "plant"},
                                ],
                                "conclusion": "Plants need light, water, air, and soil nutrients to survive!"
                            }
                        ],
                    },
                    {
                        "code": "1.2", "name": "Roots and Stems",
                        "flashcards": [
                            {"front": "Where do roots grow?", "back": "Underground", "image": "roots"},
                            {"front": "What do roots do?", "back": "Take in water and nutrients from the soil, and hold the plant in place", "image": "roots"},
                            {"front": "Where do stems grow?", "back": "Above the ground", "image": "stem"},
                            {"front": "What does the stem do?", "back": "Holds the plant up in the air. Water and food move through the stem", "image": "stem"},
                            {"front": "What is the thick stem of a tree called?", "back": "The trunk", "image": "tree_trunk"},
                            {"front": "What is the outside covering of the trunk called?", "back": "Bark", "image": "tree_trunk"},
                            {"front": "Name two roots that people eat", "back": "Carrots and beets", "image": "roots"},
                        ],
                        "quiz": [
                            {"question": "The part of a plant that grows underground is called the:", "options": ["stem", "soil", "root", "leaf"], "correct": 2, "explanation": "Roots grow underground!"},
                            {"question": "A plant part that grows above the ground is a:", "options": ["sweet potato", "stem", "root", "seed"], "correct": 1, "explanation": "Stems grow above the ground!"},
                            {"question": "Roots take in:", "options": ["water", "air", "light", "seeds"], "correct": 0, "explanation": "Roots take in water and nutrients from soil."},
                            {"question": "A tree's trunk holds up the:", "options": ["roots", "branches", "stems", "soil"], "correct": 1, "explanation": "The trunk holds up the branches!"},
                            {"question": "Some plants have many thin roots; others have:", "options": ["no roots", "one thick root", "only stems", "only leaves"], "correct": 1, "explanation": "Some have one thick root!"},
                        ],
                        "truefalse": [
                            {"statement": "Roots hold the plant in place.", "answer": True, "explanation": "Yes! Roots anchor the plant."},
                            {"statement": "Carrots and beets are examples of roots people eat.", "answer": True, "explanation": "Correct! They are roots!"},
                            {"statement": "Water and food move through the stem.", "answer": True, "explanation": "The stem transports water and food!"},
                            {"statement": "The outside covering of the trunk is called skin.", "answer": False, "explanation": "It's called BARK!"},
                        ],
                        "matching": [
                            {"left": "Carrot", "right": "Root"},
                            {"left": "Tree", "right": "Trunk (thick stem)"},
                            {"left": "Bark", "right": "Outside covering of trunk"},
                            {"left": "Roots", "right": "Grow underground"},
                            {"left": "Stems", "right": "Grow above ground"},
                        ],
                        "labeling": {
                            "title": "Label the Plant Parts",
                            "image": "plant",
                            "labels": [
                                {"label": "Flower", "x": 50, "y": 10},
                                {"label": "Leaves", "x": 50, "y": 35},
                                {"label": "Stem", "x": 50, "y": 55},
                                {"label": "Roots", "x": 50, "y": 85},
                            ]
                        },
                        "experiments": [
                            {
                                "title": "Observe Roots and Stems",
                                "intro": "Let's observe the roots and stems of a real plant!",
                                "steps": [
                                    {"instruction": "Take a potted plant out of its pot gently.", "image": "plant"},
                                    {"instruction": "Hold the plant over a tray. Wash away the soil carefully.", "image": "roots"},
                                    {"instruction": "Observe the plant parts using a hand lens. Draw what you see.", "image": "roots"},
                                    {"instruction": "Question: What colors were the roots?", "answer": "Light brown", "image": "roots"},
                                    {"instruction": "Question: What color were the stems?", "answer": "Green", "image": "stem"},
                                    {"instruction": "Put the plant back in the pot. Add soil and water it.", "image": "plant"},
                                ],
                                "conclusion": "Roots are usually brown and grow underground. Stems are green and grow above ground!"
                            }
                        ],
                    },
                    {
                        "code": "1.3", "name": "Leaves and Flowers",
                        "flashcards": [
                            {"front": "What do leaves take in?", "back": "Sunlight and air", "image": "leaves"},
                            {"front": "What do leaves use light and air for?", "back": "To make food for the plant", "image": "leaves"},
                            {"front": "Maple tree leaves are shaped like:", "back": "Hands", "image": "leaves"},
                            {"front": "Pine tree leaves are shaped like:", "back": "Needles", "image": "leaves"},
                            {"front": "What does the flower make?", "back": "Seeds", "image": "flower"},
                            {"front": "What can a seed grow into?", "back": "A new plant", "image": "seed"},
                            {"front": "Where are the parts needed for a new plant to grow?", "back": "Inside the seed", "image": "seed"},
                        ],
                        "quiz": [
                            {"question": "Leaves grow:", "options": ["underground", "above ground", "in the soil", "in water"], "correct": 1, "explanation": "Leaves grow above ground!"},
                            {"question": "Flowers make:", "options": ["roots", "seeds", "leaves", "water"], "correct": 1, "explanation": "Flowers make seeds!"},
                            {"question": "A seed can grow into a:", "options": ["new plant", "new shell", "new animal", "new rock"], "correct": 0, "explanation": "Seeds grow into new plants!"},
                            {"question": "Leaves use light and air to make:", "options": ["sunlight", "water", "food", "soil"], "correct": 2, "explanation": "Leaves make food using light and air!"},
                        ],
                        "matching": [
                            {"left": "Leaves", "right": "Take in sunlight and air"},
                            {"left": "Flower", "right": "Makes seeds"},
                            {"left": "Seed", "right": "Grows into a new plant"},
                            {"left": "Maple leaves", "right": "Shaped like hands"},
                            {"left": "Pine leaves", "right": "Shaped like needles"},
                        ],
                        "memory": [
                            {"pair_a": "Leaves", "pair_b": "Make food", "image_a": "leaves", "image_b": "leaves"},
                            {"pair_a": "Flower", "pair_b": "Makes seeds", "image_a": "flower", "image_b": "flower"},
                            {"pair_a": "Seed", "pair_b": "New plant", "image_a": "seed", "image_b": "seed"},
                            {"pair_a": "Roots", "pair_b": "Take in water", "image_a": "roots", "image_b": "roots"},
                        ],
                        "experiments": [
                            {
                                "title": "Sorting Leaves",
                                "intro": "Let's observe and sort different leaves!",
                                "steps": [
                                    {"instruction": "Observe the leaves. How are they the same? How are they different?", "image": "leaves"},
                                    {"instruction": "Choose one way to sort the leaves (by color, shape, or size).", "image": "leaves"},
                                    {"instruction": "Question: In what ways were all the leaves the same?", "answer": "All leaves are flat and have a thin stem", "image": "leaves"},
                                    {"instruction": "Think of another way to sort leaves (poisonous vs edible, or stay on tree all year vs not)", "image": "leaves"},
                                ],
                                "conclusion": "Leaves can be sorted by color, shape, size, and many other ways! All leaves are flat with a thin stem."
                            }
                        ],
                    },
                    {
                        "code": "1.4", "name": "Plants Grow and Change",
                        "flashcards": [
                            {"front": "What is a life cycle?", "back": "The changes in a living thing as it grows", "image": "life_cycle"},
                            {"front": "How do most plants begin life?", "back": "As a seed", "image": "seed"},
                            {"front": "What is germination?", "back": "When a seed starts to grow", "image": "seedling"},
                            {"front": "What is a seedling?", "back": "A young plant with roots, a stem, and leaves", "image": "seedling"},
                            {"front": "What does an adult plant form?", "back": "Flowers and seeds", "image": "flower"},
                            {"front": "How does a maple seed travel?", "back": "By wind", "image": "seed"},
                            {"front": "How does a coconut seed travel?", "back": "By water", "image": "coconut"},
                            {"front": "How does a burdock seed travel?", "back": "By animals", "image": "burdock"},
                            {"front": "How does a dandelion seed travel?", "back": "By wind", "image": "dandelion"},
                        ],
                        "quiz": [
                            {"question": "When a seed falls on wet and warm soil, it may:", "options": ["germinate", "fly", "float", "disappear"], "correct": 0, "explanation": "Seeds germinate in wet, warm soil!"},
                            {"question": "Adult plants can make:", "options": ["light", "water", "flowers", "soil"], "correct": 2, "explanation": "Adult plants make flowers and seeds!"},
                            {"question": "A plant that grows from a seed looks like:", "options": ["a tree", "all other plants", "its parent", "a rock"], "correct": 2, "explanation": "Plants look like their parents!"},
                            {"question": "A root grows from a seed into:", "options": ["the ground", "the air", "the sun", "the sky"], "correct": 0, "explanation": "Roots grow into the ground!"},
                        ],
                        "truefalse": [
                            {"statement": "Each plant looks like its parent.", "answer": True, "explanation": "Yes! Plants look like their parents."},
                            {"statement": "Plants of one kind may differ in some ways.", "answer": True, "explanation": "Correct! Same kind plants can differ slightly."},
                            {"statement": "Some seeds can float on water.", "answer": True, "explanation": "Yes! Some seeds float to travel!"},
                            {"statement": "Some plants shoot their seeds away from the parent plant.", "answer": True, "explanation": "Yes! Some plants do this!"},
                            {"statement": "Plants can survive without air.", "answer": False, "explanation": "Plants NEED air!"},
                        ],
                        "matching": [
                            {"left": "Coconut", "right": "Travels by water"},
                            {"left": "Dandelion", "right": "Travels by wind"},
                            {"left": "Burdock", "right": "Travels by animals"},
                            {"left": "Seed", "right": "Starts the life cycle"},
                            {"left": "Seedling", "right": "Young plant with roots, stem, leaves"},
                        ],
                        "sorting": {
                            "title": "Put the plant life cycle in order!",
                            "categories": ["Step 1", "Step 2", "Step 3", "Step 4"],
                            "items": [
                                {"item": "Seed", "category": 0},
                                {"item": "Germination (sprouting)", "category": 1},
                                {"item": "Seedling (young plant)", "category": 2},
                                {"item": "Adult plant with flowers", "category": 3},
                            ]
                        },
                        "experiments": [
                            {
                                "title": "Sprouting Seeds",
                                "intro": "Let's watch a seed grow into a plant!",
                                "steps": [
                                    {"instruction": "Put some soil in a cup. Put seeds on the soil. Cover with a bit more soil.", "image": "seed"},
                                    {"instruction": "Spray the soil with water.", "image": "seedling"},
                                    {"instruction": "Place the cup on a shelf. Check every day. Keep the soil damp.", "image": "seedling"},
                                    {"instruction": "Measure and record the height of the plant as it grows. Draw how it looks each day.", "image": "plant"},
                                    {"instruction": "Question: How did the height of the plant change?", "answer": "It grew taller each day", "image": "plant"},
                                ],
                                "conclusion": "Seeds germinate into seedlings, then grow into adult plants. This is the plant life cycle!"
                            }
                        ],
                    },
                ],
            },
            {
                "code": "C2", "name": "People",
                "sections": [
                    {
                        "code": "2.1", "name": "Your Senses",
                        "flashcards": [
                            {"front": "Which body part do you use to see?", "back": "Eyes (sight)", "image": "eyes"},
                            {"front": "Which body part do you use to smell?", "back": "Nose", "image": "nose"},
                            {"front": "Which body part do you use to hear?", "back": "Ears (hearing)", "image": "ears"},
                            {"front": "Which body part do you use to taste?", "back": "Tongue", "image": "tongue"},
                            {"front": "Which body part do you use to touch/feel?", "back": "Skin", "image": "skin"},
                            {"front": "What is observing?", "back": "Using your senses to learn about an object", "image": "eyes"},
                            {"front": "What tool helps see very small parts of objects?", "back": "A hand lens (magnifying glass)", "image": "eyes"},
                            {"front": "What tool helps see faraway objects?", "back": "A telescope", "image": "eyes"},
                            {"front": "What tool tells how warm or cool the air is?", "back": "A thermometer", "image": "thermometer"},
                        ],
                        "quiz": [
                            {"question": "You use your ________ to find out how things feel.", "options": ["ears", "eyes", "skin", "nose"], "correct": 2, "explanation": "Skin is used for touch!"},
                            {"question": "You use your ________ to tell the color of something.", "options": ["ears", "nose", "eyes", "tongue"], "correct": 2, "explanation": "Eyes are used for sight!"},
                            {"question": "Your ________ tells you how something tastes.", "options": ["tongue", "hand", "ear", "nose"], "correct": 0, "explanation": "The tongue is used for taste!"},
                            {"question": "To see faraway objects, you use a:", "options": ["hand lens", "telescope", "thermometer", "ruler"], "correct": 1, "explanation": "A telescope helps see faraway things!"},
                            {"question": "To see very small parts of objects, you use a:", "options": ["telescope", "thermometer", "hand lens", "balance"], "correct": 2, "explanation": "A hand lens magnifies small things!"},
                        ],
                        "matching": [
                            {"left": "Eyes", "right": "Sight"},
                            {"left": "Nose", "right": "Smell"},
                            {"left": "Ears", "right": "Hearing"},
                            {"left": "Tongue", "right": "Taste"},
                            {"left": "Skin", "right": "Touch"},
                            {"left": "Hand lens", "right": "See small things"},
                            {"left": "Telescope", "right": "See faraway things"},
                            {"left": "Thermometer", "right": "Measure temperature"},
                        ],
                        "experiments": [
                            {
                                "title": "Use Your Senses",
                                "intro": "Let's use all five senses to observe a stalk of celery!",
                                "steps": [
                                    {"instruction": "Put a stalk of celery on a paper towel. Observe it with your eyes. What do you see?", "image": "leaves"},
                                    {"instruction": "Touch the celery. How does it feel?", "image": "skin"},
                                    {"instruction": "Smell the celery. What do you observe?", "image": "nose"},
                                    {"instruction": "Break the celery and listen to the sound it makes.", "image": "ears"},
                                    {"instruction": "Question: Which body part did you use to smell?", "answer": "Nose", "image": "nose"},
                                    {"instruction": "Question: Which body part did you use to listen?", "answer": "Ears", "image": "ears"},
                                    {"instruction": "Question: Which body part did you use to touch?", "answer": "Skin", "image": "skin"},
                                ],
                                "conclusion": "We use our five senses (sight, smell, hearing, taste, touch) to observe and learn about the world!"
                            }
                        ],
                    },
                    {
                        "code": "2.2", "name": "Body Parts",
                        "flashcards": [
                            {"front": "What are bones?", "back": "Hard body parts that hold up your body", "image": "bones"},
                            {"front": "What do some bones do?", "back": "Help you move; other bones protect parts of your body", "image": "bones"},
                            {"front": "What are muscles?", "back": "Body parts that allow movement", "image": "muscles"},
                            {"front": "What do some muscles do?", "back": "Help move blood through your body", "image": "muscles"},
                            {"front": "What do lungs do?", "back": "Help you breathe air. You have two lungs in your chest", "image": "lungs"},
                            {"front": "What happens when you breathe in?", "back": "Air goes into your lungs", "image": "lungs"},
                            {"front": "What happens when you breathe out?", "back": "Air goes out of your lungs", "image": "lungs"},
                            {"front": "What does the heart do?", "back": "Pumps blood to all parts of your body", "image": "heart"},
                            {"front": "What does the brain do?", "back": "Used to think. It tells other body parts what to do", "image": "brain"},
                            {"front": "What do all body parts need to live?", "back": "Energy (from food)", "image": "heart"},
                        ],
                        "quiz": [
                            {"question": "_______ hold up the body.", "options": ["Lungs", "Bones", "Arms", "Muscles"], "correct": 1, "explanation": "Bones hold up the body!"},
                            {"question": "Your ________ pumps blood.", "options": ["heart", "brain", "lung", "bone"], "correct": 0, "explanation": "The heart pumps blood!"},
                            {"question": "You breathe with your:", "options": ["eyes", "lungs", "heart", "brain"], "correct": 1, "explanation": "You breathe with your lungs!"},
                            {"question": "The ________ is used to think.", "options": ["heart", "muscle", "brain", "lung"], "correct": 2, "explanation": "The brain is used for thinking!"},
                        ],
                        "truefalse": [
                            {"statement": "You use your brain to think.", "answer": True, "explanation": "Yes! The brain thinks!"},
                            {"statement": "Your brain tells your lungs to take in air.", "answer": True, "explanation": "The brain controls the body!"},
                            {"statement": "Your heart tells your brain to pump blood.", "answer": False, "explanation": "No! The BRAIN tells the heart what to do!"},
                        ],
                        "matching": [
                            {"left": "Brain", "right": "Tells body parts what to do"},
                            {"left": "Heart", "right": "Pumps blood"},
                            {"left": "Lungs", "right": "Push out air"},
                            {"left": "Bones", "right": "Hold the body up"},
                            {"left": "Muscles", "right": "Allow movement"},
                        ],
                        "memory": [
                            {"pair_a": "Brain", "pair_b": "Think", "image_a": "brain", "image_b": "brain"},
                            {"pair_a": "Heart", "pair_b": "Pump blood", "image_a": "heart", "image_b": "heart"},
                            {"pair_a": "Lungs", "pair_b": "Breathe", "image_a": "lungs", "image_b": "lungs"},
                            {"pair_a": "Bones", "pair_b": "Hold up", "image_a": "bones", "image_b": "bones"},
                        ],
                    },
                    {
                        "code": "2.3", "name": "People Grow and Change",
                        "flashcards": [
                            {"front": "What is a newborn baby called?", "back": "An infant", "image": "infant"},
                            {"front": "What do infants need?", "back": "To be fed and need help doing things", "image": "infant"},
                            {"front": "What do toddlers do?", "back": "Grow and learn to walk and talk", "image": "toddler"},
                            {"front": "What is a person aged 13-19 called?", "back": "A teenager (teen)", "image": "teen"},
                            {"front": "What can adults do?", "back": "Take care of themselves", "image": "adult"},
                            {"front": "What happens to elder adults?", "back": "Can have gray hair, and their skin may wrinkle", "image": "elder"},
                        ],
                        "quiz": [
                            {"question": "A ________ needs a lot of care from adults.", "options": ["teen", "toddler", "adult", "elder"], "correct": 1, "explanation": "Toddlers need lots of care!"},
                            {"question": "Someone who is 15 years old is a(n):", "options": ["infant", "teen", "adult", "toddler"], "correct": 1, "explanation": "15 is a teenager!"},
                            {"question": "People have the same:", "options": ["body parts", "hair color", "eye color", "height"], "correct": 0, "explanation": "All people have the same body parts!"},
                        ],
                        "truefalse": [
                            {"statement": "All people have the same body parts.", "answer": True, "explanation": "Yes! All people have the same body parts."},
                            {"statement": "People are not different from one another.", "answer": False, "explanation": "People ARE different! Different hair, eyes, etc."},
                            {"statement": "Children may have the same eye color as their parents.", "answer": True, "explanation": "Yes! Children can look like parents."},
                            {"statement": "You will be an elder adult before you are a teen.", "answer": False, "explanation": "No! Teen comes BEFORE elder adult!"},
                        ],
                        "sorting": {
                            "title": "Put the life stages in order (youngest to oldest)",
                            "categories": ["Stage 1", "Stage 2", "Stage 3", "Stage 4", "Stage 5"],
                            "items": [
                                {"item": "Infant", "category": 0},
                                {"item": "Toddler", "category": 1},
                                {"item": "Teen", "category": 2},
                                {"item": "Adult", "category": 3},
                                {"item": "Elder adult", "category": 4},
                            ]
                        },
                        "matching": [
                            {"left": "Infant", "right": "Newborn baby"},
                            {"left": "Toddler", "right": "Learns to walk and talk"},
                            {"left": "Teen", "right": "Ages 13-19"},
                            {"left": "Adult", "right": "Takes care of themselves"},
                            {"left": "Elder", "right": "May have gray hair and wrinkles"},
                        ],
                    },
                ],
            },
        ],
    },
    {
        "code": "U2", "name": "Physical Science", "color": "#2196F3", "icon": "atom",
        "chapters": [
            {
                "code": "C3", "name": "States of Matter",
                "sections": [
                    {
                        "code": "3.1", "name": "Solids",
                        "flashcards": [
                            {"front": "What is matter?", "back": "Anything that has mass and takes up space. All things are made of matter", "image": "solid"},
                            {"front": "What is a solid?", "back": "Matter that has its own shape and size", "image": "solid"},
                            {"front": "What is length?", "back": "How long or short an object is", "image": "ruler"},
                            {"front": "What tool measures length?", "back": "A metric ruler or measuring tape", "image": "ruler"},
                            {"front": "What units are on a ruler?", "back": "Centimeters and millimeters (or inches)", "image": "ruler"},
                            {"front": "What is mass?", "back": "The amount of matter in an object", "image": "balance"},
                            {"front": "What tool measures mass?", "back": "A balance", "image": "balance"},
                            {"front": "What unit is mass measured in?", "back": "Grams", "image": "balance"},
                        ],
                        "quiz": [
                            {"question": "Matter that has its own shape and size is:", "options": ["length", "solid", "mass", "liquid"], "correct": 1, "explanation": "A solid has its own shape and size!"},
                            {"question": "All things are made of:", "options": ["mass", "solid", "matter", "energy"], "correct": 2, "explanation": "Everything is made of matter!"},
                            {"question": "_______ is how long an object is.", "options": ["Solid", "Mass", "Length", "Volume"], "correct": 2, "explanation": "Length is how long something is!"},
                            {"question": "The amount of matter in an object is its:", "options": ["mass", "length", "centimeters", "volume"], "correct": 0, "explanation": "Mass is the amount of matter!"},
                            {"question": "A tool used to measure mass is a:", "options": ["ruler", "balance", "thermometer", "telescope"], "correct": 1, "explanation": "A balance measures mass!"},
                        ],
                        "matching": [
                            {"left": "Ruler", "right": "Measures length"},
                            {"left": "Balance", "right": "Measures mass"},
                            {"left": "Grams", "right": "Unit of mass"},
                            {"left": "Centimeters", "right": "Unit of length"},
                            {"left": "Solid", "right": "Has own shape and size"},
                        ],
                        "experiments": [
                            {
                                "title": "Measure Solid Objects",
                                "intro": "Let's measure the mass and length of solid objects!",
                                "steps": [
                                    {"instruction": "Pick up objects one at a time. Predict which is heaviest and which is lightest.", "image": "solid"},
                                    {"instruction": "Use a balance to measure and record the mass of each object.", "image": "balance"},
                                    {"instruction": "Predict which object is longest and which is shortest.", "image": "ruler"},
                                    {"instruction": "Use a metric ruler to measure and record the length of each object.", "image": "ruler"},
                                    {"instruction": "Question: How do you measure the mass and length of solid objects?", "answer": "Use a balance for mass and a ruler for length", "image": "solid"},
                                ],
                                "conclusion": "We measure mass with a balance (in grams) and length with a ruler (in centimeters)!"
                            }
                        ],
                    },
                    {
                        "code": "3.2", "name": "Liquids",
                        "flashcards": [
                            {"front": "What is a liquid?", "back": "Matter that changes its shape. It takes the shape of its container", "image": "liquid"},
                            {"front": "Does a liquid have its own shape?", "back": "No! It changes shape to fit its container", "image": "liquid"},
                            {"front": "What is volume?", "back": "The amount of space something takes up", "image": "liquid"},
                            {"front": "What units measure volume?", "back": "Liters and milliliters", "image": "liquid"},
                            {"front": "Thin liquids flow:", "back": "Fast", "image": "liquid"},
                            {"front": "Thick liquids flow:", "back": "Slow", "image": "liquid"},
                            {"front": "Name 3 tools to measure liquids", "back": "Measuring cup, graduated cylinder, beaker", "image": "liquid"},
                        ],
                        "quiz": [
                            {"question": "The amount of space something occupies is its:", "options": ["mass", "length", "volume", "solid"], "correct": 2, "explanation": "Volume is the space something takes up!"},
                            {"question": "Matter that takes the shape of its container is a:", "options": ["solid", "liquid", "length", "gas"], "correct": 1, "explanation": "Liquids take the shape of their container!"},
                            {"question": "Volume is measured in liters and:", "options": ["centimeters", "milliliters", "grams", "degrees"], "correct": 1, "explanation": "Volume uses liters and milliliters!"},
                            {"question": "Milk and orange juice are:", "options": ["liquids", "solids", "mass", "gases"], "correct": 0, "explanation": "They are liquids!"},
                        ],
                        "matching": [
                            {"left": "Measuring cup", "right": "Measures liquid volume"},
                            {"left": "Graduated cylinder", "right": "Measures liquid volume"},
                            {"left": "Beaker", "right": "Holds liquids"},
                            {"left": "Liters", "right": "Unit of volume"},
                            {"left": "Liquid", "right": "Takes shape of container"},
                        ],
                        "sorting": {
                            "title": "Sort: Is it a solid or liquid?",
                            "categories": ["Solids", "Liquids"],
                            "items": [
                                {"item": "Ice", "category": 0},
                                {"item": "Rock", "category": 0},
                                {"item": "Baseball bat", "category": 0},
                                {"item": "Basketball", "category": 0},
                                {"item": "Orange juice", "category": 1},
                                {"item": "Milk", "category": 1},
                                {"item": "Water", "category": 1},
                                {"item": "Honey", "category": 1},
                            ]
                        },
                        "experiments": [
                            {
                                "title": "The Shape of Water",
                                "intro": "Let's see how water changes shape in different containers!",
                                "steps": [
                                    {"instruction": "Fill a measuring cup with 250 milliliters of water. Draw the shape of the water.", "image": "liquid"},
                                    {"instruction": "Pour the water into a graduated cylinder. Draw the shape.", "image": "liquid"},
                                    {"instruction": "Pour the water into a 1-liter beaker. Draw the shape.", "image": "liquid"},
                                    {"instruction": "Question: What makes the shape of water change?", "answer": "The container it is in", "image": "liquid"},
                                    {"instruction": "Question: Did the number of milliliters change?", "answer": "No, it stayed the same", "image": "liquid"},
                                ],
                                "conclusion": "Liquids change shape to fit their container, but the volume (amount) stays the same!"
                            }
                        ],
                    },
                    {
                        "code": "3.3", "name": "Gases",
                        "flashcards": [
                            {"front": "What is a gas?", "back": "Matter that spreads out to fill all the space in its container", "image": "gas"},
                            {"front": "What is air made up of?", "back": "Gases", "image": "gas"},
                            {"front": "What does a gas take?", "back": "The shape and size of its container", "image": "gas"},
                            {"front": "What is temperature?", "back": "How warm or cool something is", "image": "thermometer"},
                            {"front": "What tool measures temperature?", "back": "A thermometer", "image": "thermometer"},
                            {"front": "What scales are on a thermometer?", "back": "°C (Celsius) and °F (Fahrenheit)", "image": "thermometer"},
                            {"front": "Where does a thermometer read 0°C (32°F)?", "back": "In ice", "image": "thermometer"},
                        ],
                        "quiz": [
                            {"question": "Matter that spreads out to fill all the space is a:", "options": ["solid", "liquid", "gas", "rock"], "correct": 2, "explanation": "Gases spread to fill their container!"},
                            {"question": "_______ is how warm or cool something is.", "options": ["Volume", "Temperature", "Mass", "Length"], "correct": 1, "explanation": "Temperature is how warm/cool something is!"},
                            {"question": "Air is a:", "options": ["solid", "liquid", "gas", "rock"], "correct": 2, "explanation": "Air is a gas!"},
                            {"question": "Scientists use a temperature scale marked:", "options": ["°C", "°A", "°D", "°X"], "correct": 0, "explanation": "Scientists use Celsius (°C)!"},
                            {"question": "Which tool measures air temperature?", "options": ["thermometer", "balance", "ruler", "spoon"], "correct": 0, "explanation": "A thermometer measures temperature!"},
                        ],
                        "truefalse": [
                            {"statement": "Solids, liquids, and gases are states of matter.", "answer": True, "explanation": "Yes! These are the three states!"},
                            {"statement": "You can use a ruler to measure length.", "answer": True, "explanation": "Yes! Rulers measure length!"},
                            {"statement": "The amount of matter in an object is its volume.", "answer": False, "explanation": "No! That's MASS. Volume is space!"},
                            {"statement": "A liquid has its own size and shape.", "answer": False, "explanation": "No! Only solids have their own shape!"},
                            {"statement": "A gas fills out all the space in its container.", "answer": True, "explanation": "Yes! Gases fill everything!"},
                            {"statement": "Temperature is how warm or cool something is.", "answer": True, "explanation": "Correct!"},
                        ],
                        "sorting": {
                            "title": "Sort: Solid, Liquid, or Gas?",
                            "categories": ["Solids", "Liquids", "Gases"],
                            "items": [
                                {"item": "Ice", "category": 0},
                                {"item": "Butter", "category": 0},
                                {"item": "Rock", "category": 0},
                                {"item": "Water", "category": 1},
                                {"item": "Juice", "category": 1},
                                {"item": "Milk", "category": 1},
                                {"item": "Air", "category": 2},
                                {"item": "Neon", "category": 2},
                                {"item": "Steam", "category": 2},
                            ]
                        },
                        "experiments": [
                            {
                                "title": "Measuring Temperature",
                                "intro": "Let's measure the temperature of ice and warm water!",
                                "steps": [
                                    {"instruction": "Place a thermometer in a cup of ice cubes for 5 minutes. Read the temperature in °C and °F.", "image": "thermometer"},
                                    {"instruction": "Predict the temperature of warm water.", "image": "thermometer"},
                                    {"instruction": "Place the thermometer in warm water for 5 minutes. Read the temperature.", "image": "thermometer"},
                                    {"instruction": "Compare the results. What was the difference?", "image": "thermometer"},
                                    {"instruction": "Question: Where does the thermometer read 0°C (32°F)?", "answer": "In ice", "image": "thermometer"},
                                ],
                                "conclusion": "Thermometers measure temperature. Ice is cold (0°C/32°F) and warm water has a higher temperature!"
                            }
                        ],
                    },
                ],
            },
            {
                "code": "C4", "name": "Motion and Forces",
                "sections": [
                    {
                        "code": "4.1", "name": "Ways Things Move",
                        "flashcards": [
                            {"front": "What are the 3 ways objects move?", "back": "Straight line, round and round (spin), back and forth", "image": "motion"},
                            {"front": "What is a zigzag?", "back": "A Z-shaped path", "image": "motion"},
                            {"front": "What is speed?", "back": "How fast or slow an object moves", "image": "motion"},
                            {"front": "What is position?", "back": "Where an object is (above, below, behind, in front of)", "image": "motion"},
                            {"front": "Give an example of fast movement", "back": "A train", "image": "motion"},
                            {"front": "Give an example of slow movement", "back": "A snail or hour hand", "image": "motion"},
                        ],
                        "quiz": [
                            {"question": "A Z-shaped path is a:", "options": ["spin", "zigzag", "swing", "straight line"], "correct": 1, "explanation": "A Z-shape is a zigzag!"},
                            {"question": "A round and round movement is a:", "options": ["swing", "zigzag", "spin", "push"], "correct": 2, "explanation": "Round and round = spin!"},
                            {"question": "How fast or slow an object moves is its:", "options": ["speed", "mass", "swing", "shape"], "correct": 0, "explanation": "Speed is how fast/slow!"},
                            {"question": "A word to describe position is:", "options": ["fast", "below", "slow", "spin"], "correct": 1, "explanation": "Below is a position word!"},
                            {"question": "Which of the following moves fast?", "options": ["snail", "train", "hour hand", "turtle"], "correct": 1, "explanation": "A train moves fast!"},
                        ],
                        "matching": [
                            {"left": "Cars", "right": "Straight line"},
                            {"left": "Swing", "right": "Back and forth"},
                            {"left": "Top/Pinwheel", "right": "Round and round"},
                            {"left": "Train", "right": "Fast"},
                            {"left": "Snail", "right": "Slow"},
                        ],
                        "sorting": {
                            "title": "Sort: How does it move?",
                            "categories": ["Straight line", "Round and round", "Back and forth"],
                            "items": [
                                {"item": "Car on road", "category": 0},
                                {"item": "Train on track", "category": 0},
                                {"item": "Pinwheel", "category": 1},
                                {"item": "Spinning top", "category": 1},
                                {"item": "Swing", "category": 2},
                                {"item": "Pendulum", "category": 2},
                            ]
                        },
                        "experiments": [
                            {
                                "title": "Ways Objects Move",
                                "intro": "Let's find objects that move in different ways!",
                                "steps": [
                                    {"instruction": "Find objects that can move round and round. Draw them.", "image": "motion"},
                                    {"instruction": "Find objects that can move back and forth. Draw them.", "image": "motion"},
                                    {"instruction": "Find objects that can move in a straight line. Draw them.", "image": "motion"},
                                    {"instruction": "Question: Do all objects move in the same way?", "answer": "No, objects move in different ways", "image": "motion"},
                                ],
                                "conclusion": "Objects move in many ways: straight lines, round and round, back and forth, and zigzags!"
                            }
                        ],
                    },
                    {
                        "code": "4.2", "name": "Pushes and Pulls",
                        "flashcards": [
                            {"front": "What does a push do?", "back": "Moves something away from you", "image": "push"},
                            {"front": "What does a pull do?", "back": "Moves something closer to you", "image": "pull"},
                            {"front": "What is a force?", "back": "A push or a pull", "image": "push"},
                            {"front": "What is gravity?", "back": "A force that pulls objects toward the ground", "image": "gravity"},
                            {"front": "What pushes a sailboat?", "back": "Wind", "image": "push"},
                            {"front": "If you drop a ball, gravity causes it to:", "back": "Fall", "image": "gravity"},
                        ],
                        "quiz": [
                            {"question": "A force used to move a wagon closer to you is a:", "options": ["fall", "pull", "push", "spin"], "correct": 1, "explanation": "Pulling moves things closer!"},
                            {"question": "Gravity pulls objects toward the:", "options": ["sky", "ground", "wind", "sun"], "correct": 1, "explanation": "Gravity pulls toward the ground!"},
                            {"question": "A sailboat is pushed by:", "options": ["wind", "water", "wood", "gravity"], "correct": 0, "explanation": "Wind pushes sailboats!"},
                            {"question": "If you drop a ball, gravity causes it to:", "options": ["float", "rise", "fall", "spin"], "correct": 2, "explanation": "Gravity makes things fall!"},
                        ],
                        "truefalse": [
                            {"statement": "A push moves something toward you.", "answer": False, "explanation": "No! A push moves things AWAY!"},
                            {"statement": "A magnet's pull is its force.", "answer": True, "explanation": "Yes! Pull is a force!"},
                            {"statement": "Gravity is what makes you fall when you trip.", "answer": True, "explanation": "Yes! Gravity pulls you down!"},
                        ],
                        "matching": [
                            {"left": "Push", "right": "Moves away from you"},
                            {"left": "Pull", "right": "Moves closer to you"},
                            {"left": "Force", "right": "A push or a pull"},
                            {"left": "Gravity", "right": "Pulls toward the ground"},
                        ],
                        "experiments": [
                            {
                                "title": "Making Objects Move",
                                "intro": "Let's move objects by pushing and pulling!",
                                "steps": [
                                    {"instruction": "Observe a block and a cotton ball. Think of ways to move them.", "image": "push"},
                                    {"instruction": "Use string and a drinking straw to move the block and cotton ball.", "image": "pull"},
                                    {"instruction": "Record the different ways you moved the objects. Write push or pull.", "image": "push"},
                                    {"instruction": "Question: What can make an object move?", "answer": "A force (push or pull)", "image": "push"},
                                ],
                                "conclusion": "Forces (pushes and pulls) make objects move. Gravity is a force that pulls things down!"
                            }
                        ],
                    },
                    {
                        "code": "4.3", "name": "Magnets",
                        "flashcards": [
                            {"front": "What does a magnet attract?", "back": "Objects with steel or iron in them (like paper clips, steel nails)", "image": "magnet"},
                            {"front": "What does a magnet NOT attract?", "back": "Plastic, glass, wood, rubber, paper", "image": "magnet"},
                            {"front": "How many poles does a magnet have?", "back": "Two poles: N (North) and S (South)", "image": "magnet_poles"},
                            {"front": "What happens when different poles meet?", "back": "They attract (pull together)", "image": "magnet_poles"},
                            {"front": "What happens when same poles meet?", "back": "They repel (push apart)", "image": "magnet_poles"},
                            {"front": "Where is a magnet strongest?", "back": "At its poles", "image": "magnet_poles"},
                            {"front": "What are the 3 shapes of magnets?", "back": "Horseshoe, bar, and circle (ring)", "image": "magnet"},
                        ],
                        "quiz": [
                            {"question": "Objects attracted by a magnet have ________ in them.", "options": ["steel", "glass", "wood", "plastic"], "correct": 0, "explanation": "Magnets attract steel/iron!"},
                            {"question": "A magnet ________ objects toward it.", "options": ["forces", "pushes", "pulls", "drops"], "correct": 2, "explanation": "Magnets pull (attract) objects!"},
                            {"question": "A magnet that is long and flat is a ________ magnet.", "options": ["circle", "horseshoe", "bar", "ring"], "correct": 2, "explanation": "Long and flat = bar magnet!"},
                            {"question": "A magnet is strongest at its:", "options": ["top", "poles", "middle", "side"], "correct": 1, "explanation": "Magnets are strongest at the poles!"},
                            {"question": "What happens when S pole meets N pole?", "options": ["They push away", "They repel", "They pull together", "Nothing"], "correct": 2, "explanation": "Different poles attract!"},
                        ],
                        "truefalse": [
                            {"statement": "Magnets can have three or four poles.", "answer": False, "explanation": "No! Magnets have exactly TWO poles!"},
                            {"statement": "All magnets have two poles.", "answer": True, "explanation": "Yes! N and S poles!"},
                            {"statement": "A magnet attracts paper clips.", "answer": True, "explanation": "Yes! Paper clips have steel!"},
                            {"statement": "A magnet attracts a plastic fork.", "answer": False, "explanation": "No! Magnets don't attract plastic!"},
                        ],
                        "sorting": {
                            "title": "Sort: Does the magnet attract it?",
                            "categories": ["Magnet attracts", "Magnet does NOT attract"],
                            "items": [
                                {"item": "Steel nail", "category": 0},
                                {"item": "Paper clip", "category": 0},
                                {"item": "Iron screw", "category": 0},
                                {"item": "Paper plate", "category": 1},
                                {"item": "Plastic fork", "category": 1},
                                {"item": "Rubber ball", "category": 1},
                                {"item": "Glass marble", "category": 1},
                            ]
                        },
                        "matching": [
                            {"left": "Horseshoe", "right": "U-shaped magnet"},
                            {"left": "Bar", "right": "Long and flat magnet"},
                            {"left": "N pole", "right": "North pole"},
                            {"left": "S pole", "right": "South pole"},
                            {"left": "Attract", "right": "Different poles pull together"},
                            {"left": "Repel", "right": "Same poles push apart"},
                        ],
                        "experiments": [
                            {
                                "title": "What Magnets Do",
                                "intro": "Let's discover what magnets attract and what they don't!",
                                "steps": [
                                    {"instruction": "Hold a magnet near different objects. Observe if it pulls or not.", "image": "magnet"},
                                    {"instruction": "Repeat with each object: paper clip, steel nail, plastic fork, rubber ball, glass marble.", "image": "magnet"},
                                    {"instruction": "Group objects the magnet pulls together. Group objects it doesn't pull.", "image": "magnet_poles"},
                                    {"instruction": "Question: What kinds of objects does a magnet pull?", "answer": "Objects with steel or iron in them", "image": "magnet"},
                                ],
                                "conclusion": "Magnets attract objects with steel or iron. They have two poles (N and S) and are strongest at the poles!"
                            }
                        ],
                    },
                ],
            },
        ],
    },
    {
        "code": "U3", "name": "Earth Science", "color": "#FF9800", "icon": "globe",
        "chapters": [
            {
                "code": "C5", "name": "Earth Materials & Natural Resources",
                "sections": [
                    {
                        "code": "5.1", "name": "Air, Land, Water & Living Things",
                        "flashcards": [
                            {"front": "What is air made up of?", "back": "Many gases", "image": "gas"},
                            {"front": "Does air take up space?", "back": "Yes! Air takes up space", "image": "gas"},
                            {"front": "What is moving air called?", "back": "Wind", "image": "gas"},
                            {"front": "What is the dry part of Earth's surface called?", "back": "Land", "image": "natural_resources"},
                            {"front": "What is a mountain?", "back": "Where the land is high", "image": "natural_resources"},
                            {"front": "What is a plain?", "back": "Where the land is flat", "image": "natural_resources"},
                            {"front": "Is there more water or land on Earth?", "back": "More water! Most of Earth is covered with water", "image": "natural_resources"},
                            {"front": "Where do people live?", "back": "On land", "image": "natural_resources"},
                            {"front": "Where do fish live?", "back": "In water", "image": "natural_resources"},
                        ],
                        "quiz": [
                            {"question": "A mountain is where the land is:", "options": ["high", "low", "flat", "wet"], "correct": 0, "explanation": "Mountains are high land!"},
                            {"question": "A plain is where the land is:", "options": ["bumpy", "flat", "high", "rocky"], "correct": 1, "explanation": "Plains are flat land!"},
                            {"question": "Air is made up of many:", "options": ["gases", "rocks", "lands", "waters"], "correct": 0, "explanation": "Air is made of gases!"},
                            {"question": "Water in a lake is:", "options": ["still", "flowing", "rocky", "salty"], "correct": 0, "explanation": "Lake water is still!"},
                            {"question": "The dry part of Earth's surface is:", "options": ["land", "water", "air", "fire"], "correct": 0, "explanation": "Land is the dry part!"},
                        ],
                        "truefalse": [
                            {"statement": "Most of Earth's surface is covered with land.", "answer": False, "explanation": "No! Most is covered with WATER!"},
                            {"statement": "Water in a lake is still.", "answer": True, "explanation": "Yes! Lake water is still!"},
                            {"statement": "Water in a river flows.", "answer": True, "explanation": "Yes! Rivers flow!"},
                            {"statement": "Water in an ocean is saltwater.", "answer": True, "explanation": "Yes! Oceans have saltwater!"},
                        ],
                        "matching": [
                            {"left": "Fish", "right": "Lives in water"},
                            {"left": "Dog", "right": "Lives on land"},
                            {"left": "Mountain", "right": "High land"},
                            {"left": "Plain", "right": "Flat land"},
                            {"left": "Wind", "right": "Moving air"},
                        ],
                        "experiments": [
                            {
                                "title": "Earth's Surface",
                                "intro": "Let's explore Earth's surface using a globe!",
                                "steps": [
                                    {"instruction": "Observe the globe closely without a magnifying glass.", "image": "earth_rotation"},
                                    {"instruction": "Observe the globe closely with a magnifying glass.", "image": "earth_rotation"},
                                    {"instruction": "Question: Is there more water or land on Earth?", "answer": "More water", "image": "earth_rotation"},
                                ],
                                "conclusion": "Earth has more water than land. Land includes mountains (high) and plains (flat). Air is made of gases."
                            }
                        ],
                    },
                    {
                        "code": "5.2", "name": "Rocks",
                        "flashcards": [
                            {"front": "What is a rock?", "back": "A nonliving solid that is formed naturally", "image": "rock_boulder"},
                            {"front": "Are all rocks the same?", "back": "No! Rocks have different colors, sizes, and textures (rough or smooth)", "image": "rock_gravel"},
                            {"front": "What is a boulder?", "back": "A very big rock", "image": "rock_boulder"},
                            {"front": "What is gravel?", "back": "Larger than sand but smaller than a boulder", "image": "rock_gravel"},
                            {"front": "What is sand?", "back": "Small pieces of broken rock, smaller than gravel", "image": "rock_sand"},
                            {"front": "What is clay?", "back": "A piece of rock that is smaller than sand", "image": "rock_clay"},
                            {"front": "What happens to rocks over time?", "back": "They break down into smaller pieces (sand and clay)", "image": "rock_sand"},
                            {"front": "What are natural resources?", "back": "Things in nature that people use", "image": "natural_resources"},
                        ],
                        "quiz": [
                            {"question": "A nonliving solid formed naturally is a(n):", "options": ["rock", "ant", "wall", "tree"], "correct": 0, "explanation": "Rocks are nonliving natural solids!"},
                            {"question": "Natural resources people use to build are:", "options": ["water", "rocks", "air", "light"], "correct": 1, "explanation": "Rocks are used to build!"},
                            {"question": "A very big rock is a:", "options": ["boulder", "sand", "gravel", "clay"], "correct": 0, "explanation": "Boulders are very big rocks!"},
                            {"question": "Sand is ________ than gravel.", "options": ["smaller", "larger", "harder", "softer"], "correct": 0, "explanation": "Sand is smaller than gravel!"},
                            {"question": "Over time, rocks break down into:", "options": ["larger", "smaller", "similar", "bigger"], "correct": 1, "explanation": "Rocks break into smaller pieces!"},
                            {"question": "Gravel is ________ than clay.", "options": ["smaller", "larger", "softer", "darker"], "correct": 1, "explanation": "Gravel is larger than clay!"},
                        ],
                        "truefalse": [
                            {"statement": "A rock is a living solid.", "answer": False, "explanation": "No! Rocks are NONLIVING!"},
                            {"statement": "Rocks can be different colors and sizes.", "answer": True, "explanation": "Yes! Rocks vary!"},
                            {"statement": "All rocks feel rough.", "answer": False, "explanation": "No! Some are smooth!"},
                            {"statement": "Gravel is larger than sand but smaller than a boulder.", "answer": True, "explanation": "Correct!"},
                        ],
                        "sorting": {
                            "title": "Sort rocks from smallest to largest",
                            "categories": ["Smallest", "Small", "Medium", "Largest"],
                            "items": [
                                {"item": "Clay", "category": 0},
                                {"item": "Sand", "category": 1},
                                {"item": "Gravel", "category": 2},
                                {"item": "Boulder", "category": 3},
                            ]
                        },
                        "matching": [
                            {"left": "Boulder", "right": "Very big rock"},
                            {"left": "Gravel", "right": "Medium rock pieces"},
                            {"left": "Sand", "right": "Small rock pieces"},
                            {"left": "Clay", "right": "Smallest rock pieces"},
                        ],
                        "experiments": [
                            {
                                "title": "Sorting Rocks",
                                "intro": "Let's observe and sort different rocks!",
                                "steps": [
                                    {"instruction": "Place rocks on a paper plate.", "image": "rock_gravel"},
                                    {"instruction": "Observe the rocks with a magnifying glass.", "image": "rock_gravel"},
                                    {"instruction": "Feel the rocks with your hands.", "image": "rock_gravel"},
                                    {"instruction": "Classify the rocks as rough or smooth.", "image": "rock_gravel"},
                                    {"instruction": "Sort the rocks by color, then by size.", "image": "rock_gravel"},
                                    {"instruction": "Question: What are some properties of rocks?", "answer": "Color, size, and texture (rough or smooth)", "image": "rock_gravel"},
                                ],
                                "conclusion": "Rocks have different colors, sizes, and textures. Over time they break down into smaller pieces!"
                            }
                        ],
                    },
                    {
                        "code": "5.3", "name": "Soil",
                        "flashcards": [
                            {"front": "What is soil?", "back": "The loose upper layer of Earth's surface", "image": "soil"},
                            {"front": "What nonliving things are in soil?", "back": "Sand and clay", "image": "rock_sand"},
                            {"front": "What living things are in soil?", "back": "Earthworms and ants", "image": "earthworm"},
                            {"front": "Does all soil feel the same?", "back": "No! Soil can feel rough or smooth", "image": "soil"},
                            {"front": "How does water pass through sandy soil?", "back": "Quickly", "image": "rock_sand"},
                            {"front": "How does water pass through clay soil?", "back": "Slowly", "image": "rock_clay"},
                            {"front": "What are the layers of soil?", "back": "Topsoil (top layer) and rock deep underneath", "image": "soil"},
                            {"front": "Is soil a natural resource?", "back": "Yes! Soil is used to grow plants", "image": "soil"},
                        ],
                        "quiz": [
                            {"question": "Water passes quickly through:", "options": ["sandy soil", "clay soil", "all soil", "white soil"], "correct": 0, "explanation": "Water passes quickly through sandy soil!"},
                            {"question": "Water passes slowly through:", "options": ["sandy soil", "clay soil", "white soil", "rock"], "correct": 1, "explanation": "Water passes slowly through clay soil!"},
                            {"question": "Deep under the topsoil is:", "options": ["rock", "sand", "root", "water"], "correct": 0, "explanation": "Rock is deep under topsoil!"},
                            {"question": "The top layer of soil is called:", "options": ["tree", "topsoil", "sand", "clay"], "correct": 1, "explanation": "Topsoil is the top layer!"},
                            {"question": "People grow ________ in soil.", "options": ["plants", "houses", "statues", "cars"], "correct": 0, "explanation": "We grow plants in soil!"},
                        ],
                        "truefalse": [
                            {"statement": "All types of soil are the same color.", "answer": False, "explanation": "No! Soil comes in different colors!"},
                            {"statement": "Soil can feel rough or smooth.", "answer": True, "explanation": "Yes! Different textures!"},
                            {"statement": "Soil contains living and nonliving things.", "answer": True, "explanation": "Yes! Worms, ants, sand, clay!"},
                            {"statement": "Living things live only on land.", "answer": False, "explanation": "No! Fish live in water!"},
                        ],
                        "sorting": {
                            "title": "Sort: Living or Nonliving things in soil?",
                            "categories": ["Living things in soil", "Nonliving things in soil"],
                            "items": [
                                {"item": "Earthworms", "category": 0},
                                {"item": "Ants", "category": 0},
                                {"item": "Bacteria", "category": 0},
                                {"item": "Sand", "category": 1},
                                {"item": "Clay", "category": 1},
                                {"item": "Rock pieces", "category": 1},
                            ]
                        },
                        "experiments": [
                            {
                                "title": "Observing Soil",
                                "intro": "Let's observe soil from different places!",
                                "steps": [
                                    {"instruction": "Collect soil from different parts of the playground. Put each in a different bag.", "image": "soil"},
                                    {"instruction": "Spread soil from each bag on a white paper plate.", "image": "soil"},
                                    {"instruction": "Rub the soil between your fingers.", "image": "soil"},
                                    {"instruction": "Observe the soil using a magnifying glass.", "image": "earthworm"},
                                    {"instruction": "Question: Is soil made of only one thing?", "answer": "No, soil has many things in it", "image": "soil"},
                                ],
                                "conclusion": "Soil contains living things (worms, ants) and nonliving things (sand, clay). It has layers and comes in different colors!"
                            }
                        ],
                    },
                    {
                        "code": "5.4", "name": "Air, Trees & Water as Resources",
                        "flashcards": [
                            {"front": "Which natural resource do people breathe?", "back": "Air", "image": "gas"},
                            {"front": "Which resource grows on land and makes paper?", "back": "Trees (wood)", "image": "tree_trunk"},
                            {"front": "Which resource do people drink?", "back": "Water", "image": "liquid"},
                            {"front": "What do people use water for?", "back": "Drinking, washing, cooking, and having fun", "image": "liquid"},
                            {"front": "How to be safe around water?", "back": "Know how to swim, wear a life jacket, have adult supervision", "image": "liquid"},
                            {"front": "What does a life jacket do?", "back": "Helps you float in water", "image": "liquid"},
                            {"front": "What do people use wood for?", "back": "Furniture and paper", "image": "tree_trunk"},
                        ],
                        "quiz": [
                            {"question": "Air is ________ to most living things.", "options": ["colored", "important", "living", "rare"], "correct": 1, "explanation": "Air is important for living things!"},
                            {"question": "People use ________ to make furniture and paper.", "options": ["land", "wood", "air", "water"], "correct": 1, "explanation": "Wood from trees!"},
                            {"question": "A life jacket can keep you safe in:", "options": ["water", "land", "air", "fire"], "correct": 0, "explanation": "Life jackets are for water!"},
                            {"question": "Adult supervision is ________ when in water.", "options": ["dangerous", "important", "fun", "optional"], "correct": 1, "explanation": "Always have adult supervision near water!"},
                        ],
                        "matching": [
                            {"left": "Air", "right": "People breathe it"},
                            {"left": "Trees", "right": "Make paper and furniture"},
                            {"left": "Water", "right": "People drink it"},
                            {"left": "Life jacket", "right": "Helps you float"},
                        ],
                    },
                    {
                        "code": "5.5", "name": "Conserving Natural Resources",
                        "flashcards": [
                            {"front": "What does conserve mean?", "back": "To protect a natural resource from waste", "image": "recycle"},
                            {"front": "What does reduce mean?", "back": "To use less of something", "image": "reduce"},
                            {"front": "What does reuse mean?", "back": "To use something again", "image": "reuse"},
                            {"front": "What does recycle mean?", "back": "To change an object into something new", "image": "recycle"},
                            {"front": "Example of reducing", "back": "Turning off water while brushing teeth, writing on both sides of paper", "image": "reduce"},
                            {"front": "Example of reusing", "back": "Using the same grocery bag many times", "image": "reuse"},
                            {"front": "Example of recycling", "back": "Taking plastic bottles to a factory to make new things", "image": "recycle"},
                        ],
                        "quiz": [
                            {"question": "Writing on both sides of paper is:", "options": ["reducing", "reusing", "recycling", "wasting"], "correct": 0, "explanation": "Using less paper = reducing!"},
                            {"question": "Taking old aluminum to a factory to make new things is:", "options": ["reusing", "recycling", "reducing", "wasting"], "correct": 1, "explanation": "Changing into new = recycling!"},
                            {"question": "Using the same grocery bag many times is:", "options": ["recycling", "reusing", "reducing", "wasting"], "correct": 1, "explanation": "Using again = reusing!"},
                            {"question": "Turning off electricity when leaving is:", "options": ["recycling", "reducing", "reusing", "wasting"], "correct": 1, "explanation": "Using less = reducing!"},
                            {"question": "What is one way to reduce trash?", "options": ["Using a new water bottle every day", "Writing on both sides of paper", "Throwing away more", "Buying more things"], "correct": 1, "explanation": "Writing on both sides reduces paper waste!"},
                        ],
                        "truefalse": [
                            {"statement": "Natural resources are things from nature that people use.", "answer": True, "explanation": "Yes!"},
                            {"statement": "To reuse is to use less of something.", "answer": False, "explanation": "No! Reuse = use AGAIN. Reduce = use LESS!"},
                            {"statement": "To recycle is to change an object into something new.", "answer": True, "explanation": "Yes!"},
                            {"statement": "Turning off water while washing dishes is reducing.", "answer": True, "explanation": "Yes! Using less water!"},
                        ],
                        "sorting": {
                            "title": "Sort: Reduce, Reuse, or Recycle?",
                            "categories": ["Reduce", "Reuse", "Recycle"],
                            "items": [
                                {"item": "Turn off lights", "category": 0},
                                {"item": "Write on both sides of paper", "category": 0},
                                {"item": "Use less water", "category": 0},
                                {"item": "Use same grocery bag", "category": 1},
                                {"item": "Use old jar for storage", "category": 1},
                                {"item": "Donate old clothes", "category": 1},
                                {"item": "Take plastic to factory", "category": 2},
                                {"item": "Make new from old aluminum", "category": 2},
                                {"item": "Turn old paper into new paper", "category": 2},
                            ]
                        },
                        "matching": [
                            {"left": "Reduce", "right": "Use less of something"},
                            {"left": "Reuse", "right": "Use something again"},
                            {"left": "Recycle", "right": "Change into something new"},
                            {"left": "Conserve", "right": "Protect from waste"},
                        ],
                        "experiments": [
                            {
                                "title": "Plant Pet from Recycled Bottle",
                                "intro": "Let's make a plant pet while reducing trash!",
                                "steps": [
                                    {"instruction": "Cut the bottom half of a water bottle (ask an adult for help).", "image": "reuse"},
                                    {"instruction": "Glue googly eyes and the bottle cap on to make a face.", "image": "reuse"},
                                    {"instruction": "Half-fill the bottle with potting soil.", "image": "soil"},
                                    {"instruction": "Add seeds and cover with a thin layer of soil.", "image": "seed"},
                                    {"instruction": "Water the seeds. Keep watering every day until the plant grows.", "image": "seedling"},
                                    {"instruction": "Question: How did you reduce trash?", "answer": "By reusing the water bottle", "image": "reuse"},
                                    {"instruction": "Question: What did you reuse?", "answer": "The water bottle", "image": "reuse"},
                                ],
                                "conclusion": "We can conserve natural resources by reducing, reusing, and recycling!"
                            }
                        ],
                    },
                ],
            },
            {
                "code": "C6", "name": "The Sky",
                "sections": [
                    {
                        "code": "6.1", "name": "Objects in the Sky",
                        "flashcards": [
                            {"front": "Name objects seen in the daytime sky", "back": "Sun, clouds, birds, planes", "image": "sky_day"},
                            {"front": "Name objects seen in the nighttime sky", "back": "Moon and stars", "image": "sky_night"},
                            {"front": "Which object is always in the daytime sky?", "back": "The Sun", "image": "sun"},
                            {"front": "What is a moon phase?", "back": "The shape of the moon seen in the sky", "image": "moon_phases"},
                            {"front": "What is a full moon?", "back": "When the moon looks like a bright circle", "image": "moon_phases"},
                            {"front": "What is a new moon?", "back": "When the moon cannot be seen at all", "image": "moon_phases"},
                            {"front": "How often do moon phases repeat?", "back": "Almost every 29 days", "image": "moon_phases"},
                            {"front": "Which objects stay in the sky for a short time?", "back": "Clouds, birds, planes (contrails)", "image": "sky_day"},
                        ],
                        "quiz": [
                            {"question": "The shape of the moon seen in the sky is called a:", "options": ["phase", "sun", "lit moon", "shadow"], "correct": 0, "explanation": "It's called a phase!"},
                            {"question": "When the moon looks like a bright circle, it is a:", "options": ["new moon", "full moon", "quarter moon", "half moon"], "correct": 1, "explanation": "A bright circle = full moon!"},
                            {"question": "When the moon cannot be seen at all, it is a:", "options": ["new moon", "quarter moon", "full moon", "half moon"], "correct": 0, "explanation": "Can't see it = new moon!"},
                            {"question": "The phases of the moon repeat almost every ________ days.", "options": ["27", "28", "29", "30"], "correct": 2, "explanation": "About 29 days!"},
                        ],
                        "matching": [
                            {"left": "Sun", "right": "Daytime sky"},
                            {"left": "Moon", "right": "Nighttime sky"},
                            {"left": "Stars", "right": "Nighttime sky"},
                            {"left": "Clouds", "right": "Short time in sky"},
                            {"left": "Full moon", "right": "Bright circle"},
                            {"left": "New moon", "right": "Cannot be seen"},
                        ],
                        "experiments": [
                            {
                                "title": "What's in the Sky",
                                "intro": "Let's observe the sky during daytime!",
                                "steps": [
                                    {"instruction": "Observe the sky during the daytime. Look up carefully!", "image": "sky_day"},
                                    {"instruction": "Draw on cardboard paper what you observed in the sky.", "image": "sky_day"},
                                    {"instruction": "Question: Which objects stay in the sky for a long time?", "answer": "The sun", "image": "sun"},
                                    {"instruction": "Question: Which objects do not stay for long?", "answer": "Clouds, birds, planes", "image": "sky_day"},
                                ],
                                "conclusion": "The sun is always in the daytime sky. The moon and stars are seen at night. Clouds, birds, and planes are in the sky for a short time."
                            }
                        ],
                    },
                    {
                        "code": "6.2", "name": "The Sun, a Star",
                        "flashcards": [
                            {"front": "What is a star?", "back": "A huge ball of gases", "image": "star"},
                            {"front": "What does a star give off?", "back": "Light and heat", "image": "star"},
                            {"front": "Is the sun a star?", "back": "Yes! The sun is a star", "image": "sun"},
                            {"front": "Why does the sun look big?", "back": "Because it is the closest star to Earth", "image": "sun"},
                            {"front": "What does the sun provide Earth?", "back": "Light and heat", "image": "sun"},
                            {"front": "What does sunlight heat?", "back": "The land, water, and air on Earth", "image": "sun"},
                            {"front": "What is a shadow?", "back": "A dark area that forms when light is blocked", "image": "shadow"},
                            {"front": "Why do plants need sunlight?", "back": "To make food and grow", "image": "sun"},
                            {"front": "How many stars are in the sky?", "back": "Many! Too many to count", "image": "star"},
                        ],
                        "quiz": [
                            {"question": "When feeling hot, stand in the shade to feel:", "options": ["hotter", "cooler", "warmer", "bigger"], "correct": 1, "explanation": "Shade is cooler!"},
                            {"question": "The sun looks big because it is the ________ star to Earth.", "options": ["closest", "farthest", "smallest", "biggest"], "correct": 0, "explanation": "It's the closest star!"},
                            {"question": "On a sunny day, sand, air, and water become:", "options": ["warm", "cold", "wet", "dark"], "correct": 0, "explanation": "The sun makes them warm!"},
                            {"question": "Plants need ________ to grow.", "options": ["sunlight", "wind", "animals", "darkness"], "correct": 0, "explanation": "Plants need sunlight!"},
                            {"question": "There are ________ stars in the sky.", "options": ["many", "ten", "two", "five"], "correct": 0, "explanation": "There are many stars!"},
                        ],
                        "truefalse": [
                            {"statement": "The sun is seen in the sky during daytime.", "answer": True, "explanation": "Yes!"},
                            {"statement": "The sun seems to set in the morning.", "answer": False, "explanation": "No! It sets in the evening!"},
                            {"statement": "If you stand in the sun, you will feel cooler.", "answer": False, "explanation": "No! You feel WARMER!"},
                            {"statement": "Sunlight helps plants grow.", "answer": True, "explanation": "Yes! Plants need sunlight!"},
                        ],
                        "matching": [
                            {"left": "Sun", "right": "A huge ball of gases"},
                            {"left": "Shadow", "right": "Dark area when light is blocked"},
                            {"left": "Star", "right": "Gives off light and heat"},
                            {"left": "Sun", "right": "Closest star to Earth"},
                        ],
                        "experiments": [
                            {
                                "title": "Plants Need the Sun",
                                "intro": "Let's prove that plants need sunlight!",
                                "steps": [
                                    {"instruction": "Cover one leaf of a plant with aluminum foil. Make sure it covers all of the leaf.", "image": "leaves"},
                                    {"instruction": "Keep the plant in a sunny place. Water it as needed.", "image": "sun"},
                                    {"instruction": "After one week, remove the foil from the covered leaf.", "image": "leaves"},
                                    {"instruction": "Question: How is the covered leaf different from other leaves?", "answer": "It is pale and lighter colored", "image": "leaves"},
                                    {"instruction": "Question: Is the sun necessary for plants?", "answer": "Yes, plants need sunlight to make food", "image": "sun"},
                                ],
                                "conclusion": "The sun is a star that gives light and heat. Plants need sunlight to make food and grow. Shadows form when light is blocked!"
                            }
                        ],
                    },
                    {
                        "code": "6.3", "name": "Earth's Rotation",
                        "flashcards": [
                            {"front": "What causes daytime and nighttime?", "back": "Earth's rotation (spinning like a top)", "image": "earth_rotation"},
                            {"front": "What is on the side of Earth facing the sun?", "back": "Daytime", "image": "day_night"},
                            {"front": "What is on the side facing away from the sun?", "back": "Nighttime", "image": "day_night"},
                            {"front": "How often do daytime and nighttime repeat?", "back": "Every 24 hours (one day)", "image": "earth_rotation"},
                            {"front": "Why does the sun seem to move?", "back": "Because of Earth's rotation", "image": "earth_rotation"},
                            {"front": "When does the sun seem to rise?", "back": "In the morning", "image": "sun"},
                            {"front": "When is the sun highest in the sky?", "back": "At noon", "image": "sun"},
                            {"front": "When does the sun seem to set?", "back": "In the evening", "image": "sun"},
                            {"front": "Does Earth spin like a top?", "back": "Yes! Earth spins like a top", "image": "earth_rotation"},
                        ],
                        "quiz": [
                            {"question": "The sun seems to ________ in the morning.", "options": ["rise", "set", "grow", "sleep"], "correct": 0, "explanation": "The sun rises in the morning!"},
                            {"question": "The sun appears ________ at noon.", "options": ["highest", "lowest", "cool", "small"], "correct": 0, "explanation": "The sun is highest at noon!"},
                            {"question": "The sun seems to ________ late in the afternoon.", "options": ["rise", "set", "sleep", "grow"], "correct": 1, "explanation": "The sun sets in the afternoon!"},
                            {"question": "The sun seems to change place because of Earth's:", "options": ["rotation", "pattern", "size", "color"], "correct": 0, "explanation": "Earth's rotation makes the sun seem to move!"},
                            {"question": "The position of sun and stars changes with seasons, forming a:", "options": ["pattern", "movement", "rotation", "shape"], "correct": 0, "explanation": "It forms a pattern!"},
                        ],
                        "truefalse": [
                            {"statement": "Earth's rotation makes the moon seem to move in the sky.", "answer": True, "explanation": "Yes! Rotation makes everything seem to move!"},
                            {"statement": "Earth's rotation makes the stars seem to move in the sky.", "answer": True, "explanation": "Yes!"},
                            {"statement": "The position of the sun stays the same during different seasons.", "answer": False, "explanation": "No! It changes with seasons!"},
                            {"statement": "Earth spins like a top.", "answer": True, "explanation": "Yes!"},
                            {"statement": "It is nighttime on the side of Earth that faces the sun.", "answer": False, "explanation": "No! It's DAYTIME on the side facing the sun!"},
                            {"statement": "The stars in the sky can easily be counted one by one.", "answer": False, "explanation": "No! There are too many stars!"},
                        ],
                        "matching": [
                            {"left": "To rotate", "right": "To spin"},
                            {"left": "The sun", "right": "Seems to move in daytime sky"},
                            {"left": "The moon", "right": "Seems to move in nighttime sky"},
                            {"left": "Day and night", "right": "Repeat every 24 hours"},
                            {"left": "Earth's rotation", "right": "Causes day and night"},
                        ],
                        "experiments": [
                            {
                                "title": "Day and Night Model",
                                "intro": "Let's model day and night with a flashlight and globe!",
                                "steps": [
                                    {"instruction": "In a dark room, turn a flashlight on.", "image": "sun"},
                                    {"instruction": "Have a partner hold a globe.", "image": "earth_rotation"},
                                    {"instruction": "Shine the flashlight on the globe and rotate the globe slowly.", "image": "earth_rotation"},
                                    {"instruction": "Question: What does the globe represent?", "answer": "Earth", "image": "earth_rotation"},
                                    {"instruction": "Question: What does the flashlight represent?", "answer": "The sun", "image": "sun"},
                                    {"instruction": "Question: Is it daytime on all sides of Earth at the same time?", "answer": "No", "image": "day_night"},
                                    {"instruction": "Question: How does this model explain day and night?", "answer": "The side facing the sun has day, the other side has night", "image": "day_night"},
                                ],
                                "conclusion": "Earth's rotation causes day and night. The side facing the sun has daytime, the other side has nighttime. This repeats every 24 hours!"
                            }
                        ],
                    },
                ],
            },
        ],
    },
]


def get_all_sections():
    sections = []
    for unit in UNITS:
        for chapter in unit["chapters"]:
            for section in chapter["sections"]:
                sections.append({
                    "unit": unit,
                    "chapter": chapter,
                    "section": section,
                })
    return sections


def count_activities(section):
    count = 0
    for key in ["flashcards", "quiz", "truefalse", "matching", "sorting", "memory", "labeling"]:
        if key in section and section[key]:
            count += 1
    if "experiments" in section:
        count += len(section["experiments"])
    return count


if __name__ == "__main__":
    sections = get_all_sections()
    total = 0
    for s in sections:
        n = count_activities(s["section"])
        total += n
        print(f"{s['unit']['code']}/{s['chapter']['code']}/{s['section']['code']} {s['section']['name']}: {n} activities")
    print(f"\nTotal: {len(sections)} sections, {total} activities")
