# 3D Elements / Interactive — AI design spec

> Uses 3D models, scenes, WebGL.
>
> Style page: https://www.aiwebstyle.com/styles/3d-interactive.html · Live preview: https://www.aiwebstyle.com/previews/3d-interactive.html
>
> Drop this file at the root of a project and point your coding agent at it. Every value is copied from the working stylesheet, not estimated.

## 1. What this style is

Note: These CSS effects are intended to significantly enhance the visual style and simulate a 3D interactive feel. True 3D rendering and complex interactions still require JavaScript and WebGL. The perceived effect may also vary depending on the browser and user settings. Overly strong effects can sometimes impact usability, so please balance accordingly.

## 2. Tokens

### Page surface

| Token | Value | Purpose |
|---|---|---|
| `--page-bg` | `#0f172a` | Page background (solid fallback) |
| `--page-bg-gradient` | `linear-gradient(to bottom, #1e293b, #0f172a)` | Page background gradient; overrides the solid unless `none` |

### Text

| Token | Value | Purpose |
|---|---|---|
| `--text-color` | `#cbd5e1` | Body text |
| `--heading-color` | `#f8fafc` | Headings |

### Links

| Token | Value | Purpose |
|---|---|---|
| `--link-color` | `#38bdf8` | Link and inline accent |
| `--link-hover-color` | `#7dd3fc` | Link hover |

### Borders

| Token | Value | Purpose |
|---|---|---|
| `--border-color` | `#334155` | Dividers and input borders |

### Cards

| Token | Value | Purpose |
|---|---|---|
| `--card-bg` | `#1e293b` | Card surface |
| `--card-border-radius` | `8px` | Card corner radius |
| `--card-shadow` | `0 10px 25px rgba(0, 0, 0, 0.35)` | Card at rest |
| `--card-hover-shadow` | `0 20px 50px rgba(0, 0, 0, 0.5)` | Card on hover |

### Header

| Token | Value | Purpose |
|---|---|---|
| `--header-bg` | `rgba(15, 23, 42, 0.85)` | Sticky header surface |
| `--header-text-color` | `var(--heading-color)` | Header text and nav links |
| `--header-shadow` | `0 2px 5px rgba(0, 0, 0, 0.2)` | Header elevation (usually `none`) |

### Footer

| Token | Value | Purpose |
|---|---|---|
| `--footer-bg` | `#0f172a` | Footer surface |
| `--footer-text-color` | `#94a3b8` | Footer text |

### Buttons

| Token | Value | Purpose |
|---|---|---|
| `--button-bg` | `var(--link-color)` | Primary button fill |
| `--button-text-color` | `#0f172a` | Primary button label |
| `--button-hover-bg` | `var(--link-hover-color)` | Primary button hover fill |
| `--button-border` | `none` | Primary button border |
| `--button-secondary-bg` | `#334155` | Secondary button fill |
| `--button-secondary-text-color` | `#cbd5e1` | Secondary button label |
| `--button-secondary-hover-bg` | `#475569` | Secondary button hover fill |

### Code / prompt block

| Token | Value | Purpose |
|---|---|---|
| `--prompt-bg` | `#1e293b` | Code / prompt block surface |
| `--prompt-text-color` | `#818cf8` | Code / prompt block text |

### Type

| Token | Value | Purpose |
|---|---|---|
| `--base-font` | `var(--font-inter)` | Body font stack |
| `--heading-font` | `var(--font-inter)` | Heading font stack |

### Other tokens in this theme

| Token | Value |
|---|---|
| `--button-shadow` | `0 3px 7px rgba(0, 0, 0, 0.25)` |
| `--button-hover-shadow` | `0 5px 12px rgba(0, 0, 0, 0.35)` |
| `--button-secondary-border` | `none` |
| `--button-border-radius` | `5px` |
| `--mono-font` | `var(--font-roboto-mono)` |

## 3. Do

- Drive every color, radius and shadow from the tokens below. No literal hex values in component code.
- Reuse the `--card-*` tokens for any elevated surface (card, panel, modal, dropdown) so elevation stays consistent.
- Keep header and footer on `--header-*` / `--footer-*` even when the page background is a gradient.

## 4. Don't

- Do not blend tokens from another style in this library — one page, one token set.
- Do not invent a hover state: every interactive element has a `*-hover-*` token above.

## 5. Using this with a coding agent

Place this file at the project root as `DESIGN.md`, then instruct the agent:

> Follow `DESIGN.md` for all UI. Every color, radius and shadow comes from its token table. If you need a state that is not listed, derive it from the nearest listed token and add the new token to `DESIGN.md` instead of hard-coding a value.

If the project already has a token layer (Tailwind config, CSS custom properties, a theme file), map these tokens onto it one-to-one and keep the names unchanged.

## 6. Original prompt

```text
Create a website product page showcasing an interactive 3D model (e.g., using Three.js or Spline). Allow users to rotate/zoom the model. Use a clean, modern UI around the 3D view.
```

---

*Generated from the `3d-interactive` theme in `style.css`. Token values are verbatim — regenerate rather than edit by hand.*
