# Clone Prompt: Arcade Tycoon v0.2

Paste this entire file as your **first message** in a new Lovable project.

---

Build **Arcade Tycoon v0.2**, a top-down tile-based simulation tycoon where
you extract cash from customer wallets while electricity bills tick up.

## Stack rules
- TanStack Start, React 19, Tailwind v4. No backend.
- One route at `/` — the game is the homepage.
- Semantic tokens in `src/styles.css`. No raw color classes.
- State in `useReducer`. Tick at 30fps via `useGameTick(30)`.

## Core loop (tower-defense extraction)
You own a small arcade. Each day (~75s real time) NPCs walk in with a wallet,
seek a free machine, play, leave a tip, and exit. Marketing burns cash to
attract more/richer customers. Electricity bills compound per machine per
second. End of day → P&L report → advance day.

## Grid
12 wide × 8 tall tiles. Tile size 56px. Entrance on left edge row 4.
Exit on right edge row 4. Floor changes hue from amber morning → indigo night
as the day elapses (lerp two oklch colors).

## Machines (place by clicking a palette item, then a valid empty tile)
| Machine | Emoji | Cost | $/play | Play time | Watts |
|---|---|---|---|---|---|
| Pinball | 🎯 | 120 | $4 | 8s | 40 |
| Claw | 🦞 | 200 | $6 | 10s | 60 |
| Racing Sim | 🏎️ | 450 | $12 | 14s | 120 |
| DDR Pad | 💃 | 600 | $16 | 18s | 150 |
| Lightgun | 🔫 | 900 | $22 | 12s | 180 |
| VR Pod | 🥽 | 1,800 | $45 | 22s | 300 |
| Snack Bar | 🍿 | 350 | $8 | 4s | 80 |
| Cash ATM | 🏧 | 500 | $1 fee | 3s | 50 — *refills wallets +$30* |

Sell machine: hover → × button, refunds 50%.

## NPCs
- Spawn from entrance every `max(0.9, 4.5 − buzz/30) / spawnMultiplier` seconds.
- `wallet`: 20 + buzz/2 + random(0..40). Boosted by Premium Tickets upgrade.
- `patience`: 25s. Drops while seeking. Hits 0 → grumpy walkout, buzz −2.
- States: `entering → seeking → walking → playing → leaving`.
- Pathing: simple step-toward target in pixels (no A*). Grid is open.
- Use emoji avatars (🧑 👩 🧒 👵 👨‍🎤 — random) with a gentle bob animation.

## Resources
- `cash` (starts $1,500)
- `buzz` (reputation 0–100, decays −0.5/sec, raised by happy plays)
- `dayElapsed` / `dayLength = 75`
- `electricitySpent`, `marketingSpent`, `revenue` per day

## Live P&L panel (always visible, updates per tick)
Revenue · Electricity · Marketing · = Profit

## Upgrades (persistent across days)
1. **Marketing Push** — +25% spawn rate, base $300
2. **Premium Tickets** — +30% tip per play, base $500
3. **Neon Decor** — +10 starting buzz, base $400
4. **Staff Hire** — −10% machine play time, base $700
5. **Green Wiring** — −20% watts, base $600
6. **VIP Lounge** — wallets +$25 baseline, base $1,200

## One-shot purchases (per-day boosts)
- **Sandwich Board** $50 — burst 8 NPCs immediately.
- **Radio Ad** $200 — next 20s spawn ×3.
- **Viral Stunt** $800 — wallets ×2 for 30s.

## Electricity
Cost = `Σ(watts) × 0.002 × dt` (deducted continuously). Modified by Green Wiring.

## End-of-day modal
Income statement style:
- Revenue
- − Electricity
- − Marketing
- = Profit (red if negative)
- Customers served / walkouts
- "Open Tomorrow" button → next day, buzz carries over, machines persist.

## Layout
- Top bar: cash, day#, dayElapsed bar, buzz meter, P&L pills.
- Left: machine palette + one-shot buttons + upgrades.
- Center: the grid (CSS grid, absolutely-positioned NPC emojis).
- Right: collapsible event log ("Sara tipped $14", "🔌 −$3.20 electricity").

## Visuals
- Machines as bordered tiles with emoji + animated CSS glow when in use.
- Screen flicker overlay (low-opacity radial gradient pulsing).
- NPCs bob via `@keyframes` translateY.
- Floating "+$X" green / "−$X" red text on cash changes.

## Acceptance
- NPCs actually spawn from the entrance and reach machines.
- Day ends at 75s with a P&L modal.
- Electricity makes empty arcades unprofitable — forces real decisions.
- All upgrades and one-shots have visible effects.
- No console errors.
