/* Chi tiết phim: hero, tập, form lưu (phần 4/9, tách từ main.css). */
/* Thứ tự nạp (cascade) của bộ: base → hero → cards → movie → watch → account → categories → search → chrome → motion. */
/* ============ Chi tiết phim ============ */
/* Không dùng ảnh nền: atmosphere WebGL (nebula + bụi vàng) chạy scope 'page' —
   canvas cố định theo viewport, hiện xuyên qua phần trong suốt của hero.
   Hero chỉ giữ 2 quầng radial làm điểm nhấn, không nền đục. */
.movie-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 480px at 76% 12%, rgba(255, 184, 0, 0.08), transparent 70%),
    radial-gradient(760px 620px at 18% 34%, rgba(255, 170, 0, 0.07), transparent 68%);
}
.movie-hero-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.breadcrumb-hero {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(213, 196, 171, 0.8);
  margin-bottom: 0;
}
.breadcrumb-hero .icon { color: var(--text-muted); }
.breadcrumb-hero a { color: inherit; }
.breadcrumb-hero a:hover { color: var(--gold-bright); }
.breadcrumb-hero .is-current { color: var(--gold-bright); font-weight: 600; }
.movie-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}
@media (min-width: 1024px) { .movie-hero-grid { grid-template-columns: 4fr 8fr; } }
.movie-poster-col { position: relative; display: flex; flex-direction: column; gap: var(--space-md); }
.poster-ambient {
  position: absolute;
  top: 0; left: 0; right: 0;
  aspect-ratio: 16 / 9;
  z-index: 0;
  opacity: 0.72;
  pointer-events: none;
  transform: scale(1.14) translateY(2%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 22%, #000 32%, transparent 76%);
  mask-image: radial-gradient(120% 90% at 50% 22%, #000 32%, transparent 76%);
}
.poster-ambient img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(52px) saturate(1.3) brightness(0.9);
}
.movie-poster-frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  outline: 1px solid rgba(255, 255, 255, 0.05);
}
.poster-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.poster-media img { width: 100%; height: 100%; object-fit: cover; }
.poster-media .card-poster-fallback { font-size: 72px; }
.poster-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(14, 14, 14, 0.5) 0%, rgba(19, 19, 19, 0) 40%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}
.poster-episode-note {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: rgba(14, 14, 14, 0.8);
  backdrop-filter: blur(12px);
  outline: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  line-height: 14px;
  color: var(--text-secondary);
}
/* badge trạng thái đã bỏ (yêu cầu chủ 28/11) — note chỉ còn số tập */
.poster-episode-note span { color: var(--gold-bright); font-weight: 600; }
.poster-quickbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  background: var(--card);
  border-radius: var(--radius-lg);
  outline: 1px solid rgba(255, 255, 255, 0.05);
}
.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease;
}
.quick-btn:hover { color: var(--gold-bright); background: var(--surface); }
/* Form lưu phim bao ngoài nút — cho nút thành grid item chính để dàn đều 3 ô */
.poster-quickbar form { display: contents; }
.quick-btn .icon { transition: transform 200ms ease; }
.quick-btn:hover .icon { transform: translateY(-2px); }
.quick-btn.is-active, .quick-btn.is-active .icon { color: var(--gold-bright); }
.movie-info-col { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 30px;
}
.chip:hover { border-color: var(--border); color: var(--text); }
.chip.is-active { background: rgba(255, 220, 161, 0.1); border-color: rgba(255, 220, 161, 0.3); color: var(--gold-bright); }
.chip-ai {
  background: rgba(255, 220, 161, 0.1);
  border-color: rgba(255, 220, 161, 0.3);
  color: var(--gold-bright);
  text-transform: uppercase;
}
.movie-title { font-size: clamp(36px, 4vw, 48px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; }
.synopsis-heading {
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 4px;
}
.movie-desc { color: rgba(229, 226, 225, 0.9); font-size: 16px; line-height: 26px; }
.movie-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.resume-btn { display: inline-flex; align-items: center; gap: 12px; }
.resume-btn-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 220, 161, 0.2);
  color: var(--gold-bright);
  flex-shrink: 0;
  transition: background 200ms ease, color 200ms ease;
}
.resume-btn:hover .resume-btn-icon { background: var(--gold-bright); color: #412d00; }
.resume-btn-text { display: flex; flex-direction: column; text-align: left; }
.resume-btn-text small { font-size: 11px; line-height: 14px; color: var(--text-secondary); font-weight: 400; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
}
.badge-success { color: var(--success); border-color: rgba(76, 175, 128, 0.5); }
.badge-live { color: var(--gold); border-color: rgba(255, 184, 0, 0.45); }
.badge-danger { color: var(--error); border-color: rgba(255, 180, 171, 0.4); }
.badge-muted { color: var(--text-muted); }

/* ---- Danh sách tập: lưới nút số tập (không thumbnail) ---- */
.episodes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(53, 53, 52, 0.5);
  margin-bottom: var(--space-lg);
}
.episodes-title-wrap { display: flex; align-items: center; gap: 12px; }
.episodes-accent { width: 6px; height: 24px; border-radius: 999px; background: var(--gold); }
.ep-range-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-range-tab {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.ep-range-tab:hover { color: var(--gold-bright); border-color: var(--gold-deep); }
.ep-range-tab.is-active { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.ep-grid[hidden] { display: none; }
.ep-btn {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.ep-btn:hover { background: var(--interactive); border-color: var(--gold-deep); color: var(--gold-bright); }
.ep-btn.is-current { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.ep-btn.is-done { color: var(--gold-bright); }
.ep-btn.is-current.is-done { color: var(--on-gold); }
.ep-btn-check { position: absolute; top: 3px; right: 5px; line-height: 0; color: var(--success); }
.ep-btn.is-current .ep-btn-check { color: var(--on-gold); }
