Game: Tower Defense
Theme: Cyberpunk quarantine grid
Map: Single winding path
Date: 2026-04-24

## Prompt
Create a single-file 3D tower defense benchmark with multiple tower types, enemy waves, upgrades, pathing, effects, and responsive controls.

Build a static `index.html` that serves at `/tower-defense/` and contains all HTML, CSS, and JavaScript inline. Use Three.js from a single CDN import only; use no external images, models, or assets. The game should be called **Firewall Bastion**: a neon cyberpunk defense grid where towers stop hostile packets from reaching the core.

The live game must include:

- A 3D isometric scene with a programmatic neon city floor, a clearly marked winding enemy path, buildable tile grid, ambient and directional lighting, tower glow accents, projectile effects, enemy health bars, and animated hit/death particles.
- Camera controls: wheel zoom, right-drag or middle-drag pan, responsive resizing, and touch-friendly UI controls.
- Six tower archetypes with distinct stats, visuals, targeting, projectiles, upgrade costs, and level-3 abilities:
  - Pulse Turret: balanced, level 3 piercing shots.
  - Rail Spire: long range, high damage, slow fire, level 3 critical hits.
  - Mortar Node: splash damage, level 3 larger blast and burn damage-over-time.
  - Cryo Lattice: slows enemies, level 3 short freeze.
  - Shard Repeater: rapid fire, level 3 double projectiles.
  - Arc Relay: chain-lightning style special tower, level 3 jumps to more enemies.
- Six enemy types with distinct speed, HP, value, armour, visuals, and behaviour:
  - Scout, Soldier, Tank, Sprinter, Healer, Boss.
- Twenty defined waves with predictable compositions, every fifth wave containing a boss and occasional swarm waves.
- Economy: 260 starting gold, kill rewards by enemy type, 60% sell refund, 20 lives, upgrades at 1.5x and 2.5x base cost, no softlock-prone pricing.
- UI overlay: title/start state, HUD with gold/lives/wave/timer/speed, tower panel with greyed-out unaffordable towers, selected tower info, upgrade/sell controls, wave preview, pause/game-over/victory overlays, and restart support.
- Game loop: build phase countdown, next-wave button, enemy movement along path, tower targeting and rotation, projectile travel, damage application, enemy leaks, game-over and victory handling.
- Responsive controls for desktop and mobile with minimum 44px buttons.

## Notes
The cyberpunk theme keeps primitive geometry readable: towers are cylinders, boxes, cones, torus rings, and emissive spheres; enemies are coloured geometric drones with billboard health bars. Balance is tuned so the opening allows three to four towers, with boss pressure every fifth wave and upgrade choices becoming important after wave six.
