/* ===== 广告轮播 — 暗色主题（默认） ===== */
.front-ads {
  max-width: 1180px;
  width: calc(100% - 48px);
  margin: 24px auto 0;
  padding: 0;
}

.front-ads-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 62px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(35, 36, 43, .84), rgba(16, 24, 38, .78));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px);
}

.front-ads-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 0 18px;
  color: var(--gold);
  background: rgba(218, 174, 50, .08);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.front-ads-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #050913;
  background: var(--gold-2);
  font-size: 12px;
}

.front-ads-viewport {
  min-width: 0;
  overflow: hidden;
}

.front-ads-track {
  display: flex;
  width: 100%;
  transition: transform .35s ease;
  will-change: transform;
}

.front-ads-slide {
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 62px;
  padding: 0 18px;
  color: rgba(255, 255, 255, .88);
}

.front-ads-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-ads-link {
  flex: 0 0 auto;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 700;
}

.front-ads-link:hover {
  color: #70daf5;
}

.front-ads-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}

.front-ads-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  cursor: pointer;
  transition: width .2s ease, background-color .2s ease;
}

.front-ads-dot.active {
  width: 18px;
  border-radius: 999px;
  background: var(--gold-2);
}

.front-ads-dot:hover,
.front-ads-dot:focus-visible {
  background: #70daf5;
  outline: none;
}

.front-ads-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 10px;
}

.front-ads-control {
  width: 30px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, .5);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.front-ads-control:hover,
.front-ads-control:focus-visible {
  color: var(--gold-2);
  background: rgba(218, 174, 50, .12);
  outline: none;
}

/* ===== 移动端 ===== */
@media (max-width: 760px) {
  .front-ads {
    width: calc(100% - 24px);
    margin-top: 18px;
  }

  .front-ads-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .front-ads-label {
    min-height: 56px;
    padding: 0 12px;
  }

  .front-ads-label > span:last-child {
    display: none;
  }

  .front-ads-slide {
    min-height: 56px;
    padding: 0 12px;
  }

  .front-ads-text {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .front-ads-dots {
    display: none;
  }

  .front-ads-controls {
    padding-right: 6px;
  }
}

/* ===== 浅色主题 ===== */
body[data-appearance="light"] .front-ads-shell {
  border-color: #dbe5ff;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .08);
  backdrop-filter: none;
}

body[data-appearance="light"] .front-ads-label {
  color: #3156d8;
  background: #f2f5ff;
}

body[data-appearance="light"] .front-ads-icon {
  color: #fff;
  background: #4d67f4;
}

body[data-appearance="light"] .front-ads-slide {
  color: #4b5563;
}

body[data-appearance="light"] .front-ads-link {
  color: #4666f2;
}

body[data-appearance="light"] .front-ads-dot {
  background: #cbd5e1;
}

body[data-appearance="light"] .front-ads-dot.active {
  background: #4d67f4;
}

body[data-appearance="light"] .front-ads-control {
  color: #64748b;
}

body[data-appearance="light"] .front-ads-control:hover,
body[data-appearance="light"] .front-ads-control:focus-visible {
  color: #3156d8;
  background: #f2f5ff;
}

/* ===== 减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
  .front-ads-track,
  .front-ads-dot {
    transition: none;
  }
}
