/* DadyAI 下载站 - 移动端优先 */
:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --primary-light: #a29bfe;
  --accent: #00cec9;
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --text: #f0f0f5;
  --text-muted: #a0a0b8;
  --border: rgba(255,255,255,0.08);
  --gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
  --shadow: 0 8px 32px rgba(108,92,231,0.25);
  --radius: 16px;
  --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);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: calc(80px + var(--safe-bottom));
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,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;
  padding: 12px 16px;
  max-width: 960px;
  margin: 0 auto;
}

.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;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  display: block;
}

.nav-links a:hover {
  background: var(--bg-card);
  color: var(--text);
}

/* 移动端汉堡菜单 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.nav-toggle:hover {
  background: var(--bg-card-hover);
  border-color: rgba(108,92,231,0.4);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    min-width: 160px;
    background: rgba(26,26,46,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 110;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .site-nav .nav-links {
    flex-direction: column;
    gap: 2px;
  }

  .site-nav .nav-links a {
    padding: 12px 16px;
    font-size: 0.92rem;
    border-radius: 10px;
  }

  .site-nav .nav-links a:active {
    background: rgba(108,92,231,0.2);
    color: var(--primary-light);
  }

  .header-inner {
    position: relative;
  }
}

/* Hero */
.hero {
  padding: 32px 0 40px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(108,92,231,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(108,92,231,0.2);
  color: var(--primary-light);
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(108,92,231,0.3);
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto 24px;
}

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow);
}

/* Download buttons */
.download-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: #fff;
}

.btn-download:active { transform: scale(0.97); }

.btn-android {
  background: linear-gradient(135deg, #3ddc84 0%, #2aab5a 100%);
  box-shadow: 0 4px 20px rgba(61,220,132,0.3);
}

.btn-ios {
  background: linear-gradient(135deg, #5ac8fa 0%, #007aff 100%);
  box-shadow: 0 4px 20px rgba(0,122,255,0.3);
}

.btn-download svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Sections */
.section {
  padding: 40px 0;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Screenshots */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.screenshot-item img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
}

.screenshot-item figcaption {
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: background 0.2s;
}

.feature-card:hover { background: var(--bg-card-hover); }

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--primary-light);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--primary-light);
  transition: transform 0.2s;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item .faq-answer {
  padding: 0 16px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Related links */
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.related-links a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.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: 32px 0 calc(100px + var(--safe-bottom));
  margin-top: 20px;
}

.disclaimer {
  background: rgba(255,193,7,0.1);
  border: 1px solid rgba(255,193,7,0.3);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  text-align: center;
}

.disclaimer strong {
  color: #ffc107;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 4px;
}

.disclaimer p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.download-stats {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
}

.download-stats span { color: var(--accent); font-weight: 600; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.friend-links {
  text-align: center;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.friend-links-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.friend-links-list a {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color 0.2s, color 0.2s;
}

.friend-links-list a:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: #666;
}

/* Floating download bar */
.float-download-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(15,15,26,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + var(--safe-bottom));
  display: flex;
  gap: 10px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.float-download-bar.visible {
  transform: translateY(0);
}

.float-download-bar .btn-download {
  flex: 1;
  padding: 12px 10px;
  font-size: 0.88rem;
  border-radius: 12px;
}

/* Content page */
.content-article {
  padding: 24px 0 40px;
}

.content-article h1 {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  margin-bottom: 12px;
  line-height: 1.35;
}

.content-article .article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.content-article h2 {
  font-size: 1.15rem;
  margin: 28px 0 12px;
  color: var(--primary-light);
}

.content-article p,
.content-article li {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.content-article ul,
.content-article ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.content-article .inline-download {
  margin: 24px 0;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-top: 12px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }

/* Tablet+ */
@media (min-width: 640px) {
  .download-group {
    flex-direction: row;
    max-width: 480px;
  }

  .screenshot-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links a { font-size: 0.9rem; }
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  body { padding-bottom: 0; }

  .float-download-bar { display: none; }

  .site-footer { padding-bottom: 32px; }
}
