/* Kệ phim, thẻ phim, tiếp tục xem, quảng cáo, callout + trang danh sách v1 (phần 3/9, tách từ main.css). */
/* Thứ tự nạp (cascade) của bộ: base → hero → cards → movie → watch → account → categories → search → chrome → motion. */
/* ============ Kệ phim + thẻ ============ */
.shelf { margin-top: var(--space-xl); }
.page-container > .shelf:first-child,
.page-container > .shelf:first-of-type { margin-top: 0; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); }
.shelf-head-left { display: flex; align-items: center; gap: var(--space-sm); }
.shelf-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.shelf-more:hover { color: var(--gold); }
.shelf-more .icon { transition: transform 200ms ease; }
.shelf-more:hover .icon { transform: translateX(4px); }
.shelf-note { color: var(--text-muted); font-size: 11px; }
.shelf-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scrollbar-width: thin;
}

/* Ảnh phim 16:9 ngang: tối đa 4 cột — nhiều hơn làm card quá nhỏ (bố trí cũ 6 cột là của poster dọc 2:3) */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
@media (min-width: 640px) { .movie-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .movie-grid { grid-template-columns: repeat(4, 1fr); } }

.movie-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  transition: transform 300ms ease, background 300ms ease;
}
.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--graphite);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.card-poster-img {
  width: 100%;
  height: 106%;
  object-fit: cover;
  object-position: center bottom;
  transition: transform 500ms ease;
}
.card-poster-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 44px;
  font-weight: 800;
  color: rgba(255, 220, 161, 0.35);
  background: linear-gradient(160deg, var(--surface), #141414 70%);
}
.card-badge {
  position: absolute;
  top: 8px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(4px);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
}
.card-badge-left { left: 8px; color: var(--text); font-weight: 700; }
.card-badge-left.is-gold { color: var(--gold-bright); }
.card-badge-right { right: 8px; color: var(--text); font-weight: 500; }
.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  color: var(--gold);
  font-weight: 600;
}
.card-hover-play {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px;
  background: linear-gradient(0deg, rgba(14, 14, 14, 0.95) 0%, rgba(14, 14, 14, 0) 100%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}
.card-hover-play span {
  display: block;
  width: 100%;
  padding: 8px 0;
  text-align: center;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}
.card-poster:hover .card-hover-play,
.movie-card:focus-within .card-hover-play { opacity: 1; }
@media (hover: hover) {
  /* :not(.has-tilt) — khi JS bật tilt, motion.css sở hữu transform thẻ
     (pipeline var duy nhất); rule này chỉ là fallback CSS-pure */
  .movie-card:hover:not(.has-tilt) { transform: translateY(-6px); background: var(--surface); }
  .movie-card:hover .card-poster-img { transform: scale(1.05); }
}
.card-info { padding: 10px 12px 12px; }
.card-title { color: var(--text); font-size: 16px; font-weight: 600; line-height: 22px; display: block; }
.card-title:hover { color: var(--gold-bright); }
.card-title h3 { font-size: inherit; font-weight: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--text-muted); font-size: 11px; line-height: 14px; margin-top: 2px; }
.card-meta-dot { opacity: 0.6; }
.card-progress {
  height: 6px;
  margin-top: 8px;
  background: var(--graphite);
  border-radius: 999px;
  overflow: hidden;
}
.card-progress span { display: block; height: 100%; background: var(--gold); }

/* Tiếp tục xem — 3 cột desktop theo Stitch p01 */
.continue-row, .continue-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 640px) { .continue-row, .continue-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .continue-row, .continue-grid { grid-template-columns: repeat(3, 1fr); } }
.continue-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: background 300ms ease;
}
.continue-card:hover { background: var(--surface); }
.continue-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--graphite);
  overflow: hidden;
}
.continue-thumb img { width: 100%; height: 106%; object-fit: cover; object-position: center bottom; }
.continue-thumb .card-poster-fallback { font-size: 32px; }
.continue-time {
  position: absolute;
  top: 8px; right: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(14, 14, 14, 0.8);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
}
.continue-hover {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(14, 14, 14, 0.4);
  opacity: 0;
  transition: opacity 300ms ease;
}
.continue-play {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--gold);
  color: var(--on-gold);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 200ms ease;
}
.continue-card:hover .continue-hover,
.continue-card:focus-within .continue-hover { opacity: 1; }
/* scale hover của .continue-play chuyển sang pipeline --play-scale (motion.css) */
.continue-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: block;
  height: 6px;
  background: var(--graphite);
}
.continue-progress span {
  display: block;
  height: 100%;
  background: var(--gold);
}
.continue-info { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.continue-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); }
.continue-ep { color: var(--gold-bright); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.03em; white-space: nowrap; }
.continue-sub { color: var(--text-secondary); font-size: 11px; line-height: 14px; display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.continue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
}
.continue-close {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  padding: 2px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}
.continue-close:hover { color: var(--error); }
.continue-info .card-meta { margin-top: 2px; }

/* Banner quảng cáo kiểu Stitch p01 */
.ad-banner {
  position: relative;
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}
.ad-banner-glow {
  position: absolute;
  right: -80px; bottom: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255, 184, 0, 0.1);
  filter: blur(64px);
  pointer-events: none;
}
.ad-banner-main { display: flex; align-items: flex-start; gap: var(--space-md); position: relative; z-index: 1; }
.ad-banner-tile {
  width: 56px; height: 56px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-lg);
  background: var(--interactive);
  color: var(--gold);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
}
.ad-banner-text { display: flex; flex-direction: column; }
.ad-banner-chips { display: flex; align-items: center; gap: var(--space-sm); }
.ad-banner-chip {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--interactive);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ad-banner-sponsor { color: var(--gold-bright); font-size: 11px; line-height: 14px; }
.ad-banner-title { margin-top: 4px; font-size: 16px; font-weight: 700; line-height: 22px; color: var(--text); }
.ad-banner-desc { margin-top: 2px; color: var(--text-secondary); font-size: 11px; line-height: 14px; max-width: 672px; }
.ad-banner-actions { display: flex; align-items: center; gap: var(--space-sm); position: relative; z-index: 1; }

/* Callout nhà làm phim AI kiểu Stitch p01 */
.callout {
  position: relative;
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}
.callout-body { max-width: 576px; display: flex; flex-direction: column; }
.callout-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold-bright);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.callout-title { margin-top: var(--space-xs); font-size: 24px; font-weight: 700; line-height: 32px; letter-spacing: -0.01em; color: var(--text); }
.callout-desc { margin-top: var(--space-sm); color: var(--text-secondary); font-size: 14px; line-height: 22px; }
.callout-stats { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: var(--space-md); }
.callout-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
  min-width: 140px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}
.callout-stat-num { font-size: 24px; font-weight: 800; line-height: 32px; color: var(--gold); }
.callout-stat-label { margin-top: 4px; color: var(--text-muted); font-size: 11px; line-height: 14px; }

/* ============ Thể loại ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-sm);
  background: var(--card);
  outline: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: var(--text);
  transition: outline-color 180ms ease, background 180ms ease, transform 180ms ease;
  min-height: 96px;
}
.category-card:hover {
  outline-color: rgba(255, 184, 0, 0.4);
  background: var(--surface);
  color: var(--text);
  transform: translateY(-2px);
}
.category-name { font-weight: 700; font-size: 15px; }
.category-count { color: var(--text-muted); font-size: 11px; letter-spacing: 0.03em; }

/* ============ Tìm kiếm (Stitch p03) ============ */
.search-hero {
  background: var(--bg-secondary);
  padding: var(--space-xl) var(--gutter);
}
.search-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.search-form { display: flex; gap: var(--space-md); }
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--graphite);
  border-radius: var(--radius-lg);
  padding: 4px 16px;
  color: var(--text-muted);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.15);
}
.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 22px;
  padding: 10px 0;
  min-height: 48px;
}
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: var(--text-muted); }
.hint-block { margin-top: var(--space-lg); text-align: center; }
.trending-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.trending-label .icon { color: var(--gold-bright); }
.hint-block .chip-row { justify-content: center; }

