/* MiyuAI 下载官网 - 移动端优先 */
:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --accent: #ec4899;
  --bg: #0f0a1a;
  --bg-card: #1a1228;
  --bg-card-hover: #221a32;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(167, 139, 250, 0.15);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --shadow: 0 4px 24px rgba(124, 58, 237, 0.25);
  --radius: 12px;
  --header-h: 56px;
  --float-bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 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.6;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

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(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;
  gap: 12px;
  height: var(--header-h);
  position: relative;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  min-width: 0;
}

.logo-link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-link img { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; }

/* Mobile menu toggle - top right */
.menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
  flex-shrink: 0;
}

.menu-toggle span + span { margin-top: 5px; }

.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); }

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.nav-overlay.active { opacity: 1; visibility: visible; }

/* Mobile-first nav */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100%;
  height: 100dvh;
  background: var(--bg-card);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: calc(var(--header-h) + 16px) 20px 24px;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.site-nav.active { transform: translateX(0); }

.site-nav ul { list-style: none; }

.site-nav li { border-bottom: 1px solid var(--border); }

.site-nav a {
  display: block;
  padding: 14px 8px;
  color: var(--text);
  font-size: 0.95rem;
}

.site-nav a:hover, .site-nav a.active { color: var(--primary-light); }

/* Desktop nav */
@media (min-width: 1024px) {
  .menu-toggle { display: none; }
  .nav-overlay { display: none; }

  .site-nav {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    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 12px;
    font-size: 0.875rem;
    border-radius: 8px;
  }

  .site-nav a:hover { background: rgba(124, 58, 237, 0.15); }
}

/* Hero */
.hero {
  padding: calc(var(--header-h) + 32px) 0 48px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(124, 58, 237, 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.6rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* Download buttons */
.download-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .download-group { flex-direction: row; max-width: 440px; }
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: #fff;
}

.btn-download:active { transform: scale(0.97); }

.btn-android {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.btn-ios {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-download svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Sections */
.section { padding: 48px 0; }

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* Feature cards */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .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 20px;
  transition: border-color 0.2s, background 0.2s;
}

.feature-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-card h3 a {
  color: var(--text);
}

.feature-card h3 a:hover {
  color: var(--primary-light);
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Screenshots */
.screenshots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .screenshots { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.screenshot-item img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
}

.screenshot-item figcaption {
  padding: 8px 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* 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: 10px;
  overflow: hidden;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}

.faq-q::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--primary-light);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-q::after { transform: rotate(45deg); }

.faq-a {
  padding: 0 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 18px 16px;
}

/* Content page */
.content-page {
  padding: calc(var(--header-h) + 24px) 0 48px;
}

.content-page h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 16px;
  line-height: 1.35;
}

.content-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 32px;
}

.content-body h2 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
  color: var(--primary-light);
}

.content-body h2:first-child { margin-top: 0; }

.content-body p, .content-body li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.content-body ul { padding-left: 20px; }

.content-body a { color: var(--primary-light); }

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-bottom: 0;
}

.site-footer.has-float { margin-bottom: var(--float-bar-h); }

.footer-disclaimer {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 28px;
  text-align: center;
}

.footer-disclaimer strong {
  display: block;
  color: #fca5a5;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.footer-disclaimer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
}

.friend-links a {
  font-size: 0.85rem;
  color: var(--primary-light);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
}

.footer-nav a {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-stats {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.download-stats span { color: var(--primary-light); font-weight: 600; }

.footer-copy {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Floating download bar */
.float-download {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -120px;
  z-index: 998;
  width: auto;
  max-width: none;
  background: rgba(15, 10, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  overflow: hidden;
  transition: bottom 0.3s ease;
}

.float-download.visible {
  bottom: 0;
}

.float-download-inner {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: auto;
  max-width: none;
  margin: 0;
  overflow: hidden;
}

.float-download .btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  padding: 11px 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
  gap: 0;
  border-radius: 10px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 4px;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }

/* Stats badges in hero */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
