/* ============================================================
   MacCMS 2025 · Detail Page Styles
   详情页专属: 沉浸式头部 / 元数据面板 / 影评 / Q&A
   ============================================================ */

/* ── Immersive Header ── */
.detail-hero {
  position: relative;
  overflow: hidden;
}
.detail-hero__bg {
  position: absolute; inset: 0; z-index: 0;
}
.detail-hero__bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.detail-hero__bg--bottom {
  filter: blur(50px) brightness(0.28);
  transform: scale(1.12);
}
.detail-hero__bg--top {
  filter: blur(15px) brightness(0.5);
  transform: scale(1.05);
  opacity: 0.45;
}
.detail-hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 40% 50% at 30% 50%, transparent 0%, rgba(8,8,16,0.35) 100%),
    linear-gradient(to top, #080810 0%, transparent 40%);
}

.detail-hero__layout {
  display: flex;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(32px, 5vh, 64px) 0;
  position: relative;
  z-index: 1;
}
.detail-hero__poster {
  flex-shrink: 0;
  width: clamp(180px, 24vw, 310px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 40px rgba(0,0,0,0.5);
}
.detail-hero__poster img {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block;
}
.detail-hero__info {
  flex: 1; min-width: 0;
}
.detail-hero__tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.detail-hero__class-tags {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
}
.detail-hero__actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}

/* ── Breadcrumb ── */
.breadcrumb {
  padding: clamp(8px, 1.5vh, 16px) 0;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--text-secondary); }
.breadcrumb__sep { margin: 0 4px; color: var(--text-tertiary); }
.breadcrumb__cur { color: var(--text-secondary); }

/* ── Detail Panels (三栏) ── */
.detail-panels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(16px, 2.5vw, 28px);
}
.detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(14px, 2vw, 22px);
}
.detail-panel__heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ── Meta List (影片信息/演职) ── */
.meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.meta-item {
  display: flex; gap: 8px;
  font-size: 0.8rem; line-height: 1.8;
}
.meta-item__label {
  color: var(--text-tertiary);
  flex-shrink: 0; min-width: 52px;
}
.meta-item__value {
  color: var(--text-secondary);
}
.meta-item__value a {
  color: var(--text-secondary);
}

/* ── Description ── */
.desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8; max-width: 72ch;
}
.desc--collapsed {
  max-height: 4.5em; overflow: hidden;
}
.desc-toggle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  cursor: pointer;
  margin-top: 8px;
  border: none; background: transparent;
}
.desc-toggle:hover { color: var(--gold); }

/* ── Review Card ── */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.review-card__header {
  padding: clamp(14px, 2vw, 20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; gap: 10px;
}
.review-card__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: rgba(232,168,56,0.1);
  border-radius: 8px;
  font-size: 0.75rem; font-weight: 600; color: var(--gold);
  flex-shrink: 0;
}
.review-card__title {
  font-size: 0.9rem; font-weight: 500; color: var(--text-primary); flex: 1;
}
.review-expand-btn {
  font-size: 0.68rem; color: var(--text-tertiary);
  cursor: pointer; user-select: none; flex-shrink: 0;
}
.review-body {
  padding: clamp(14px, 2vw, 20px);
  font-size: 0.82rem; color: var(--text-secondary);
  line-height: 1.85;
  max-height: 120px; overflow: hidden;
  position: relative;
  transition: max-height 0.4s cubic-bezier(0.25,0,0,1);
}
.review-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, #12121E);
  pointer-events: none;
}

/* ── Cast Section ── */
.cast-scroll {
  display: flex;
  gap: clamp(10px, 1.5vw, 16px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px;
  margin-bottom: clamp(16px, 2vw, 24px);
}
.cast-scroll::-webkit-scrollbar { display: none; }
.cast-card {
  flex-shrink: 0;
  width: clamp(110px, 16vw, 140px);
  scroll-snap-align: start;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s;
}
.cast-card:hover { transform: translateY(-2px); }
.cast-card__avatar {
  width: 100%; aspect-ratio: 3/4;
  border-radius: 10px; overflow: hidden;
  background: var(--bg-surface);
  margin-bottom: 8px;
}
.cast-card__avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.cast-card__avatar-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(232,168,56,0.15), rgba(107,92,231,0.15));
  font-size: 1.6rem; color: var(--text-primary); font-family: var(--serif);
}
.cast-card__name {
  font-size: 0.8rem; font-weight: 500; color: var(--text-primary); line-height: 1.3;
}
.cast-card__role {
  font-size: 0.65rem; color: var(--text-tertiary); margin-top: 2px;
}

/* ── Role List ── */
.role-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: clamp(8px, 1vw, 12px);
  margin-bottom: clamp(16px, 2vw, 24px);
}
.role-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.role-item__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(232,168,56,0.2), rgba(107,92,231,0.2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--text-primary); flex-shrink: 0;
}
.role-item__name {
  font-size: 0.8rem; font-weight: 500; color: var(--text-primary);
}
.role-item__role {
  font-size: 0.68rem; color: var(--text-secondary);
}

/* ── Screenshot Scroll ── */
.screenshot-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.screenshot-scroll::-webkit-scrollbar { display: none; }
.screenshot-scroll img {
  flex-shrink: 0;
  width: clamp(200px, 30vw, 320px);
  aspect-ratio: 16/9; object-fit: cover;
  border-radius: 8px;
  scroll-snap-align: start;
}

/* ── Related Topics ── */
.topic-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: clamp(10px, 1.5vw, 16px);
}
.topic-related-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.25,0,0,1), border-color 0.3s;
}
.topic-related-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);
}
.topic-related-card__thumb {
  width: 56px; height: 56px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
}
.topic-related-card__thumb-placeholder {
  width: 56px; height: 56px; border-radius: 10px;
  background: linear-gradient(135deg, #1A1A2A, #12121E);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.topic-related-card__name {
  font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 3px;
}
.topic-related-card__sub {
  font-size: 0.72rem; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topic-related-card__hits {
  font-size: 0.65rem; color: var(--text-tertiary); margin-top: 4px;
}

/* ── Detail Meta Links ── */
.detail-meta-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.detail-meta-links a:hover {
  color: var(--gold);
  border-bottom-color: rgba(232,168,56,0.35);
}

.qa-movie-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.qa-movie-link:hover {
  color: var(--gold);
  border-bottom-color: rgba(232,168,56,0.35);
}

@media (hover: none) and (pointer: coarse) {
  .detail-meta-links a {
    color: #8B8799;
    border-bottom: 1px dotted rgba(255,255,255,0.2);
  }
}

@media (hover: none) and (pointer: coarse) {
  .qa-movie-link {
    color: #8B8799;
    border-bottom: 1px dotted rgba(255,255,255,0.2);
  }
}

/* ── Play Button Bar (mobile fixed) ── */
.detail-play-fixed {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: var(--space-sm) var(--page-padding);
  background: rgba(8,8,16,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: var(--z-sticky);
  display: none;
}

/* ── Hero Info Tags ── */
.hero-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
}
.hero-tag--gold {
  background: rgba(232,168,56,0.12);
  color: var(--gold);
  font-weight: 500;
}
.hero-tag--muted {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}

/* ── Responsive ── */
@media (max-width: 1023px) {
  .detail-hero__layout {
    flex-direction: column;
    text-align: center;
  }
  .detail-hero__poster {
    width: clamp(160px, 34vw, 240px);
    margin: 0 auto;
  }
  .breadcrumb { justify-content: center; }
  .detail-hero__tags,
  .detail-hero__class-tags,
  .detail-hero__actions {
    justify-content: center;
  }
  .detail-panels {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .detail-hero__layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .detail-hero__poster {
    width: clamp(140px, 42vw, 200px);
    margin: 0 auto;
  }
  .detail-panels {
    grid-template-columns: 1fr;
  }
  .detail-play-fixed { display: flex; }
  .meta-list { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
  .detail-hero__poster { width: clamp(110px, 38vw, 150px); }
  .detail-panels { gap: 10px; }
}
