/* ============== 基础变量 ============== */
:root {
  --bg: #06070d;
  --bg-2: #0a0c15;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f8;
  --text-2: #9aa3b6;
  --text-3: #6b7385;
  --violet: #7c5cff;
  --cyan: #2dd4ff;
  --grad: linear-gradient(135deg, #7c5cff 0%, #2dd4ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(45, 212, 255, 0.18));
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --font-display: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* 双语切换：默认中文 */
.zh, .en { display: inline; }
html[data-lang="zh"] .en { display: none; }
html[data-lang="en"] .zh { display: none; }

/* ============== 背景光晕 ============== */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-a { width: 520px; height: 520px; background: #5b3cff; top: -160px; left: -120px; }
.orb-b { width: 460px; height: 460px; background: #15b8d8; top: 30%; right: -160px; opacity: 0.4; }
.orb-c { width: 380px; height: 380px; background: #7c5cff; bottom: -120px; left: 35%; opacity: 0.3; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 92, 255, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* ============== 导航 ============== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(6, 7, 13, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(6, 7, 13, 0.82); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .3px; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 14.5px; }
.nav-links a { color: var(--text-2); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-gh { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text) !important; }
.nav-gh:hover { border-color: var(--border-strong); background: var(--surface); }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: 4px; }
.lang-toggle {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: border-color .2s, background .2s;
}
.lang-toggle:hover { border-color: var(--border-strong); }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ============== Hero ============== */
.hero {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 90px 24px 70px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 50px; align-items: center;
}
.eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: .4px; color: var(--text-2);
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.12; letter-spacing: -.5px;
  margin-bottom: 20px;
}
.hero-title span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17px; color: var(--text-2); max-width: 520px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 12px;
  cursor: pointer; transition: transform .18s, box-shadow .2s, border-color .2s, background .2s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -10px rgba(124, 92, 255, 0.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(124, 92, 255, 0.8); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); }
.hero-stats span { font-size: 12.5px; color: var(--text-3); }

/* Hero 设备框 */
.hero-visual { display: flex; justify-content: center; }
.device {
  position: relative; width: 100%; max-width: 480px;
  border: 1px solid var(--border-strong); border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  box-shadow: var(--shadow);
}
.device-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.device-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.device-bar span:nth-child(1) { background: #ff5f57; }
.device-bar span:nth-child(2) { background: #febc2e; }
.device-bar span:nth-child(3) { background: #28c840; }
.device-screen { position: relative; }
.device-screen img { width: 100%; height: auto; display: block; }
.device-glow { position: absolute; inset: -40px; z-index: -1; background: var(--grad-soft); filter: blur(40px); opacity: .8; }

/* ============== 通用 section ============== */
.section { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 80px 24px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.3px; margin-bottom: 14px; }
.section-head p { color: var(--text-2); font-size: 16px; }

/* ============== 特性卡片 ============== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .22s, border-color .22s, background .22s;
  position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: var(--grad-soft); opacity: 0; transition: opacity .25s; pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card:hover::after { opacity: .5; }
.card-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--border); color: var(--cyan); margin-bottom: 16px;
}
.card-ico svg { width: 24px; height: 24px; }
.card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 8px; position: relative; }
.card p { color: var(--text-2); font-size: 14.5px; position: relative; }

/* ============== 主题展示 ============== */
.theme-showcase {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px; align-items: center; margin-bottom: 8px;
}
.theme-stage { display: flex; justify-content: center; }
.theme-stage .device { max-width: 440px; width: 100%; }
.theme-stage .device-screen img { cursor: zoom-in; transition: opacity .25s ease; }
.theme-picker { display: flex; flex-direction: column; gap: 16px; }
.theme-current {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 24px; font-weight: 600;
}
.theme-dot { width: 16px; height: 16px; border-radius: 50%; flex: none; background: linear-gradient(135deg,#7c5cff,#2dd4ff); box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }
.theme-desc { color: var(--text-2); font-size: 14.5px; margin-top: -6px; }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-card {
  display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer;
  padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); transition: transform .18s, border-color .2s, background .2s, box-shadow .2s;
  font-family: var(--font-body);
}
.theme-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2); }
.theme-card.active { border-color: rgba(124,92,255,0.6); background: var(--grad-soft); box-shadow: 0 0 0 1px rgba(124,92,255,0.45), 0 12px 30px -14px rgba(124,92,255,0.55); }
.theme-swatch { width: 100%; height: 34px; border-radius: 8px; border: 1px solid var(--border); }
.theme-card-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.theme-card-name em { font-style: normal; color: var(--text-3); font-size: 11.5px; margin-left: 4px; }
.theme-card-desc { font-size: 11.5px; color: var(--text-2); line-height: 1.4; }

/* ============== 安装 ============== */
.install { max-width: 820px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.tab {
  flex: 1; padding: 11px; border: 0; background: none; color: var(--text-2);
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px; cursor: pointer;
  border-radius: 10px; transition: background .2s, color .2s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.tab-panel { display: none; padding: 26px 24px; }
.tab-panel.active { display: block; }
.hint { color: var(--text-2); font-size: 14.5px; margin-bottom: 14px; }
.hint.small { font-size: 13px; color: var(--text-3); margin-top: 14px; margin-bottom: 0; }
.hint code, .code code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.hint code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--cyan); font-size: 12.5px; }
.code { position: relative; background: #0b0d18; border: 1px solid var(--border); border-radius: 12px; padding: 18px 18px; }
.code pre { overflow-x: auto; }
.code code { color: #cdd6f4; font-size: 13.5px; line-height: 1.7; white-space: pre; }
.copy {
  position: absolute; top: 12px; right: 12px; font-size: 12.5px; padding: 6px 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.copy:hover { border-color: var(--border-strong); background: var(--surface-2); }
.copy.done { color: var(--cyan); border-color: rgba(45,212,255,0.4); }

/* ============== CTA ============== */
.cta-band {
  position: relative; z-index: 1; max-width: 920px; margin: 30px auto 90px; padding: 60px 30px; text-align: center;
  border: 1px solid var(--border-strong); border-radius: 26px; overflow: hidden;
  background: var(--grad-soft);
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 50% 0%, rgba(124,92,255,0.25), transparent 70%); }
.cta-band h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3vw, 34px); margin-bottom: 12px; position: relative; }
.cta-band p { color: var(--text-2); margin-bottom: 26px; position: relative; }
.cta-band .btn { position: relative; }

/* ============== 页脚 ============== */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 40px 24px 30px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14px; }
.footer-brand .brand-logo { width: 26px; height: 26px; }
.footer-links { display: flex; gap: 24px; font-size: 14px; }
.footer-links a { color: var(--text-2); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { max-width: var(--maxw); margin: 24px auto 0; color: var(--text-3); font-size: 12.5px; }

/* ============== 灯箱 ============== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 30px;
  background: rgba(3, 4, 8, 0.92); backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.lightbox-close { position: absolute; top: 22px; right: 28px; font-size: 34px; line-height: 1; color: var(--text); background: none; border: 0; cursor: pointer; }

/* ============== 滚动揭示 ============== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============== 响应式 ============== */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; gap: 36px; }
  .hero-visual { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-showcase { grid-template-columns: 1fr; gap: 30px; }
  .theme-stage .device { max-width: 400px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
    position: absolute; top: 100%; left: 0; right: 0; padding: 20px 24px;
    background: rgba(6,7,13,0.96); border-bottom: 1px solid var(--border);
  }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .section { padding: 60px 20px; }
  .theme-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
