/* Post Detail — Figma PC / H5 (#0F0F0F / #ECD227) */

.post-detail-static {
  --pd-bg: #0f0f0f;
  --pd-surface: rgba(255, 255, 255, 0.05);
  --pd-line: rgba(255, 255, 255, 0.1);
  --pd-muted: rgba(255, 255, 255, 0.55);
  --pd-accent: #ecd227;
  --pd-danger: #f54336;
  --pd-pink: #ea1e61;
  --pd-ink: #0d0d0d;
}

.post-detail-static .post-view {
  display: flex;
  justify-content: center;
  width: 100%;
  /* 大屏居中 1280；缩窄时左右边距压到 48（对齐 video-detail） */
  padding: 30px max(48px, calc((100% - 1280px) / 2));
  box-sizing: border-box;
  background: var(--pd-bg);
}

.post-detail-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 1280px;
  min-width: 0;
}

/* 主栏可缩；侧栏按卡片固宽（对齐 video-detail 热门视频） */
.post-detail-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 36px;
  flex: 1 1 0;
  width: auto;
  max-width: 919px;
  min-width: 0;
}

.post-detail-main > .detail-nine-grid--scroll,
.post-detail-main > .detail-nine-grid--row,
.post-detail-main > .detail-nine-grid--wrap {
  align-self: stretch;
  min-width: 0;
  max-width: 100%;
}

.post-detail-divider {
  width: 1px;
  align-self: stretch;
  flex: 0 0 auto;
  margin: 0 40px;
  background: var(--pd-line);
}

.post-detail-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.post-detail-aside__title {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 36px;
  font-weight: 600;
}

.post-detail-aside__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Crumb */
.post-detail-crumb {
  align-self: stretch;
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-detail-crumb__current {
  color: var(--pd-muted);
}

/* Article */
.post-detail-article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  align-self: stretch;
}

.post-detail-article__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 40px;
  object-fit: cover;
  background: #525252;
}

.post-detail-article__text {
  margin: 0;
  align-self: stretch;
  text-align: justify;
  color: var(--pd-muted);
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  word-wrap: break-word;
}

/* Player — 随主栏宽度等比（Figma 919×535） */
.post-detail-player {
  position: relative;
  align-self: stretch;
  width: 100%;
  height: 0;
  padding-bottom: 58.215452%; /* 535 / 919 */
  overflow: hidden;
  border-radius: 24px;
  background: #000;
}

.post-detail-player .dplayer-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.post-detail-player .dplayer {
  width: 100%;
  height: 100%;
}

.post-detail-player__cover {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.post-detail-player__cover.video-player__poster--hidden {
  opacity: 0;
  visibility: hidden;
}

.post-detail-player__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  z-index: 2;
}

.post-detail-player__play img {
  display: block;
  width: 84px;
  height: 84px;
}

.post-detail-player__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 0 20px 28px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 100%);
  box-sizing: border-box;
}

.post-detail-player__progress {
  position: relative;
  width: 100%;
  height: 4px;
}

.post-detail-player__track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: #fff;
  opacity: 0.3;
}

.post-detail-player__fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 16%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #fff 0%, #999 100%);
}

.post-detail-player__knob {
  position: absolute;
  top: 50%;
  left: 16%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #fff;
}

.post-detail-player__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.post-detail-player__left,
.post-detail-player__right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.post-detail-player__right {
  gap: 20px;
}

.post-detail-player__time {
  color: #aaa;
  font-size: 18px;
  line-height: 23.4px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-weight: 500;
  white-space: nowrap;
}

.post-detail-player__icon {
  display: block;
  width: 24px;
  height: 24px;
  background: #fff;
  flex-shrink: 0;
}

.post-detail-player__icon--play {
  clip-path: polygon(20% 10%, 90% 50%, 20% 90%);
}

.post-detail-player__icon--vol,
.post-detail-player__icon--pip,
.post-detail-player__icon--fs {
  border-radius: 2px;
  opacity: 0.95;
}

/* Tabs */
.post-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-self: stretch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.post-detail-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 0 2px;
  color: var(--pd-muted);
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
  position: relative;
}

.post-detail-tab--active {
  color: var(--pd-accent);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.post-detail-tab--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 17px;
  height: 2px;
  margin-left: -8.5px;
  background: var(--pd-accent);
  border-radius: 2px 2px 0 0;
}

/* Panels */
.post-detail-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 36px;
  width: 100%;
}

.post-detail-panel[hidden] {
  display: none !important;
}

.post-detail-panel--comment {
  gap: 24px;
}

.post-detail-panel--comment .comment {
  width: 100%;
}

/* Info */
.post-detail-info {
  display: flex;
  flex-direction: column;
  gap: 36px;
  align-self: stretch;
}

.post-detail-info__title {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  word-break: break-word;
}

.post-detail-info__byline {
  margin: 0;
  color: var(--pd-muted);
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
}

.post-detail-info__author-part,
.post-detail-info__stats {
  display: inline;
}

.post-detail-info__author-prefix {
  display: none;
}

.post-detail-info__byline-sep {
  display: inline;
}

/* Tags */
.post-detail-tags {
  display: flex;
  align-items: center;
  gap: 18px;
  align-self: stretch;
  flex-wrap: wrap;
}

.post-detail-tags__label {
  color: var(--pd-muted);
  font-size: 18px;
  line-height: 24px;
  flex-shrink: 0;
}

.post-detail-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

/* Author */
.post-detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: stretch;
}

.post-detail-author__avatar {
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
  background: #464646;
}

.post-detail-author__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-detail-author__name {
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.post-detail-author__count {
  color: var(--pd-muted);
  font-size: 14px;
  line-height: 20px;
}

/* Actions PC — Figma: solid accent icon circles */
.post-detail-actions--pc {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-detail-action-group {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.post-detail-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  font-family: inherit;
  cursor: pointer;
}

.post-detail-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: rgba(255, 225, 32, 0.1);
  flex-shrink: 0;
}

.post-detail-action--on .post-detail-action__icon {
  background: var(--pd-accent);
}

.post-detail-action__icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.post-detail-action-group__sep {
  width: 2px;
  height: 19px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.post-detail-download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--pd-accent);
  border-radius: 12px;
  color: var(--pd-ink);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
}

.post-detail-download img {
  display: block;
}

/* Actions H5 */
.post-detail-actions--h5 {
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  padding: 10px 12px;
  background: var(--pd-surface);
  border-radius: 12px;
  border: 1px solid var(--pd-line);
  box-sizing: border-box;
}

.post-detail-action-h5 {
  display: inline-flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.post-detail-action-h5 > span:not(.post-detail-action-h5__icon),
.post-detail-action-h5__label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.post-detail-action-h5__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 225, 32, 0.1);
}

.post-detail-action-h5__icon img {
  width: 12px;
  height: 12px;
  display: block;
}

.post-detail-action-h5--active .post-detail-action-h5__icon {
  background: var(--pd-accent);
}

/* Pager */
.post-detail-pager {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  min-height: 146px;
  padding: 24px 30px;
  background: var(--pd-surface);
  border-radius: 18px;
  border: 1px solid var(--pd-line);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.post-detail-pager__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.post-detail-pager__item--next {
  text-align: right;
}

.post-detail-pager__label {
  color: #fff;
  font-size: 24px;
  line-height: 30px;
  font-weight: 400;
}

.post-detail-pager__title {
  color: var(--pd-muted);
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-detail-pager__sep {
  width: 2px;
  height: 96px;
  flex-shrink: 0;
  align-self: center;
  background: var(--pd-line);
}

/* Hot aside — 对齐 video-detail 热门视频：固宽卡片、标题两行、标签可换行 */
.post-detail-hot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 269px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 9px;
  color: inherit;
}

.post-detail-hot__main {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.post-detail-hot__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #343434;
}

.post-detail-hot__media::before {
  content: "";
  display: block;
  width: 100%;
  padding-bottom: 38.66171%; /* 104 / 269 */
}

.post-detail-hot__cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-detail-hot__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 6px 12px 0;
  box-sizing: border-box;
  background: var(--pd-surface);
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.post-detail-hot__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 6px 12px;
  box-sizing: border-box;
  background: var(--pd-surface);
  color: var(--pd-muted);
  font-size: 14px;
  line-height: 20px;
}

.post-detail-hot__tags .tag-link,
.post-detail-hot__tags span {
  color: inherit;
  text-decoration: none;
}

.post-detail-hot__tags .tag-link:hover {
  color: var(--pd-accent);
}

/* Recommend H5 */
.post-detail-recommend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  align-self: stretch;
}

.post-detail-recommend__head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.post-detail-recommend__bar {
  width: 4px;
  height: 14px;
  background: var(--pd-accent);
  border-radius: 3px;
  flex-shrink: 0;
}

.post-detail-recommend__title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.post-detail-recommend__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.post-detail-rec-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.post-detail-rec-card__cover-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 49.404762%; /* 83 / 168，随宽度等比缩小 */
  overflow: hidden;
  border-radius: 9px;
  background: #343434;
}

.post-detail-rec-card__cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-detail-rec-card__badge {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  color: var(--pd-pink);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 400;
}

.post-detail-rec-card__title {
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-detail-rec-card__tags {
  color: var(--pd-muted);
  font-size: 12px;
  line-height: 18px;
}

/* Visibility helpers */
@media (max-width: 768px) {
  .pd-only-pc {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .pd-only-h5 {
    display: none !important;
  }

  /* PC Figma order: title/meta → tags → author → actions */
  .post-detail-panel[data-panel-content="detail"] {
    display: flex;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-info {
    order: 1;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-tags {
    order: 2;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-author {
    order: 3;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-actions--pc {
    order: 4;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-pager {
    order: 5;
  }

  .post-detail-panel[data-panel-content="detail"] .detail-links {
    order: 6;
  }

  .post-detail-panel[data-panel-content="detail"] .detail-banners {
    order: 7;
  }
}

/* ==========================================================================
   H5
   ========================================================================== */
@media (max-width: 768px) {
  .post-detail-static .post-view {
    padding: 12px 16px 32px;
  }

  .post-detail-layout {
    flex-direction: column;
    max-width: none;
  }

  .post-detail-main {
    width: 100%;
    gap: 18px;
  }

  .post-detail-crumb {
    font-size: 12px;
    line-height: 18px;
  }

  .post-detail-article {
    gap: 12px;
  }

  .post-detail-article__img {
    border-radius: 12px;
    aspect-ratio: 343 / 193;
  }

  .post-detail-article__text {
    color: #fff;
    font-size: 14px;
    line-height: 20px;
  }

  .post-detail-player {
    height: 190px;
    padding-bottom: 0;
    border-radius: 12px;
  }

  .post-detail-player__play img {
    width: 36px;
    height: 36px;
  }

  .post-detail-player__bar {
    gap: 12px;
    padding: 0 12px 10px;
  }

  .post-detail-player__progress {
    height: 2px;
  }

  .post-detail-player__knob {
    width: 6px;
    height: 6px;
  }

  .post-detail-player__left {
    gap: 12px;
  }

  .post-detail-player__icon {
    width: 16px;
    height: 16px;
  }

  .post-detail-player__time {
    font-size: 12px;
    line-height: 19.2px;
    font-weight: 400;
  }

  .post-detail-tabs {
    gap: 24px;
  }

  .post-detail-panel {
    gap: 18px;
  }

  /* H5 Figma: info → actions → tags → pager → recommend → links → apps → banners */
  .post-detail-panel[data-panel-content="detail"] .post-detail-info {
    order: 1;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-actions--h5 {
    order: 2;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-tags {
    order: 3;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-pager {
    order: 4;
  }

  .post-detail-panel[data-panel-content="detail"] .post-detail-recommend {
    order: 5;
  }

  .post-detail-panel[data-panel-content="detail"] .detail-links {
    order: 6;
  }

  .post-detail-panel[data-panel-content="detail"] .detail-nine-grid--wrap {
    order: 7;
  }

  .post-detail-panel[data-panel-content="detail"] .detail-banners {
    order: 8;
  }

  .post-detail-info {
    gap: 6px;
    overflow: hidden;
  }

  .post-detail-info__title {
    font-size: 18px;
    line-height: 24px;
  }

  .post-detail-info__byline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
  }

  .post-detail-info__author-part,
  .post-detail-info__stats {
    display: block;
  }

  .post-detail-info__author-prefix {
    display: inline;
  }

  .post-detail-info__byline-sep {
    display: none;
  }

  .post-detail-tags {
    gap: 12px;
  }

  .post-detail-tags__label {
    font-size: 14px;
    line-height: 20px;
  }

  .post-detail-pager {
    min-height: 0;
  }

  .post-detail-pager__label {
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
  }

  .post-detail-pager__title {
    font-size: 12px;
    line-height: 18px;
  }

  .post-detail-pager__sep {
    width: 1px;
  }

  .post-detail-panel--comment {
    gap: 12px;
  }
}

/* PC 缩窄：对齐 video-detail — 主栏吃剩余空间，侧栏卡片不超过设计宽 */
@media (min-width: 769px) and (max-width: 1600px) {
  .post-detail-main {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    max-width: 919px;
  }

  .post-detail-hot {
    width: 100%;
    max-width: 269px;
  }
}

