﻿:root {
  color-scheme: light;
  --bg: #f6f9ff;
  --bg-soft: #edf5ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #0f1835;
  --muted: #64708a;
  --subtle: #92a0b7;
  --line: #dce5f4;
  --primary: #2463eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #e7efff;
  --pink: #ef5f91;
  --orange: #f5a524;
  --green: #2dbd7f;
  --shadow: 0 22px 60px rgba(50, 86, 140, 0.14);
  --radius: 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(223, 235, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 235, 255, 0.32) 1px, transparent 1px),
    radial-gradient(circle at 50% 10%, #ffffff 0, #f3f8ff 38%, #f8fbff 80%);
  background-size: 72px 72px, 72px 72px, auto;
}

body.dark {
  color-scheme: dark;
  --bg: #10182a;
  --bg-soft: #17223a;
  --surface: rgba(20, 30, 50, 0.9);
  --surface-strong: #162139;
  --text: #eef4ff;
  --muted: #a6b3c9;
  --subtle: #768399;
  --line: #2c3b58;
  --primary: #5b8cff;
  --primary-strong: #7aa2ff;
  --primary-soft: #1d315d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  background:
    linear-gradient(rgba(94, 127, 178, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 127, 178, 0.16) 1px, transparent 1px),
    radial-gradient(circle at 50% 10%, #1b2841 0, #111a2c 48%, #0c1322 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
  padding: 0 clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(220, 229, 244, 0.78);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

body.dark .topbar {
  background: rgba(14, 22, 38, 0.86);
  border-bottom-color: rgba(65, 82, 116, 0.5);
}

.brand {
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
}

.main-nav,
.top-actions,
.platform-row,
.rewrite-actions,
.section-heading,
.heading-title {
  display: flex;
  align-items: center;
}

.main-nav {
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}

.nav-item,
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: transparent;
  border-radius: var(--radius);
  font-weight: 700;
}

.nav-item {
  padding: 10px 12px;
}

.nav-item:hover,
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.platform-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.douyin {
  background: #111936;
}

.bilibili {
  background: var(--pink);
}

.wechat {
  background: var(--orange);
}

.top-actions {
  gap: 12px;
}

.icon-button,
.ghost-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: transparent;
  border-radius: var(--radius);
}

.icon-button:hover,
.ghost-button:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.login-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.login-button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 28px rgba(36, 99, 235, 0.24);
}

.login-button {
  padding: 0 22px;
}

.primary-button {
  padding: 0 26px;
}

.primary-button:hover,
.login-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.flow-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  padding: 70px 0 24px;
  text-align: center;
}

.hero-copy {
  max-width: 840px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 20px;
  padding: 0 16px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 229, 244, 0.8);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

body.dark .eyebrow {
  background: rgba(22, 33, 57, 0.72);
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

h1 span {
  color: var(--primary);
}

.subtitle {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
}

.extractor,
.workspace,
.features {
  border: 1px solid rgba(220, 229, 244, 0.78);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.extractor {
  max-width: 900px;
  margin: 32px auto 0;
  padding: 24px;
  border-radius: 8px;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px auto;
  gap: 8px;
}

.link-field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 18px;
  color: var(--subtle);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.link-field:focus-within {
  color: var(--primary-strong);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(36, 99, 235, 0.12);
}

.link-field input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.field-message {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--pink);
  font-size: 14px;
  text-align: left;
}

.field-message.success {
  color: var(--green);
}

.platform-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 7vw, 96px);
  margin: 20px 0 26px;
}

.platform-chip {
  padding: 8px 10px;
}

.platform-chip strong {
  padding: 2px 8px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 12px;
}

.platform-chip:hover,
.platform-chip.active {
  background: rgba(36, 99, 235, 0.08);
}

.extract-progress[hidden] {
  display: none;
}

.extract-progress {
  --progress-color: var(--primary);
  margin: -4px auto 22px;
  max-width: 760px;
  padding: 12px 14px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(220, 229, 244, 0.72);
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

body.dark .extract-progress {
  background: rgba(22, 33, 57, 0.58);
  border-color: rgba(65, 82, 116, 0.5);
}

.extract-progress[data-state="running"] {
  color: var(--text);
  border-color: rgba(36, 99, 235, 0.32);
  background: rgba(231, 239, 255, 0.54);
}

.extract-progress[data-state="success"] {
  --progress-color: var(--green);
  color: var(--text);
  border-color: rgba(45, 189, 127, 0.32);
  background: rgba(45, 189, 127, 0.08);
}

.extract-progress[data-state="error"] {
  --progress-color: var(--pink);
  color: var(--text);
  border-color: rgba(239, 95, 145, 0.34);
  background: rgba(239, 95, 145, 0.08);
}

.progress-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--progress-color);
  box-shadow: 0 0 0 4px rgba(36, 99, 235, 0.12);
  flex: 0 0 auto;
}

.extract-progress[data-state="running"] .progress-dot {
  animation: progressPulse 1.2s ease-in-out infinite;
}
.extract-progress[data-state="success"] .progress-dot {
  box-shadow: 0 0 0 4px rgba(45, 189, 127, 0.14);
}

.extract-progress[data-state="error"] .progress-dot {
  box-shadow: 0 0 0 4px rgba(239, 95, 145, 0.14);
}

.progress-percent {
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.progress-track {
  position: relative;
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress-value, 0%);
  background: var(--progress-color);
  border-radius: inherit;
  transition: width 0.35s ease, background 0.2s ease;
}

@keyframes progressPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.72;
  }

  50% {
    transform: scale(1.38);
    opacity: 1;
  }
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.privacy-note svg {
  color: var(--primary);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  gap: 22px;
  margin-top: 24px;
  padding: 26px;
  border-radius: 8px;
}

.script-column {
  min-width: 0;
}

.section-heading {
  justify-content: space-between;
  gap: 14px;
  min-height: 36px;
  margin-bottom: 14px;
}

.heading-title {
  gap: 10px;
}

.heading-icon,
.feature-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 8px;
}

.heading-icon {
  width: 32px;
  height: 32px;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
}

.word-count,
.model-badge {
  color: var(--muted);
  font-size: 14px;
}

.model-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.model-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(45, 189, 127, 0.14);
}

textarea {
  display: block;
  width: 100%;
  min-height: 258px;
  resize: vertical;
  padding: 20px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  line-height: 1.8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(36, 99, 235, 0.12);
}

.secondary-button {
  min-width: 118px;
  margin-top: 18px;
  padding: 0 18px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.secondary-button:hover {
  color: var(--primary-strong);
  border-color: rgba(36, 99, 235, 0.44);
}

.flow-button {
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
}

.flow-button svg {
  width: 28px;
  height: 28px;
}

.rewrite-actions {
  justify-content: space-between;
  gap: 12px;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 40px 0 28px;
  padding: 28px;
  border-radius: 8px;
}

.feature-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.feature-icon {
  width: 54px;
  height: 54px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-item h3 {
  font-size: 16px;
}

.feature-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.link-accent {
  color: #2463eb;
  background: #e7efff;
}

.fast-accent {
  color: #7c3aed;
  background: #f0e9ff;
}

.write-accent {
  color: #0f9f7a;
  background: #e4f8f1;
}

.safe-accent {
  color: #ef7b24;
  background: #fff0df;
}

body.dark .link-accent,
body.dark .fast-accent,
body.dark .write-accent,
body.dark .safe-accent {
  background: var(--primary-soft);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 18px 32px;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  padding: 0;
  color: var(--primary-strong);
  background: transparent;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 17, 32, 0.48);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal h2 {
  margin-right: 40px;
  font-size: 24px;
}

.modal p {
  margin: 16px 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.modal-action {
  width: 100%;
}

.product-modal {
  width: min(520px, 100%);
}

.product-modal-tip {
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--text);
}

.product-info-input {
  min-height: 150px;
  max-height: 260px;
  margin-top: 0;
}

.product-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.product-modal-actions .secondary-button,
.product-modal-actions .primary-button {
  min-width: 112px;
  margin-top: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 40;
  transform: translate(-50%, 20px);
  max-width: min(90vw, 420px);
  padding: 12px 18px;
  color: #ffffff;
  background: rgba(15, 24, 53, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .topbar {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .workspace,
  .features {
    grid-template-columns: 1fr;
  }

  .flow-button {
    justify-self: center;
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 42px;
  }

  .input-row {
    grid-template-columns: 1fr 48px;
  }

  .input-row .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .extract-progress {
    margin-top: 2px;
    padding: 12px;
  }

  .extractor,
  .workspace,
  .features {
    padding: 18px;
  }


  .section-heading,
  .rewrite-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .rewrite-button,
  .secondary-button {
    width: 100%;
  }

  .top-actions {
    gap: 8px;
  }

  .login-button {
    padding: 0 14px;
  }

  .product-modal-actions {
    flex-direction: column-reverse;
  }

  .product-modal-actions .secondary-button,
  .product-modal-actions .primary-button {
    width: 100%;
  }
}



