# One-Shot Prompt

**Theme**: Neon Arcade
**Generated**: 2026-04-04

## Prompt

Write a complete Snake game using HTML5 Canvas with all HTML, CSS, and JavaScript in a single self-contained file themed around "Neon Arcade". The game should be named "Serpentine".

Technical constraints:
- Single HTML file containing all CSS and JS.
- No external images or CDN dependencies (Google Fonts allowed).
- Vanilla JS only.
- Rendered entirely on a `<canvas>` element.

Game Mechanics:
- Arrow keys and WASD to control direction.
- Input buffering to queue turns and prevent 180-degree self-collisions.
- Snake speed slightly increases as score grows.
- Eating food grows the snake and spawns particle effects.
- High score saved to localStorage.
- Support pause (P or ESC).
- HTML/CSS UI overlays for Start, Paused, and Game Over states.

Visual and Animation Quality (Neon Arcade Theme):
- Dark synthwave aesthetic: deep purple/black background with a subtle moving grid.
- The snake is a continuous glowing cyan line (neon tube) with a bright white head.
- The snake must move smoothly! Do not just snap to the grid every 100ms. Use `requestAnimationFrame` to interpolate (lerp) the snake's drawn position between grid cells for buttery smooth movement.
- The food is a glowing magenta diamond that pulses using a sine wave animation.
- When food is eaten, emit glowing magenta particles that burst outwards and fade.
- Add an afterglow/bloom effect using Canvas `shadowBlur` and `shadowColor`.
- Responsive canvas that resizes to the window.

Output the entire code in one block. Do not truncate any logic.

## Notes

- Uses time-based lerping for ultra-smooth movement between logical grid steps.
- Uses `devicePixelRatio` to ensure crisp rendering on retina screens.
- Hosting: Vercel / local / static / Cloudflare Pages.
