/* ═══════════════════════════════════════
   8K剧库 — 详情页样式 (BEM-Lite)
   ═══════════════════════════════════════ */

/* ── Top Nav ── */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topnav__brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.topnav__brand:hover {
  text-decoration: none;
}

.topnav__back {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
}

.topnav__back:hover {
  color: var(--accent);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.3) saturate(1.2);
  transform: scale(1.1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 50%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px 40px;
  display: flex;
  gap: 32px;
  align-items: flex-end;
}

.hero__layout {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  width: 100%;
}

.hero__poster {
  flex-shrink: 0;
  width: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  border: 2px solid var(--border);
}

.hero__poster img {
  width: 100%;
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.hero__info {
  flex: 1;
  padding-bottom: 8px;
}

.hero__info h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.hero__info .original-title {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.hero__info .tagline {
  font-size: 15px;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 16px;
}

.hero__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.hero__subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.hero__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero__rating {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(224,192,151,0.25);
  font-weight: 600;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.hero__overview {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

/* ── Download Buttons ── */
.dl-group {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--border);
  cursor: pointer;
}

.dl-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.dl-btn--baidu {
  background: linear-gradient(135deg, #245bdb 0%, #3b7dff 100%);
  color: #fff;
  border-color: #3b7dff;
}

.dl-btn--baidu:hover {
  box-shadow: 0 4px 16px rgba(59,125,255,0.3);
}

.dl-btn--quark {
  background: linear-gradient(135deg, #6a5acd 0%, #9370db 100%);
  color: #fff;
  border-color: #9370db;
}

.dl-btn--quark:hover {
  box-shadow: 0 4px 16px rgba(147,112,219,0.3);
}

.dl-btn--thunder {
  background: linear-gradient(135deg, #d4a017 0%, #f0c040 100%);
  color: #1a1a2e;
  border-color: #f0c040;
}

.dl-btn--thunder:hover {
  box-shadow: 0 4px 16px rgba(240,192,64,0.3);
}

.dl-btn__icon {
  font-size: 18px;
}

.dl-btn__label {
  font-size: 12px;
  opacity: 0.85;
}

.dl-btn__sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Main Layout ── */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 60px;
}

/* ── Content Grid (主侧栏) ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  margin-top: 32px;
}

.main-content {
  min-width: 0;
}

.side-content {
  min-width: 0;
}

/* ── Sections ── */
.section {
  margin-bottom: 24px;
}

.section__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section__icon {
  font-size: 20px;
}

/* ── Empty State ── */
.empty-state {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  padding: 16px 0;
}

/* ── Quotes Container ── */
.quotes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Character Narratives ── */
.char-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.char-card:last-child {
  margin-bottom: 0;
}

/* ── Crew List Container ── */
.crew-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Info Grid ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── Related（横向滚动） ── */
.related-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.related-scroll::-webkit-scrollbar { height: 4px; }
.related-scroll::-webkit-scrollbar-track { background: transparent; }
.related-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.related-card {
  flex: 0 0 155px;
  text-decoration: none;
  color: var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
  scroll-snap-align: start;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent2);
  text-decoration: none;
}

.related-card__poster {
  position: relative;
  width: 100%;
}

.related-card__poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.related-card__rating {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(4px);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.related-card__body {
  padding: 8px 10px;
}

.related-card__title {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.related-card__genre {
  font-size: 10px;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 移动端 */
@media (max-width: 768px) {
  .related-card {
    flex: 0 0 125px;
  }
}

/* ── Ratings Overview ── */
.ratings-section {
  margin-top: 32px;
}

.ratings__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}

.ratings__row-label {
  width: 50px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.ratings__track {
  flex: 1;
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}

.ratings__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.ratings__fill--empty {
  background: var(--surface2);
}

.ratings__score {
  width: 60px;
  text-align: right;
  color: var(--text-dim);
  font-size: 12px;
  flex-shrink: 0;
}

.ratings__score--active {
  color: var(--accent);
  font-weight: 600;
}

/* ── Star Rating (维度评分) ── */
/* ── Audience Tags ── */
.audience-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.audience-chips-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-right: 4px;
  align-self: center;
}

/* ── Short Reviews ── */

/* ── Trailers Grid ── */
.trailers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.trailer-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.trailer-card__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.trailer-card__title {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Info Row (legacy compat) ── */
/* ═══════════════════════════════════════
   Mobile Responsive (≤768px)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Nav ── */
  .topnav { padding: 10px 16px; }
  .topnav__brand { font-size: 14px; }

  /* ── Hero ── */
  .hero { min-height: auto; }

  .hero__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px 24px;
    gap: 16px;
  }

  .hero__layout {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .hero__poster {
    width: 130px;
  }

  .hero__info {
    padding-bottom: 0;
  }

  .hero__info h1,
  .hero__title {
    font-size: 22px;
  }

  .hero__info .original-title,
  .hero__subtitle {
    font-size: 12px;
  }

  .hero__meta {
    font-size: 12px;
    justify-content: center;
  }

  .hero__chips {
    justify-content: center;
    gap: 6px;
  }

  .hero__chip {
    font-size: 12px;
    padding: 4px 10px;
  }

  .hero__overview {
    font-size: 14px;
    text-align: left;
  }

  /* ── Download Buttons ── */
  .dl-group {
    justify-content: center;
    gap: 8px;
  }

  .dl-btn {
    padding: 8px 16px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
  }

  /* ── Main ── */
  .main {
    padding: 0 16px 40px;
  }

  /* ── Content Grid → 单列 ── */
  .content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
  }

  /* ── Section ── */
  .section__title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  /* ── Info Grid → 单列 ── */
  .info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* ── Score Bars ── */
  .score-bars {
    padding: 12px 14px;
    gap: 4px 12px;
  }

  .score-bars__row {
    min-width: 80px;
    font-size: 12px;
  }

  /* ── Ratings ── */
  .ratings__row {
    font-size: 12px;
    gap: 8px;
  }

  .ratings__row-label {
    width: 42px;
  }

  /* ── Quotes ── */
  .quotes__item {
    padding: 14px 16px;
  }

  .quotes__text {
    font-size: 14px;
  }

  .quotes__context {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* ── Character Cards ── */
  .char-card {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .char-card__avatar {
    width: 40px;
    height: 40px;
  }

  .char-card__narrative,
  .char-card__paragraph {
    font-size: 12px;
  }

  /* ── Short Reviews ── */
  .short-reviews__text {
    font-size: 13px;
  }

  .short-reviews__item {
    padding: 12px 0;
  }

  /* ── Crew List ── */
  .crew-list__item {
    gap: 8px;
  }

  .crew-list__avatar {
    width: 30px;
    height: 30px;
  }

  .crew-list__name {
    font-size: 12px;
  }

  /* ── Audience Chips ── */
  .audience-chips {
    gap: 6px;
    padding-top: 12px;
  }

  /* ── 猫眼预告片网格 ── */
  .trailers-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .trailer-card__title {
    font-size: 12px;
    padding: 8px 10px;
  }

  /* ── Narrative Cards (猫眼人物叙事) ── */
  .narrative-card {
    flex-direction: column;
    gap: 10px;
  }
}

/* ── 超小屏 (≤400px) ── */
@media (max-width: 400px) {
  .hero__poster { width: 110px; }
  .hero__info h1 { font-size: 20px; }
  .dl-btn { font-size: 12px; padding: 8px 12px; }
}

/* ═══════════════════════════════════════
   Runtime-generated content — BEM aliases
   ═══════════════════════════════════════ */

/* ── Score Bars (was .star-rating) ── */
.score-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.score-bars__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  min-width: 100px;
}

.score-bars__label {
  color: var(--text-dim);
  width: 36px;
  flex-shrink: 0;
}

.score-bars__value {
  color: var(--accent);
  letter-spacing: 2px;
  font-size: 14px;
}

/* ── Info Grid Items (was .info-item) ── */
.info-grid__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.info-grid__icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.4;
}

.info-grid__body {
  flex: 1;
  min-width: 0;
}

.info-grid__label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.info-grid__value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

.info-grid__value.empty {
  color: var(--text-dim);
  font-weight: 400;
  font-style: italic;
}

/* ── Crew List Items (was .crew-item) ── */
.crew-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crew-list__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.crew-list__name {
  font-size: 13px;
  font-weight: 500;
}

.crew-list__role {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Short Reviews (was .short-reviews-section) ── */
.short-reviews {
  margin-top: 32px;
}

.short-reviews__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.short-reviews__item:last-child {
  border-bottom: none;
}

.short-reviews__stars {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.short-reviews__text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.short-reviews__text::before { content: '\201c'; }
.short-reviews__text::after  { content: '\201d'; }

.short-reviews__meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

.short-reviews__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-right: 6px;
  vertical-align: middle;
}

/* ── Quotes (was .quote-list) ── */
.quotes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quotes__item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  border-left: 3px solid var(--accent2);
  position: relative;
}

.quotes__title {
  font-size: 13px;
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: 6px;
}

.quotes__text {
  font-size: 15px;
  font-style: italic;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 8px;
}

.quotes__text::before { content: '\201c'; color: var(--accent); }
.quotes__text::after  { content: '\201d'; color: var(--accent); }

.quotes__source {
  font-size: 12px;
  color: var(--text-dim);
}

.quotes__context {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--surface2);
  border-radius: 6px;
  line-height: 1.5;
}

.quotes__context::before {
  content: '📖 ';
}

/* ── Character Card children (was .char-avatar etc.) ── */
.char-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--surface2);
}

.char-card__info {
  flex: 1;
}

.char-card__name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.char-card__role {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.char-card__narrative {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
}

.char-card__paragraph {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 8px;
}

.char-card__paragraph:last-child {
  margin-bottom: 0;
}

.char-card__paragraph::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
