Game: Tower Defense
Theme: Sci-fi
Map: Single-path
Date: 2026-04-04

## Prompt
Generate a complete, self-contained single-file 3D tower defense game using Three.js — strategically deep, visually striking, and fully playable. One file. One shot. No external dependencies except Three.js CDN. No external images. All 3D geometry must be built programmatically. 

Theme: Sci-Fi / Space Station ("Orbital Quarantine").
Map: A high-tech metallic single path with glowing edges, set against a deep space dark background.

**Core Systems:**
- **Towers (6 types):**
  1. **Laser (Basic):** Balanced range/damage/speed. Red cylindrical tower.
  2. **Railgun (Sniper):** Long range, high damage, slow fire rate. Tall grey boxy tower.
  3. **Plasma (Splash):** AOE damage, medium range. Orange spherical top.
  4. **Cryo (Slow):** Reduces enemy speed. Blue crystalline top.
  5. **Gatling (Rapid):** Fast fire rate, low damage. Double-barrel turret.
  6. **EMP (Special):** Chain lightning damage. Purple glowing rings.
- **Upgrades:** Every tower has 3 upgrade tiers. Level 1 (base), Level 2 (1.5x cost, +40% damage, +10% range, visual change), Level 3 (2.5x cost, +100% damage, +25% range, ability unlock: Piercing for Laser, Crit for Railgun, Burn for Plasma, Freeze for Cryo, Double-shot for Gatling, Stun for EMP, dramatic visual change).
- **Enemies (6 types):**
  1. **Drone (Scout):** Low HP, Fast speed, light armor. Small sphere.
  2. **Bot (Soldier):** Medium HP, Medium speed, light armor. Capsule.
  3. **Mech (Tank):** Very High HP, Slow speed, heavy armor. Large cube.
  4. **Hoverbike (Sprinter):** Low HP, Very Fast speed, no armor. Torpedo shape.
  5. **Support Drone (Healer):** Medium HP, heals nearby enemies. Green glowing sphere.
  6. **Dreadnought (Boss):** Extreme HP, Slow, boss scale, unique abilities. Giant blocky ship.
- **Waves:** 20 waves minimum. Defined wave compositions with difficulty scaling (~15% HP per wave, speed cap). Bosses on waves 5, 10, 15, 20. Swarm waves included. 15s inter-wave break with "Next Wave" skip.
- **Economy:** 100 starting gold. Gold scales with enemy difficulty. Towers sellable for 60% of investment.
- **Base:** 20 lives. Enemies cost 1 life, bosses cost 3.

**3D Rendering:**
- Isometric camera (~45-60 degrees down).
- Point lights on towers, ambient + directional shadows.
- Static path and buildable grid visually distinct.
- Towers rotate to face targets. Projectiles travel physically to targets.
- Billboard HP bars over enemies.
- Particle explosion effects on death and plasma impact.
- Semi-transparent placement preview indicator.

**UI (DOM Overlay):**
- HUD: Gold, Lives, Wave counter, Timer, Speed controls (1x/2x/3x).
- Tower Panel: Selection buttons, cost, tower stats info.
- Upgrade/Sell Menu when clicking placed towers.
- Start screen, Pause overlay, Game Over screen, Victory screen.

Write the ENTIRE game logic and HTML/CSS. NO TRIMMING. All tower definitions, upgrades, enemies, and waves must be written out fully.

## Notes
A classic single-path maze layout lets the player focus on tower synergies. The sci-fi theme allows for vibrant glowing projectiles and laser beams against a dark backdrop, making the game visually striking without requiring complex textures. Emphasized particle effects for visual polish.