Context: You are the WebSim Creation Engine, an advanced AI model designed to collaboratively generate detailed, immersive, interactive web content based on user prompts. By leveraging your expertise in HTML, CSS, and JavaScript, you can bring any idea to life, working hand-in-hand with users to explore the vast landscape of creative possibilities. Users communicate their ideas to you through prompts and optional parameters. Your task is to interpret these inputs, making your best effort to understand their intention, even if the instructions are unclear or ambiguous. Use your context awareness, pattern recognition, and general knowledge to guide your interpretations, choosing the path most likely to lead to an engaging creation that is aligned with user instructions. Respond with rich, immersive HTML that breathes life into the user's concepts, building upon their ideas to create captivating, immersive websites, apps, and games. You may also subtly prompt the user for clarification or additional details through the content you generate, maintaining immersion while helping to refine their vision collaboratively. Objective: Create a 2D game titled "The Trouble with Space Junk," very loosely inspired by the classic game Asteroids. The game features space junk instead of asteroids, and it is designed in a colorful, pixelated style. The player should be able to move smoothly and quickly around the map using the WASD keys, shoot projectiles with the spacebar, and pause/unpause the game with the Enter key. The gameplay focuses on managing space junk, which breaks down into smaller, faster, and more numerous pieces, emphasizing a message about mindful space exploration and not polluting space. Game Description: Theme and Style: The game is set in space, with a colorful, pixelated background filled with slow-moving stars. The player's ship is a small, pixel-art spacecraft that shoots projectiles from its front tip. The space junk consists of various pixelated debris like old satellites, broken parts, and fragments of larger objects. The overall aesthetic is retro, with bright, vibrant colors and a nostalgic arcade feel. The background should not move, but the stars should move slowly. The game begins with an intro screen that displays the title "The Trouble with Space Junk" and a button to start the game. Gameplay Mechanics: The player controls the spacecraft using the WASD keys for movement: W to move forward A to rotate left S to move backward D to rotate right ENTER to pause and unpause SPACE to shoot a projectile Lives should be represented as hearts on the top right corner. The game starts with exactly 5 large green pieces of slow-moving space junk on the screen. These pieces are the largest and slowest objects in the game. When a green piece gets hit, it breaks into 4 smaller orange pieces. These orange pieces are half the diameter of the green pieces and move faster. When an orange piece gets hit, it breaks into 4 even smaller red pieces. These red pieces are half the diameter of the orange pieces and move even faster. When a red piece gets hit, it breaks into 4 purple pieces. The purple pieces are half the diameter of the red pieces and move faster still. This process continues until the pieces are 3px large, with each subsequent level of space junk being smaller, faster, a different color and more numerous than the previous one. The player’s ship should have smooth and swift movement, enabling precise and agile navigation across the map. By pressing the spacebar, the player can fire projectiles that break down the space junk as described above. When any piece of space junk, regardless of size, collides with the player's ship, the player loses 1 life and their ship temporarily changes color to show they've been hit. The player starts with 5 lives, represented by hearts at the top right of the screen. The game ends when the player loses all their lives, or they survive for 5 minutes. End States: If the player loses all their lives, the game ends, and a game over screen appears with a button to restart the game. If the player survives for 5 minutes, they win the game. A dialog box appears with the message, "You've learned to live with the junk around you, you win!" and a button to restart the game. Technical Requirements: 2D Game Setup: The game should be developed using HTML, CSS, and JavaScript, focusing on 2D rendering using Canvas API. The game loop should manage movement, shooting projectiles, collision detection, and rendering of the player’s ship, space junk, and UI elements like lives and messages. HTML Structure: Set up an HTML file with a canvas element to render the game. Include any external libraries needed, such as p5.js, if additional support is desired for drawing and animations. JavaScript Implementation: Initialize the game environment, including the player's ship, space junk, and UI elements. Script the smooth movement of the player’s ship using the WASD keys for quick and responsive controls. Implement shooting mechanics so that pressing the spacebar fires a projectile from the player’s ship. Script the behavior of space junk, including its movement, breaking into smaller, faster pieces upon being hit, and collision detection with the player's ship. Manage the health system, reducing the player's lives by 1 point upon collision with any piece of space junk. Implement the ability to pause and unpause the game by pressing the Enter key, ensuring that all game actions stop when paused and resume seamlessly when unpaused. Implement a win condition where the player wins if they survive for 5 minutes, triggering a dialog box that says, "You've learned to live with the junk around you, you win!" and provides an option to restart the game. Create a game over condition when the player’s lives reach zero, with a button for the option to restart the game. Include an intro screen that displays "The Trouble with Space Junk" and a start button. Clicking the start button takes the player to the main game screen. CSS Styling: Style the game with pixelated, retro UI elements that match the overall theme. Ensure that the hearts representing health points are clearly visible and fit with the pixelated art style. Style the intro screen and the win/loss screens with a retro arcade feel, ensuring the titles, messages, and buttons are prominent and visually appealing. Additional Considerations: Optimize the game for smooth performance across various web browsers. Make the game responsive and playable on different screen sizes.