/* 抖阴视频官网 - 全局样式 */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --text-primary: #f5f5f7;
  --text-secondary: #a0a0b0;
  --accent-cyan: #00f0ff;
  --accent-magenta: #ff0050;
  --accent-red: #ff2d55;
  --border: #2a2a38;
  --max-width: 1100px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --header-height: 56px;
  --ads-height: 0px;
  --sticky-top: 56px;
}

*, *::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.75;
  min-height: 100vh;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-magenta); }

button { font-family: inherit; color: inherit; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* 广告栏 - 页头下方固定 */
.ads-sticky-bar {
  position: sticky;
  top: var(--header-height, 62px);
  z-index: 99;
  background: rgba(10, 10, 15, 0.96);
  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: 6px 10px;
  background: transparent;
  max-width: var(--max-width);
  margin: 0 auto;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg, #fff, #fff);
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}

#ads img:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 24px rgba(255, 45, 85, 0.35);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

.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-link img { width: 42px; height: 42px; border-radius: 8px; }

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }

.main-nav a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* 移动端导航按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  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);
}

.mobile-br { display: none; }

.gallery-scroll-hint { display: none; }

/* 移动端底部下载栏 */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
}

/* Hero */
.hero {
  padding: 60px 0 50px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(255, 0, 80, 0.06) 0%, transparent 50%);
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 28px;
}

.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-red));
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(255, 0, 80, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255, 0, 80, 0.5); }

/* Sections */
section { padding: 48px 0; }

section:nth-child(even) { background: var(--bg-secondary); }

.section-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  padding-left: 14px;
  border-left: 4px solid var(--accent-magenta);
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 800px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.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(--accent-cyan);
  transform: translateY(-3px);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--accent-cyan);
}

.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Category tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.tag:hover { border-color: var(--accent-red); color: var(--accent-red); }

/* Screenshot gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.gallery-item:hover { transform: scale(1.02); }

.gallery-item img { width: 100%; aspect-ratio: 9/16; object-fit: cover; object-position: top; }

.gallery-caption {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.gallery-caption strong { color: var(--text-primary); display: block; margin-bottom: 4px; }

/* Content article */
.article-content { max-width: 860px; }

.article-content h2 {
  font-size: 1.4rem;
  margin: 36px 0 14px;
  color: var(--accent-cyan);
}

.article-content h3 {
  font-size: 1.15rem;
  margin: 24px 0 10px;
}

.article-content p { margin-bottom: 16px; color: var(--text-secondary); }

.article-content ul, .article-content ol {
  margin: 12px 0 16px 24px;
  color: var(--text-secondary);
}

.article-content li { margin-bottom: 8px; }

.article-content strong { color: var(--text-primary); }

/* FAQ */
.faq-list { max-width: 800px; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
}

.faq-item h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text-primary); }
.faq-item p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }

/* Page header (sub pages) */
.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-header h1 { font-size: 2rem; margin-bottom: 8px; }
.page-header .breadcrumb { color: var(--text-secondary); font-size: 0.9rem; }

/* Legal pages */
.legal-content h2 { font-size: 1.25rem; margin: 32px 0 12px; color: var(--accent-cyan); }
.legal-content h3 { font-size: 1.05rem; margin: 20px 0 8px; }
.legal-content p, .legal-content li { color: var(--text-secondary); margin-bottom: 12px; }
.legal-content ul { margin-left: 24px; }

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h1 { font-size: 1.5rem; margin: 16px 0 8px; }
.error-page p { color: var(--text-secondary); margin-bottom: 24px; }

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent-cyan); }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Breadcrumb nav */
.breadcrumb-nav { margin-bottom: 24px; font-size: 0.9rem; color: var(--text-secondary); }
.breadcrumb-nav a { color: var(--accent-cyan); }

/* Responsive */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .container { padding: 0 16px; }

  /* 全站紧凑顶栏 + 汉堡菜单 */
  .header-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 10px 16px;
    gap: 10px;
    position: relative;
  }

  .logo-link img { width: 36px; height: 36px; }
  .logo-text { font-size: 1.1rem; }

  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 12px 12px;
    background: rgba(10, 10, 15, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open { display: flex; }

  .main-nav a {
    display: block;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  /* 广告栏移动端 - 居中排列 */
  .ads-sticky-bar {
    padding: 8px 12px;
    top: var(--header-height, 56px);
  }

  #ads {
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 10px 14px;
    padding: 2px 0;
    width: 100%;
  }

  #ads > div {
    flex-shrink: 0;
    width: 64px;
  }

  #ads img { width: 58px; height: 58px; border-radius: 14px; }
  #ads .caption { max-width: 64px; font-size: 10px; }

  /* 子页面通用 */
  .page-header {
    padding: 28px 0 20px;
    margin-bottom: 24px;
  }

  .page-header h1 { font-size: 1.5rem; }

  .article-content h2,
  .legal-content h2 { font-size: 1.15rem; }

  .article-content h3,
  .legal-content h3 { font-size: 1.05rem; }

  .article-content p,
  .article-content li,
  .legal-content p,
  .legal-content li {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .legal-content ul { margin-left: 20px; }

  .error-page {
    min-height: 55vh;
    padding: 24px 16px;
  }

  .error-code { font-size: 4.5rem; }

  .site-footer {
    margin-top: 40px;
    padding: 32px 0 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }

  .footer-bottom { font-size: 0.78rem; line-height: 1.6; }

  /* 首页专属 */
  .page-home .hero { padding: 28px 0 24px; }
  .page-home .hero h1 {
    font-size: 1.55rem;
    line-height: 1.35;
    margin-bottom: 12px;
  }
  .page-home .mobile-br { display: block; }
  .page-home .hero-sub {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0;
  }

  .page-home section { padding: 28px 0; }
  .page-home .section-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    padding-left: 12px;
  }
  .page-home .section-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.65;
  }

  .page-home .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .page-home .feature-card { padding: 16px 18px; }
  .page-home .feature-card h3 { font-size: 1rem; margin-bottom: 6px; }
  .page-home .feature-card p { font-size: 0.88rem; line-height: 1.6; }

  .page-home .tag-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin: 16px -16px 20px;
    padding: 0 16px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .page-home .tag-list::-webkit-scrollbar { display: none; }
  .page-home .tag {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  .page-home .article-content h2 {
    font-size: 1.15rem;
    margin: 24px 0 10px;
    line-height: 1.4;
  }
  .page-home .article-content ol { padding-left: 20px; }

  .page-home .gallery-scroll-hint {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    opacity: 0.8;
  }

  .page-home .gallery {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .page-home .gallery::-webkit-scrollbar { display: none; }

  .page-home .gallery-item {
    flex: 0 0 78%;
    max-width: 300px;
    scroll-snap-align: center;
  }
  .page-home .gallery-item img {
    aspect-ratio: 9/15;
    max-height: 380px;
    object-fit: cover;
  }
  .page-home .gallery-caption {
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  .page-home .faq-item {
    padding: 16px 18px;
    margin-bottom: 10px;
  }
  .page-home .faq-item h3 { font-size: 0.95rem; }
  .page-home .faq-item p { font-size: 0.88rem; line-height: 1.65; }

  .hero { padding: 40px 0 32px; }
  section { padding: 32px 0; }
}

@media (max-width: 380px) {
  .page-home .hero h1 { font-size: 1.4rem; }
  .page-home .gallery-item { flex: 0 0 85%; }
  .footer-grid { grid-template-columns: 1fr; }
}
