/* PRESERVE: Do NOT replace this file with write_file. Use edit_file to ADD your styles below the CUSTOM STYLES marker. */
/* This file contains essential utility classes: glass-nav, nav-logo, card-hero, card-tinted, badge-frosted, */
/* animate-in, animate-in-delay-*, animate-float, hero-glow, btn, card, list, modal, form controls. */
/* Overwriting these will break your app's visual foundation. Add new styles at the bottom. */

:root {
  /* "Iris" design system — one signature blue-violet hue (~248) with hue-tinted
     neutrals, a tokenized gradient story, and a WCAG-AA status ramp. Re-theme by
     overriding these tokens; never hardcode raw color values in the markup. */
  --color-bg: hsl(0 0% 100%);
  --color-surface: hsl(248 20% 96.5%);
  --color-text: hsl(248 28% 9%);
  --color-muted: hsl(248 9% 42%);
  --color-primary: hsl(248 84% 58%);
  --color-primary-hover: hsl(248 84% 48%);
  --color-border: hsl(248 18% 90%);
  --color-success: hsl(160 84% 27%);
  --color-warning: hsl(36 100% 32%);
  --color-info: hsl(205 92% 38%);
  --color-danger: hsl(356 76% 48%);
  /* Gradient tokens — hero/logo surfaces read these three stops. */
  --gradient-from: hsl(236 86% 58%);
  --gradient-via: hsl(252 82% 60%);
  --gradient-to: hsl(268 78% 52%);
  --font-sans: system-ui, -apple-system, sans-serif;
  --radius: 8px;
  --max-width: 900px;
  /* Motion tokens — shared easing + durations for hover/entrance motion. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 450ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: hsl(248 24% 7%);
    --color-surface: hsl(248 16% 15%);
    --color-text: hsl(248 25% 96%);
    --color-muted: hsl(248 12% 70%);
    --color-primary: hsl(249 92% 70%);
    --color-primary-hover: hsl(249 92% 78%);
    --color-border: hsl(248 16% 18%);
    --color-success: hsl(158 64% 50%);
    --color-warning: hsl(42 96% 60%);
    --color-info: hsl(203 94% 62%);
    --color-danger: hsl(356 82% 62%);
    --gradient-from: hsl(238 90% 64%);
    --gradient-via: hsl(252 88% 66%);
    --gradient-to: hsl(270 84% 60%);
  }
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; width: 100%; }

header { border-bottom: 1px solid var(--color-border); padding: 0.75rem 0; }
.glass-nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(255,255,255,0.8); border-bottom: 1px solid rgba(0,0,0,0.08); }
@media (prefers-color-scheme: dark) { .glass-nav { background: rgba(15,23,42,0.8); border-bottom-color: rgba(255,255,255,0.06); } }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo { width: 2rem; height: 2rem; border-radius: 0.5rem; background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to)); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(82, 58, 238, 0.25); }
.logo { font-weight: 600; font-size: 1.125rem; text-decoration: none; color: var(--color-text); letter-spacing: -0.01em; }

main { flex: 1; }
.hero { padding: 4rem 0; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.02em; }
.hero p { color: var(--color-muted); margin-bottom: 2rem; font-size: 1.125rem; }
.hero code { background: var(--color-border); padding: 0.2em 0.5em; border-radius: 4px; font-size: 0.875em; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; background: var(--color-primary);
  color: #fff; border: none; border-radius: var(--radius); font-size: 1rem;
  cursor: pointer; transition: background var(--duration-fast) var(--ease-out); text-decoration: none;
}
.btn:hover { background: var(--color-primary-hover); }
.btn-ghost {
  background: transparent; color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-surface); }

/* ── Form controls ────────────────────────────────── */
.input, .textarea, .select {
  width: 100%; padding: 0.5rem 0.75rem;
  background: var(--color-bg); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.875rem; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(82, 58, 238, 0.15);
}
.textarea { min-height: 80px; resize: vertical; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1rem; }
.form-label { font-size: 0.875rem; font-weight: 500; }
.form-error { font-size: 0.75rem; color: var(--color-danger); }

/* ── Card ─────────────────────────────────────────── */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card-tinted {
  background: linear-gradient(135deg, rgba(82,58,238,0.06), rgba(82,58,238,0.12));
  border: 1px solid rgba(82,58,238,0.15); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card-hero {
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-via), var(--gradient-to));
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  color: #fff; border-radius: 1rem; padding: 2rem; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(82,58,238,0.25);
}
.card-hero::before {
  content: ""; position: absolute; top: -50%; right: -20%; width: 200px; height: 200px;
  background: rgba(255,255,255,0.05); border-radius: 50%;
}

/* ── Animations ──────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes gradientShift { 0%,100% { background-position:0% 50%; } 50% { background-position:100% 50%; } }
@keyframes glowPulse { 0%,100% { opacity:0.3; } 50% { opacity:0.6; } }
@keyframes growWidth { from { width:0%; } to { width:var(--target-width); } }
@keyframes growHeight { from { height:0%; } to { height:var(--target-height); } }
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
.animate-in { animation: fadeUp 0.5s ease-out both; }
.animate-in-delay-1 { animation: fadeUp 0.5s ease-out 0.1s both; }
.animate-in-delay-2 { animation: fadeUp 0.5s ease-out 0.2s both; }
.animate-in-delay-3 { animation: fadeUp 0.5s ease-out 0.3s both; }
.animate-in-delay-4 { animation: fadeUp 0.5s ease-out 0.4s both; }
.animate-float { animation: float 3s ease-in-out infinite; }
.hero-glow { position:absolute; inset:-4px; border-radius:1rem; background:inherit; opacity:0.3; filter:blur(20px); animation:glowPulse 3s ease-in-out infinite; z-index:-1; }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(107,114,128,0.2); border-radius:999px; }
::-webkit-scrollbar-thumb:hover { background:rgba(107,114,128,0.35); }

/* ── List ─────────────────────────────────────────── */
.list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  transition: border-color 0.15s;
}
.list-item:hover { border-color: var(--color-primary); }

/* ── Sidebar layout ───────────────────────────────── */
.layout {
  display: flex; gap: 1.5rem; align-items: flex-start;
  flex: 1; padding: 1.5rem 0;
}
.layout-sidebar {
  flex: 0 0 220px; min-width: 0;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1rem;
  position: sticky; top: 1rem;
}
.layout-main { flex: 1; min-width: 0; }
@media (max-width: 640px) { .layout { flex-direction: column; } .layout-sidebar { flex: none; width: 100%; position: static; } }

/* ── Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.5rem; width: 100%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--color-muted); font-size: 1.25rem; line-height: 1; padding: 0.25rem; }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ── Badge / Tag ──────────────────────────────────── */
.badge {
  display: inline-block; padding: 0.2em 0.6em;
  font-size: 0.75rem; font-weight: 500; border-radius: 999px;
  background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text);
}
.badge-frosted {
  display: inline-block; padding: 0.25em 0.75em;
  font-size: 0.8rem; font-weight: 500; border-radius: 999px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.1);
}

footer { border-top: 1px solid var(--color-border); padding: 1.5rem 0; text-align: center; color: var(--color-muted); font-size: 0.875rem; }

/* === CUSTOM STYLES: Add your domain-specific styles below this line === */

/* ── Lava lamp screensaver ─────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
  background: #050406;
}

body {
  display: block;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse 120% 80% at 50% 108%, rgba(90, 30, 10, 0.35), transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(20, 10, 30, 0.6), transparent 60%),
    linear-gradient(180deg, #08060b 0%, #0c0810 45%, #050307 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 140, 60, 0.10), transparent 70%);
  mix-blend-mode: screen;
}

.ambient-glow {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: min(70vw, 900px);
  height: min(70vw, 900px);
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 130, 40, 0.30) 0%, rgba(255, 90, 30, 0.14) 30%, transparent 68%);
  filter: blur(10px);
  animation: ambientPulse 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

/* ── Lamp structure ───────────────────────────────────────────────── */
.lamp {
  position: relative;
  z-index: 2;
  width: clamp(200px, 24vw, 380px);
  height: clamp(440px, 82vh, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Real lava lamps sit on a base that hums and radiates heat unevenly —
     the whole fixture has an almost imperceptible slow drift rather than
     being perfectly rigid. Kept extremely subtle so it reads as "alive"
     rather than an obvious wobble. */
  animation: lampBreathe 46s ease-in-out infinite;
  transform-origin: 50% 100%;
}

@keyframes lampBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.005); }
}

@media (prefers-reduced-motion: reduce) {
  .lamp { animation-duration: 100s; }
}

.lamp-cap {
  position: relative;
  width: 46%;
  height: 7%;
  min-height: 26px;
  background: linear-gradient(180deg, #3a3a40 0%, #1c1c20 30%, #57575e 55%, #17171a 80%, #0c0c0e 100%);
  border-radius: 10px 10px 4px 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.15);
  z-index: 3;
}
.cap-ridge {
  position: absolute;
  top: 18%;
  left: 0;
  right: 0;
  height: 10%;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(255,255,255,0.08));
}
.cap-highlight {
  position: absolute;
  top: 8%;
  left: 12%;
  width: 14%;
  height: 70%;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), transparent);
  border-radius: 4px;
  filter: blur(1px);
}

.glass-wrap {
  position: relative;
  width: 100%;
  height: 78%;
  margin-top: -2px;
}

.clip-defs { position: absolute; width: 0; height: 0; }

.glass {
  position: relative;
  width: 100%;
  height: 100%;
  clip-path: url(#bottleClip);
  background: rgba(10, 8, 6, 0.4);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

.liquid-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 196, 110, 0.20) 0%, rgba(255, 158, 60, 0.28) 45%, rgba(200, 90, 20, 0.35) 100%);
  z-index: 1;
}

#lava-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  filter: url(#goo);
}

#fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  mix-blend-mode: screen;
}

.glass-shine {
  position: absolute;
  top: 4%;
  left: 10%;
  width: 12%;
  height: 88%;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.05) 60%, transparent);
  filter: blur(3px);
  border-radius: 40%;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
}
.glass-shine-2 {
  left: auto;
  right: 16%;
  width: 5%;
  opacity: 0.5;
}

.glass-vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  box-shadow: inset 0 0 34px rgba(0,0,0,0.55), inset 0 0 70px rgba(0,0,0,0.25);
  background: radial-gradient(ellipse 70% 100% at 50% 50%, transparent 55%, rgba(0,0,0,0.30) 100%);
}

.lamp-neck {
  width: 34%;
  height: 2.2%;
  background: linear-gradient(180deg, #2a2a2e, #131316);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.1);
}

.lamp-base {
  position: relative;
  width: 58%;
  height: 11%;
  min-height: 42px;
  background: linear-gradient(180deg, #4a4a52 0%, #232327 12%, #302f34 50%, #18181b 88%, #0a0a0b 100%);
  border-radius: 6px 6px 16px 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.65), inset 0 1px 1px rgba(255,255,255,0.12);
  overflow: hidden;
}

.base-glow-ring {
  position: absolute;
  top: -4%;
  left: 50%;
  width: 70%;
  height: 34%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 170, 80, 0.9), rgba(255, 110, 30, 0.35) 55%, transparent 80%);
  filter: blur(3px);
  animation: bulbFlicker 3.4s ease-in-out infinite;
}
@keyframes bulbFlicker {
  0%, 100% { opacity: 0.75; }
  45% { opacity: 1; }
  50% { opacity: 0.88; }
  75% { opacity: 0.97; }
}

.base-vents {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10%;
}
.base-vents span {
  width: 3px;
  height: 14px;
  background: rgba(0,0,0,0.55);
  border-radius: 2px;
  box-shadow: 1px 0 0 rgba(255,255,255,0.05);
}

.base-highlight {
  position: absolute;
  top: 20%;
  left: 8%;
  width: 10%;
  height: 55%;
  background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
  border-radius: 3px;
}

@media (max-width: 480px) {
  .lamp { width: 62vw; }
}

