# One-Shot Prompt

**Theme**: Pelagic Coil
**Generated**: 2026-04-23

## Prompt

Write a complete Snake game using HTML5 Canvas with all HTML, CSS, and JavaScript in a single self-contained file themed around **Pelagic Coil**, a deep-sea bioluminescence arcade scene built for a one-shot benchmark catalog. The game should feel authored, not tutorial-like: elegant, dark, responsive, and dense with underwater atmosphere while keeping UI copy extremely tight.

Build a full-page interface around a square canvas board. Use a cold abyss palette with a few disciplined accents: trench black, midnight blue, bioluminescent cyan, plankton mint, and a restrained amber highlight. The shell should feel like a live instrument panel, not a generic game page. Use CSS variables, responsive sizing, accessible contrast, and purposeful motion. No purple-heavy default AI look. No external images. No external dependencies.

The page must include:
- A compact masthead with the route label and game name `Pelagic Coil`
- A tight HUD showing score, best, and current pace
- A square canvas framed by a glassy, pressure-chamber style container
- A minimal overlay card for start, pause, and game-over states
- Optional touch controls that feel integrated rather than bolted on

Gameplay requirements:
- Continuous Snake movement on a grid rendered inside the canvas
- Arrow keys and WASD for control
- Swipe support on touch devices
- Tap or SPACE to start and restart
- `P` or `Escape` to pause and resume
- Eating food grows the snake by exactly one segment
- Wall collision or self-collision triggers game over
- High score persists in `localStorage`
- Speed increases gradually with score and caps at a sensible maximum
- Direction input buffering must keep quick turns responsive
- Prevent 180-degree reversals

Rendering requirements:
- Use `requestAnimationFrame` with interpolation so movement feels fluid between grid steps
- Use device-pixel-ratio aware canvas sizing for crisp rendering
- The background should have depth: trench gradient, drifting plankton, soft caustic sweeps, and a faint radial light field around the snake head
- The snake should look like a translucent deep-sea creature, not green boxes: glowing rounded segments, connective body ribbon, distinct head, and a subtle trailing wake
- Food should be a pulsing jellyfish-like lure with animated tendrils and a spawn pulse
- Collecting food should emit particles and a brief bioluminescent flash
- Game over should trigger a short, subtle shake and visual collapse
- Ambient motion should continue while paused or at rest
- Respect `prefers-reduced-motion` by reducing ambient drift and effect intensity

UX requirements:
- Keep copy terse: examples include `Launch`, `Resume`, `Restart`, `Arrows / WASD / Swipe`, and `Space to dive`
- Ensure the board scales well from mobile to desktop
- Make the canvas and controls accessible with labels and visible focus styles
- Clicking or tapping the board when not playing should start or restart the game

Technical constraints:
- Single file only
- No external images
- No placeholder comments or omitted logic
- Must run as a static `index.html`
- Set an inline SVG favicon
- Set the page title to `Pelagic Coil`

## Notes

- Visual direction: deep-sea bioluminescence with restrained instrument-panel UI
- Hosting: static `index.html` for local preview or catalog embedding
