/* ==================== 基础变量与重置 ==================== */
:root {
  --bg: #07080c;
  --bg-2: #0d0f17;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaf2;
  --text-2: #a8adbe;
  --text-3: #6c7186;
  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --accent: #22d3ee;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(99,102,241,.18) 0%, rgba(139,92,246,.18) 50%, rgba(236,72,153,.18) 100%);
  --shadow-lg: 0 30px 80px -20px rgba(99, 102, 241, 0.35);
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.muted { color: var(--text-2); }
.small { font-size: 13px; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==================== 背景装饰 ==================== */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  animation: float 20s ease-in-out infinite;
}
.orb-1 { width: 520px; height: 520px; background: #6366f1; top: -120px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: #ec4899; top: 30%; right: -160px; animation-delay: -7s; }
.orb-3 { width: 400px; height: 400px; background: #22d3ee; bottom: -120px; left: 30%; animation-delay: -14s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ==================== 导航 ==================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 8, 12, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.brand-logo { width: 28px; height: 28px; }
.brand-name {
  font-size: 17px;
  letter-spacing: -0.01em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 12px; }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(139, 92, 246, .7); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); }

/* ==================== Hero ==================== */
.hero {
  padding: 80px 0 60px;
  position: relative;
}
.hero-inner { text-align: center; }
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 28px;
}
.version-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 12px #22d3ee;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:.5 } }

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero-sub {
  max-width: 680px;
  margin: 0 auto 40px;
  color: var(--text-2);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* ==================== 软件预览 ==================== */
.hero-preview { perspective: 1500px; }
.preview-frame {
  max-width: 980px;
  margin: 0 auto;
  background: linear-gradient(180deg, #14161f 0%, #0d0f17 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.04) inset;
  transform: rotateX(2deg);
  transition: transform .5s;
}
.preview-frame:hover { transform: rotateX(0); }
.preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0,0,0,.3);
  border-bottom: 1px solid var(--border);
}
.preview-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.preview-bar .dot.red { background: #ff5f57; }
.preview-bar .dot.yellow { background: #febc2e; }
.preview-bar .dot.green { background: #28c840; }
.preview-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.preview-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 460px;
  height: 460px;
}
.preview-sidebar {
  padding: 16px 12px;
  background: rgba(255,255,255,.015);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.sb-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.sb-item.active {
  background: var(--gradient-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.3);
}
.sidebar-spacer { flex: 1; }
.sb-tag {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  padding: 8px;
  border-top: 1px dashed var(--border);
  letter-spacing: 0.05em;
}
.live {
  font-size: 10px;
  color: #ef4444;
  margin-left: 8px;
  letter-spacing: 0.1em;
  animation: pulse 1.6s ease-in-out infinite;
}
.replay-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all .2s;
}
.replay-btn:hover { color: var(--text); background: var(--surface-2); transform: rotate(180deg); }

.preview-main {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  overflow: hidden;
  position: relative;
}
.demo-progress {
  height: 3px;
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  margin: 12px auto 0;
  max-width: 980px;
  overflow: hidden;
}
.demo-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  transition: width .3s linear;
  border-radius: 999px;
}
.msg {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 85%;
}
.msg.user {
  background: var(--gradient-soft);
  border: 1px solid rgba(139,92,246,.3);
  align-self: flex-end;
}
.msg.assistant {
  background: var(--surface);
  border: 1px solid var(--border);
}
.msg-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; margin-bottom: 8px; font-size: 13px;
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gradient); font-size: 12px;
}
.msg-line { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.msg-line b { color: var(--accent); font-weight: 600; }
.msg-line.typing { color: var(--text); }
.cursor { animation: blink 1s steps(2) infinite; color: var(--primary-2); }
@keyframes blink { 50% { opacity: 0; } }

/* ==================== 演示动画元素 ==================== */
.demo-stage { animation: fadeSlide .4s ease both; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.msg.fade-in { animation: msgIn .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 工具调用块 */
.tool-call {
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: msgIn .4s cubic-bezier(.2,.8,.2,1) both;
}
.tool-call.thinking { background: rgba(139,92,246,.08); border-color: rgba(139,92,246,.3); }
.tool-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient); font-size: 12px; flex-shrink: 0;
}
.tool-name { color: var(--accent); font-weight: 600; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12.5px; }
.tool-call.thinking .tool-name { color: var(--primary-2); }
.tool-arg { color: var(--text-3); font-family: ui-monospace, monospace; font-size: 11.5px; }
.tool-status {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.tool-status.done { color: #22c55e; }
.spinner {
  width: 12px; height: 12px;
  border: 1.5px solid rgba(255,255,255,.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 进度条 */
.task-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  animation: msgIn .4s both;
}
.tp-head {
  display: flex; justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-2);
}
.tp-bar {
  height: 6px;
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  overflow: hidden;
}
.tp-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 999px;
  width: 0%;
  transition: width .8s ease;
}

/* 产物卡片 */
.artifact {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--gradient-soft);
  border: 1px solid rgba(139,92,246,.4);
  border-radius: 12px;
  animation: artifactIn .55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes artifactIn {
  from { opacity: 0; transform: translateY(10px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.artifact-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25);
  font-size: 22px;
}
.artifact-info { flex: 1; min-width: 0; }
.artifact-name { font-weight: 600; font-size: 13.5px; }
.artifact-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.artifact-action {
  font-size: 11.5px;
  color: var(--accent);
  border: 1px solid rgba(34,211,238,.4);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Agent 团队卡片 */
.agent-team { display: flex; gap: 8px; flex-wrap: wrap; animation: msgIn .4s both; }
.agent-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
}
.agent-chip .dot-mini {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px #22c55e;
}
.agent-chip.busy .dot-mini { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; animation: pulse 1s infinite; }

/* 输入框打字效果 */
.demo-input {
  margin-top: auto;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
}
.demo-input .placeholder { color: var(--text-3); }
.demo-input .typed { color: var(--text); }
.demo-input::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  margin-left: auto;
  box-shadow: 0 0 12px rgba(139,92,246,.6);
}

/* ==================== Section 通用 ==================== */
.section { padding: 100px 0; position: relative; }
.section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.015) 50%, transparent 100%);
}
.section-head { text-align: center; margin-bottom: 60px; }
.section-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-sub {
  color: var(--text-2);
  font-size: 17px;
}

/* ==================== Cards ==================== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .25s, border-color .25s, background .25s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.card:hover::before { opacity: 0.5; }
.card > * { position: relative; z-index: 1; }
.card-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: inline-flex;
  width: 56px; height: 56px;
  align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
}
.card h3 { font-size: 19px; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }

/* ==================== Skills ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.skill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.skill:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.skill-emoji {
  font-size: 26px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient-soft);
  border-radius: 10px;
  flex-shrink: 0;
}
.skill b { font-size: 14px; display: block; margin-bottom: 2px; }
.skill p { color: var(--text-3); font-size: 12.5px; }

.skill-more {
  background: var(--gradient-soft);
  border-color: rgba(139,92,246,.4);
}
.skill-more b {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.skill-more p { color: var(--text-2); }

/* ==================== Architecture ==================== */
.arch {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.arch-layer { width: 100%; display: flex; justify-content: center; }
.arch-row { gap: 14px; flex-wrap: wrap; }
.arch-box {
  flex: 1;
  min-width: 200px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.arch-box.small { padding: 18px 12px; }
.arch-box h4 {
  font-size: 16px; margin-bottom: 6px;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.arch-box span { color: var(--text-3); font-size: 13px; }
.arch-arrow { color: var(--text-3); font-size: 20px; opacity: .5; }

/* ==================== Download ==================== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}
.dl-card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform .25s, border-color .25s;
}
.dl-card:hover { transform: translateY(-4px); }
.dl-card.featured {
  background: var(--gradient-soft);
  border-color: rgba(139,92,246,.4);
}
.dl-icon { font-size: 44px; margin-bottom: 14px; }
.dl-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.dl-desc { color: var(--text-2); font-size: 13px; margin-bottom: 22px; min-height: 38px; }
.dl-card .btn { width: 100%; }

.dl-card.disabled {
  opacity: 0.5;
}
.dl-card.disabled .btn { pointer-events: none; background: var(--surface-2); color: var(--text-3); box-shadow: none; }

.changelog {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.changelog h3 { margin-bottom: 14px; font-size: 17px; }
.changelog-body {
  color: var(--text-2);
  font-size: 14.5px;
  white-space: pre-wrap;
  line-height: 1.85;
}

/* ==================== Support ==================== */
.support-card {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.support-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0.6;
  pointer-events: none;
}
.support-card > * { position: relative; z-index: 1; }

.support-qr {
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 20px 60px -10px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-qr img {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
  border-radius: 8px;
}

.support-info { color: var(--text); }
.support-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.support-desc {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.support-desc b {
  color: var(--text);
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.support-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 18px;
}
.support-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}
.sl-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .support-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 22px;
    text-align: center;
  }
  .support-qr { margin: 0 auto; max-width: 240px; }
  .support-list { grid-template-columns: 1fr; text-align: left; }
}

/* ==================== Footer ==================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 40px;
  margin-top: 60px;
  background: rgba(0,0,0,.2);
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-2); font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ==================== 响应式 ==================== */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .preview-body { grid-template-columns: 1fr; }
  .preview-sidebar { display: none; }
  .hero { padding: 60px 0 40px; }
  .section { padding: 70px 0; }
  .arch-row { flex-direction: column; }
}
