Note: this text prompt is re-made from the interactive, use as reference only. USER TASK SPECIFICATION: Create an interactive HTML5 **“Animal Classification Mystery”** game where students classify animals into the correct vertebrate/invertebrate groups (mammals, birds, fish, reptiles, amphibians, insects, or “does not belong”) under time pressure, with score, levels, and auditory support. TARGET AUDIENCE: - Primary Science / Lower Secondary Biology (~9–13 years old) INTERACTIVE REQUIREMENTS: - A **game-container** with: - Header showing **Score**, **Time**, **Level**, **Progress**, and a **speaker button**. - Main area displaying: - A large **animal emoji/icon**. - The **animal’s name**. - Classification section with buttons for: - Mammals, Birds, Fish, Reptiles, Amphibians, Insects, and - “Does not belong to any of the groups listed”. - Feedback section showing correctness messages. - Game-over screen summarising final score, level, and accuracy, with a Play Again button. - Self-contained HTML, CSS, JavaScript (no external frameworks). - **MOBILE-FRIENDLY & ACCESSIBLE**: - Buttons large enough for touch. - Optional speaker button to read out animal name (or simulate TTS event hook). SPECIFIC REQUIREMENTS: Game state & data - Maintain state variables for: - `score`, `level`, `timeRemaining`, `questionsAnswered`, `totalQuestions` (e.g., 5 per level or round). - `currentAnimal`, `currentGroup`, `correctGroup`, `accuracy`. - Define a list/array of **animals**, each with: - `name` (e.g., "Crocodile"). - `emoji` (e.g., 🐊). - `group` (e.g., `reptiles`, `mammals`, etc., or `other`). - Ensure coverage across all classification buttons. Gameplay flow - On game start (page load or Play Again): - Initialise state (score=0, level=1, time=50s, progress=0/5, accuracy=0%). - Start a countdown timer. - Present the first random animal. - For each question: - Show animal emoji and name. - Student clicks a classification button. - Check answer: - If correct: increase score and correct count, update progress. - If incorrect: optionally deduct points or show only feedback. - Show immediate feedback in the feedback section. - Move to next animal until **totalQuestions** reached or time runs out. - Level progression (if implemented): - Increase level when student completes a round with sufficient accuracy or after a fixed number of animals. - Optionally increase difficulty (less obvious animals, more "other" cases, shorter time). Classification options - Buttons and groups: - Mammals (warm-blooded, hair/fur, feed young with milk). - Birds (feathers, wings, lay eggs). - Fish (live in water, gills, fins). - Reptiles (scales, cold-blooded, lay eggs on land). - Amphibians (live on land and water). - Insects (6 legs, 3 body segments). - “Does not belong to any of the groups listed” for outliers. - Each button displays an icon and a group name, plus a tooltip summarising group characteristics. Feedback & scoring - Feedback section (`#feedbackMessage`): - Show messages like “Correct! Crocodile is a reptile.” or “Try again! Crocodile is a reptile, not a fish.” - Score updates: - Award points for correct responses (optionally more for first try). - Track total questions answered and correct answers to compute accuracy. - Game header updates: - Score: `#score`. - Timer: `#timer` countdown. - Level: `#level`. - Progress: e.g., `#progress` showing `questionsAnswered/totalQuestions`. Timer and game over - Timer counts down each second from starting value (e.g., 50 seconds). - When timer hits zero or all questions are answered: - Show **game-over screen** (`#gameOverScreen`). - Display: - Final score (`#finalScore`). - Level reached (`#finalLevel`). - Accuracy percentage (`#accuracy`). - Provide a **Play Again** button to restart the game. Speaker / auditory support - `#speakerBtn`: - When pressed, reads out the animal name for auditory learners (via Web Speech API or placeholder function). - Provide visual feedback (e.g., pulsing icon) while speaking. Tooltips - Tooltip element (`#tooltip`) used to: - Show group descriptions when hovering over classification buttons. - Optionally show hints about animals or controls. Play Again behaviour - `Play Again` button: - Hides the game-over screen. - Resets all state variables to starting values. - Restart timer and present a new random animal. LEARNING OUTCOMES: - Students should be able to: - Classify a range of animals into correct vertebrate/invertebrate groups. - Use clues from physical traits, habitats, and behaviours to justify classification. - Recognise that some animals do not fit simple groupings (“other” category). - The game should build **automaticity** and confidence in classification while remaining fun and time-bound. INTERACTION FEATURES TO INCLUDE: - Time-limited classification rounds with score and progress feedback. - Immediate corrective feedback and summary statistics. - Simple, visual interface with emojis and concise text. - Optional audio support for animal names. Create a complete, functional HTML5 interactive that meets all requirements above.