:root {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --card: #151e2e;
  --card-edge: #24314a;
  --text: #f3f6fb;
  --muted: #9fb0c7;
  --gold: #f5b83d;
  --gold-dark: #d99a1f;
  --green: #34d399;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-edge);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; letter-spacing: 0.2px; }
.brand strong { color: var(--gold); }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #1a1205; font-weight: 800;
}
.topnav { display: flex; gap: 18px; margin-left: auto; color: var(--muted); font-size: 15px; }
.topnav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), #f97316); color: #1a1205; }
.btn-gold:hover { background: linear-gradient(135deg, #ffc95e, #fb8c2e); }
.btn-ghost { background: transparent; border-color: var(--card-edge); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { padding: 8px 16px; font-size: 14px; }

/* Hero */
.hero {
  text-align: center;
  padding: 72px 20px 56px;
  background:
    radial-gradient(700px 320px at 50% -60px, rgba(245, 184, 61, 0.18), transparent 65%),
    radial-gradient(600px 300px at 85% 10%, rgba(56, 189, 248, 0.12), transparent 65%);
}
.eyebrow { color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: 2.5px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.12; margin: 0 0 18px; }
.hero-sub { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 34px; }
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  max-width: 760px; margin: 0 auto 36px;
}
.hero-stats div {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: 16px 22px; min-width: 150px;
}
.hero-stats strong { display: block; font-size: 28px; color: var(--gold); }
.hero-stats span { color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { max-width: 1180px; margin: 0 auto; padding: 56px 20px; }
.section h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 14px; line-height: 1.2; }
.section-sub { color: var(--muted); margin: 0 0 26px; max-width: 640px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.step { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius); padding: 24px; }
.step-num { color: var(--gold); font-weight: 800; font-size: 14px; letter-spacing: 2px; }
.step h3 { margin: 10px 0 8px; font-size: 20px; }
.step p { color: var(--muted); margin: 0; }

/* Toolbar and chips */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
#search {
  flex: 1 1 280px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-edge);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
#search:focus { border-color: var(--gold); }
.type-toggle { display: flex; background: var(--bg-soft); border: 1px solid var(--card-edge); border-radius: 999px; padding: 4px; }
.toggle {
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.toggle.active { background: var(--gold); color: #1a1205; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.chip {
  border: 1px solid var(--card-edge); background: transparent; color: var(--muted);
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--text); color: #0b0f17; border-color: var(--text); }
.result-count { color: var(--muted); font-size: 14px; margin: 14px 0; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: #36486b; }
.card-cover {
  height: 172px; position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.preview-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.preview-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.preview-subject {
  position: relative; z-index: 1;
  font-size: 78px; line-height: 1;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45));
}
.preview-subject-big { font-size: 104px; }
.preview-play {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(8, 12, 20, 0.62);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
}
.preview-play::after {
  content: ""; position: absolute; left: 15px; top: 11px;
  border-left: 12px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.preview-duration {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  background: rgba(8, 12, 20, 0.68); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 9px; border-radius: 999px;
}
.card-cover::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(320px 150px at 20% 0%, rgba(255,255,255,0.20), transparent 60%);
}
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 11.5px; font-weight: 800; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 999px;
}
.badge-free { background: var(--green); color: #052e1f; }
.badge-premium { background: var(--gold); color: #1a1205; }
.badge-style {
  left: auto; right: 12px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.style-3d-animation { background: #7c3aed; }
.style-photorealistic { background: #0284c7; }
.style-cinematic { background: #b45309; }
.style-2d-cartoon { background: #db2777; }
.style-documentary { background: #0f766e; }
.modal-cover .badge-style { right: 58px; }
.chips-label {
  color: var(--muted); font-size: 12px; font-weight: 800;
  letter-spacing: 1.6px; text-transform: uppercase;
  align-self: center; margin-right: 2px;
}
.style-chips { margin-top: 10px; }
.chip-style.active { background: var(--gold); color: #1a1205; border-color: var(--gold); }
.badge-gold { position: static; display: inline-block; background: var(--gold); color: #1a1205; margin-bottom: 12px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.card-meta span { background: var(--bg-soft); border: 1px solid var(--card-edge); padding: 3px 9px; border-radius: 999px; }
.card h3 { margin: 2px 0 0; font-size: 17.5px; line-height: 1.35; }
.card-hook { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.card-tools { color: var(--muted); font-size: 12.5px; }
.card .btn { margin-top: 8px; width: 100%; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 30px; max-width: 820px; }
.price-card { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius); padding: 28px; }
.price-card.featured { border-color: var(--gold-dark); box-shadow: 0 0 0 1px var(--gold-dark), 0 18px 50px rgba(245, 184, 61, 0.08); }
.price-card h3 { margin: 0 0 6px; font-size: 20px; }
.price { font-size: 42px; font-weight: 800; margin: 0; }
.price span { font-size: 15px; color: var(--muted); font-weight: 600; }
.price-note { color: var(--muted); margin: 4px 0 18px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.price-card li { padding-left: 26px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.price-card .btn { width: 100%; }
.price-alt { color: var(--muted); font-size: 13.5px; text-align: center; margin: 14px 0 0; }

/* FAQ */
.faq-list { display: grid; gap: 10px; max-width: 760px; margin-top: 24px; }
.faq-list details { background: var(--card); border: 1px solid var(--card-edge); border-radius: 12px; padding: 16px 20px; }
.faq-list summary { cursor: pointer; font-weight: 700; }
.faq-list p { color: var(--muted); margin: 10px 0 2px; }

/* Footer */
.footer { border-top: 1px solid var(--card-edge); padding: 34px 20px 44px; text-align: center; color: var(--muted); }
.footer-note { font-size: 13px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, 0.78); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: min(680px, 100%); max-height: 90vh; overflow: auto;
  background: var(--bg-soft); border: 1px solid var(--card-edge); border-radius: 20px;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(11, 15, 23, 0.75); color: #fff; font-size: 16px; cursor: pointer;
}
.modal-cover { height: 230px; display: grid; place-items: center; position: relative; overflow: hidden; }
.story-title { font-weight: 800; margin: 0 0 10px; font-size: 15px; letter-spacing: 0.4px; }
.storyboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.story-frame { margin: 0; }
.story-thumb {
  position: relative; height: 96px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--card-edge);
}
.story-subject {
  position: absolute; top: 50%; z-index: 1;
  transform: translate(-50%, -50%);
  font-size: 44px; line-height: 1;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}
.story-num {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(8, 12, 20, 0.72); color: #fff;
  font-size: 11.5px; font-weight: 800;
}
.story-frame figcaption { color: var(--muted); font-size: 12.5px; margin-top: 7px; line-height: 1.4; }
.modal-body { padding: 22px 24px 26px; }
.modal-body h3 { font-size: 24px; margin: 12px 0 8px; line-height: 1.3; }
.modal-hook { color: var(--muted); margin: 0 0 18px; }
.prompt-box {
  background: #0a0e16; border: 1px solid var(--card-edge); border-radius: 12px;
  padding: 16px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word;
}
.shot-list { margin: 18px 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.shot-list strong { color: var(--text); }
.locked-box {
  border: 1px dashed var(--gold-dark); border-radius: 12px; padding: 18px;
  background: rgba(245, 184, 61, 0.06);
}
.locked-lines { filter: blur(5px); user-select: none; color: var(--muted); font-size: 14px; margin: 12px 0; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.modal-actions .btn { flex: 1 1 180px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--green); color: #052e1f; font-weight: 700; font-size: 14.5px;
  padding: 12px 22px; border-radius: 999px; z-index: 80;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}
.toast[hidden] { display: none; }

@media (max-width: 720px) {
  .topnav { display: none; }
  .topbar .btn { margin-left: auto; }
  .hero { padding: 48px 16px 40px; }
  .section { padding: 42px 16px; }
  .grid { grid-template-columns: 1fr; }
  .hero-stats div { min-width: 130px; flex: 1 1 40%; }
}
