:root {
  --bg: #0b0b0f;
  --panel: #15151c;
  --panel-2: #1d1d27;
  --line: #2a2a36;
  --text: #f4f4f6;
  --muted: #9a9aab;
  --accent: #ff6a1a;
  --accent-2: #ffb21a;
  --ok: #34d399;
  --bad: #f87171;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); }
img, video { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11,11,15,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.credit-pill { background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; color: var(--accent-2) !important; font-weight: 600; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; color: #111; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.google { background: #fff; color: #222; }
input[type=email], input[type=password], input[type=text] { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 6px; }
.error { color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 8px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* hero */
.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 { font-size: clamp(30px, 6vw, 54px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 18px; }

/* generator */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0 56px; }
@media (max-width: 820px) { .studio { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h2, .card h3 { margin: 0 0 12px; font-size: 18px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); min-height: 220px; display: grid; place-items: center; text-align: center; cursor: pointer; position: relative; overflow: hidden; padding: 16px; }
.drop:hover, .drop.drag { border-color: var(--accent); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.drop input { display: none; }
.step-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.chip small { display: block; color: var(--muted); font-size: 12px; }
.chip[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cost-row { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px; font-size: 15px; }
.cost-row strong { color: var(--accent-2); font-size: 20px; }
.result { aspect-ratio: 9 / 16; max-height: 640px; background: #000; border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; color: var(--muted); text-align: center; padding: 16px; margin: 0 auto; width: 100%; }
.result video { width: 100%; height: 100%; object-fit: contain; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sections */
section.block { padding: 40px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .grid3 { grid-template-columns: 1fr; } }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }

/* pricing */
.pack { display: flex; flex-direction: column; gap: 8px; }
.pack .price { font-size: 36px; font-weight: 800; }
.pack .credits { color: var(--accent-2); font-weight: 700; }
.pack.featured { border-color: var(--accent); }
.cost-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cost-table th, .cost-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: flex-end; justify-content: center; z-index: 50; }
.modal.open { display: flex; }
@media (min-width: 640px) { .modal { align-items: center; } }
.modal-body { background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 0 0; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 22px 20px 28px; position: relative; }
@media (min-width: 640px) { .modal-body { border-radius: 18px; } }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.pack-pick { display: grid; gap: 10px; margin: 12px 0 16px; }
.pack-pick button { display: flex; justify-content: space-between; align-items: center; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* auth pages */
.auth { max-width: 420px; margin: 48px auto; }

/* account */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.video-card video { aspect-ratio: 9/16; width: 100%; object-fit: cover; background: #000; border-radius: 10px; }
.video-card .meta { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); margin-right: 16px; }
.prose { max-width: 760px; margin: 40px auto; }
.prose h1 { letter-spacing: -.02em; }

@media (max-width: 480px) {
  .site-header .wrap { gap: 10px; }
  .logo { font-size: 15px; }
  .nav { gap: 10px; font-size: 14px; white-space: nowrap; }
  .nav a[href="/pricing"] { display: none; }
}

.packs-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1000px) { .packs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .packs-grid { grid-template-columns: 1fr; } }

.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.uploads .drop { min-height: 180px; }
.slot-label { font-size: 14px; font-weight: 600; margin-top: 6px; text-align: center; }
.drop-wide { min-height: 140px; margin-top: 10px; }
#scene-custom input { margin-top: 10px; }
