/* 抖阴官网 d-y.baby 全局样式 */
:root {
  --bg-primary: #0d0d12;
  --bg-secondary: #16161e;
  --bg-card: #1c1c28;
  --accent: #ff2d55;
  --accent-hover: #ff4d6d;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  --border: #2a2a3a;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: rgba(13, 13, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.logo-link:hover {
  color: var(--text-primary);
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-main {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-main a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-main a.active {
  color: var(--accent);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-download:hover {
  background: var(--accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Hero */
.hero {
  padding: 60px 0 50px;
  background: linear-gradient(180deg, #1a0a14 0%, var(--bg-primary) 100%);
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero h1 span {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-primary) !important;
  padding: 10px 22px;
  border-radius: 24px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

.hero-screenshot {
  max-width: 360px;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: var(--shadow), 0 0 60px rgba(255, 45, 85, 0.15);
  border: 2px solid var(--border);
}

/* Section */
.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}

.feature-card-body {
  padding: 20px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Category Tags */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

.tag {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Content Article */
.content-article {
  max-width: 860px;
  margin: 0 auto;
}

.content-article h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.content-article h3 {
  font-size: 1.2rem;
  margin: 28px 0 12px;
  color: var(--accent);
}

.content-article p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-align: justify;
}

.content-article ul, .content-article ol {
  margin: 12px 0 20px 24px;
  color: var(--text-secondary);
}

.content-article li {
  margin-bottom: 8px;
}

.content-article a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Screenshot Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}

.gallery-caption {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Download Section */
.download-section {
  text-align: center;
  padding: 60px 0;
  background: linear-gradient(135deg, #1a0a14, #0d0d12);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.download-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  padding: 40px 48px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.download-box img {
  width: 80px;
  border-radius: 18px;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  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 {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 0 24px 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Page Header */
.page-header {
  padding: 48px 0 32px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* Legal Page */
.legal-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px;
  color: var(--accent);
}

.legal-content p, .legal-content li {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-content ul, .legal-content ol {
  margin-left: 24px;
  margin-bottom: 16px;
}

.legal-content .update-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Error Pages */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand img {
  width: 48px;
  margin-bottom: 12px;
  border-radius: 10px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-links h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-keywords {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* Internal Links Box */
.internal-links {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.internal-links h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.internal-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.internal-links a {
  background: var(--bg-secondary);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.internal-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    position: relative;
  }

  .header-inner > nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
  }

  .nav-main {
    display: none;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-main.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
    flex-shrink: 0;
  }

  .header-inner .btn-download {
    display: none;
  }

  .site-footer {
    padding: 28px 0 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
    margin-bottom: 20px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand img {
    width: 40px;
    margin-bottom: 10px;
  }

  .footer-brand p {
    max-width: none;
    font-size: 0.84rem;
    line-height: 1.65;
  }

  .footer-keywords {
    font-size: 0.72rem;
    line-height: 1.6;
    margin-top: 6px;
  }

  .footer-links h4 {
    font-size: 0.88rem;
    margin-bottom: 10px;
  }

  .footer-links li {
    margin-bottom: 6px;
  }

  .footer-links a {
    font-size: 0.84rem;
    display: block;
    padding: 3px 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding-top: 16px;
  }

  .footer-bottom p {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .hero {
    padding: 40px 0 30px;
  }

  .download-box {
    padding: 28px 24px;
    width: 100%;
  }
}

/* 广告栏 - 固定于导航下方 */
.ad-bar {
  position: sticky;
  top: 62px;
  z-index: 999;
  background: rgba(22, 22, 30, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  background: transparent;
  max-width: var(--max-width);
  margin: 0 auto;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  box-sizing: border-box;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 16px;
}

#ads a:hover img {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 45, 85, 0.25);
  border-color: var(--accent);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

@media (max-width: 768px) {
  :root {
    --mobile-header-h: 70px;
    --mobile-adbar-h: 88px;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }

  .site-header + main {
    padding-top: var(--mobile-header-h);
  }

  .ad-bar {
    position: fixed;
    top: var(--mobile-header-h);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    padding: 6px 8px;
    background: #16161e;
    backdrop-filter: none;
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
  }

  .ad-bar + main {
    padding-top: calc(var(--mobile-header-h) + var(--mobile-adbar-h));
  }

  #ads > div {
    width: 64px;
  }

  #ads img {
    width: 58px;
    height: 58px;
  }
}
