/* 专题详情页 */

.topic-detail-page {
  background: #060611;
}

.topic-detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: #07060e;
}

.topic-detail-hero__bg,
.topic-detail-hero__mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.topic-detail-hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: blur(42px);
  transform: scale(1.18);
  transform-origin: center center;
}

.topic-detail-hero__mask {
  background:
    linear-gradient(
      90deg,
      rgba(7, 6, 14, 0.78) 0%,
      rgba(7, 6, 14, 0.4) 42%,
      rgba(7, 6, 14, 0.22) 100%
    ),
    linear-gradient(
      180deg,
      rgba(7, 6, 14, 0.35) 0%,
      rgba(7, 6, 14, 0.55) 55%,
      #060611 100%
    );
}

.topic-detail-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 48px;
  min-height: 348px;
  padding-top: 36px;
  padding-bottom: 48px;
  background: transparent;
}

.topic-detail-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: min(640px, 100%);
  min-width: 0;
}

.topic-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.topic-breadcrumb__item {
  color: #f160b1;
  font-size: calc(12px + var(--pc-font-boost, 0px));
  font-weight: 400;
  line-height: 18px;
  text-decoration: none;
}

.topic-breadcrumb__item.is-current {
  color: #aea7bc;
}

.topic-breadcrumb__sep {
  color: #696379;
  font-size: calc(12px + var(--pc-font-boost, 0px));
  line-height: 18px;
}

.topic-detail-hero__title {
  margin: 0;
  color: #fff;
  font-size: calc(40px + var(--pc-font-boost, 0px));
  font-weight: 600;
  line-height: 48px;
  letter-spacing: 0.2px;
}

.topic-detail-hero__desc {
  margin: 0;
  max-width: 560px;
  color: #9994ad;
  font-size: calc(16px + var(--pc-font-boost, 0px));
  font-weight: 400;
  line-height: 26px;
}

.topic-detail-hero__meta {
  margin: 2px 0 4px;
  color: #696379;
  font-size: calc(13px + var(--pc-font-boost, 0px));
  font-weight: 400;
  line-height: 18px;
}

.topic-detail-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.topic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  font-size: calc(15px + var(--pc-font-boost, 0px));
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  box-sizing: border-box;
}

.topic-btn .icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.topic-btn--primary {
  color: #fff;
  background: linear-gradient(90deg, #ff4a7b 0%, #f12b9e 52%, #93226f 100%);
}

.topic-detail-hero__stack {
  position: relative;
  flex-shrink: 0;
  width: 360px;
  height: 280px;
}

.topic-detail-hero__stack img {
  position: absolute;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  object-fit: cover;
  background: #1a1a1f;
}

.topic-detail-hero__stack img:nth-child(1) {
  left: 8px;
  top: 52px;
  z-index: 1;
  width: 152px;
  height: 202px;
  opacity: 0.62;
}

.topic-detail-hero__stack img:nth-child(2) {
  left: 84px;
  top: 28px;
  z-index: 2;
  width: 168px;
  height: 224px;
  opacity: 0.85;
}

.topic-detail-hero__stack img:nth-child(3) {
  left: 168px;
  top: 0;
  z-index: 3;
  width: 188px;
  height: 252px;
  opacity: 1;
  border-color: transparent;
  box-shadow:
    0 0 0 2px rgba(241, 43, 158, 0.9),
    0 0 28px rgba(241, 43, 158, 0.35),
    0 20px 48px rgba(0, 0, 0, 0.55);
}

.topic-detail-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 0 24px;
  width: 100%;
  max-width: 1700px;
}

.topic-detail-section--more {
  gap: 20px;
  padding: 8px 0 40px;
}

.topic-detail-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.topic-detail-section__left {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  min-width: 0;
}

.topic-detail-section__title {
  margin: 0;
  color: #fff;
  font-size: calc(22px + var(--pc-font-boost, 0px));
  font-weight: 600;
  line-height: 30px;
}

.topic-detail-section__count {
  color: #696379;
  font-size: calc(14px + var(--pc-font-boost, 0px));
  font-weight: 400;
  line-height: 22px;
  padding-bottom: 4px;
}

.topic-detail-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9994ad;
  font-size: calc(13px + var(--pc-font-boost, 0px));
  line-height: 20px;
  text-decoration: none;
}

.topic-detail-more-link .icon {
  width: 14px;
  height: 14px;
}

.topic-detail-sort {
  display: inline-flex;
  align-items: flex-end;
  gap: 20px;
  flex-shrink: 0;
  margin-left: 6px;
}

.topic-detail-sort__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #9994ad;
  font-size: calc(14px + var(--pc-font-boost, 0px));
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

.topic-detail-sort__item::after {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #ff4a7b 0%, #f12b9e 52%, #93226f 100%);
  opacity: 0;
}

.topic-detail-sort__item.is-active {
  color: #fff;
}

.topic-detail-sort__item.is-active::after {
  opacity: 1;
}

.topic-detail-sort-dropdown {
  display: none;
  position: relative;
  flex-shrink: 0;
}

.topic-detail-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  color: #9994ad;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: calc(13px + var(--pc-font-boost, 0px));
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
  appearance: none;
}

.topic-detail-sort-link .icon,
.topic-detail-sort-link__caret {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.topic-detail-sort-dropdown.is-open .topic-detail-sort-link__caret {
  transform: rotate(-90deg);
}

.topic-detail-sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 112px;
  padding: 6px;
  background: #1b1b1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.topic-detail-sort-menu[hidden] {
  display: none;
}

.topic-detail-sort-menu__item {
  display: block;
  padding: 10px 12px;
  color: #9994ad;
  border-radius: 8px;
  font-size: calc(13px + var(--pc-font-boost, 0px));
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
}

.topic-detail-sort-menu__item.is-active,
.topic-detail-sort-menu__item:active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 767px) {
  body.page-topic-detail .site-header,
  body.page-topic-detail header.site-header {
    display: none !important;
  }

  .topic-detail-hero {
    min-height: 0;
  }

  .topic-detail-hero .topic-subheader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom-color: transparent;
  }

  .topic-detail-hero .topic-subheader--overlay.is-scrolled {
    background: rgba(7, 6, 14, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .topic-detail-hero__bg {
    opacity: 0.5;
    filter: blur(28px);
    transform: scale(1.12);
  }

  .topic-detail-hero__mask {
    background: linear-gradient(
      180deg,
      rgba(7, 6, 14, 0.55) 0%,
      rgba(7, 6, 14, 0.5) 40%,
      #060611 100%
    );
  }

  .topic-detail-hero__inner.page-shell {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 0;
    padding: 68px 16px 20px;
  }

  .topic-detail-hero__content {
    flex: 1 1 0;
    width: auto;
    gap: 10px;
  }

  .topic-detail-hero__title {
    font-size: calc(22px + var(--pc-font-boost, 0px));
    line-height: 30px;
  }

  .topic-detail-hero__desc {
    max-width: none;
    font-size: calc(13px + var(--pc-font-boost, 0px));
    line-height: 20px;
  }

  .topic-detail-hero__meta {
    margin: 0;
    font-size: calc(11px + var(--pc-font-boost, 0px));
    line-height: 16px;
  }

  .topic-detail-hero__actions {
    width: auto;
    margin-top: 2px;
  }

  .topic-btn {
    min-width: 0;
    height: 40px;
    padding: 0 16px;
    font-size: calc(14px + var(--pc-font-boost, 0px));
    line-height: 20px;
  }

  .topic-btn .icon {
    width: 18px;
    height: 18px;
  }

  .topic-detail-hero__stack {
    width: 120px;
    height: 150px;
    margin: 0;
  }

  .topic-detail-hero__stack img {
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  }

  .topic-detail-hero__stack img:nth-child(1) {
    left: 0;
    top: 40px;
    width: 72px;
    height: 96px;
  }

  .topic-detail-hero__stack img:nth-child(2) {
    left: 22px;
    top: 22px;
    width: 72px;
    height: 96px;
  }

  .topic-detail-hero__stack img:nth-child(3) {
    left: 44px;
    top: 4px;
    width: 72px;
    height: 96px;
    box-shadow:
      0 0 0 1.5px rgba(241, 43, 158, 0.85),
      0 8px 20px rgba(0, 0, 0, 0.5);
  }

  .topic-detail-page.page-shell {
    padding: 12px 16px 24px;
    gap: 0;
  }

  .topic-detail-section {
    gap: 14px;
    padding: 16px 0;
  }

  .topic-detail-section--more {
    gap: 14px;
    padding: 8px 0 24px;
  }

  .topic-detail-section__left {
    align-items: baseline;
    gap: 10px;
  }

  .topic-detail-section__title {
    font-size: calc(18px + var(--pc-font-boost, 0px));
    line-height: 26px;
  }

  .topic-detail-section__count {
    font-size: calc(12px + var(--pc-font-boost, 0px));
    line-height: 18px;
  }

  .topic-detail-sort-dropdown {
    display: block;
  }

  .topic-grid--more {
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .topic-grid--more::-webkit-scrollbar {
    display: none;
  }

  .topic-grid--more .topic-card {
    width: 280px;
    height: 140px;
    flex-shrink: 0;
    padding-left: 16px;
    border-radius: 12px;
  }

  .topic-grid--more .topic-card__stack {
    width: 112px;
    height: 140px;
  }

  .topic-grid--more .topic-card__stack img:nth-child(1) {
    top: 56px;
  }

  .topic-grid--more .topic-card__stack img:nth-child(2) {
    top: 42px;
  }

  .topic-grid--more .topic-card__stack img:nth-child(3) {
    top: 28px;
  }
}
