/* 顶部广告栏 - 利于点击 */
.ads-bar {
  background: var(--bg-section, #0f1a2e);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding: 12px 0;
  position: sticky;
  top: var(--header-h, 72px);
  z-index: 900;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 16px;
  background: transparent;
  min-height: 88px;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  box-sizing: border-box;
}

#ads img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: #fff;
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 16px;
  line-height: 0;
}

#ads a:hover img,
#ads a:focus img {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 24px rgba(18, 168, 85, 0.35);
  border-color: var(--primary-light, #12a855);
}

#ads .caption {
  margin-top: 6px;
  height: 16px;
  font-size: 11px;
  color: var(--text-muted, #8b9cb8);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 16px;
}

#ads a:hover + .caption,
#ads figure:hover .caption {
  color: var(--primary-light, #12a855);
}

@media (max-width: 768px) {
  .ads-bar { padding: 10px 0; }

  #ads {
    gap: 6px 12px;
    min-height: 80px;
  }

  #ads > div { width: 72px; }

  #ads img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  #ads .caption {
    max-width: 72px;
    font-size: 10px;
  }
}
