/* 夜色AI 下载官网 - 移动端优先 */
:root {
  --bg-deep: #0a0a14;
  --bg-card: #12121f;
  --bg-elevated: #1a1a2e;
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --accent: #ec4899;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(139, 92, 246, 0.25);
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --header-h: 60px;
  --float-h: 64px;
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::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-deep);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

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(10, 10, 20, 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 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.logo:hover { color: var(--text); }

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 22px;
  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); }

/* Nav */
.main-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(300px, 85vw);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-card);
  padding: calc(var(--header-h) + 20px) 24px 24px;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}

.main-nav.open { right: 0; }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 999;
}

.nav-overlay.active { opacity: 1; visibility: visible; }

.nav-list { list-style: none; }

.nav-list li { border-bottom: 1px solid var(--border); }

.nav-list a {
  display: block;
  padding: 14px 0;
  color: var(--text);
  font-size: 1rem;
}

.nav-list a:hover,
.nav-list a.active { color: var(--primary-light); }

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .nav-overlay { display: none; }

  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    padding: 0;
    border: none;
    overflow: visible;
  }

  .nav-list { display: flex; gap: 4px; }
  .nav-list li { border: none; }
  .nav-list a { padding: 8px 14px; font-size: 0.9rem; border-radius: 8px; }
  .nav-list a:hover { background: rgba(139, 92, 246, 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(139, 92, 246, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  background: var(--gradient);
  -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-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover { color: #fff; box-shadow: 0 6px 28px rgba(139, 92, 246, 0.5); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

/* Sections */
section { padding: 48px 0; }

.section-title {
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.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: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Screenshots */
.screenshots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshots::-webkit-scrollbar { display: none; }

.screenshot-item {
  flex: 0 0 200px;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.screenshot-item img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  background: var(--bg-elevated);
  min-height: 200px;
}

@media (min-width: 768px) {
  .screenshots {
    justify-content: center;
    overflow-x: visible;
    flex-wrap: wrap;
  }
  .screenshot-item { flex: 0 0 220px; }
}

/* 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%;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  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(--primary-light);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.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.9rem;
}

.faq-item.open .faq-answer { max-height: 300px; }

/* Content page */
.page-content {
  padding: calc(var(--header-h) + 32px) 0 48px;
}

.page-content h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-content .lead {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 1rem;
}

.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.content-block h2 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--primary-light);
}

.content-block p,
.content-block li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.content-block ul {
  padding-left: 20px;
  margin-top: 8px;
}

.content-block li { margin-bottom: 6px; }

/* Related links */
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.related-links a {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.related-links a:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 calc(24px + var(--float-h) + var(--safe-bottom));
}

.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;
  margin-bottom: 28px;
  text-align: center;
}

.footer-disclaimer strong {
  display: block;
  color: #f9a8d4;
  font-size: 1rem;
  margin-bottom: 4px;
}

.footer-disclaimer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

@media (min-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-col h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-col a:hover { color: var(--primary-light); }

.friend-links {
  margin-bottom: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.friend-links h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.friend-links-list a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.friend-links-list a:hover { color: var(--primary-light); }

.download-stats {
  text-align: center;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.download-stats span { color: var(--primary-light); font-weight: 600; }

.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Floating download bar */
.float-download {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(18, 18, 31, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + var(--safe-bottom));
  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-inner {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.float-download .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.9rem;
}

/* Steps */
.steps {
  display: grid;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-item h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.step-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* SEO keyword navigation */
.seo-keyword-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.seo-keyword-nav a {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.seo-keyword-nav a:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(139, 92, 246, 0.1);
}

.seo-intro { max-width: 800px; margin: 0 auto; }

.seo-intro h2 { font-size: 1.1rem; margin-bottom: 12px; color: var(--primary-light); }

.seo-intro p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.8; }

.breadcrumb {
  padding: 0 0 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }
