/* ============================================
   AI 翻译助手 — 宣传网站样式
   设计方向：深空科技感，玻璃拟态，渐变光晕
   ============================================ */

/* ---------- 重置与变量 ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 色彩系统 */
  --bg-base: #070b16;
  --bg-surface: #0e1424;
  --bg-elevated: #151c30;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(79, 124, 255, 0.4);

  --text-primary: #e8ecf4;
  --text-secondary: #9ba8c0;
  --text-muted: #5d6b85;

  --accent-blue: #4f7cff;
  --accent-blue-soft: rgba(79, 124, 255, 0.15);
  --accent-cyan: #00d4ff;
  --accent-purple: #8b5cf6;
  --accent-purple-soft: rgba(139, 92, 246, 0.15);

  --gradient-primary: linear-gradient(135deg, #4f7cff 0%, #6366f1 100%);
  --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #4f7cff 100%);
  --gradient-text: linear-gradient(135deg, #4f7cff 0%, #00d4ff 50%, #8b5cf6 100%);

  /* 字体 */
  --font-display: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', sans-serif;

  /* 间距 */
  --max-width: 1200px;
  --section-pad: 100px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

a { color: inherit; text-decoration: none; }
code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.875em;
}

/* ---------- 背景装饰 ---------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: orb-float 20s ease-in-out infinite;
}

.mesh-orb-1 {
  width: 500px; height: 500px;
  background: #4f7cff;
  top: -100px; left: -100px;
}

.mesh-orb-2 {
  width: 400px; height: 400px;
  background: #8b5cf6;
  top: 30%; right: -80px;
  animation-delay: -5s;
}

.mesh-orb-3 {
  width: 450px; height: 450px;
  background: #00d4ff;
  bottom: -100px; left: 30%;
  animation-delay: -10s;
  opacity: 0.2;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 124, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 124, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
}

/* ---------- 导航栏 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(7, 11, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
  margin-right: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent-blue);
  transition: width 0.3s;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.nav-github:hover { color: var(--text-primary); }
.nav-github::after { display: none; }

.nav-cta {
  background: var(--gradient-primary);
  color: #fff;
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 124, 255, 0.35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(7, 11, 22, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-mobile.active { display: flex; }
.nav-mobile a {
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 8px 0;
}
.nav-mobile .nav-cta {
  text-align: center;
  margin-top: 8px;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 124, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 124, 255, 0.45);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.8125rem; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 140px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 100vh;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(79, 124, 255, 0.1);
  border: 1px solid rgba(79, 124, 255, 0.25);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--accent-blue);
  font-weight: 500;
  margin-bottom: 28px;
}

.pulse-dot {
  width: 8px; height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(0, 212, 255, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

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

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-divider {
  width: 1px; height: 36px;
  background: var(--border);
}

/* ---------- Hero 可视化 ---------- */
.hero-visual {
  position: relative;
}

.demo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  position: relative;
}

.demo-card-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.demo-card-url {
  margin-left: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: 'SF Mono', monospace;
}

.demo-card-body {
  padding: 24px;
}

.demo-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.demo-lang-tag {
  flex-shrink: 0;
  width: 28px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 124, 255, 0.15);
  color: var(--accent-blue);
  border-radius: 5px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.demo-lang-tag-zh {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent-cyan);
}

.demo-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.demo-text-translated {
  color: var(--text-primary);
  font-weight: 500;
}

.demo-arrow {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px 40px;
  color: var(--text-muted);
}

.demo-scan-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-cyan), transparent);
  animation: scan 4s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

/* ---------- 通用 Section ---------- */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-pad) 24px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- 功能卡片 ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon-blue {
  background: rgba(79, 124, 255, 0.12);
  color: var(--accent-blue);
}

.feature-icon-cyan {
  background: rgba(0, 212, 255, 0.12);
  color: var(--accent-cyan);
}

.feature-icon-purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-purple);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* 功能预览区 */
.feature-preview {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 预览：浏览器模拟 */
.preview-browser {
  width: 100%;
}

.preview-browser-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.preview-browser-bar .dot {
  width: 8px; height: 8px;
}

.preview-browser-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }

.translate-flash {
  background: var(--accent-blue-soft);
  animation: flash-translate 2.5s ease-in-out infinite;
}

@keyframes flash-translate {
  0%, 100% { background: rgba(255, 255, 255, 0.06); }
  50% { background: rgba(79, 124, 255, 0.25); }
}

/* 预览：划词翻译 */
.preview-selection {
  position: relative;
  width: 100%;
}

.preview-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 0;
}

.preview-text::selection { background: var(--accent-blue-soft); }

.preview-popup {
  position: absolute;
  top: 100%;
  left: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  animation: popup-appear 0.4s ease;
}

.preview-popup-arrow {
  position: absolute;
  top: -5px; left: 20px;
  width: 10px; height: 10px;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-hover);
  border-top: 1px solid var(--border-hover);
  transform: rotate(45deg);
}

.preview-popup-content {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

@keyframes popup-appear {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 预览：网页总结 */
.preview-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-bullet {
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
}

.summary-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- 安装步骤 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  position: relative;
  transition: all 0.3s;
}

.step:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.step-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
  line-height: 1;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.install-note {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 700px;
  margin: 40px auto 0;
  padding: 18px 24px;
  background: var(--accent-blue-soft);
  border: 1px solid rgba(79, 124, 255, 0.2);
  border-radius: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.install-note svg {
  flex-shrink: 0;
  color: var(--accent-blue);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--border-hover);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-icon {
  width: 20px; height: 20px;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

.faq-icon::before {
  top: 9px; left: 2px;
  width: 16px; height: 2px;
}

.faq-icon::after {
  top: 2px; left: 9px;
  width: 2px; height: 16px;
}

.faq-item[open] .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---------- CTA ---------- */
.cta-section {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.cta-content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-content::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(79, 124, 255, 0.08), transparent 50%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.cta-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  position: relative;
}

.cta-content .btn { position: relative; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.footer-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------- 滚动揭示动画 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 968px) {
  :root { --section-pad: 70px; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 120px;
    gap: 48px;
    text-align: center;
    min-height: auto;
  }

  .hero-badge, .hero-actions, .hero-stats {
    justify-content: center;
  }

  .hero-subtitle { margin-left: auto; margin-right: auto; }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

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

  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  :root { --section-pad: 56px; }

  .hero { padding: 110px 20px 60px; }
  .section { padding: var(--section-pad) 20px; }

  .hero-stats { gap: 16px; }
  .stat-num { font-size: 1.375rem; }

  .feature-card { padding: 28px 24px; }
  .step { padding: 24px; flex-direction: column; gap: 12px; }
  .step-number { font-size: 1.5rem; }

  .cta-content { padding: 48px 24px; }

  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; }

  .install-note { flex-direction: column; text-align: center; gap: 8px; }
}

/* ---------- 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
