/* 一人 AI 公司 · 门户（Spark 式黑底大字 + 玻璃拟态） */

:root {
  --bg: #050505;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --radius: 18px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI",
    system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
code { font-family: "JetBrains Mono", Consolas, monospace; }

/* ---------- 背景动效 ---------- */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  width: 42vw; height: 42vw;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.26;
  will-change: transform;
  animation: drift 30s ease-in-out infinite alternate;
}
.orb-1 { background: var(--accent); top: -18vw; left: -10vw; }
.orb-2 { background: var(--accent-2); top: 24vh; right: -16vw; animation-delay: -8s; animation-duration: 36s; }
.orb-3 { background: var(--accent-3); bottom: -20vw; left: 28vw; opacity: 0.16; animation-delay: -16s; animation-duration: 42s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, -4vh) scale(1.12); }
  100% { transform: translate(-4vw, 5vh) scale(0.95); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
}

/* 交互点阵（React Bits DotGrid 风格，零依赖内联实现） */
.dot-grid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, black 20%, transparent 70%);
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(5, 5, 5, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: 0.2px; }
.logo-mark { font-size: 20px; filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.8)); }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { font-size: 13.5px; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  background: var(--glass); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: color 0.2s;
}
.nav-user:hover { color: var(--fg); }
.nav-user .dot-avatar { font-size: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; font-size: 14px; font-weight: 500;
  padding: 12px 22px; transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, #fafafa, #d4d4d8);
  color: #09090b; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 8px 28px -8px rgba(139, 92, 246, 0.55);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 10px 36px -8px rgba(139, 92, 246, 0.8); transform: translateY(-1px); }
.btn-ghost {
  background: var(--glass); color: var(--fg);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--glass-2); border-color: rgba(255,255,255,0.2); }
.btn-sm { padding: 8px 15px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; margin-top: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-link {
  background: none; border: none; color: var(--dim); font-size: 12.5px;
  padding: 6px 2px; transition: color 0.2s;
}
.btn-link:hover:not([disabled]) { color: var(--fg); }
.btn-link[disabled] { cursor: not-allowed; opacity: 0.6; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: 158px 24px 60px; text-align: center; }
.hero-inner { max-width: 1120px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; background: var(--glass);
}
.hero-eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero-title {
  margin-top: 30px;
  font-size: clamp(44px, 8.4vw, 96px);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.08;
}
.hero-title .ch {
  display: inline-block; opacity: 0; transform: translateY(28px) rotate(4deg);
  animation: chIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-title .ch.space { width: 0.32em; }
@keyframes chIn { to { opacity: 1; transform: none; } }
/* 兜底：动画因环境卡顿未完成时，2.5s 后强制显示标题（JS 会加 title-done） */
.hero-title.title-done .ch { opacity: 1 !important; transform: none !important; animation: none; }
.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 50%, var(--accent-3) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero-sub {
  margin: 26px auto 0; max-width: 620px;
  color: var(--muted); font-size: 16.5px; line-height: 1.8;
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 演示窗口 ---------- */
.hero-demo { margin-top: 76px; perspective: 1400px; }
.demo-window {
  max-width: 680px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(12, 12, 14, 0.82);
  backdrop-filter: blur(24px);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 80px -40px rgba(139, 92, 246, 0.4);
  overflow: hidden; text-align: left;
  transform: rotateX(6deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-demo:hover .demo-window, .demo-stage .demo-window { transform: none; }
.demo-window-lg { max-width: 760px; }
.demo-titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.demo-title { margin-left: 8px; font-size: 12px; color: var(--dim); }
.demo-body { padding: 18px; min-height: 250px; display: flex; flex-direction: column; gap: 12px; }
.demo-body-lg { min-height: 330px; }
.demo-msg { display: flex; gap: 10px; max-width: 88%; opacity: 0; transform: translateY(10px); animation: msgIn 0.45s forwards; }
@keyframes msgIn { to { opacity: 1; transform: none; } }
.demo-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.demo-ava {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 15px;
  background: var(--glass-2); border: 1px solid var(--line);
}
.demo-bubble {
  padding: 9px 13px; border-radius: 13px;
  font-size: 13.5px; line-height: 1.65;
  background: var(--glass); border: 1px solid var(--line);
  color: #d4d4d8;
}
.demo-msg.user .demo-bubble { background: rgba(139, 92, 246, 0.16); border-color: rgba(139, 92, 246, 0.35); }
.demo-msg .demo-bubble .who { display: block; font-size: 11px; color: var(--dim); margin-bottom: 2px; }
.demo-cursor {
  display: inline-block; width: 7px; height: 14px; vertical-align: -2px;
  background: var(--accent-2); animation: pulse 1s infinite; border-radius: 1px;
}
.demo-img {
  margin-top: 8px; width: 180px; height: 110px; border-radius: 9px; display: block;
  background:
    radial-gradient(circle at 30% 40%, rgba(244,114,182,0.65), transparent 55%),
    radial-gradient(circle at 72% 65%, rgba(34,211,238,0.6), transparent 55%),
    linear-gradient(135deg, rgba(139,92,246,0.7), rgba(0,0,0,0.4));
  border: 1px solid var(--line);
}

/* ---------- 数据条 ---------- */
.stats { position: relative; z-index: 1; padding: 30px 24px 10px; }
.stats-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat {
  text-align: center; padding: 26px 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--glass);
}
.stat-num {
  font-size: 38px; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(120deg, #fafafa, #a1a1aa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-num .suffix { font-size: 22px; }
.stat-label { margin-top: 6px; font-size: 12.5px; color: var(--dim); }

/* ---------- 通用 section ---------- */
.section { position: relative; z-index: 1; padding: 110px 24px 30px; }
.section-inner { max-width: 1120px; margin: 0 auto; text-align: center; }
.section-title { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; letter-spacing: -0.02em; }
.section-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { margin: 18px auto 0; max-width: 560px; color: var(--muted); font-size: 15px; line-height: 1.8; }

/* ---------- 特性 ---------- */
.feature-grid {
  margin-top: 56px; text-align: left;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feature-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--glass); padding: 26px 24px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--glass-2);
  box-shadow: 0 24px 60px -30px rgba(139, 92, 246, 0.5);
}
.feature-icon { font-size: 26px; }
.feature-card h3 { margin-top: 14px; font-size: 16.5px; font-weight: 600; }
.feature-card p { margin-top: 9px; font-size: 13.5px; line-height: 1.75; color: var(--muted); }

/* ---------- 下载 ---------- */
.download-card {
  max-width: 640px; margin: 52px auto 0;
  border: 1px solid var(--line); border-radius: 22px;
  background: rgba(12, 12, 14, 0.8);
  backdrop-filter: blur(20px);
  padding: 34px 30px; text-align: center;
  box-shadow: 0 30px 90px -40px rgba(139, 92, 246, 0.5);
}
.download-main { display: flex; align-items: center; gap: 20px; text-align: left; }
.download-badge {
  width: 62px; height: 62px; flex-shrink: 0; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: var(--glass-2); border: 1px solid var(--line);
}
.download-meta { flex: 1; min-width: 0; }
.download-name { font-weight: 600; font-size: 15.5px; }
.download-ver {
  margin-top: 4px; font-size: 12.5px; color: var(--dim);
  display: flex; gap: 10px; flex-wrap: wrap;
}
.download-ver .tag {
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px;
  color: var(--muted); background: var(--glass);
}
.download-note { margin-top: 22px; font-size: 12.5px; color: var(--dim); line-height: 1.7; }
.download-loading { color: var(--dim); font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 0; }
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--muted);
  animation: spin 0.9s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.download-all { margin-top: 18px; text-align: left; }
.download-all summary { cursor: pointer; font-size: 12.5px; color: var(--dim); }
.download-all summary:hover { color: var(--muted); }
.download-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.download-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.download-item .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Consolas, monospace; }
.download-item a { color: var(--accent-2); flex-shrink: 0; }
.download-item a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; margin-top: 90px; padding: 70px 24px 46px; text-align: center; border-top: 1px solid var(--line); }
.footer-logo { font-size: 44px; filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.6)); }
.footer p { margin-top: 14px; color: var(--muted); font-size: 14px; }
.footer .footer-fine { margin-top: 8px; font-size: 12px; color: var(--dim); }

/* ---------- 滚动渐入 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 380px;
  border: 1px solid var(--line); border-radius: 22px;
  background: rgba(14, 14, 17, 0.95);
  padding: 30px 26px; text-align: center;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9);
  animation: msgIn 0.3s;
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: var(--dim); font-size: 22px; line-height: 1;
}
.modal-close:hover { color: var(--fg); }
.modal-title { font-size: 19px; font-weight: 700; }
.modal-sub { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.modal-sub b { color: var(--fg); font-weight: 600; }
.input {
  width: 100%; margin-top: 20px;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 15px;
  color: var(--fg); font-size: 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: rgba(139, 92, 246, 0.6); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.input-code { text-align: center; font-size: 22px; letter-spacing: 8px; font-family: Consolas, monospace; }
.auth-row { margin-top: 12px; display: flex; justify-content: space-between; }
.auth-devcode {
  margin-top: 14px; font-size: 12px; color: var(--accent-2);
  background: rgba(34, 211, 238, 0.08); border: 1px dashed rgba(34, 211, 238, 0.4);
  border-radius: 10px; padding: 9px 12px; line-height: 1.6;
}
.me-avatar {
  width: 62px; height: 62px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(34,211,238,0.2));
  border: 1px solid var(--line);
}
.me-info {
  margin-top: 18px; text-align: left;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--glass); overflow: hidden;
}
.me-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--line);
}
.me-row:last-child { border-bottom: none; }
.me-row span:first-child { color: var(--dim); flex-shrink: 0; }
.me-row code { font-size: 12px; color: var(--accent-2); }
.me-hint { margin-top: 14px; font-size: 12px; color: var(--dim); line-height: 1.6; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 200; background: rgba(24, 24, 27, 0.95);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--fg); font-size: 13.5px; padding: 12px 20px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
  animation: msgIn 0.25s; max-width: 86vw;
}
.toast.err { border-color: rgba(244, 63, 94, 0.4); color: #fda4af; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 128px; }
  .hide-sm { display: none; }
  .download-main { flex-direction: column; text-align: center; }
  .download-ver { justify-content: center; }
}
/* 低性能环境：减弱动效（软件渲染 / 弱 GPU 下 blur 大光斑代价高） */
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; filter: blur(72px); }
  .ch { animation-duration: 0.01s; animation-delay: 0s !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .demo-msg { animation-duration: 0.01s; }
}
