/* 抖阴APP官网 - 全局样式 */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --accent-red: #fe2c55;
  --accent-cyan: #25f4ee;
  --accent-gold: #d4a853;
  --border-color: #2a2a2a;
  --max-width: 1200px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --ads-bar-height: 118px;
  --header-height: 70px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -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-primary);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-red);
}

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-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.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: 10px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* Hero */
.hero {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, #111 0%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(254, 44, 85, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-red), #e01e45);
  color: #fff;
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(254, 44, 85, 0.35);
}

.btn-download:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(254, 44, 85, 0.45);
}

.hero-phone {
  max-width: 320px;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: var(--shadow), 0 0 60px rgba(37, 244, 238, 0.08);
  border: 2px solid var(--border-color);
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 12px;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 48px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Screenshot Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  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: 16px;
}

.gallery-caption h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.gallery-caption p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Content Article */
.content-article {
  max-width: 900px;
  margin: 0 auto;
}

.content-article h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-red);
}

.content-article h3 {
  font-size: 1.2rem;
  margin: 28px 0 12px;
  color: var(--accent-cyan);
}

.content-article p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-align: justify;
}

.content-article ul,
.content-article ol {
  margin: 16px 0 16px 24px;
  color: var(--text-secondary);
}

.content-article li {
  margin-bottom: 8px;
}

.content-article a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  border: none;
  padding: 0;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.toc a {
  color: var(--text-secondary);
}

.toc a:hover {
  color: var(--accent-cyan);
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  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.4rem;
  color: var(--accent-red);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  text-align: center;
  margin: 48px 0;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px 16px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* Download Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  padding-top: 48px;
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 16px;
  left: 24px;
  width: 32px;
  height: 32px;
  background: var(--accent-red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Legal Pages */
.legal-page {
  padding: 48px 0 80px;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.legal-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 36px;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin: 32px 0 14px;
  color: var(--accent-cyan);
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-content ul {
  margin: 12px 0 12px 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-red));
  -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 12px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.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: 1rem;
  margin-bottom: 16px;
}

.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-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--text-secondary);
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-cyan);
}

.section-anchor {
  scroll-margin-top: 80px;
}

/* ========== 移动端排版优化 ========== */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  /* 导航 */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 8px 12px 12px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    gap: 4px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .logo-link img {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  /* Hero */
  .hero {
    padding: 28px 0 40px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .hero h1 {
    font-size: 1.45rem;
    line-height: 1.35;
    margin-bottom: 14px;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 18px;
    text-align: left;
  }

  .hero-badges {
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
  }

  .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .hero-phone {
    max-width: 220px;
    border-radius: 20px;
  }

  /* 通用区块 */
  .section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 1.3rem;
    line-height: 1.4;
    padding: 0 2px;
  }

  .section-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 28px;
    padding: 0 2px;
    text-align: left;
  }

  .section-anchor {
    scroll-margin-top: 64px;
  }

  /* 数据统计 */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0;
  }

  .stat-item {
    padding: 18px 10px;
  }

  .stat-number {
    font-size: 1.45rem;
  }

  .stat-label {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  /* 分类卡片 */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .category-card:hover {
    transform: none;
  }

  .category-card-body {
    padding: 10px;
  }

  .category-card-body h3 {
    font-size: 0.85rem;
    margin-bottom: 4px;
    line-height: 1.35;
  }

  .category-card-body p {
    font-size: 0.72rem;
    line-height: 1.55;
  }

  /* 图文展示 */
  .showcase-row {
    gap: 18px;
    margin-bottom: 32px;
    padding-bottom: 32px;
  }

  .showcase-img {
    max-width: 220px;
  }

  .showcase-text h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.35;
  }

  .showcase-text p {
    font-size: 0.9rem;
    line-height: 1.75;
    text-align: left;
    margin-bottom: 10px;
  }

  .showcase-text ul {
    margin: 8px 0 0 18px;
    font-size: 0.88rem;
  }

  /* 画廊 */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .gallery-item:hover {
    transform: none;
  }

  .gallery-caption {
    padding: 10px;
  }

  .gallery-caption h3 {
    font-size: 0.88rem;
    margin-bottom: 4px;
    line-height: 1.35;
  }

  .gallery-caption p {
    font-size: 0.75rem;
    line-height: 1.55;
  }

  /* 功能卡片 */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-card:hover {
    transform: none;
  }

  .feature-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  .feature-card h3 {
    font-size: 1.05rem;
  }

  .feature-card p {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  /* 长文内容 */
  .content-article h2 {
    font-size: 1.2rem;
    margin: 28px 0 12px;
    line-height: 1.4;
  }

  .content-article h3 {
    font-size: 1.02rem;
    margin: 20px 0 10px;
  }

  .content-article p {
    font-size: 0.9rem;
    line-height: 1.75;
    text-align: left;
    margin-bottom: 12px;
  }

  .content-article ul,
  .content-article ol {
    margin: 12px 0 12px 20px;
    font-size: 0.9rem;
  }

  .content-article li {
    margin-bottom: 6px;
    line-height: 1.65;
  }

  .toc {
    padding: 16px 18px;
    margin-bottom: 24px;
  }

  .toc h2 {
    font-size: 1rem;
  }

  .toc ol {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  /* FAQ */
  .faq-item summary {
    padding: 14px 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    gap: 12px;
  }

  .faq-item summary::after {
    flex-shrink: 0;
    font-size: 1.2rem;
  }

  .faq-answer {
    padding: 0 16px 14px;
    font-size: 0.88rem;
    line-height: 1.7;
  }

  /* 法律页 */
  .legal-page {
    padding: 20px 0 40px;
  }

  .legal-page h1 {
    font-size: 1.45rem;
    line-height: 1.35;
  }

  .legal-meta {
    font-size: 0.82rem;
    margin-bottom: 24px;
  }

  .legal-content h2 {
    font-size: 1.1rem;
    margin: 24px 0 10px;
    line-height: 1.4;
  }

  .legal-content p,
  .legal-content li {
    font-size: 0.9rem;
    line-height: 1.75;
    text-align: left;
  }

  .legal-content ul {
    margin: 10px 0 10px 20px;
  }

  .breadcrumb {
    padding: 12px 0;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* 错误页 */
  .error-page {
    min-height: 60vh;
    padding: 32px 16px;
  }

  .error-code {
    font-size: 4.5rem;
  }

  .error-page h1 {
    font-size: 1.25rem;
  }

  .error-page p {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .btn-download {
    padding: 14px 28px;
    font-size: 1rem;
  }

  /* 页脚 */
  .site-footer {
    padding: 32px 0 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
  }

  .footer-brand p {
    max-width: none;
    line-height: 1.65;
  }

  .footer-links h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }

  .footer-links a {
    display: inline-block;
    padding: 4px 0;
    min-height: 32px;
    line-height: 1.5;
  }

  .footer-bottom {
    padding-top: 20px;
    font-size: 0.78rem;
    line-height: 1.7;
  }

  /* 步骤卡片 */
  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step-card {
    padding: 20px 18px;
    padding-top: 44px;
  }
}

/* 超小屏手机 */
@media (max-width: 380px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 12px;
  }

  .hero h1 {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
  }

  .stats-row {
    gap: 10px;
  }

  .showcase-img {
    max-width: 200px;
  }
}

/* 图文展示区块 - 移动端优先 */
.showcase-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-color);
}

.showcase-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.showcase-img {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  max-width: 280px;
  width: 100%;
  margin: 0 auto;
}

.showcase-img img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}

.showcase-text {
  min-width: 0;
}

.showcase-text h3 {
  font-size: 1.25rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.showcase-text p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: justify;
  overflow-wrap: break-word;
  word-break: break-word;
}

.showcase-text ul {
  margin: 12px 0 0 20px;
  color: var(--text-secondary);
}

.showcase-text li {
  margin-bottom: 6px;
}

@media (min-width: 769px) {
  .showcase-row {
    grid-template-columns: 280px 1fr;
    gap: 40px;
  }

  .showcase-row.reverse {
    grid-template-columns: 1fr 280px;
  }

  .showcase-row.reverse .showcase-img {
    order: 2;
  }

  .showcase-row.reverse .showcase-text {
    order: 1;
  }

  .showcase-img {
    max-width: none;
    margin: 0;
  }
}

/* 分类小卡片网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.category-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-3px);
}

.category-card img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}

.category-card-body {
  padding: 14px;
}

.category-card-body h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.category-card-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-anchor {
  scroll-margin-top: 80px;
}

/* 广告推荐栏 */
.ads-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0 12px;
}

body.has-fixed-ads .ads-bar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 1050;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.ads-bar-inner {
  text-align: center;
}

.ads-bar-label {
  font-size: 0.8rem;
  color: var(--accent-red);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.ads-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
}

.ads-item a {
  display: block;
  border-radius: 16px;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.ads-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  background: #fff;
}

.ads-item a:active img,
.ads-item a:hover img {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--accent-red);
  box-shadow: 0 8px 24px rgba(254, 44, 85, 0.25);
}

.ads-caption {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .ads-bar {
    padding: 12px 0 10px;
  }

  #ads {
    gap: 14px 18px;
  }

  .ads-item {
    width: 76px;
  }

  .ads-item img {
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }

  .ads-caption {
    max-width: 76px;
    font-size: 0.7rem;
  }
}

@media (max-width: 380px) {
  #ads {
    gap: 12px 14px;
  }

  .ads-item {
    width: 70px;
  }

  .ads-item img {
    width: 64px;
    height: 64px;
  }

  .ads-caption {
    max-width: 70px;
  }
}

/* 固定广告栏页面布局 */
body.has-fixed-ads {
  padding-top: calc(var(--ads-bar-height) + var(--header-height));
}

body.has-fixed-ads .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
}

body.has-fixed-ads .section-anchor {
  scroll-margin-top: calc(var(--ads-bar-height) + var(--header-height) + 12px);
}

@media (max-width: 768px) {
  :root {
    --ads-bar-height: 110px;
    --header-height: 58px;
  }
}
