/* ============================================
   Saylo AI 中文官网 - 全站样式 (重写版)
   原则：body 不设 z-index(保证 fixed 正常)
        fade-up 默认可见(不依赖 JS)
        无堆叠上下文冲突
============================================ */

/* ========== 1) 设计令牌 ========== */
:root {
  --bg: #09090B;
  --bg-section: #101014;
  --bg-card: #15151D;
  --bg-elevated: #1A1A24;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(139,92,246,0.4);
  --primary: #8B5CF6;
  --primary-hover: #A855F7;
  --accent: #C084FC;
  --primary-soft: rgba(139,92,246,0.15);
  --primary-glow: rgba(139,92,246,0.3);
  --text-1: #FFFFFF;
  --text-2: #B7B7C8;
  --text-3: #88889A;
  --r-card: 24px;
  --r-btn: 16px;
  --r-tag: 999px;
  --shadow-glow: 0 0 80px rgba(139,92,246,0.15);
  --shadow-glow-sm: 0 0 40px rgba(139,92,246,0.1);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --container: 1280px;
  --header-h: 72px;
  --pad-x: 24px;
}

/* ========== 2) Reset ========== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC","HarmonyOS Sans","Microsoft YaHei","Noto Sans SC",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 1400px 800px at 50% -200px, rgba(139,92,246,0.12) 0%, rgba(139,92,246,0.03) 35%, transparent 65%),
    radial-gradient(ellipse 1200px 600px at 50% 110vh, rgba(192,132,252,0.06) 0%, transparent 50%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul,ol { list-style: none; }
h1,h2,h3,h4 { color: var(--text-1); }

/* ========== 3) 布局容器 ========== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--bg-section); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-title {
  font-size: 40px; font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 16px; color: var(--text-3);
  max-width: 640px; margin: 0 auto;
}

/* ========== 4) 通用组件 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 56px; padding: 0 28px;
  border-radius: var(--r-btn);
  font-size: 16px; font-weight: 600;
  transition: all 0.25s ease;
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: 0 0 40px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 60px var(--primary-glow); color: #fff; }
.btn-ghost {
  background: var(--bg-card); color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--bg-elevated); color: var(--text-1); }
.btn-outline {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-soft); color: var(--accent); }
.btn-sm { height: 40px; padding: 0 20px; font-size: 14px; }
.btn-lg { height: 60px; padding: 0 36px; font-size: 17px; }

.btn .ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0); animation: ripple-anim 0.6s linear;
  pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--accent);
  border-radius: var(--r-tag);
  font-size: 13px; font-weight: 500;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 32px;
  transition: all 0.3s ease;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ========== 5) Header ========== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); z-index: 100;
  background: rgba(9,9,11,0.6);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.site-header.scrolled {
  background: rgba(9,9,11,0.85);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--text-1); }
.logo img { height: 36px; width: auto; }
.nav-list { display: flex; gap: 4px; }
.nav-list a {
  padding: 8px 16px; font-size: 15px; color: var(--text-2);
  border-radius: 12px; transition: all 0.2s;
}
.nav-list a:hover, .nav-list a.active { color: var(--text-1); background: rgba(255,255,255,0.05); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.mobile-toggle { display: none; }
.mobile-menu { display: none; }

/* ========== 6) Hero ========== */
.hero {
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 40px;
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--r-tag);
  color: var(--accent); font-size: 13px; font-weight: 500;
  margin-bottom: 24px;
}
.hero-badge::before {
  content: ""; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}
.hero h1 {
  font-size: 52px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 20px;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 17px; color: var(--text-2);
  max-width: 480px; margin-bottom: 32px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-tag);
  font-size: 13px; color: var(--text-2);
}
.hero-tag i { color: var(--primary); font-size: 14px; }

/* Hero 右侧手机 */
.hero-phones {
  position: relative; height: 500px;
  display: flex; align-items: center; justify-content: center;
}
.hero-phone {
  position: absolute; width: 200px; height: 420px;
  background: #1a1a26;
  border-radius: 28px;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-card), 0 0 60px rgba(139,92,246,0.2);
  overflow: hidden;
}
.hero-phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.hero-phone::before {
  content: ""; position: absolute; top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 18px;
  background: #0a0a0e; border-radius: 9px; z-index: 2;
}
.hero-phone-1 { z-index: 1; transform: translateX(-120px) rotate(-10deg); animation: floatL 4s ease-in-out infinite; }
.hero-phone-2 { z-index: 3; width: 220px; height: 460px; animation: floatC 4s ease-in-out 0.5s infinite; }
.hero-phone-3 { z-index: 1; transform: translateX(120px) rotate(10deg); animation: floatR 4s ease-in-out 1s infinite; }
.hero-phones::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 500px; height: 500px;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 55%);
  pointer-events: none;
}
@keyframes floatC { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatL { 0%,100% { transform: translateX(-120px) rotate(-10deg) translateY(0); } 50% { transform: translateX(-120px) rotate(-10deg) translateY(-10px); } }
@keyframes floatR { 0%,100% { transform: translateX(120px) rotate(10deg) translateY(0); } 50% { transform: translateX(120px) rotate(10deg) translateY(-10px); } }

/* ========== 7) 数据统计 ========== */
.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 32px 24px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 24px; text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-num {
  font-size: 36px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.02em; display: block; margin-bottom: 6px;
}
.stat-label { color: var(--text-3); font-size: 14px; }
.stat-item { position: relative; }
.stat-item + .stat-item::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 32px; background: var(--border);
}

/* ========== 8) APP 截图 ========== */
.screenshots-wrap {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 24px; align-items: end;
  max-width: 1100px; margin: 0 auto;
}
.screen-card { text-align: center; transition: all 0.3s ease; }
.screen-card:nth-child(2) { transform: translateY(-16px); }
.screen-card:nth-child(4) { transform: translateY(-16px); }
.screen-phone {
  background: #1a1a26;
  border-radius: 24px;
  border: 1.5px solid rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}
.screen-phone img { width: 100%; aspect-ratio: 745/1235; object-fit: cover; }
.screen-card:hover .screen-phone {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-card), 0 0 40px var(--primary-glow);
  border-color: var(--border-hover);
}
.screen-label { margin-top: 16px; font-size: 14px; color: var(--text-2); font-weight: 500; }

/* ========== 9) 为什么选择 ========== */
.features-list {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 960px; margin: 0 auto;
}
.feature-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px 28px;
  transition: all 0.3s ease;
}
.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  transform: translateX(4px);
}
.feature-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(192,132,252,0.1) 100%);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--accent);
}
.feature-text h3 { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.feature-text p { color: var(--text-2); font-size: 15px; }

/* ========== 10) 热门角色 ========== */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.3s ease;
}
.character-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow-sm);
}
.character-avatar {
  width: 120px; height: 120px;
  margin: 0 auto 18px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--border);
  transition: all 0.3s;
}
.character-card:hover .character-avatar {
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow);
  transform: scale(1.05);
}
.character-avatar img { width: 100%; height: 100%; object-fit: cover; }
.character-name { font-size: 18px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; }
.character-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 12px; }
.character-tags .ctag {
  font-size: 12px; padding: 2px 10px;
  background: rgba(255,255,255,0.05); color: var(--text-3);
  border-radius: var(--r-tag);
}
.character-desc { font-size: 14px; color: var(--text-3); margin-bottom: 20px; min-height: 42px; }
.character-card .btn { width: 100%; }

/* ========== 11) 产品介绍 ========== */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.intro-text h2 { font-size: 36px; font-weight: 700; margin-bottom: 20px; line-height: 1.2; }
.intro-text .lead { font-size: 17px; color: var(--text-2); margin-bottom: 20px; }
.intro-text p { color: var(--text-2); margin-bottom: 16px; font-size: 15px; line-height: 1.8; }
.intro-text strong { color: var(--text-1); font-weight: 600; }
.intro-illu { text-align: center; }
.intro-illu img {
  width: 100%; max-width: 440px; margin: 0 auto;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card), 0 0 80px var(--primary-glow);
}

/* ========== 12) FAQ ========== */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq-item:hover { border-color: rgba(139,92,246,0.25); }
.faq-question {
  width: 100%; padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; text-align: left;
  font-size: 15px; font-weight: 500; color: var(--text-1);
  transition: color 0.2s;
}
.faq-question:hover { color: var(--accent); }
.faq-question i { color: var(--primary); font-size: 18px; transition: transform 0.3s; flex-shrink: 0; }
.faq-item.open .faq-question i { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner { padding: 0 24px 20px; font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ========== 13) 最新文章 ========== */
.articles-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: all 0.3s;
}
.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow-sm);
}
.article-cover { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-elevated); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.article-card:hover .article-cover img { transform: scale(1.08); }
.article-body { padding: 20px 24px 24px; }
.article-date { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.article-title { font-size: 17px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; line-height: 1.4; }
.article-excerpt {
  font-size: 14px; color: var(--text-3); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ========== 14) 下载区 ========== */
.download-cta { text-align: center; }
.download-cta .btn-group {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin-top: 32px;
}

/* ========== 15) Footer ========== */
.site-footer {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1.2fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-col h4 { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text-3); font-size: 14px; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-brand p { color: var(--text-3); font-size: 14px; margin-top: 16px; line-height: 1.6; }
.footer-qr { text-align: center; }
.footer-qr .qr {
  width: 100px; height: 100px; margin: 0 auto 10px;
  background: #fff; border-radius: 12px; padding: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #333;
}
.footer-qr p { font-size: 12px; color: var(--text-3); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 16px;
  color: var(--text-3); font-size: 13px;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal a { color: var(--text-3); }
.footer-legal a:hover { color: var(--accent); }

/* ========== 16) 滚动动画(默认可见) ========== */
.fade-up {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ========== 17) 响应式 ========== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 42px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-phones { height: 420px; }
  .hero-phone-1 { transform: translateX(-100px) rotate(-10deg) scale(0.85); }
  .hero-phone-2 { width: 200px; height: 420px; }
  .hero-phone-3 { transform: translateX(100px) rotate(10deg) scale(0.85); }
  .section { padding: 72px 0; }
  .section-title { font-size: 32px; }
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .characters-grid { grid-template-columns: repeat(2,1fr); }
  .articles-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --pad-x: 16px; }
  .nav-list, .header-cta .btn { display: none; }
  .mobile-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text-1); font-size: 18px;
  }
  .mobile-menu {
    display: none;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(9,9,11,0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 16px; z-index: 99;
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a {
    display: block; padding: 14px 16px;
    color: var(--text-1); border-radius: 10px; font-size: 16px;
  }
  .mobile-menu a:hover { background: rgba(255,255,255,0.05); }
  .hero { padding-top: calc(var(--header-h) + 32px); padding-bottom: 40px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-phones { height: 360px; }
  .hero-phone-1 { transform: translateX(-80px) rotate(-10deg) scale(0.7); }
  .hero-phone-2 { width: 170px; height: 360px; }
  .hero-phone-3 { transform: translateX(80px) rotate(10deg) scale(0.7); }
  .stats-card { grid-template-columns: repeat(2,1fr); padding: 24px 16px; }
  .stat-item + .stat-item::before { display: none; }
  .screenshots-wrap { grid-template-columns: repeat(2,1fr); gap: 16px; }
  .screen-card:nth-child(n) { transform: none; }
  .feature-card { grid-template-columns: 48px 1fr; gap: 16px; padding: 20px; }
  .feature-icon { width: 48px; height: 48px; font-size: 22px; }
  .feature-text h3 { font-size: 17px; }
  .characters-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-title { font-size: 26px; }
  .intro-text h2 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ========== 18) 无障碍 ========== */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
