"""
zones.py — Coding Basics zones and challenges.

All challenges are conceptual — no actual coding required.
Ages 8-12. Uses analogies, logical thinking, and what-does-this-do questions.
"""

ZONE_ORDER = [
    "what_is_coding",
    "sequences_loops",
    "conditionals",
    "variables",
    "functions",
    "creative_computing",
]

ZONES = {
    "what_is_coding": {
        "id": "what_is_coding",
        "name": "The Code Workshop",
        "subtitle": "What is a computer program, anyway?",
        "icon": "⚙️",
        "description": "Discover what coding is and how computers think",
        "level_required": 1,
        "challenges": [
            {
                "id": "wic_01",
                "title": "What Is a Program?",
                "type": "quiz",
                "question": "A computer program is best described as which of these?",
                "lesson": "A [bold yellow]computer program[/bold yellow] is a set of instructions that tells a computer exactly what to do. Just like a recipe tells you how to bake a cake, a program tells a computer how to do a task — step by step.",
                "options": [
                    "A set of instructions that tells a computer what to do",
                    "A kind of electric plug",
                    "A picture drawn on a screen",
                    "A very fast calculator button",
                ],
                "answer": "a",
                "hints": [
                    "Think of a recipe — it tells you what to do, step by step.",
                    "A program is like a recipe for a computer!",
                ],
                "xp": 25,
            },
            {
                "id": "wic_02",
                "title": "What Computers Do",
                "type": "quiz",
                "question": "When a computer reads your instructions, what does it do with them?",
                "lesson": "Computers [bold yellow]follow instructions exactly[/bold yellow] — no more, no less. They don't guess, they don't improvise, and they don't skip steps. That's why writing instructions clearly is so important in coding!",
                "options": [
                    "It guesses what you probably meant",
                    "It follows the instructions exactly as written",
                    "It ignores them and does whatever it wants",
                    "It asks a friend what to do",
                ],
                "answer": "b",
                "hints": [
                    "Computers are very precise — they do exactly what they're told.",
                    "No guessing allowed! Computers follow instructions exactly.",
                ],
                "xp": 25,
            },
            {
                "id": "wic_03",
                "title": "Computer Language",
                "type": "quiz",
                "question": "Deep down, at the very lowest level, what language do computers actually understand?",
                "lesson": "At the very deepest level, computers understand [bold yellow]binary[/bold yellow] — a language made of only two symbols: 0 and 1. Everything on a computer — pictures, words, games — is ultimately stored as long strings of 0s and 1s.",
                "options": [
                    "English",
                    "A very fast type of Spanish",
                    "Binary — just 0s and 1s",
                    "Emojis",
                ],
                "answer": "c",
                "hints": [
                    "It's a very simple language — only two possible symbols.",
                    "Zero and one — that's all a computer needs at its core!",
                ],
                "xp": 25,
            },
            {
                "id": "wic_04",
                "title": "What Is a Bug?",
                "type": "quiz",
                "question": "In coding, when someone says their program has a \"bug,\" what do they mean?",
                "lesson": "A [bold yellow]bug[/bold yellow] is an error or mistake in a program. When there's a bug, the program doesn't do what was intended. The word came from an early computer that was actually stopped by a real moth getting trapped inside — bugs have been part of computing ever since!",
                "options": [
                    "A small insect that lives inside the computer",
                    "An error or mistake in the program",
                    "A special feature that makes programs faster",
                    "The cursor blinking on the screen",
                ],
                "answer": "b",
                "hints": [
                    "It's not a real insect — it's a mistake in the instructions.",
                    "A bug is when something goes wrong in the code!",
                ],
                "xp": 25,
            },
            {
                "id": "wic_05",
                "title": "Debugging",
                "type": "quiz",
                "question": "A programmer finds that her game keeps crashing. She starts reading through her instructions very carefully to find the mistake. What is she doing?",
                "lesson": "[bold yellow]Debugging[/bold yellow] is the process of finding and fixing errors (bugs) in a program. It's one of the most important skills in coding — and even expert programmers spend lots of time debugging!",
                "options": [
                    "Installing the game",
                    "Debugging — finding and fixing errors in the program",
                    "Deleting the program",
                    "Painting the screen",
                ],
                "answer": "b",
                "hints": [
                    "She's looking for the mistake — what do we call that process?",
                    "Finding and fixing bugs is called debugging!",
                ],
                "xp": 25,
            },
            {
                "id": "wic_boss",
                "title": "The Algorithm",
                "type": "quiz",
                "question": "You want to teach a robot how to make a sandwich. You write down: 1) Get bread. 2) Spread butter. 3) Add filling. 4) Close sandwich. What have you written?",
                "lesson": "An [bold yellow]algorithm[/bold yellow] is a clear, step-by-step set of instructions for solving a problem or completing a task. Recipes, directions, and game rules are all algorithms! Every computer program is built on algorithms.",
                "options": [
                    "A shopping list",
                    "An algorithm — step-by-step instructions to solve a problem",
                    "A drawing",
                    "A letter to the robot",
                ],
                "answer": "b",
                "hints": [
                    "It's a step-by-step plan to get something done — what's the word for that?",
                    "A clear set of steps to solve a problem is called an algorithm!",
                ],
                "xp": 60,
            },
        ],
    },
    "sequences_loops": {
        "id": "sequences_loops",
        "name": "The Loop Garden",
        "subtitle": "Order matters — and repeating is powerful",
        "icon": "🔄",
        "description": "Learn how instructions run in order and how loops save the day",
        "level_required": 1,
        "challenges": [
            {
                "id": "sl_01",
                "title": "Sequences",
                "type": "quiz",
                "question": "In coding, what does the word \"sequence\" mean?",
                "lesson": "A [bold yellow]sequence[/bold yellow] means instructions that run in order — one after another. The order matters! If you put on your shoes before your socks, that's the wrong sequence. Computers follow sequences very carefully.",
                "options": [
                    "Instructions that all run at the same time",
                    "Instructions that run in order, one after another",
                    "Instructions that run backwards",
                    "Instructions that the computer chooses randomly",
                ],
                "answer": "b",
                "hints": [
                    "Think of a recipe — you follow the steps in a certain order.",
                    "A sequence is instructions in order — first this, then that!",
                ],
                "xp": 25,
            },
            {
                "id": "sl_02",
                "title": "When to Use a Loop",
                "type": "quiz",
                "question": "You want a robot to wave its arm 10 times. Instead of writing \"wave arm\" ten times, what should you use?",
                "lesson": "A [bold yellow]loop[/bold yellow] lets you repeat instructions without writing them over and over. Instead of saying \"wave arm\" ten times, you can say \"repeat 10 times: wave arm.\" Loops make code shorter and easier to read.",
                "options": [
                    "A very long list",
                    "A loop — it repeats instructions a set number of times",
                    "Ten separate programs",
                    "A special delete button",
                ],
                "answer": "b",
                "hints": [
                    "There's a tool in coding that lets you repeat things easily.",
                    "A loop repeats — so you only have to write the instruction once!",
                ],
                "xp": 25,
            },
            {
                "id": "sl_03",
                "title": "The For Loop",
                "type": "quiz",
                "question": "A \"for loop\" in coding does what?",
                "lesson": "A [bold yellow]for loop[/bold yellow] repeats instructions a specific number of times. \"For 5 times: jump\" means jump exactly 5 times — no more, no less. You decide exactly how many repetitions before the loop starts.",
                "options": [
                    "It runs forever and never stops",
                    "It only runs once",
                    "It repeats instructions a specific number of times",
                    "It skips every other instruction",
                ],
                "answer": "c",
                "hints": [
                    "The name gives a clue — \"for 5 times\" means a specific amount.",
                    "A for loop runs a set number of times that you decide!",
                ],
                "xp": 25,
            },
            {
                "id": "sl_04",
                "title": "The While Loop",
                "type": "quiz",
                "question": "A \"while loop\" in coding does what?",
                "lesson": "A [bold yellow]while loop[/bold yellow] keeps repeating as long as a certain condition is true. \"While it's raining: stay inside\" means you stay inside for as long as the rain keeps going — you don't know exactly how many times ahead of time.",
                "options": [
                    "It runs exactly three times, always",
                    "It runs while a condition is true, stopping when it becomes false",
                    "It runs backwards",
                    "It only runs at night",
                ],
                "answer": "b",
                "hints": [
                    "\"While\" suggests it keeps going as long as something is happening.",
                    "A while loop runs as long as a condition stays true!",
                ],
                "xp": 25,
            },
            {
                "id": "sl_05",
                "title": "Which Loop?",
                "type": "quiz",
                "question": "Which kind of loop keeps running while something is TRUE — and stops as soon as it becomes false?",
                "lesson": "The [bold yellow]while loop[/bold yellow] is built around a true/false condition. It checks: \"Is this still true?\" If yes, it runs. If no, it stops. This is useful when you don't know in advance how many times something will repeat.",
                "options": [
                    "A for loop",
                    "A sequence",
                    "A while loop",
                    "A counting loop",
                ],
                "answer": "c",
                "hints": [
                    "This loop is named after the word that means \"as long as.\"",
                    "While something is true — that's the while loop!",
                ],
                "xp": 25,
            },
            {
                "id": "sl_boss",
                "title": "Count the Loops",
                "type": "quiz",
                "question": "Here is an instruction: \"Repeat 5 times: say hello.\" How many times does the computer say hello?",
                "lesson": "When a loop says [bold yellow]\"repeat 5 times\"[/bold yellow], the instruction runs exactly 5 times — not 4, not 6, exactly 5. Computers do precisely what they are told, which is why being exact matters so much in coding!",
                "options": [
                    "Once",
                    "Ten times",
                    "It depends on the weather",
                    "5 times",
                ],
                "answer": "d",
                "hints": [
                    "The loop says exactly how many times — read the number carefully.",
                    "\"Repeat 5 times\" means it runs exactly 5 times!",
                ],
                "xp": 60,
            },
        ],
    },
    "conditionals": {
        "id": "conditionals",
        "name": "The If-Then Forest",
        "subtitle": "Making decisions with code",
        "icon": "🌿",
        "description": "Learn how programs make choices using if/then logic",
        "level_required": 1,
        "challenges": [
            {
                "id": "cond_01",
                "title": "If / Then",
                "type": "quiz",
                "question": "In coding, what does \"if/then\" mean?",
                "lesson": "[bold yellow]If/then[/bold yellow] is how computers make decisions. \"IF a condition is true, THEN do something.\" If it's raining, then bring an umbrella. The code only runs the \"then\" part when the \"if\" part is actually true.",
                "options": [
                    "Do something only IF a condition is true",
                    "Do something and then stop forever",
                    "Repeat the same thing twice",
                    "Ask the user a question",
                ],
                "answer": "a",
                "hints": [
                    "\"If\" sets up a condition — something that might or might not be true.",
                    "If the condition is true, THEN the action happens!",
                ],
                "xp": 25,
            },
            {
                "id": "cond_02",
                "title": "Booleans",
                "type": "quiz",
                "question": "In coding, what do we call a value that can only be TRUE or FALSE — nothing else?",
                "lesson": "A [bold yellow]boolean[/bold yellow] (named after mathematician George Boole) is a value that is either true or false — that's all. Is it raining? True or false. Is the score over 100? True or false. Booleans power all if/then decisions in code.",
                "options": [
                    "A number",
                    "A boolean — a condition that is either true or false",
                    "A color",
                    "A secret code",
                ],
                "answer": "b",
                "hints": [
                    "This value has only two possible states — true or false.",
                    "True or false? That's a boolean!",
                ],
                "xp": 25,
            },
            {
                "id": "cond_03",
                "title": "Spot the Condition",
                "type": "quiz",
                "question": "\"If it is raining, then bring an umbrella.\" In that sentence, what is the CONDITION?",
                "lesson": "The [bold yellow]condition[/bold yellow] is the part that gets checked — the part after \"if.\" \"Is it raining?\" is the condition. If that's true, we bring the umbrella. If it's not true, we leave it at home. The condition controls everything!",
                "options": [
                    "Bringing the umbrella",
                    "The umbrella itself",
                    "It is raining",
                    "Going outside",
                ],
                "answer": "c",
                "hints": [
                    "The condition is the thing that might or might not be true.",
                    "The condition is what comes right after the word \"if\"!",
                ],
                "xp": 25,
            },
            {
                "id": "cond_04",
                "title": "The Else",
                "type": "quiz",
                "question": "In an if/then statement, what does the word \"else\" mean?",
                "lesson": "\"[bold yellow]Else[/bold yellow]\" is the backup plan — what the code does when the condition is NOT true. \"If it's raining, bring an umbrella. ELSE, wear sunglasses.\" Else covers all the situations where the \"if\" condition didn't happen.",
                "options": [
                    "Do the main action again",
                    "Stop the program",
                    "What to do if the condition is NOT true",
                    "A fancy way to say \"and\"",
                ],
                "answer": "c",
                "hints": [
                    "Think of \"else\" as the backup plan when \"if\" doesn't apply.",
                    "Else handles the situation when the condition is false!",
                ],
                "xp": 25,
            },
            {
                "id": "cond_05",
                "title": "Nested If",
                "type": "quiz",
                "question": "What is a \"nested if\" in coding?",
                "lesson": "A [bold yellow]nested if[/bold yellow] is an if statement inside another if statement. \"If it's cold: if it's also raining, then wear a raincoat — else, wear a regular coat.\" Nesting lets you make more detailed decisions based on multiple conditions.",
                "options": [
                    "An if that only works at night",
                    "An if inside another if",
                    "An if that runs backwards",
                    "Two ifs that never talk to each other",
                ],
                "answer": "b",
                "hints": [
                    "\"Nested\" means tucked inside — like Russian dolls.",
                    "A nested if is an if statement that lives inside another if!",
                ],
                "xp": 25,
            },
            {
                "id": "cond_boss",
                "title": "What Grade?",
                "type": "quiz",
                "question": "Here is a rule: IF score is greater than 90, THEN grade = A. ELSE grade = B. A student scores 85. What grade do they get?",
                "lesson": "Since 85 is [bold yellow]not greater than 90[/bold yellow], the \"if\" condition is false — so we go to the \"else\" and give grade B. This is exactly how programs make decisions: check the condition, and follow the right path based on whether it's true or false.",
                "options": [
                    "A",
                    "B",
                    "C",
                    "No grade — the program crashes",
                ],
                "answer": "b",
                "hints": [
                    "Is 85 greater than 90? Check the condition carefully.",
                    "85 is NOT greater than 90, so we take the else path — grade B!",
                ],
                "xp": 60,
            },
        ],
    },
    "variables": {
        "id": "variables",
        "name": "The Memory Room",
        "subtitle": "Where programs remember things",
        "icon": "📦",
        "description": "Discover how variables hold and change information",
        "level_required": 1,
        "challenges": [
            {
                "id": "var_01",
                "title": "What Is a Variable?",
                "type": "quiz",
                "question": "In coding, what is a variable?",
                "lesson": "A [bold yellow]variable[/bold yellow] is a named storage place for data — like a labeled box where you can put a piece of information and come back to it later. You give the box a name, and you can put things in, take them out, or swap them for something new.",
                "options": [
                    "A special kind of screen",
                    "A named storage place for data",
                    "A color you use to paint the program",
                    "A very fast internet connection",
                ],
                "answer": "b",
                "hints": [
                    "Think of a labeled box where you keep a piece of information.",
                    "A variable is a named box that stores data!",
                ],
                "xp": 25,
            },
            {
                "id": "var_02",
                "title": "Types of Data",
                "type": "quiz",
                "question": "Which of these things can a variable hold?",
                "lesson": "Variables can hold many types of data: [bold yellow]numbers[/bold yellow] (like 42 or 3.14), [bold yellow]text[/bold yellow] (like \"hello\" or a name), and [bold yellow]true/false values[/bold yellow] (booleans). Different kinds of programs use different types of variables.",
                "options": [
                    "Only whole numbers",
                    "Only words",
                    "Numbers, text, and true/false values",
                    "Only colors",
                ],
                "answer": "c",
                "hints": [
                    "Variables are very flexible — they can hold different kinds of information.",
                    "Numbers, words, true/false — variables can hold all of these!",
                ],
                "xp": 25,
            },
            {
                "id": "var_03",
                "title": "Reading a Variable",
                "type": "quiz",
                "question": "A programmer writes: name = \"Lily\". What is stored in the variable called name?",
                "lesson": "The variable [bold yellow]name[/bold yellow] is storing the text [bold yellow]\"Lily\"[/bold yellow]. The equals sign in coding means \"put this value into this box.\" So name = \"Lily\" means: take the box labeled name, and put \"Lily\" inside it.",
                "options": [
                    "The word \"name\"",
                    "Nothing — it's empty",
                    "\"Lily\"",
                    "The number 4 (the length of Lily)",
                ],
                "answer": "c",
                "hints": [
                    "The = sign puts the thing on the right into the box on the left.",
                    "name = \"Lily\" puts \"Lily\" into the variable called name!",
                ],
                "xp": 25,
            },
            {
                "id": "var_04",
                "title": "Changing a Variable",
                "type": "quiz",
                "question": "A score starts at 10. Then the program runs: score = score + 5. What is score now?",
                "lesson": "Variables can [bold yellow]change[/bold yellow]. \"score = score + 5\" means: take what's already in score (10), add 5, then store the result back in score. So score becomes 10 + 5 = [bold yellow]15[/bold yellow]. This is how games track your points!",
                "options": [
                    "Still 10 — variables never change",
                    "5",
                    "105",
                    "15",
                ],
                "answer": "d",
                "hints": [
                    "Take the old score (10), add 5 to it, and store the result.",
                    "10 + 5 = 15, and that goes back into score!",
                ],
                "xp": 25,
            },
            {
                "id": "var_05",
                "title": "Can Variables Change?",
                "type": "quiz",
                "question": "Can a variable's value change after it has been set?",
                "lesson": "Yes! Variables [bold yellow]can change[/bold yellow] — that's actually where the name comes from. The word \"variable\" means \"able to vary.\" A score can go up, a name can be updated, a status can switch from true to false. Variables are meant to change!",
                "options": [
                    "No — once set, a variable is locked forever",
                    "Yes — that's why it's called a variable",
                    "Only if you restart the computer",
                    "Only on Tuesdays",
                ],
                "answer": "b",
                "hints": [
                    "The name \"variable\" comes from the word \"vary\" — to change.",
                    "Variables are designed to change — that's the whole point!",
                ],
                "xp": 25,
            },
            {
                "id": "var_boss",
                "title": "Three Variables",
                "type": "quiz",
                "question": "A program sets: x = 3, y = 4, z = x + y. What is z?",
                "lesson": "[bold yellow]z = x + y[/bold yellow] means: look up what's in x (which is 3), look up what's in y (which is 4), add them together, and store the result in z. So z = 3 + 4 = [bold yellow]7[/bold yellow]. Programs combine variables like this all the time!",
                "options": [
                    "34 (the numbers next to each other)",
                    "3",
                    "7",
                    "xy",
                ],
                "answer": "c",
                "hints": [
                    "Look at what x and y hold, then add them together.",
                    "x is 3, y is 4 — so z = 3 + 4 = 7!",
                ],
                "xp": 60,
            },
        ],
    },
    "functions": {
        "id": "functions",
        "name": "The Recipe Hall",
        "subtitle": "Name an action so you can use it again and again",
        "icon": "📋",
        "description": "Learn how functions let you write instructions once and use them forever",
        "level_required": 1,
        "challenges": [
            {
                "id": "fn_01",
                "title": "What Is a Function?",
                "type": "quiz",
                "question": "In coding, what is a function?",
                "lesson": "A [bold yellow]function[/bold yellow] is a named set of instructions that you can use over and over again. You write it once, give it a name, and then whenever you need those instructions, you just use the name. It's like a recipe that you can cook as many times as you like!",
                "options": [
                    "A number that the computer adds up",
                    "A named set of instructions you can use again and again",
                    "A type of screen display",
                    "A special keyboard shortcut",
                ],
                "answer": "b",
                "hints": [
                    "Think of a recipe — once written, you can use it as many times as you want.",
                    "A function is a reusable, named set of instructions!",
                ],
                "xp": 25,
            },
            {
                "id": "fn_02",
                "title": "Why Functions?",
                "type": "quiz",
                "question": "Why are functions useful in programming?",
                "lesson": "Functions let you [bold yellow]reuse code[/bold yellow] and avoid writing the same instructions over and over. If you need to do the same thing in ten places, you write it once as a function and call it ten times. This keeps programs shorter, cleaner, and easier to fix.",
                "options": [
                    "They make the program run backwards",
                    "They make the screen brighter",
                    "They let you reuse code and avoid repetition",
                    "They are only used for math",
                ],
                "answer": "c",
                "hints": [
                    "Imagine if you had to copy a recipe ten times instead of referencing it once!",
                    "Functions help you avoid repeating yourself — write once, use many times!",
                ],
                "xp": 25,
            },
            {
                "id": "fn_03",
                "title": "Arguments",
                "type": "quiz",
                "question": "When you give a function a piece of information it needs to do its job, what is that called?",
                "lesson": "When you give a function the information it needs, you're [bold yellow]passing an argument[/bold yellow] (also called an input). If your function is \"make a sandwich,\" the argument might be \"peanut butter\" or \"jam\" — the specific detail it needs to work.",
                "options": [
                    "A return value",
                    "A bug",
                    "Passing an argument (or input)",
                    "A loop",
                ],
                "answer": "c",
                "hints": [
                    "You're giving the function specific information to work with.",
                    "The information you give a function is called an argument or input!",
                ],
                "xp": 25,
            },
            {
                "id": "fn_04",
                "title": "Return Values",
                "type": "quiz",
                "question": "When a function finishes and sends an answer back, what is that answer called?",
                "lesson": "A [bold yellow]return value[/bold yellow] is the answer a function gives back when it's done. If a function adds two numbers, the return value is the sum. Not all functions return a value — some just do something (like display text) without giving anything back.",
                "options": [
                    "A bug",
                    "A return value",
                    "A loop",
                    "A variable",
                ],
                "answer": "b",
                "hints": [
                    "The function finishes its work and \"returns\" an answer.",
                    "What a function gives back when it's done is called a return value!",
                ],
                "xp": 25,
            },
            {
                "id": "fn_05",
                "title": "Calling a Function",
                "type": "quiz",
                "question": "What does it mean to \"call\" a function?",
                "lesson": "To [bold yellow]call a function[/bold yellow] means to run it — to tell the program to execute that named set of instructions right now. You write the function's name (maybe with an argument), and the program jumps to those instructions, runs them, and then comes back.",
                "options": [
                    "To phone the programmer",
                    "To delete it",
                    "To run it — to execute those named instructions",
                    "To name it for the first time",
                ],
                "answer": "c",
                "hints": [
                    "Calling isn't about phones here — it's about activating something.",
                    "To call a function means to run it!",
                ],
                "xp": 25,
            },
            {
                "id": "fn_boss",
                "title": "What Does It Return?",
                "type": "quiz",
                "question": "There is a function called addTwo. It takes any number and adds 2 to it. What does addTwo(8) return?",
                "lesson": "addTwo takes a number, adds 2, and returns the result. [bold yellow]addTwo(8)[/bold yellow] means: call the function with the argument 8. It calculates 8 + 2 = [bold yellow]10[/bold yellow], and that's what it returns. Arguments go in, results come out!",
                "options": [
                    "2",
                    "8",
                    "82",
                    "10",
                ],
                "answer": "d",
                "hints": [
                    "The function adds 2 to whatever number you give it.",
                    "8 + 2 = 10 — that's what addTwo(8) returns!",
                ],
                "xp": 60,
            },
        ],
    },
    "creative_computing": {
        "id": "creative_computing",
        "name": "The Dream Lab",
        "subtitle": "Where ideas become real things",
        "icon": "✨",
        "description": "Explore how code powers games, apps, and everything interactive",
        "level_required": 1,
        "challenges": [
            {
                "id": "cc_01",
                "title": "The Game Loop",
                "type": "quiz",
                "question": "What is a \"game loop\" in coding?",
                "lesson": "A [bold yellow]game loop[/bold yellow] is code that runs over and over, many times per second, to keep the game updated. Every time it runs, it checks what the player is doing, updates the game world, and draws the screen. Without the game loop, the game would freeze!",
                "options": [
                    "A level that loops back to the beginning",
                    "Code that runs over and over to keep the game updated",
                    "A circular shape on the screen",
                    "A game about loops",
                ],
                "answer": "b",
                "hints": [
                    "Think about what keeps a game feeling alive and moving.",
                    "A game loop runs constantly to keep everything updated!",
                ],
                "xp": 25,
            },
            {
                "id": "cc_02",
                "title": "Interactivity",
                "type": "quiz",
                "question": "What makes a game \"interactive\"?",
                "lesson": "A game is [bold yellow]interactive[/bold yellow] when it responds to what the player does. Press left — the character moves left. Jump — the character jumps. The game is listening to you and reacting. That back-and-forth between player and program is what makes games fun!",
                "options": [
                    "It has really good graphics",
                    "It responds to what the player does",
                    "It has music",
                    "It has more than three levels",
                ],
                "answer": "b",
                "hints": [
                    "Think about the difference between watching a movie and playing a game.",
                    "Interactive means it reacts to you — the player!",
                ],
                "xp": 25,
            },
            {
                "id": "cc_03",
                "title": "Events",
                "type": "quiz",
                "question": "In coding, what is an \"event\"?",
                "lesson": "An [bold yellow]event[/bold yellow] is something that happens that the code responds to — like a mouse click, a key press, or a timer going off. Code can \"listen\" for events and do something when they occur. Most interactive programs are built around responding to events.",
                "options": [
                    "A party that programmers go to",
                    "Something that happens that the code responds to, like a click",
                    "A mistake in the program",
                    "A kind of variable",
                ],
                "answer": "b",
                "hints": [
                    "Think about what happens when you click a button in a game.",
                    "An event is something the code notices and responds to!",
                ],
                "xp": 25,
            },
            {
                "id": "cc_04",
                "title": "Output",
                "type": "quiz",
                "question": "In coding, what is \"output\"?",
                "lesson": "[bold yellow]Output[/bold yellow] is what a program shows or does — the result you can see or hear. Text on screen, a sound, a picture, a score updating — these are all outputs. Input is what goes in (your keypress); output is what comes out (the game reacting).",
                "options": [
                    "The code you write",
                    "The electric plug at the back of the computer",
                    "What a program shows or does as a result",
                    "A type of variable",
                ],
                "answer": "c",
                "hints": [
                    "Think about what you can see or hear when a program runs.",
                    "Output is what the program produces — what comes out!",
                ],
                "xp": 25,
            },
            {
                "id": "cc_05",
                "title": "Hardware vs Software",
                "type": "quiz",
                "question": "What is the difference between hardware and software?",
                "lesson": "[bold yellow]Hardware[/bold yellow] is the physical parts of a computer — the screen, the keyboard, the chips you can touch. [bold yellow]Software[/bold yellow] is the programs — the code, the apps, the games. You can hold hardware in your hands; software lives in memory and runs on hardware.",
                "options": [
                    "Hardware is old, software is new",
                    "Hardware is physical parts; software is programs",
                    "They are the same thing",
                    "Hardware is free; software always costs money",
                ],
                "answer": "b",
                "hints": [
                    "One you can touch, one you can't — which is which?",
                    "Hardware = physical things. Software = programs and code!",
                ],
                "xp": 25,
            },
            {
                "id": "cc_boss",
                "title": "Start With a Plan",
                "type": "quiz",
                "question": "You want to make a quiz game. Before you write a single line of code, what is the MOST IMPORTANT first thing to plan?",
                "lesson": "Before writing any code, the most important step is to think through [bold yellow]the rules and questions of the game — the algorithm[/bold yellow]. What questions will you ask? How will scoring work? What happens when someone wins? Planning before coding makes everything easier and avoids a lot of bugs!",
                "options": [
                    "What color the background should be",
                    "What font to use",
                    "The questions, rules, and algorithm for the game",
                    "How many buttons are on the screen",
                ],
                "answer": "c",
                "hints": [
                    "Before building anything, you need to know what you're building.",
                    "Start with the plan — the questions, rules, and algorithm!",
                ],
                "xp": 60,
            },
        ],
    },
}
