/* ==========================================================
   前台广告轮播 + 友情链接
   样式参考 er.yfufu.com 的广告卡片风格
   ========================================================== */

/* ---------- 广告横幅 ---------- */
.yx-ad-banner {
  position: relative;
  width: 100%;
  margin-bottom: 18px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ew-surface-2, #1d232c);
  border: 1px solid var(--ew-border, #262c36);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  cursor: pointer;
}

.yx-ad-track { position: relative; width: 100%; }

.yx-ad-slide { display: none; position: relative; width: 100%; }

.yx-ad-slide.active {
  display: block;
  animation: yxAdFade .45s ease;
}

@keyframes yxAdFade {
  from { opacity: .25; }
  to   { opacity: 1; }
}

.yx-ad-slide img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

@media (max-width: 640px) {
  .yx-ad-slide img { height: 118px; }
}

.yx-ad-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 轮播圆点 */
.yx-ad-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.yx-ad-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: .2s;
}

.yx-ad-dot.active {
  background: #fff;
  width: 18px;
  border-radius: 4px;
}

/* 广告角标 */
.yx-ad-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 4px 0 9px;
  border-radius: 11px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  user-select: none;
}

.yx-ad-tag-txt { letter-spacing: .5px; }

.yx-ad-tag-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: rgba(255, 255, 255, .85);
  transition: .18s;
}

.yx-ad-tag-close:hover {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

/* ---------- 首页「前往 API 列表」按钮 ---------- */
.yx-more-apis {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.yx-more-apis .ew-btn {
  padding: 10px 26px;
  border-radius: 10px;
  font-size: 14px;
}

/* ---------- API 列表页头部 ---------- */
.yx-list-hero {
  padding: 4px 2px 16px;
}

.yx-list-title {
  margin: 0 0 7px;
  font-size: 23px;
  font-weight: 600;
  color: var(--ew-text);
  letter-spacing: .3px;
}

.yx-list-sub {
  margin: 0;
  font-size: 13px;
  color: var(--ew-text-2, var(--ew-text));
  opacity: .78;
}

/* ---------- 友情链接 ---------- */
.yx-links-panel {
  margin-top: 22px;
  padding: 16px 18px 18px;
  border-radius: var(--ew-radius-lg, 14px);
  background: var(--ew-surface);
  border: 1px solid var(--ew-border);
}

.yx-links-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ew-text-2);
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.yx-links-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--ew-primary, #26a69a);
}

.yx-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.yx-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--ew-surface-2, #1d232c);
  border: 1px solid var(--ew-border);
  text-decoration: none;
  color: inherit;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.yx-link-item:hover {
  transform: translateY(-2px);
  border-color: rgba(38, 166, 154, .45);
  box-shadow: 0 6px 18px rgba(38, 166, 154, .12);
}

.yx-link-logo {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(38, 166, 154, .14);
  color: var(--ew-primary, #26a69a);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}

.yx-link-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yx-link-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yx-link-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ew-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yx-link-desc {
  font-size: 11.5px;
  color: var(--ew-text-3, var(--ew-text-2));
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
