:root {
  --bg: #080b2a;
  --accent: #5d5fef;
  --accent-2: #7879f1;
  --ellipse: #2a3e84;
  --muted: #999999;
  --yellow: #ffcc00;
  --card-starter: #484370;
  --card-pro: #7879f1;
  --white: #ffffff;
  --ink: #1b1f26;
  --font-script: 'Indie Flower', cursive;
  --font-body: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* decorative background */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ellipse {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--ellipse), transparent 70%);
  opacity: 0.55;
  filter: blur(2px);
}
.e1 { top: -120px; left: -100px; }
.e2 { top: 15%; right: -140px; }
.e3 { bottom: 10%; left: 45%; }
.star { position: absolute; color: var(--white); opacity: 0.6; font-size: 20px; }
.s1 { top: 12%; left: 8%; }
.s2 { top: 8%; right: 12%; }

.site-header, .hero, .result, .how-it-works, .pricing, .about, .site-footer {
  position: relative;
  z-index: 1;
}

/* header */
.site-header { padding: 28px 0 8px; }
.header-row { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: var(--font-script);
  font-size: 30px;
  text-decoration: none;
}
.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; opacity: 0.9; }
.nav a:hover { opacity: 1; color: var(--accent-2); }
.header-cta {
  background: var(--white);
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 100px;
  padding: 10px 18px;
  flex-shrink: 0;
}
.header-cta:hover { opacity: 0.92; }

/* hero */
.hero { padding: 40px 0 20px; text-align: center; }
.eyebrow {
  color: #9799ff;
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
}
.script-xl {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 108px);
  margin: 0;
  line-height: 1.05;
}
.hero-wave {
  width: 100%;
  max-width: 900px;
  height: 100px;
  margin: 8px auto -10px;
  display: block;
}
.hero-wave path {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 2;
  opacity: 0.55;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 28px;
  margin: 8px 0 36px;
}
.tag {
  color: #9799ff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

/* prompt bar */
.prompt-bar {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 100px;
  padding: 8px 8px 8px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.prompt-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.prompt-input::placeholder { color: #8b8f9a; }
.icon-btn {
  border: none;
  background: #ebedf0;
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: #dfe2f5; }
.mic-btn.listening {
  background: var(--accent);
  color: var(--white);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(93, 95, 239, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(93, 95, 239, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 95, 239, 0); }
}
.send-btn {
  border: none;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  border-radius: 100px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
}
.send-btn svg { width: 18px; height: 18px; }
.send-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.send-btn.is-loading .send-spinner { display: block; }
.send-btn.is-loading .send-arrow,
.send-btn.is-loading .send-label { display: none; }
.send-btn:hover { background: #4b4dd8; }
.send-btn:disabled { opacity: 0.72; cursor: progress; }
.icon-btn.is-recording {
  background: #ff4d6d;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.25);
}
.attach-row {
  margin: 12px 0 0;
}
.attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}
.attach-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.attach-chip button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  cursor: pointer;
  line-height: 1;
}
.model-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
}
.model-label {
  font-size: 13px;
  color: #b7b9ff;
  font-weight: 600;
}
.model-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.model-select option { color: var(--ink); }

.prompt-hint {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 14px;
  color: #b7b9ff;
}
.prompt-hint.error { color: #ff8a8a; }
.live-edit-note {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--yellow);
}

/* result */
.result { padding: 30px 0 10px; }
.result-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px;
  backdrop-filter: blur(6px);
  position: relative;
}
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.result-kicker { margin: 0; color: var(--yellow); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.result-summary { margin: 4px 0 0; font-size: 16px; max-width: 640px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--white);
  border-radius: 100px;
  padding: 9px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.ghost-btn:hover { background: rgba(255, 255, 255, 0.1); }
.ghost-close { padding: 9px 12px; }
.generate-log.error { color: #ff8a8a; }
.loading-panel.is-error {
  border-color: rgba(255, 138, 138, 0.55);
  background: rgba(48, 12, 22, 0.55);
}
.loading-panel.is-error .loading-orbit {
  border-top-color: #ff8a8a;
  animation: none;
}
.loading-panel.is-error .loading-stage { color: #ff8a8a; }
.loading-panel.is-error .loading-bar { display: none; }
.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 320px;
  margin: 8px 0 4px;
  padding: 28px 18px;
  border-radius: 16px;
  background: rgba(8, 11, 42, 0.55);
  border: 1px dashed rgba(120, 121, 241, 0.45);
}
.loading-panel[hidden] { display: none; }
.loading-panel.is-patch {
  min-height: 0;
  margin: 0 0 12px;
  padding: 14px 16px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 14px;
}
.loading-panel.is-patch .loading-feed,
.loading-panel.is-patch .loading-bar { display: none; }
.loading-orbit {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--yellow);
  border-right-color: var(--accent-2);
  animation: spin 0.9s linear infinite;
}
.loading-stage {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  text-align: center;
}
.loading-timer {
  margin: 0;
  font-size: 13px;
  color: #9799ff;
  letter-spacing: 0.04em;
}
.loading-bar {
  width: min(360px, 90%);
  height: 6px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.loading-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), var(--yellow));
  animation: loading-slide 1.4s ease-in-out infinite;
}
.loading-feed {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  width: min(520px, 100%);
  max-height: 140px;
  overflow: auto;
  font-size: 13px;
  color: #c5c7ff;
  text-align: left;
}
.loading-feed li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: fade-in 0.25s ease;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes loading-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.publish-status {
  margin: 0 0 14px;
  font-size: 14px;
  color: #b7b9ff;
}
.publish-status a { color: var(--yellow); font-weight: 700; text-decoration: underline; }
.publish-status.error { color: #ff8a8a; }
.result-frame[hidden] { display: none; }
.result-frame {
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border: none;
  border-radius: 14px;
  background: var(--white);
}

/* section headings shared */
.script-lg {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 40px;
}
.doodle-arrow, .doodle-heart { color: var(--white); opacity: 0.7; font-size: 0.6em; }
.doodle-arrow.flip { transform: scaleX(-1); display: inline-block; }

/* how it works */
.how-it-works { padding: 70px 0; text-align: center; }
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.info-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 32px 26px;
  width: 220px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.info-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.info-block p { margin: 0; font-weight: 500; font-size: 17px; color: #f8f8f8; }
.step-arrow { font-size: 22px; color: var(--white); opacity: 0.5; }

/* pricing */
.pricing { padding: 40px 0 80px; text-align: center; }
.plans {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 28px;
  flex-wrap: wrap;
  text-align: left;
}
.plan {
  background: var(--card-starter);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 32px;
  padding: 36px 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
}
.plan-pro {
  background: var(--card-pro);
  transform: translateY(-14px);
  box-shadow: 0 30px 70px rgba(93, 95, 239, 0.35);
}
.plan-price { margin: 0; font-size: 40px; font-weight: 800; }
.plan-price span { font-size: 46px; }
.plan-price { font-size: 18px; font-weight: 500; opacity: 0.85; }
.plan-name { margin: 4px 0 20px; font-size: 22px; font-weight: 700; }
.plan-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.plan-list li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.plan-btn {
  border: none;
  border-radius: 100px;
  padding: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 16px;
}
.plan-btn-light { background: var(--white); color: var(--accent); }
.plan-btn-dark { background: var(--white); color: var(--accent-2); }
.plan-note { margin: 0; font-size: 13px; opacity: 0.85; text-align: center; }
.plan-note-accent { color: var(--yellow); font-weight: 600; }

/* about */
.about { padding: 40px 0 90px; text-align: center; }
.about-text { max-width: 760px; margin: 0 auto 18px; font-size: 18px; font-weight: 500; color: #eef; }
.about .accent { color: var(--accent-2); text-decoration: underline; }

/* footer */
.site-footer { background: #05071c; padding: 50px 0 24px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-title { font-weight: 700; margin: 0 0 8px; }
.footer-line { margin: 0 0 4px; color: var(--muted); }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.footer-social { display: flex; gap: 10px; align-items: flex-start; }
.footer-social span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  color: #05071c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.footer-copy { margin-top: 30px; color: var(--muted); font-size: 13px; }

@media (max-width: 720px) {
  .nav { display: none; }
  .prompt-bar { flex-wrap: wrap; border-radius: 28px; padding: 14px; }
  .prompt-input { flex-basis: 100%; order: -1; margin-bottom: 8px; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .plan-pro { transform: none; }
}
