/* Douyin 抖阴 Official Site Styles */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #666666;
  --accent: #fe2c55;
  --accent-hover: #ff4d6d;
  --cyan: #25f4ee;
  --magenta: #fe2c55;
  --border: #2a2a2a;
  --success: #00c853;
  --max-width: 1200px;
  --header-height: 64px;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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;
  font-size: 16px;
}

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(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

/* Ads bar - sticky below header */
.ads-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 999;
  background: rgba(20, 20, 20, 0.98);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  padding: 8px 0;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  background: transparent;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 0 16px;
}

#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.04);
  box-shadow: 0 10px 24px rgba(254, 44, 85, 0.25);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-link img {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.nav-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.2s;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.site-header.nav-open .nav-toggle-icon {
  background: transparent;
}

.site-header.nav-open .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header.nav-open .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(0, 0, 0, 0.55);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-backdrop.open {
  display: block;
  opacity: 1;
}

body.nav-lock {
  overflow: hidden;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a10 50%, #0a0a0a 100%);
  padding: 60px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at center,
    rgba(254, 44, 85, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 16px;
  position: relative;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 32px;
  position: relative;
}

.btn-download {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #ff6b8a);
  color: #fff;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.btn-download:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(254, 44, 85, 0.4);
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
  position: relative;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Content sections */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 12px;
  text-align: center;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 40px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

/* Screenshot gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 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: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.gallery-caption strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

/* Article content */
.article-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.article-content h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.article-content h2 {
  font-size: 1.4rem;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.15rem;
  margin: 24px 0 10px;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
  margin: 0 0 16px 24px;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 8px;
}

.article-content .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* 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;
}

/* Category tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tag.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #1a0a10, #0a0a1a);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}

.cta-banner h2 {
  margin-bottom: 12px;
}

.cta-banner 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;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  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);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 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(--cyan), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  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: 32px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb span {
  margin: 0 8px;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .header-inner {
    position: relative;
    padding: 8px 16px;
    min-height: var(--header-height);
    justify-content: flex-start;
  }

  .logo-link {
    flex-shrink: 0;
  }

  .logo-link img {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
    order: 2;
  }

  #main-nav {
    order: 3;
    position: absolute;
    width: 0;
    height: 0;
    overflow: visible;
  }

  .main-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    border-bottom: 1px solid transparent;
    padding: 0;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0.25s ease,
      border-color 0.25s ease, padding 0.25s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  }

  .main-nav.open {
    max-height: 360px;
    opacity: 1;
    visibility: visible;
    padding: 8px 12px 16px;
    border-bottom-color: var(--border);
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
  }

  .main-nav a:hover,
  .main-nav a:active {
    background: var(--bg-card);
    color: var(--text-primary);
  }

  .main-nav a.active {
    color: var(--accent);
    background: rgba(254, 44, 85, 0.1);
    font-weight: 600;
  }

  .main-nav a.active::before {
    content: "";
    width: 3px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 12px;
    flex-shrink: 0;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .ads-bar {
    padding: 6px 0;
  }
}
