/* ============ 基础变量与主题 ============ */
:root {
  --bg: #0b0c10;
  --bg-soft: #111319;
  --bg-card: #151821;
  --bg-elev: #1b1f2a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --text-soft: #a8b0c0;
  --text-dim: #6f7889;
  --brand: #22d3ee;
  --brand-2: #8b5cf6;
  --brand-3: #f472b6;
  --accent-grad: linear-gradient(120deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --header-h: 64px;
}

html[data-theme='light'] {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-card: #ffffff;
  --bg-elev: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #101828;
  --text-soft: #4a5468;
  --text-dim: #7b8496;
  --shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.container { width: min(1200px, 100% - 40px); margin: 0 auto; }
.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--text-soft); }
.dim { color: var(--text-dim); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--brand); }
.btn:active { transform: translateY(0); }
.btn-primary {
  border: none;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 26px rgba(99, 102, 241, 0.32);
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(99, 102, 241, 0.45); }
.btn-ghost { background: transparent; }
.btn-lg { height: 52px; padding: 0 32px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ============ 顶部导航 ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.header .inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 8px 14px; border-radius: 9px; font-size: 14.5px; color: var(--text-soft);
  transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--text); background: var(--bg-elev); }
.nav a.active { color: var(--text); background: var(--bg-elev); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elev); cursor: pointer;
  color: var(--text-soft); transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.burger { display: none; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(700px 380px at 20% 8%, rgba(34, 211, 238, 0.18), transparent 70%),
    radial-gradient(760px 420px at 82% 18%, rgba(139, 92, 246, 0.2), transparent 72%),
    radial-gradient(600px 340px at 50% 100%, rgba(244, 114, 182, 0.12), transparent 70%);
}
html[data-theme='light'] .hero-bg { opacity: 0.65; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  opacity: 0.5;
}
.hero .container { position: relative; z-index: 1; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  font-size: 13px; color: var(--text-soft); margin-bottom: 26px;
}
.badge-pill b {
  background: var(--accent-grad); color: #fff; border-radius: 999px;
  padding: 2px 9px; font-size: 12px; font-weight: 600;
}
h1.hero-title {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.14;
  margin: 0 0 22px;
  letter-spacing: -0.5px;
  font-weight: 800;
}
.hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-soft);
  max-width: 660px;
  margin: 0 auto 34px;
  line-height: 1.75;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.hero-note { font-size: 13.5px; color: var(--text-dim); }

/* 统计条 */
.stats { display: flex; justify-content: center; gap: 56px; margin-top: 62px; flex-wrap: wrap; }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.stat span { font-size: 13px; color: var(--text-dim); }

/* ============ 模型跑马灯 ============ */
.marquee-section { padding: 26px 0 8px; overflow: hidden; }
.marquee {
  display: flex; gap: 12px; width: max-content;
  animation: scroll-left 46s linear infinite;
}
.marquee-wrap:hover .marquee { animation-play-state: paused; }
.marquee-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.model-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 14px; white-space: nowrap;
}
.model-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.model-chip .tag { font-size: 11px; color: var(--text-dim); }

/* ============ 通用区块 ============ */
.section { padding: 92px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head .eyebrow {
  font-size: 12.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 0 0 14px; font-weight: 800; letter-spacing: -0.4px; }
.section-head p { color: var(--text-soft); max-width: 620px; margin: 0 auto; line-height: 1.75; }

/* 卡片 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }

/* 特性四栏 */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { position: relative; overflow: hidden; }
.feature .num {
  font-size: 46px; font-weight: 800; line-height: 1;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.9; margin-bottom: 16px;
}
.feature h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.feature p { margin: 0 0 18px; color: var(--text-soft); line-height: 1.8; font-size: 14.5px; }
.feature .link { color: var(--brand); font-size: 14px; font-weight: 600; }

/* 核心能力 */
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cap {
  border-radius: var(--radius-lg); padding: 28px 24px;
  border: 1px solid var(--border); background: var(--bg-card);
  position: relative; overflow: hidden;
}
.cap::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(340px 180px at 100% 0%, rgba(34, 211, 238, 0.14), transparent 70%);
}
.cap:hover::after { opacity: 1; }
.cap .ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-grad); margin-bottom: 18px; font-size: 20px;
}
.cap h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.cap p { margin: 0 0 16px; color: var(--text-soft); font-size: 14px; line-height: 1.75; }
.cap ul { margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-dim); }
.cap ul li { padding: 4px 0 4px 18px; position: relative; }
.cap ul li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

/* 灵感广场瀑布流 */
.gallery-masonry { columns: 4; column-gap: 18px; }
.g-item {
  break-inside: avoid; margin-bottom: 18px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); background: var(--bg-card);
  cursor: pointer; position: relative;
}
.g-thumb { width: 100%; aspect-ratio: 3/4; position: relative; }
html[data-theme='light'] .g-thumb { filter: none; }
.g-thumb .g-label {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.5); color: #fff; backdrop-filter: blur(4px);
}
.g-meta { padding: 12px 14px; }
.g-meta h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.g-meta .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); }
.g-item:hover .g-thumb { transform: scale(1.03); }
.g-thumb { transition: transform 0.25s ease; }

.filter-bar { display: flex; gap: 10px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.chip {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card); font-size: 14px; cursor: pointer; color: var(--text-soft);
  transition: all 0.16s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.on { background: var(--accent-grad); color: #fff; border-color: transparent; font-weight: 600; }

/* 定价 */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.plan {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); padding: 28px 24px; display: flex; flex-direction: column;
  position: relative; transition: transform 0.2s, border-color 0.2s;
}
.plan:hover { transform: translateY(-4px); }
.plan.popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 20px 50px rgba(34, 211, 238, 0.14); }
.plan .ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-grad); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { margin: 0 0 6px; font-size: 18px; }
.plan .desc { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; min-height: 36px; }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--text-dim); }
.plan .credits { font-size: 13px; color: var(--brand); margin: 8px 0 20px; font-weight: 600; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.plan ul li { font-size: 14px; padding: 7px 0 7px 24px; position: relative; color: var(--text-soft); }
.plan ul li::before {
  content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 700;
}

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; padding: 20px 0;
  font-size: 16px; font-weight: 600; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q .arw { transition: transform 0.2s; color: var(--text-dim); }
.faq-item.open .faq-q .arw { transform: rotate(180deg); color: var(--brand); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.26s ease; color: var(--text-soft); }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { margin: 0 0 20px; line-height: 1.8; font-size: 14.5px; }

/* CTA */
.cta-band {
  border-radius: 26px; padding: 64px 40px; text-align: center;
  background: var(--accent-grad); position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: clamp(24px, 3.2vw, 36px); margin: 0 0 14px; font-weight: 800; }
.cta-band p { color: rgba(255, 255, 255, 0.9); margin: 0 0 28px; }
.btn-white { background: #fff; color: #101828; border: none; font-weight: 600; }
.btn-outline-w { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; }

/* 页脚 */
.footer { border-top: 1px solid var(--border); padding: 56px 0 32px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer h5 { margin: 0 0 16px; font-size: 14px; }
.footer a { display: block; padding: 6px 0; font-size: 13.5px; color: var(--text-soft); }
.footer a:hover { color: var(--brand); }
.footer .bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; gap: 10px;
}

/* ============ 认证页 ============ */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; position: relative; overflow: hidden; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 22px; padding: 36px 32px;
  box-shadow: var(--shadow); position: relative; z-index: 1;
}
.auth-card h1 { font-size: 24px; margin: 0 0 8px; font-weight: 700; }
.auth-card .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; margin-bottom: 8px; color: var(--text-soft); }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14); }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-dim); }
.auth-foot a { color: var(--brand); font-weight: 600; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-dim); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.err {
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px;
}
.ok-msg {
  background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px;
}

/* Toast */
#toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: grid; gap: 10px; }
.toast {
  padding: 12px 20px; border-radius: 12px; background: var(--bg-elev);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  font-size: 14px; animation: t-in 0.22s ease;
}
.toast.ok { border-color: rgba(34, 197, 94, 0.5); }
.toast.err { border-color: rgba(239, 68, 68, 0.5); }
@keyframes t-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* 响应式 */
@media (max-width: 1000px) {
  .cap-grid, .plans { grid-template-columns: repeat(2, 1fr); }
  .gallery-masonry { columns: 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .burger { display: grid; }
  .features { grid-template-columns: 1fr; }
  .cap-grid, .plans { grid-template-columns: 1fr; }
  .gallery-masonry { columns: 2; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 48px; }
  .stats { gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
}
