/* Video detail — single DOM, PC + H5 */

.video-detail-static {
  --vd-accent: #ecd227;
  --vd-ink: #0d0d0d;
  --vd-red: #f54336;
  --vd-surface: rgba(255, 255, 255, 0.05);
  --vd-border: rgba(255, 255, 255, 0.1);
  --vd-muted: rgba(255, 255, 255, 0.55);
}

.video-detail-static .video-crumb__current {
  color: var(--vd-muted);
}

.video-detail-layout {
  display: flex;
  width: 100%;
  align-items: flex-start;
}

.video-detail-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  flex: 1;
}

.video-detail-alert {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #ffb4a8;
  background: rgba(245, 67, 54, 0.12);
  border: 1px solid rgba(245, 67, 54, 0.28);
  font-size: 14px;
  line-height: 1.4;
}

/* Player — DPlayer + poster overlay（对齐 91porn） */
.video-detail-player {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  height: 0;
  padding-bottom: 56.25%; /* 16 / 9 */
}

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

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

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

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

.video-detail-player__play,
.video-detail-player .playBtn {
  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: 10;
  width: 84px;
  height: 84px;
}

.video-detail-player__play img,
.video-detail-player .playBtn {
  display: block;
  width: 84px;
  height: 84px;
}

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

.video-detail-player__progress {
  position: relative;
  width: 100%;
}

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

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

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

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

.video-detail-player__left,
.video-detail-player__right {
  display: flex;
  align-items: center;
}

.video-detail-player__time {
  color: #aaa;
  font-family: Inter, "PingFang SC", sans-serif;
  font-weight: 500;
  white-space: nowrap;
}

.video-detail-player__icon {
  display: block;
  background: #fff;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

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

.video-detail-player__icon--vol {
  border-radius: 2px;
  opacity: 0.95;
}

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

/* Tabs */
.video-detail-tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.video-detail-tabs::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.video-detail-tabs[role="tablist"] {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.video-detail-tabs[role="tablist"]::after {
  display: none;
}

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

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

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

.video-detail-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

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

.video-detail-info__title {
  margin: 0;
  color: #fff;
  font-weight: 600;
  word-break: break-word;
}

.video-detail-info__desc {
  margin: 0;
  color: var(--vd-muted);
  font-weight: 400;
  word-break: break-word;
}

.video-detail-info__meta {
  margin: 0;
  color: var(--vd-muted);
  font-weight: 400;
}

.video-detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  align-self: stretch;
}

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

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

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

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

.video-detail-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.video-detail-tags__label {
  color: var(--vd-muted);
  white-space: nowrap;
}

.video-detail-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Actions */
.video-detail-actions--pc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

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

.video-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);
}

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

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

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

.video-detail-download img {
  display: block;
  filter: brightness(0);
}

.video-detail-actions--h5 {
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--vd-surface);
  border: 1px solid var(--vd-border);
  box-sizing: border-box;
}

.video-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;
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
}

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

.video-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);
}

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

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

/* Recommend */
.video-detail-recommend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.video-detail-recommend__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-detail-recommend__bar {
  width: 4px;
  height: 14px;
  border-radius: 3px;
  background: var(--vd-accent);
}

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

/* Aside */
.video-detail-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

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

.video-detail-aside__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-detail-aside__list .video-card {
  width: 365px;
}

.video-detail-aside__list .video-card__media {
  border-radius: 18px;
}

.video-detail-aside__list .video-card__media::before {
  padding-bottom: 56.712329%; /* 207 / 365 */
}

.video-detail-aside__list .video-card__title {
  font-size: 20px;
  line-height: 28px;
  -webkit-line-clamp: 2;
}

.video-detail-aside__list .video-card__tags {
  font-size: 16px;
  line-height: 22px;
}

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

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

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

  .video-detail-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .video-detail-main {
    width: 100%;
    align-self: stretch;
    gap: 18px;
  }

  .video-detail-static .video-crumb {
    font-size: 12px;
    line-height: 18px;
    color: #fff;
  }

  .video-detail-player {
    height: 190px;
    border-radius: 12px;
  }

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

  .video-detail-player__bar {
    padding: 0 0 8px;
  }

  .video-detail-player__progress {
    height: 2px;
    margin: 0 12px 8px;
  }

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

  .video-detail-player__controls {
    padding: 0 12px;
  }

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

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

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

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

  .video-detail-tabs[role="tablist"] {
    gap: 24px;
  }

  .video-detail-panel[data-panel-content="detail"] {
    gap: 18px;
  }

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

  .video-detail-info__desc {
    font-size: 12px;
    line-height: 18px;
    text-align: justify;
  }

  .video-detail-info__meta {
    font-size: 14px;
    line-height: 20px;
  }

  .video-detail-author__avatar {
    width: 48px;
    height: 48px;
  }

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

/* ========== PC ========== */
@media (min-width: 769px) {
  .video-detail-static .video-view {
    padding: 30px 320px 60px;
  }

  .video-detail-layout {
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
  }

  .video-detail-main {
    width: 952px;
    flex: 0 0 952px;
    max-width: 100%;
    gap: 30px;
  }

  .video-detail-static .video-crumb {
    font-size: 18px;
    line-height: 24px;
    color: #fff;
  }

  .video-detail-player {
    height: 535px;
    border-radius: 24px;
  }

  .video-detail-player__bar {
    padding: 0 30px 30px;
    gap: 25px;
  }

  .video-detail-player__progress {
    height: 4px;
  }

  .video-detail-player__knob {
    width: 12px;
    height: 12px;
  }

  .video-detail-player__left {
    gap: 24px;
  }

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

  .video-detail-player__time {
    font-size: 18px;
    line-height: 23.4px;
  }

  .video-detail-player__icon {
    width: 24px;
    height: 24px;
  }

  .video-detail-panel[data-panel-content="detail"] {
    gap: 30px;
  }

  .video-detail-info__title {
    font-size: 24px;
    line-height: 32px;
  }

  .video-detail-info__desc {
    font-size: 16px;
    line-height: 22px;
  }

  .video-detail-info__meta {
    font-size: 18px;
    line-height: 24px;
  }

  .video-detail-tags__label {
    font-size: 18px;
    line-height: 24px;
  }
}

@media (min-width: 769px) and (max-width: 1600px) {
  .video-detail-static .video-view {
    padding-left: 48px;
    padding-right: 48px;
  }

  .video-detail-main {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    max-width: 952px;
  }

  .video-detail-aside__list .video-card {
    width: 100%;
    max-width: 365px;
  }
}
