Create a compact single-file HTML5 tower-defense game called Circuit Defense.
Hard constraints:
- Embedded HTML/CSS/JS only; no external assets, analytics, APIs, or network calls.
- Playable with mouse and touch.
- Keep the layout readable on laptop and mobile widths.
Creative direction:
- Neon circuit-board battlefield, glowing enemy path, turret pads, readable range rings, and a clean strategy HUD.
- You may simplify the map if it makes tower placement and wave feedback clearer.
Core gameplay:
- Enemies move along a visible path toward a core.
- The player places towers, starts waves, earns energy, upgrades or sells towers, and protects lives.
- Include at least three tower behaviors such as rapid, splash, slow, beam, or pulse.
- UI: energy/coins, lives, wave, selected tower, upgrade/sell, next wave, restart.
- Controls: click/tap to place, 1/2/3 to switch tower type when keyboard is available.
Quality gates:
- Turrets and enemies must visibly interact.
- Early waves should be easy enough to teach the loop.
- Later waves should create pressure without becoming unreadable.