/* SayloAI 下载站 - 移动端优先 */
:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --accent: #ec4899;
  --bg: #0f0a1a;
  --bg-card: #1a1229;
  --bg-card-hover: #241a38;
  --text: #f3f0ff;
  --text-muted: #a89bc4;
  --border: rgba(124, 58, 237, 0.25);
  --radius: 14px;
  --shadow: 0 8px 32px rgba(124, 58, 237, 0.2);
  --header-h: 60px;
  --float-bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(15, 10, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-link img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

/* 移动端菜单按钮 - 右上角 */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 导航 */
.site-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(300px, 85vw);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: calc(var(--header-h) + 24px) 24px 24px;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow-y: auto;
}

.site-nav.open { right: 0; }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.site-nav ul { list-style: none; }

.site-nav li { border-bottom: 1px solid var(--border); }

.site-nav a {
  display: block;
  padding: 14px 0;
  color: var(--text);
  font-size: 1rem;
}

.site-nav a:hover,
.site-nav a.active { color: var(--accent); }

/* 桌面端导航 */
@media (min-width: 768px) {
  .menu-toggle { display: none; }

  .site-nav {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    padding: 0;
    overflow: visible;
  }

  .site-nav ul {
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .site-nav li { border: none; }

  .site-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
  }

  .site-nav a:hover,
  .site-nav a.active {
    color: var(--text);
    background: rgba(124, 58, 237, 0.15);
  }
}

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-h) + 40px) 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.3;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 28px;
}

.hero-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
}

@media (min-width: 480px) {
  .hero-btns {
    flex-direction: row;
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-width: 160px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-screenshot {
  max-width: 300px;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  object-fit: cover;
}

/* ===== Sections ===== */
section { padding: 48px 0; }

.section-title {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: background 0.2s, transform 0.2s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Screenshots */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .screenshots-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 9/16;
  background: var(--bg-card);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* FAQ */
.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.faq-item.open .faq-answer { max-height: 500px; }

/* SEO 教程导航 */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .guide-grid { grid-template-columns: repeat(3, 1fr); }
}

.guide-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.guide-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.5);
  opacity: 1;
}

.guide-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #ddd6fe;
}

.guide-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* 面包屑 */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb span { color: var(--accent); }


/* Article content (sub-pages) */
.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 32px) 16px 48px;
}

.article-content h1 {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  margin-bottom: 16px;
  line-height: 1.35;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-content h2 {
  font-size: 1.2rem;
  margin: 28px 0 12px;
  color: #ddd6fe;
}

.article-content p,
.article-content li {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.article-content ul,
.article-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.article-content .download-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin: 28px 0;
}

.article-content .download-box .btn { margin: 6px; }

/* Related links */
.related-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.related-pages a {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.related-pages a:hover { color: var(--accent); }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0  calc(24px + var(--float-bar-h));
  margin-top: 24px;
}

.footer-disclaimer {
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 28px;
  font-size: 0.92rem;
  color: #fda4af;
  font-weight: 600;
  line-height: 1.6;
}

.footer-disclaimer strong {
  color: #fb7185;
  font-size: 1rem;
}

.footer-stats {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 8px;
}

.footer-stats span { color: var(--accent); font-weight: 600; }

.footer-links h4,
.footer-friends h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 24px;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-friends {
  text-align: center;
  margin-bottom: 24px;
}

.footer-friends a {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 12px;
}

.footer-friends a:hover { color: var(--accent); }

.footer-copy {
  text-align: center;
  color: #6b5f80;
  font-size: 0.8rem;
}

/* ===== Floating Download Bar ===== */
.float-download {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(15, 10, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.float-download.visible { transform: translateY(0); }

.float-download .btn {
  flex: 1;
  max-width: 200px;
  padding: 12px 16px;
  font-size: 0.9rem;
  min-width: 0;
}

/* 有悬浮栏时给页面底部留白 */
body.has-float-bar { padding-bottom: var(--float-bar-h); }

@media (min-width: 768px) {
  .site-footer { padding-bottom: 24px; }
  body.has-float-bar { padding-bottom: 0; }
  .float-download { display: none; }
}
