# Neon synthwave grid background

> A retro synthwave scene: striped sun, mountain horizon, an endlessly scrolling perspective neon grid and a flickering neon title.

- Category: Developer tools
- Version: 1.0
- Source: https://ownlyplans.com/bhaskar/neon-synthwave-grid-background/

## Overview

Retro-futurism in one CSS file. A striped sunset sun pulses over a mountain line while a perspective grid scrolls toward you forever. The title flickers like real neon and scanlines sit on top.

## Tech stack

- Animation
- CSS
- HTML

## Build steps

### 1. Paste the prompt

Paste this prompt into your AI tool. It builds everything in one go, then the steps below show what to check.

Prompt:

```text
Build a single HTML file with a synthwave scene filling the viewport. Page background: linear-gradient from #0a0020 through #2a0a4a to #ff3d81.
Elements, back to front:
1. A circular sun (about 40vmin) with a yellow #ffe45e to pink #ff3d81 vertical gradient, strong pink glow, horizontal dark stripes that get thicker toward the bottom (use an ::after with a repeating-linear-gradient), and a slow 4s pulse scale.
2. A dark mountain silhouette (inline SVG polygon, fill #14022b, pink 2px stroke) sitting on the horizon.
3. A glowing pink horizon line at 50% height.
4. A floor below the horizon with perspective: 360px, perspective-origin top, containing a tall element rotated rotateX(70deg) (origin top) with a cyan #00e5ff 2px grid (80px cells, drop-shadow glow). Animate background-position by 80px every 1.4s linear infinite so the grid rushes toward the viewer.
5. Title block near the top: small cyan letter-spaced "SYNTHWAVE // 1984" and a huge italic monospace H1 "NIGHT DRIVE" with layered pink/purple text-shadow glow and an occasional neon flicker keyframe (opacity dips at 92-97%).
6. A neon outlined cyan button "▶ PRESS START" at the bottom.
7. A top overlay of faint CRT scanlines (repeating-linear-gradient).
Monospace system font, no external files, reduced-motion safe. Return only the complete HTML.
```

### 2. Add horizon and mountains

Check: SVG ridge line and glowing horizon.

### 3. Build the perspective grid

Check: rotateX floor with scrolling cyan lines.

### 4. Add title, button and scanlines

Check: Flicker animation and CRT overlay.

**Done when:** You can see it working in the browser.

## Assets

### prompt.md — The full prompt.

~~~~
# Neon synthwave grid background

Copy this prompt into Claude, Cursor or Lovable.

```text
Build a single HTML file with a synthwave scene filling the viewport. Page background: linear-gradient from #0a0020 through #2a0a4a to #ff3d81.
Elements, back to front:
1. A circular sun (about 40vmin) with a yellow #ffe45e to pink #ff3d81 vertical gradient, strong pink glow, horizontal dark stripes that get thicker toward the bottom (use an ::after with a repeating-linear-gradient), and a slow 4s pulse scale.
2. A dark mountain silhouette (inline SVG polygon, fill #14022b, pink 2px stroke) sitting on the horizon.
3. A glowing pink horizon line at 50% height.
4. A floor below the horizon with perspective: 360px, perspective-origin top, containing a tall element rotated rotateX(70deg) (origin top) with a cyan #00e5ff 2px grid (80px cells, drop-shadow glow). Animate background-position by 80px every 1.4s linear infinite so the grid rushes toward the viewer.
5. Title block near the top: small cyan letter-spaced "SYNTHWAVE // 1984" and a huge italic monospace H1 "NIGHT DRIVE" with layered pink/purple text-shadow glow and an occasional neon flicker keyframe (opacity dips at 92-97%).
6. A neon outlined cyan button "▶ PRESS START" at the bottom.
7. A top overlay of faint CRT scanlines (repeating-linear-gradient).
Monospace system font, no external files, reduced-motion safe. Return only the complete HTML.
```
~~~~

### index.html.md — Complete code of the result in the video.

~~~~
# index.html

The finished result as one file. Save it as index.html and open it.

```html
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Neon grid</title>
<style>
*{box-sizing:border-box;margin:0}
html,body{height:100%}
body{overflow:hidden;background:linear-gradient(#0a0020 0%,#2a0a4a 55%,#ff3d81 100%);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#fff}
.sun{position:absolute;left:50%;top:47%;width:min(40vmin,330px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:linear-gradient(#ffe45e,#ff3d81 70%);box-shadow:0 0 120px 20px rgba(255,61,129,.55);animation:pulse 4s ease-in-out infinite}
.sun::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(transparent 0 58%,#2a0a4a 58% 60%,transparent 60% 70%,#2a0a4a 70% 73%,transparent 73% 82%,#2a0a4a 82% 86%,transparent 86% 94%,#2a0a4a 94% 100%);border-radius:50%}
@keyframes pulse{50%{transform:translate(-50%,-50%) scale(1.05)}}
.hor{position:absolute;left:0;right:0;top:50%;height:2px;background:#ff3d81;box-shadow:0 0 22px 4px #ff3d81}
.floor{position:absolute;left:0;right:0;top:50%;bottom:0;perspective:360px;perspective-origin:50% 0;overflow:hidden;background:linear-gradient(#1a0536,#0a0020)}
.grid{position:absolute;left:-100%;right:-100%;top:0;height:300%;transform:rotateX(70deg);transform-origin:50% 0;background-image:linear-gradient(90deg,#00e5ff 2px,transparent 2px),linear-gradient(#00e5ff 2px,transparent 2px);background-size:80px 80px;filter:drop-shadow(0 0 6px #00e5ff);animation:go 1.4s linear infinite}
@keyframes go{to{background-position:0 80px}}
.mt{position:absolute;bottom:50%;left:0;width:100%;height:14vh;z-index:2}
.mt svg{width:100%;height:100%}
.ttl{position:absolute;left:0;right:0;top:9%;text-align:center;z-index:3}
.ttl small{letter-spacing:.5em;font-size:13px;color:#00e5ff;text-shadow:0 0 12px #00e5ff;animation:flick 6s infinite}
h1{font-size:clamp(46px,9vw,120px);letter-spacing:.04em;font-style:italic;margin-top:10px;text-shadow:0 0 12px #ff3d81,0 0 40px #ff3d81,0 0 90px #b100ff;animation:flick 6s 1s infinite}
@keyframes flick{0%,92%,100%{opacity:1}93%{opacity:.4}94%{opacity:1}96%{opacity:.55}97%{opacity:1}}
.cta{position:absolute;bottom:7%;left:0;right:0;text-align:center;z-index:4}
.cta a{display:inline-block;padding:14px 34px;border:2px solid #00e5ff;color:#00e5ff;text-decoration:none;letter-spacing:.2em;font-size:14px;box-shadow:0 0 18px #00e5ff,inset 0 0 18px rgba(0,229,255,.35);text-shadow:0 0 8px #00e5ff;background:rgba(0,0,0,.35)}
.scan{position:absolute;inset:0;z-index:5;pointer-events:none;background:repeating-linear-gradient(transparent 0 3px,rgba(0,0,0,.18) 3px 4px)}
@media(prefers-reduced-motion:reduce){*{animation:none!important}}
</style></head><body>
<div class="sun"></div>
<div class="mt"><svg viewBox="0 0 1200 160" preserveAspectRatio="none"><path d="M0 160 L0 120 L120 60 L200 110 L330 30 L450 120 L560 80 L700 140 L820 50 L960 120 L1080 70 L1200 130 L1200 160Z" fill="#14022b" stroke="#ff3d81" stroke-width="2"/></svg></div>
<div class="hor"></div>
<div class="floor"><div class="grid"></div></div>
<div class="ttl"><small>SYNTHWAVE // 1984</small><h1>NIGHT DRIVE</h1></div>
<div class="cta"><a href="#">▶ PRESS START</a></div>
<div class="scan"></div>
</body></html>

```
~~~~


## Build instructions by tool

### Claude Code

Open a terminal in an empty folder, run `claude`, then paste the prompt.

```text
Build the "Neon synthwave grid background" app from the OwnlyPlans blueprint at https://ownlyplans.com/bhaskar/neon-synthwave-grid-background/.
Stack: Animation, CSS, HTML.
Follow the plan's steps in order: Paste the prompt → Add horizon and mountains → Build the perspective grid → Add title, button and scanlines.
Download the full plan (Markdown) from the link above and keep it in the project root as PLAN.md.
Ask me before adding anything not in the plan. (Prepared for Claude Code.)
```

### Cursor

Open an empty folder in Cursor, start an Agent chat, then paste the prompt.

```text
Build the "Neon synthwave grid background" app from the OwnlyPlans blueprint at https://ownlyplans.com/bhaskar/neon-synthwave-grid-background/.
Stack: Animation, CSS, HTML.
Follow the plan's steps in order: Paste the prompt → Add horizon and mountains → Build the perspective grid → Add title, button and scanlines.
Download the full plan (Markdown) from the link above and keep it in the project root as PLAN.md.
Ask me before adding anything not in the plan. (Prepared for Cursor.)
```

### Lovable

Start a new Lovable project and paste the prompt as your first message.

```text
Build the "Neon synthwave grid background" app from the OwnlyPlans blueprint at https://ownlyplans.com/bhaskar/neon-synthwave-grid-background/.
Stack: Animation, CSS, HTML.
Follow the plan's steps in order: Paste the prompt → Add horizon and mountains → Build the perspective grid → Add title, button and scanlines.
Download the full plan (Markdown) from the link above and keep it in the project root as PLAN.md.
Ask me before adding anything not in the plan. (Prepared for Lovable.)
```

## Definition of done

- Every build step is complete and the app runs locally.
- The main user flow works end to end.
- Share your build on OwnlyPlans with a demo link, build time and tool.
