/* ─── @font-face ──────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('fonts/HarmonyOS_Sans_SC_Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* ─── CSS 变量 ────────────────────────────────────────────────────────────── */
:root {
  --st-purple:       #6366f1;
  --st-purple-dark:  #4f46e5;
  --st-purple-light: #eef2ff;
  --st-cream:        #fef3c7;
  --st-dark:         #1e1b4b;
  --st-red:          #ef4444;
  --st-green:        #22c55e;
  --st-amber:        #fbbf24;
  --st-gray:         #94a3b8;

  --st-bg:           #ffffff;
  --st-bg-alt:       #fafafa;
  --st-text:         #0f172a;
  --st-text-secondary: #64748b;
  --st-border:       #e2e8f0;

  --st-font-heading: 'Geist', 'HarmonyOS Sans SC', -apple-system, sans-serif;
  --st-font-body:    'Inter', 'HarmonyOS Sans SC', -apple-system, sans-serif;
  --st-font-mono:    'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --radius-card: 16px;
  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 32px rgba(99,102,241,.18);
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── 基础重置 ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--st-bg);
  color: var(--st-text);
  font-family: var(--st-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── 布局工具 ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── 滚动浮现动画 ────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── Header / Nav ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--st-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--st-font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--st-purple);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--st-text-secondary);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--st-purple); }

/* ─── CTA Button ──────────────────────────────────────────────────────────── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--st-purple);
  color: #fff;
  font-family: var(--st-font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition),
              transform 0.15s ease,
              box-shadow 0.15s ease;
  text-decoration: none;
}
.btn-cta:hover {
  background: var(--st-purple-dark);
  transform: scale(1.02);
  box-shadow: 0 0 0 4px rgba(99,102,241,.2);
}
.btn-cta:active { transform: scale(0.99); }

.btn-cta-lg {
  font-size: 17px;
  padding: 14px 32px;
  border-radius: 12px;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.hero-text {
  animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-text { animation: none; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--st-purple-light);
  color: var(--st-purple);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-family: var(--st-font-heading);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--st-text);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--st-purple);
}

.hero-sub {
  font-size: 18px;
  color: var(--st-text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 13px;
  color: var(--st-text-secondary);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heroFadeUp 0.6s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-coin-wrap {
  position: relative;
  width: 280px;
  height: 280px;
}

.hero-coin {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 24px 48px rgba(99,102,241,.35));
  animation: coinFloat 4s ease-in-out infinite;
}

@keyframes coinFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-coin { animation: none; }
}

/* ─── Features ────────────────────────────────────────────────────────────── */
.features {
  padding: 80px 0;
  background: var(--st-bg-alt);
}

.section-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--st-purple);
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  font-family: var(--st-font-heading);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--st-text);
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--st-bg);
  border: 1px solid var(--st-border);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 16px;
}

.feature-icon-img {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: var(--st-font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--st-text);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 15px;
  color: var(--st-text-secondary);
  line-height: 1.65;
}

.ts-pill {
  display: inline-block;
  background: var(--st-purple);
  color: #fff;
  font-family: var(--st-font-mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  cursor: pointer;
}

/* ─── Demo ────────────────────────────────────────────────────────────────── */
.demo {
  padding: 96px 0;
}

.demo-header {
  text-align: center;
  margin-bottom: 56px;
}

.demo-header .section-title { margin-bottom: 12px; }

.demo-sub {
  font-size: 17px;
  color: var(--st-text-secondary);
  margin-bottom: 24px;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--st-border);
  border-radius: 99px;
  overflow: hidden;
  background: var(--st-bg-alt);
}

.lang-toggle button {
  padding: 7px 20px;
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--st-text-secondary);
  transition: background var(--transition), color var(--transition);
  border-radius: 99px;
}

.lang-toggle button.active {
  background: var(--st-purple);
  color: #fff;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Demo 左侧：视频卡片 */
.video-card {
  border: 1px solid var(--st-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--st-bg);
  box-shadow: var(--shadow-card);
}

.video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-thumbnail img {
  width: 80px;
  height: 80px;
  opacity: .9;
}

.video-duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: var(--st-font-mono);
}

.video-info {
  padding: 20px;
}

.video-title {
  font-family: var(--st-font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--st-text);
  margin-bottom: 6px;
}

.video-meta {
  font-size: 13px;
  color: var(--st-text-secondary);
  margin-bottom: 20px;
}

.btn-simulate {
  width: 100%;
  padding: 13px;
  background: var(--st-purple);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--st-font-heading);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-simulate:hover:not(:disabled) {
  background: var(--st-purple-dark);
  transform: scale(1.02);
  box-shadow: 0 0 0 4px rgba(99,102,241,.2);
}

.btn-simulate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Demo 右侧：sidebar 模拟器 */
.sidebar-sim {
  border: 1px solid var(--st-border);
  border-radius: var(--radius-card);
  background: var(--st-bg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.sidebar-sim-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--st-border);
  background: var(--st-bg-alt);
  flex-shrink: 0;
}

.sidebar-sim-header img {
  width: 28px;
  height: 28px;
  transition: opacity 0.3s ease;
}

.sidebar-sim-brand {
  font-family: var(--st-font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--st-purple);
}

.sidebar-sim-body {
  flex: 1;
  padding: 20px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sim-idle-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  color: var(--st-text-secondary);
  font-size: 14px;
  gap: 12px;
  padding: 32px 0;
}

.sim-idle-msg img {
  width: 64px;
  height: 64px;
  opacity: .7;
}

.sim-status {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--st-border);
  background: var(--st-purple-light);
  font-size: 14px;
  color: var(--st-purple);
  font-weight: 500;
  flex-shrink: 0;
}

.sim-status.visible { display: flex; }

.sim-status img {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sim-content {
  display: none;
  font-size: 14px;
  line-height: 1.75;
  color: var(--st-text);
}

.sim-content.visible { display: block; }

/* Markdown 渲染样式 */
.sim-content h2 {
  font-family: var(--st-font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--st-text);
  margin: 16px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-content h2:first-child { margin-top: 0; }

.sim-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}

.sim-content li {
  padding: 4px 0;
  font-size: 13.5px;
  line-height: 1.7;
}

.sim-content p {
  font-size: 13.5px;
  margin: 4px 0 8px;
  color: var(--st-text-secondary);
}

/* 时间戳胶囊 */
.ts-pill-sim {
  display: inline-block;
  background: var(--st-purple-light);
  color: var(--st-purple);
  font-family: var(--st-font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--transition);
}

.ts-pill-sim:hover {
  background: var(--st-purple);
  color: #fff;
}

/* ─── Bottom CTA ──────────────────────────────────────────────────────────── */
.cta-bottom {
  padding: 96px 0;
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #4338ca 100%);
  text-align: center;
  overflow: hidden;
  position: relative;
}

.cta-bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(99,102,241,.3) 0%, transparent 70%);
  pointer-events: none;
}

.cta-bottom h2 {
  font-family: var(--st-font-heading);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
  position: relative;
}

.cta-bottom p {
  font-size: 18px;
  color: rgba(255,255,255,.7);
  margin-bottom: 40px;
  position: relative;
}

.cta-bottom .btn-cta {
  background: #fff;
  color: var(--st-purple-dark);
  position: relative;
}

.cta-bottom .btn-cta:hover {
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 0 4px rgba(255,255,255,.25);
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--st-bg-alt);
  border-top: 1px solid var(--st-border);
  padding: 32px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--st-font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--st-purple);
}

.footer-brand img { width: 22px; height: 22px; }

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--st-text-secondary);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--st-purple); }

.footer-copy {
  font-size: 13px;
  color: var(--st-text-secondary);
}

/* ─── Inner pages (privacy / help) ───────────────────────────────────────── */
.inner-page {
  max-width: 720px;
  margin: 64px auto;
  padding: 0 24px 80px;
}

.inner-page h1 {
  font-family: var(--st-font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.inner-page .page-meta {
  font-size: 14px;
  color: var(--st-text-secondary);
  margin-bottom: 48px;
}

.inner-page h2 {
  font-family: var(--st-font-heading);
  font-size: 18px;
  font-weight: 600;
  margin: 40px 0 10px;
  color: var(--st-text);
}

.inner-page p, .inner-page li {
  font-size: 16px;
  color: var(--st-text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.inner-page ul, .inner-page ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.inner-page a {
  color: var(--st-purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* FAQ styles */
.faq-item {
  border-bottom: 1px solid var(--st-border);
  padding: 28px 0;
}

.faq-item:first-of-type { border-top: 1px solid var(--st-border); }

.faq-q {
  font-family: var(--st-font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--st-text);
  margin-bottom: 12px;
}

.faq-a {
  font-size: 15px;
  color: var(--st-text-secondary);
  line-height: 1.75;
  margin: 0;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 64px 0 56px; }
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .hero-coin-wrap { width: 180px; height: 180px; }

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

  .demo-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }

  .site-footer .container { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .btn-cta-lg { font-size: 15px; padding: 13px 24px; }
  .cta-bottom h2 { font-size: 26px; }
  .inner-page { margin-top: 40px; }
}
