:root {
  --bg: #09090b;
  --bg-2: #18181b;
  --bg-3: #27272a;
  --border: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --brand: #f59e0b;
  --brand-2: #d97706;
  --accent: #f43f5e;
  --green: #22c55e;
  --blue: #3b82f6;
  --fb: #1877f2;
  --yt: #ff0000;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "Be Vietnam Pro", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.container { width: min(1280px, 100% - 32px); margin-inline: auto; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(9, 9, 11, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(63, 63, 70, .5);
}
.header .container { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #000; font-size: 16px;
}
.logo span b { color: var(--brand); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-2); }
.search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.search input {
  width: 100%; height: 40px; padding: 0 40px 0 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-2); outline: none; transition: border-color .15s;
}
.search input:focus { border-color: var(--brand); }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 6px; }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; max-height: 70vh; overflow-y: auto;
}
.suggest a { display: flex; gap: 10px; padding: 8px 10px; align-items: center; }
.suggest a:hover { background: var(--bg-3); }
.suggest img, .suggest .ph { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--bg-3); flex: none; }
.suggest .t { font-weight: 600; font-size: 14px; }
.suggest .s { color: var(--muted); font-size: 12px; }
.suggest .all { justify-content: center; color: var(--brand); font-weight: 600; font-size: 13px; }
.icon-btn { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .header .container { gap: 8px; height: auto; flex-wrap: wrap; padding: 8px 0; }
  .logo span { display: none; }
  .nav a { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  /* 6 mục menu (thêm "Bảng xếp hạng" 30/10) bị bẻ chữ 2-3 dòng trên điện thoại -> menu 1 hàng RIÊNG dưới logo (order 2, chung hàng với
     số online + nút đăng nhập thì bị ép chỉ còn 1,5 mục), chữ không bẻ, vuốt ngang trong menu (trang không tràn) */
  .nav { flex: 1 1 100%; order: 2; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .search { flex: 1 1 100%; max-width: none; margin: 0; order: 3; }
}
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--bg); padding: 8px 16px 12px; }
.mobile-nav.open { display: flex; flex-wrap: wrap; gap: 6px; }
.mobile-nav a { padding: 8px 12px; border-radius: 8px; background: var(--bg-2); font-size: 14px; }

/* ---------- Notice ---------- */
.notice { background: linear-gradient(90deg, rgba(245, 158, 11, .15), rgba(244, 63, 94, .15)); border-bottom: 1px solid rgba(245, 158, 11, .3); padding: 8px 0; font-size: 14px; text-align: center; }
/* Thông báo (ô "Thông báo" trong quản trị > Cài đặt): đậm + có lề 2 bên - bản cũ padding 0 hai bên nên trên điện thoại chữ dính mép */
.notice { padding: 10px 16px; font-weight: 600; color: #fde68a; line-height: 1.45; white-space: pre-line; }

/* ---------- Hero ---------- */
.hero { position: relative; margin: 20px auto; border-radius: 20px; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; border: 1px solid var(--border); }
.hero .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.55); transform: scale(1.02); }
.hero .grad { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 9, 11, .95) 0%, rgba(9, 9, 11, .6) 50%, rgba(9, 9, 11, .2) 100%); }
.hero .inner { position: relative; padding: 32px; display: flex; gap: 24px; align-items: flex-end; width: 100%; }
.hero .poster { width: 150px; aspect-ratio: 2/3; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow); flex: none; }
.hero h2 { margin: 0 0 4px; font-size: clamp(22px, 4vw, 36px); line-height: 1.15; }
.hero .sub { color: var(--muted); margin-bottom: 10px; }
.hero p { color: #d4d4d8; max-width: 640px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 14px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .hero .poster { display: none; } .hero .inner { padding: 20px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; background: var(--bg-3); color: var(--text); transition: .15s; }
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--brand); color: #000; }
.btn.outline { background: transparent; border-color: var(--border); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* ---------- Section ---------- */
.section { margin: 28px auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 4px; height: 22px; background: var(--brand); border-radius: 4px; }
.section-head .more { color: var(--brand); font-weight: 600; font-size: 14px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input {
  height: 36px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); padding: 0 10px; outline: none; font-size: 14px;
}
.filters select:focus { border-color: var(--brand); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.chip:hover, .chip.active { color: #000; background: var(--brand); border-color: var(--brand); }

/* ---------- Grid & Card ---------- */
/* thẻ dọc nên hẹp hơn thẻ ngang cũ (220px) -> nhiều cột hơn; minmax(0,1fr) để ảnh lớn không đẩy cột phình (bẫy đã gặp ở tab Phim Trung) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; }
.grid > * { min-width: 0; }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
/* Hàng lướt ngang (trang chủ: Mới cập nhật, Đang xem dở): thẻ cùng cỡ với lưới, kéo/vuốt ngang, bắt dính từng thẻ */
.hrow { display: grid; grid-auto-flow: column; grid-auto-columns: 165px; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
.hrow::-webkit-scrollbar { height: 6px; }
.hrow::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
.hrow::-webkit-scrollbar-track { background: transparent; }
.hrow > * { scroll-snap-align: start; }
.hrow > .loading, .hrow > .empty { grid-column: 1 / -1; width: 100%; }
.section-head .hint { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .hrow { grid-auto-columns: 40%; gap: 10px; } }
.card { position: relative; display: block; }
.card .thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid rgba(63, 63, 70, .5); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.06); }
/* Poster ảnh bìa Hồng Quả (dọc 3:4) trong khung 16:9: ảnh nguyên vẹn ở giữa, nền là chính nó làm mờ */
/* Poster DỌC 3:4 ở mọi thẻ (30/10). tall = ảnh dọc phủ kín; wide = ảnh ngang nguyên vẹn giữa khung, nền là chính nó làm mờ */
.card .thumb { aspect-ratio: 3/4; }
.card .thumb .bgblur { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(14px) brightness(.5); transform: scale(1.2); }
.card .thumb.tall img { object-fit: cover; }
.card .thumb.wide img { position: relative; object-fit: contain; }
.head2 .poster, .head2 .poster.tall { width: auto; height: 220px; aspect-ratio: 3/4; object-fit: cover; }
.head2 .poster.wide { object-fit: contain; background: #000; }
/* Tên tiếng Trung lấy từ Hồng Quả (công khai) dưới tên phim */
.cn-title { color: var(--muted); font-size: 15px; margin: 2px 0 6px; }
.card .cn-sub { color: #a1a1aa; }
@media (max-width: 640px) { .head2 .poster.tall { height: 150px; } }
.card .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: rgba(255, 255, 255, .25); background: linear-gradient(160deg, #27272a, #18181b); text-align: center; padding: 10px; }
.card .ph small { font-size: 12px; font-weight: 500; }
.card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent 45%); pointer-events: none; }
.badge { position: absolute; z-index: 2; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .01em; }
.badge.epb { top: 8px; left: 8px; background: var(--brand); color: #000; }
.badge.epb.done { background: var(--green); }
.badge.epb.soon { background: var(--blue); color: #fff; }
.badge.q { top: 8px; right: 8px; background: rgba(0, 0, 0, .7); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.badge.views { top: 8px; right: 8px; background: rgba(0, 0, 0, .7); color: #fff; border: 1px solid rgba(255, 255, 255, .15); }
.badge.dur { bottom: 8px; right: 8px; background: rgba(0, 0, 0, .75); color: #fff; border: 1px solid rgba(255, 255, 255, .15); }
.badge.type { bottom: 8px; left: 8px; background: rgba(0, 0, 0, .6); color: #e4e4e7; font-weight: 500; }
.card .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: .2s; z-index: 2; }
.card:hover .play { opacity: 1; }
.card .play span { width: 52px; height: 52px; border-radius: 50%; background: rgba(245, 158, 11, .95); display: grid; place-items: center; color: #000; font-size: 20px; padding-left: 4px; }
.card .title { margin-top: 8px; font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .title { color: var(--brand); }
.card .sub { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .fav { position: absolute; top: 8px; right: 8px; z-index: 3; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; border: 1px dashed var(--border); border-radius: 12px; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.pager button { min-width: 36px; height: 36px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); }
.pager button.active { background: var(--brand); color: #000; border-color: var(--brand); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- Detail ---------- */
.detail { margin: 20px auto; }
.detail .top { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); }
.detail .top .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(20px) brightness(.35); transform: scale(1.1); }
.detail .top .inner { position: relative; display: flex; gap: 28px; padding: 28px; }
.detail .poster { width: 220px; aspect-ratio: 2/3; border-radius: 14px; object-fit: cover; flex: none; box-shadow: var(--shadow); background: var(--bg-3); }
.detail .poster.ph { display: grid; place-items: center; font-size: 40px; font-weight: 800; color: rgba(255,255,255,.2); }
.detail h1 { margin: 0 0 4px; font-size: clamp(22px, 3vw, 32px); line-height: 1.2; }
.detail .alt { color: var(--muted); margin-bottom: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #d4d4d8; font-size: 14px; margin-bottom: 14px; }
.meta b { color: var(--muted); font-weight: 500; }
.meta a { color: var(--brand); }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-pill.ongoing { background: rgba(245, 158, 11, .2); color: var(--brand); }
.status-pill.completed { background: rgba(34, 197, 94, .2); color: var(--green); }
.status-pill.upcoming { background: rgba(59, 130, 246, .2); color: #93c5fd; }
.detail .desc { color: #d4d4d8; white-space: pre-line; }
.detail .actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
@media (max-width: 720px) {
  .detail .top .inner { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
  .detail .poster { width: 170px; }
  .meta, .detail .actions { justify-content: center; }
}

/* ---------- Trang phim: poster + tên + bảng link ---------- */
.detail2 { margin: 20px auto; }
.head2 { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.head2 .poster { height: 220px; width: auto; aspect-ratio: 3/4; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow); background: var(--bg-3); flex: none; }
.head2 .poster.ph { display: grid; place-items: center; font-size: 32px; font-weight: 800; color: rgba(255, 255, 255, .2); }
.head2 h1 { margin: 0 0 4px; font-size: clamp(20px, 3vw, 30px); line-height: 1.2; }
.head2 .alt { color: var(--muted); margin-bottom: 8px; }
.head2 .mini { color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) { .head2 { gap: 12px; } .head2 .poster { width: auto; height: 150px; } .head2 h1 { font-size: 18px; } }
.ep-table-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ep-table-head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.ep-table-head h2::before { content: ""; width: 4px; height: 20px; background: var(--brand); border-radius: 4px; }
.ep-scroll { max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); }
.ep-links { width: 100%; border-collapse: collapse; min-width: 540px; }
.ep-links th { position: sticky; top: 0; z-index: 1; background: var(--bg-3); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; text-align: left; }
.ep-links td { padding: 8px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.ep-links tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.ep-links td.num { font-weight: 800; font-size: 16px; width: 90px; white-space: nowrap; }
.ep-links td.num small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); white-space: normal; max-width: 160px; }
.ep-links tr.watched td.num { color: var(--brand); }
.ep-links tr.pending td { color: var(--muted); }
.ep-links td.pd { font-size: 13px; }
.lk { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; color: #fff; white-space: nowrap; transition: .15s; }
.lk .ic { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-size: 11px; font-weight: 800; }
.lk.yt { background: var(--yt); } .lk.fb { background: var(--fb); } .lk.bk { background: var(--green); color: #000; } .lk.bk .ic { background: rgba(0, 0, 0, .15); }
.lk:hover { filter: brightness(1.12); transform: translateY(-1px); }
.lk.off { background: transparent; border: 1px dashed var(--border); color: var(--muted); font-weight: 500; font-size: 12px; cursor: default; }
@media (max-width: 640px) {
  .ep-links { min-width: 0; }
  .ep-links th, .ep-links td { padding: 8px 6px; }
  .ep-links td.num { width: 44px; font-size: 15px; }
  .ep-links th { font-size: 11px; letter-spacing: 0; }
  .lk { padding: 8px 10px; }
  .lk .t { display: none; }
  .lk .ic { width: 24px; height: 24px; font-size: 12px; }
  .lk.off { font-size: 11px; padding: 6px 8px; }
}
.desc2 { margin-top: 16px; }
.desc2 h3 { margin: 0 0 8px; font-size: 15px; }
.desc2 p { margin: 0; color: #d4d4d8; white-space: pre-line; font-size: 14px; }

/* ---------- Episode list ---------- */
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ep {
  position: relative; height: 44px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); display: grid; place-items: center;
  font-weight: 600; font-size: 14px; transition: .15s;
}
.ep:hover { border-color: var(--brand); color: var(--brand); }
.ep.active { background: var(--brand); color: #000; border-color: var(--brand); }
.ep.watched:not(.active) { color: var(--muted); background: rgba(39, 39, 42, .5); }
.ep .dots { position: absolute; bottom: 4px; display: flex; gap: 3px; }
.ep .dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.dot-yt { background: var(--yt); } .dot-fb { background: var(--fb); } .dot-bk { background: var(--green); } .dot-pd { background: var(--muted); }
.ep.pending { border-style: dashed; color: var(--muted); background: transparent; cursor: default; font-weight: 500; }
.ep.pending:hover { border-color: var(--border); color: var(--muted); }
a.ep.pending:hover { border-color: var(--brand); color: var(--brand); cursor: pointer; }
.srv em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); }
.pending-big { font-size: 22px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.ep.active .dots i { filter: brightness(.6); }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }

/* ---------- Watch ---------- */
.watch { margin: 16px auto; }
.crumb { color: var(--muted); font-size: 14px; margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a:hover { color: var(--brand); }
.player-wrap { background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); position: relative; }
.player { aspect-ratio: 16/9; width: 100%; background: #000; display: grid; place-items: center; }
.player iframe, .player video { width: 100%; height: 100%; border: 0; display: block; }
.player .msg { text-align: center; padding: 30px; color: var(--muted); }
/* Trang link: không phát video, chỉ đưa nút mở link */
.link-card { position: relative; width: 100%; height: 100%; display: grid; place-items: center; text-align: center; overflow: hidden; }
.link-card .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.3) blur(3px); transform: scale(1.05); }
.link-card .in { position: relative; padding: 24px; width: min(560px, 100%); }
.link-card .lc-title { font-size: clamp(18px, 3vw, 26px); font-weight: 800; margin-bottom: 4px; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.link-card p { color: #d4d4d8; margin: 0 0 16px; font-size: 14px; }
.link-btns { display: flex; flex-direction: column; gap: 10px; }
.link-btn { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 14px; font-weight: 700; font-size: 16px; color: #fff; border: 1px solid rgba(255, 255, 255, .15); transition: .15s; text-align: left; }
.link-btn .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: rgba(255, 255, 255, .2); flex: none; }
.link-btn .arrow { margin-left: auto; opacity: .8; }
.link-btn.yt { background: var(--yt); box-shadow: 0 8px 24px rgba(255, 0, 0, .3); }
.link-btn.fb { background: var(--fb); box-shadow: 0 8px 24px rgba(24, 119, 242, .3); }
.link-btn.bk { background: var(--green); color: #000; box-shadow: 0 8px 24px rgba(34, 197, 94, .3); }
.link-btn.bk .ic { background: rgba(0, 0, 0, .15); }
.link-btn:hover { transform: translateY(-2px) scale(1.01); filter: brightness(1.1); }
button.link-btn { width: 100%; font-family: inherit; cursor: pointer; }
.mini-open { font-size: 12px; color: var(--muted); margin-top: -4px; }
.mini-open:hover { color: var(--text); text-decoration: underline; }
.player-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--bg-2); border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.player-bar .btn:last-child { margin-left: auto; }
.link-btn.off { background: rgba(39, 39, 42, .7); color: var(--muted); border-style: dashed; cursor: default; font-weight: 500; }
.link-btn.off em { font-style: normal; font-size: 13px; margin-left: auto; }
@media (max-width: 640px) { .player { aspect-ratio: auto; min-height: 320px; } .link-card .in { padding: 16px; } .link-btn { padding: 12px 14px; font-size: 15px; } }
.player .yt-card { position: relative; width: 100%; height: 100%; display: grid; place-items: center; text-align: center; overflow: hidden; }
.player .yt-card .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.35) blur(2px); transform: scale(1.05); }
.player .yt-card .in { position: relative; padding: 24px; max-width: 520px; }
.player .yt-card .big { display: inline-flex; align-items: center; gap: 10px; background: var(--yt); color: #fff; font-weight: 800; font-size: 18px; padding: 14px 28px; border-radius: 14px; border: 0; box-shadow: 0 8px 30px rgba(255, 0, 0, .35); transition: .15s; }
.player .yt-card .big:hover { transform: scale(1.04); }
.player .yt-card p { color: #e4e4e7; margin: 14px 0 0; font-size: 14px; }
.player .yt-card small { color: var(--muted); display: block; margin-top: 6px; font-size: 12px; }
.player .msg .btn { margin-top: 12px; }
.watch.theater .player-wrap { border-radius: 0; }
.watch.theater .container { width: 100%; }
.servers { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.servers .label { color: var(--muted); font-size: 14px; margin-right: 4px; }
.srv { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); font-weight: 600; font-size: 14px; }
.srv .ic { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.srv.yt .ic { background: var(--yt); } .srv.fb .ic { background: var(--fb); } .srv.bk .ic { background: var(--green); color: #000; }
.srv.active { border-color: var(--brand); background: rgba(245, 158, 11, .12); color: var(--brand); }
.srv:disabled { opacity: .4; cursor: not-allowed; }
/* Xem trực tiếp trong trang: nút nguồn Drive, nguồn đã hỏng, khung phát giữ 16:9 cả trên điện thoại
   (luật min-height 320px ở trên là cho tấm thẻ link cũ, áp vào iframe sẽ thành khung dọc có viền đen) */
.srv.dr .ic { background: #1fa463; }
.srv.bad:not(.active) { text-decoration: line-through; opacity: .6; }
.player.playing { aspect-ratio: 16/9; min-height: 0; }
/* SDK Facebook tự đặt cỡ iframe theo data-width; ép lấp đầy khung 16:9 cho giống YouTube/Drive */
.player .fb-video, .player .fb-video > span, .player .fb-video iframe { width: 100% !important; height: 100% !important; }
.player .msg .btn { margin: 12px 4px 0; }
[hidden] { display: none !important; }
#pNext { margin-left: auto; }
.head2-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
/* Lưới tập: có phim = nổi (cam), chưa có = gạch đứt mờ, đã xem = dấu ✓ góc phải */
.ep.has { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .6); color: var(--text); font-weight: 700; }
.ep.has:hover { background: rgba(245, 158, 11, .25); color: var(--text); }
.ep.has.watched:not(.active) { background: rgba(245, 158, 11, .05); border-color: rgba(245, 158, 11, .3); color: var(--muted); }
.ep.watched::after { content: "✓"; position: absolute; top: 2px; right: 5px; font-size: 10px; color: var(--green); }
.ep.active { background: var(--brand); color: #000; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(245, 158, 11, .35); }
.ep.active::after { color: #000; }
.ep.pending { opacity: .45; border-style: dashed; background: transparent; color: var(--muted); font-weight: 400; }
.ep.pending.active { opacity: 1; }
.ep-legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.ep-legend i { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; font-style: normal; font-size: 10px; }
.lg-has { background: rgba(245, 158, 11, .25); border: 1px solid rgba(245, 158, 11, .7); }
.lg-pd { border: 1px dashed var(--muted); opacity: .6; }
.lg-seen { color: var(--green); }
/* Dải mời vào nhóm Facebook dưới menu */
.group-bar { display: flex; align-items: center; gap: 10px; max-width: 1280px; margin: 10px auto 0; padding: 9px 14px; width: calc(100% - 32px);
  border-radius: 10px; background: rgba(24, 119, 242, .12); border: 1px solid rgba(24, 119, 242, .45); font-size: 14px; color: #dbeafe; }
.group-bar:hover { background: rgba(24, 119, 242, .22); }
.group-bar b { color: #fff; }
.group-bar .gb-ic { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--fb); color: #fff; font-weight: 800; flex: none; }
.group-bar .gb-go { margin-left: auto; font-weight: 700; color: #93c5fd; white-space: nowrap; }
@media (max-width: 640px) { .group-bar { font-size: 13px; } .group-bar .gb-go { display: none; } }
/* Bình luận dưới tập */
.cmt-box { margin-top: 16px; }
.cmt-box h3 span { color: var(--muted); font-weight: 500; font-size: 14px; }
.cmt-form { display: grid; gap: 8px; margin-bottom: 14px; }
.cmt-form input, .cmt-form textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; outline: none; resize: vertical; }
.cmt-form input:focus, .cmt-form textarea:focus { border-color: var(--brand); }
#cmtName { max-width: 260px; font-weight: 600; }
.cmt-row { display: flex; align-items: center; justify-content: space-between; }
.cmt-left { color: var(--muted); font-size: 12px; }
.cmt-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.cmt-list { display: flex; flex-direction: column; gap: 10px; }
.cmt { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.cmt-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.cmt-head b { color: var(--brand); }
.cmt-head span { color: var(--muted); font-size: 12px; }
.cmt-tk { font-style: normal; font-size: 11px; color: #000; background: var(--green); border-radius: 50%; width: 15px; height: 15px; display: inline-grid; place-items: center; font-weight: 800; }
#cmtName:disabled { opacity: .85; color: var(--brand); cursor: not-allowed; }
.cmt-del { margin-left: auto; background: none; border: 0; opacity: .6; }
.cmt-del:hover { opacity: 1; }
.cmt-text { white-space: pre-line; word-break: break-word; color: #e4e4e7; font-size: 14px; }
.cmt-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 14px; }
/* Tab Phim Trung (Hồng Quả): ảnh bìa dọc 3:4, khung nhúng trang xem của Hồng Quả */
.hg-form { display: flex; gap: 8px; margin-bottom: 10px; }
.hg-form input { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; outline: none; }
.hg-form input:focus { border-color: var(--brand); }
.hg-info { color: var(--muted); font-size: 13px; margin-bottom: 14px; min-height: 18px; }
.hg-info a { color: var(--brand); }
.hg-info b, .hg-card .sub { color: #e4e4e7; }
/* minmax(0,1fr) + min-width 0: không thì ảnh bìa (rộng gốc 640 px) đẩy cột phình ra - đo 30/10 trên 390 px trang rộng 482 px, thẻ phải bị cắt */
/* 5 cột cố định: Hồng Quả trả 10 phim/trang -> 2 hàng đầy. auto-fill cũ ra 6 cột -> hàng 2 chỉ 4 phim, hõm 2 ô như hết (30/10) */
.hg-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hg-more { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 18px 0 4px; color: var(--muted); font-size: 13px; }
.hg-card, .hg-item { min-width: 0; }
.hg-item { display: flex; flex-direction: column; gap: 6px; }
/* nhãn số tập / độ hot trên ảnh bìa: nhỏ, không che ảnh (chủ trang yêu cầu 30/10) */
.hg-card .badge.hg-eps, .hg-card .badge.hg-hot { font-size: 10px; padding: 2px 6px; border-radius: 5px; }
/* Số phần trên poster (từ 第N季): góc trên phải, to rõ để nhìn lướt là biết phần mấy */
.hg-card .badge.hg-season { top: 8px; right: 8px; background: var(--brand); color: #000; font-size: 12px; padding: 3px 8px; }
.hg-tm-btn { display: block; text-align: center; padding: 7px 8px; border-radius: 8px; background: var(--green); color: #000; font-weight: 700; font-size: 13px; }
.hg-tm-btn:hover { filter: brightness(1.1); }
.hg-yc-btn { display: block; width: 100%; text-align: center; padding: 7px 8px; border-radius: 8px; border: 1px dashed var(--brand); background: transparent; color: var(--brand); font-weight: 600; font-size: 13px; }
.hg-yc-btn:hover:not(.da) { background: rgba(245, 158, 11, .12); }
/* 2 nút: Yêu cầu thuyết minh + Yêu cầu Vietsub — dưới thẻ phim xếp dọc, ở trang xem (chỗ rộng) xếp ngang */
.hg-yc-2 { display: flex; flex-direction: column; gap: 4px; }
.hg-web-slot .hg-yc-2, .hg-khoa .hg-yc-2, .hg-qr .hg-yc-2 { flex-direction: row; gap: 10px; margin-top: 10px; }
.hg-web-slot .hg-yc-2 .hg-yc-btn, .hg-khoa .hg-yc-2 .hg-yc-btn, .hg-qr .hg-yc-2 .hg-yc-btn { flex: 1; margin-top: 0; }
@media (max-width: 640px) { .hg-web-slot .hg-yc-2, .hg-khoa .hg-yc-2, .hg-qr .hg-yc-2 { flex-direction: column; } }
/* Tài khoản người xem (thanh menu) + cửa sổ đăng nhập / đăng ký */
.tk-box { display: flex; align-items: center; gap: 8px; margin-left: 12px; white-space: nowrap; font-size: 13px; }
.tk-me b { color: var(--brand); }
.tk-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tk-tabs button { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-weight: 600; }
.tk-tabs button.on { border-color: var(--brand); color: var(--brand); background: rgba(245, 158, 11, .1); }
.tk-cap { display: flex; gap: 8px; align-items: center; }
.tk-cap img { height: 46px; width: auto; border-radius: 6px; flex: none; }
.tk-cap input { text-transform: uppercase; letter-spacing: .15em; }
.tk-note { color: var(--muted); font-size: 12px; margin: 4px 0 12px; }
@media (max-width: 640px) { .tk-box { margin-left: 0; font-size: 12px; } }
.hg-web-slot .hg-yc-btn { margin-top: 14px; padding: 12px; font-size: 15px; }
.hg-yc-btn.da { border-color: var(--border); color: var(--muted); font-weight: 500; cursor: default; }
.hg-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.hg-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); color: var(--muted); font-size: 13px; }
.hg-chip.on { border-color: var(--brand); color: var(--brand); background: rgba(245, 158, 11, .1); }
.hg-chip:hover { border-color: var(--brand); }
.hg-note.hg-down { border-color: rgba(245, 158, 11, .5); color: #fde68a; margin-top: 0; }
/* Phim Hồng Quả đã có bản thuyết minh trên web (khớp Series ID) */
.badge.hg-tm { background: var(--green); color: #000; font-weight: 700; }
.hg-webbtn { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 0; padding: 14px 18px; border-radius: 12px; background: var(--brand); color: #000; font-weight: 800; font-size: 16px; }
.hg-webbtn small { font-weight: 500; font-size: 13px; opacity: .8; }
.hg-webbtn:hover { filter: brightness(1.08); }
.hg-thumb { aspect-ratio: 3/4 !important; }
.hg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hg-head h1 { margin: 6px 0 2px; font-size: 22px; }
.hg-head .sub { color: var(--muted); font-size: 13px; }
.hg-intro { color: #d4d4d8; font-size: 14px; margin: 10px 0 8px; white-space: pre-line; }
.hg-note { margin: 14px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.hg-note a { color: var(--brand); }
/* Khung xem chỉ để lộ VÙNG VIDEO (chủ trang 30/10: người xem không được biết trang nguồn). Trang nguồn khác tên miền nên không ẩn
   từng phần bên trong được -> CẮT. Đo 30/10: rộng >= 640px trang họ dùng bố cục máy tính - thanh menu có logo cao 64px, cột phải
   320px + 20px (tên phim, chọn tập, đề xuất), vùng video là phần còn lại, dòng 首页/tên phim nằm ~40px đầu vùng video.
   -> iframe rộng hơn khung 360px (cột phải tràn ra ngoài), đẩy lên 104px; tối thiểu 640px vì <= 600px họ đổi bố cục điện thoại. */
/* Điện thoại chặn tự phát -> khung đen, không có nút (trang nguồn không hiện ảnh bìa khi dừng): nhắc chạm để phát */
.hg-cham { margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.hg-frame { position: relative; height: min(78vh, 760px); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.hg-frame iframe { position: absolute; left: 0; top: -104px; width: calc(100% + 360px); min-width: 640px; height: calc(100% + 104px); border: 0; background: #000; }
@media (max-width: 640px) { .hg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hg-frame { height: min(75vh, 170vw); } }
.hg-frame.dd { margin-inline: auto; }   /* điện thoại: JS hgCatDienThoai đặt cỡ theo bố cục di động của nguồn */
/* Chip thể loại ở trang phim (thể loại lấy từ Hồng Quả theo Series ID), bấm -> /the-loai/<tên> */
.head2 .genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.head2 .genres a { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); }
.head2 .genres a:hover { border-color: var(--brand); color: var(--brand); }
/* Thanh "Thể loại" ở trang chủ / trang thể loại */
.tl-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tl-bar .chip small { opacity: .7; font-size: 11px; margin-left: 2px; }
/* Số người đang online (đầu trang) */
.online-dem { margin-left: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .online-dem { margin-left: 6px; font-size: 11px; } }
/* Trang xem phim gốc: thể loại tiếng Việt + giới thiệu gốc giấu trong "Xem bản gốc" */
.hg-head .genres { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.hg-head .genres span { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); }
.hg-goc { margin: -4px 0 8px; font-size: 12px; color: var(--muted); }
.hg-goc summary { cursor: pointer; }
.hg-goc p { margin: 6px 0 0; }
.hg-dang-dich { font-size: 12px; color: var(--muted); }
/* Bảng xếp hạng Hồng Quả ở tab Tìm phim gốc: chỉ tải khi bấm */
.hg-bxh-mo { display: flex; justify-content: center; margin: 14px 0; }
.hg-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hg-tabs .chip { cursor: pointer; font: inherit; font-size: 13px; }
.hg-tap { margin-top: 14px; }
.hg-tap h3 small { color: var(--muted); font-weight: 500; font-size: 13px; }
.hg-tap .muted { color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.hg-tap .ep { cursor: pointer; font: inherit; }
/* Tập Hồng Quả khoá (phải vào app): ô mờ + khoá; bấm -> khung báo + nút Yêu cầu thuyết minh thay cho mã QR của họ */
.hg-tap .ep.khoa:not(.active) { background: transparent; border-color: var(--border); color: var(--muted); font-weight: 500; }
.hg-tap .ep.khoa::after { content: "🔒"; position: absolute; top: 1px; right: 3px; font-size: 9px; }
.hg-khoa { margin: 0 0 12px; text-align: center; padding: 28px 16px; }
.hg-khoa-t { margin-bottom: 14px; font-size: 15px; }
.hg-qr { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }
.hg-qr:empty { display: none; }
/* Dòng giới thiệu mục đích trang, ngay dưới dải nhóm Facebook */
.site-note { max-width: 1280px; width: calc(100% - 32px); margin: 6px auto 0; padding: 0 4px; font-size: 13px; color: var(--muted); }
.watch-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.watch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.watch-head h1 { margin: 0; font-size: 20px; }
.watch-head h1 a:hover { color: var(--brand); }
.watch-head .ep-title { color: var(--muted); font-size: 14px; }
.watch-nav { display: flex; gap: 8px; }
.watch-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; margin-top: 20px; }
@media (max-width: 960px) { .watch-layout { grid-template-columns: 1fr; } }
.side-list { display: flex; flex-direction: column; gap: 10px; }
.side-item { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; }
.side-item:hover { background: var(--bg-2); }
.side-item img, .side-item .ph { width: 80px; height: 45px; border-radius: 6px; object-fit: cover; background: var(--bg-3); flex: none; }
.side-item .t { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-item .s { color: var(--muted); font-size: 12px; }
.box { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.box h3 { margin: 0 0 12px; font-size: 16px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; width: min(480px, 100%); padding: 22px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--bg-3); border: 1px solid var(--border); padding: 10px 18px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow); font-size: 14px; animation: fade .25s; }
.toast.ok { border-color: var(--green); } .toast.err { border-color: var(--accent); }
@keyframes fade { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 0; color: var(--muted); font-size: 13px; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer a { color: var(--brand); }

.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); aspect-ratio: 2/3; }
@keyframes sk { to { background-position: -200% 0; } }
.loading { text-align: center; color: var(--muted); padding: 40px; }
/* Tủ phim: nút thêm/bỏ ở trang phim + trang xem, nút "Bỏ khỏi tủ" dưới thẻ ở trang Tủ phim */
.tu-btn.co { border-color: var(--green); color: var(--green); }
.tu-item { display: flex; flex-direction: column; gap: 6px; }
.tu-bo { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 8px; padding: 5px; font: inherit; font-size: 12px; cursor: pointer; }
.tu-bo:hover { border-color: var(--accent); color: var(--accent); }
/* Icon "Linh thạch" (đơn vị điểm, thay chữ G - chủ trang 30/10): tinh thể xanh ngọc vẽ SVG nhúng, không cần file ảnh */
.lt { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.18em; margin-left: 3px; background: no-repeat center / contain url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><defs><linearGradient id='a' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23d1fae5'/><stop offset='.45' stop-color='%2334d399'/><stop offset='1' stop-color='%230e7490'/></linearGradient></defs><path d='M12 1 19.5 7 17.5 20 12 23 6.5 20 4.5 7Z' fill='url(%23a)'/><path d='M12 1v22M4.5 7 12 10.5 19.5 7M6.5 20 12 10.5 17.5 20' stroke='%23ecfeff' stroke-opacity='.6' stroke-width='.9' fill='none'/></svg>"); }
/* Bình luận gom gọn kiểu YouTube: nút đầu khung (tiêu đề + 1 dòng xem trước), bấm mới mở ô viết + danh sách */
.cmt-mo { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.cmt-mo h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cmt-mui { margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .2s; }
.cmt-box:not(.gon) .cmt-mui { transform: rotate(180deg); }
.cmt-teaser { font-size: 13px; color: #d4d4d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmt-teaser b { margin-right: 6px; }
.cmt-box:not(.gon) .cmt-teaser { display: none; }
.cmt-box:not(.gon) .cmt-mo { margin-bottom: 10px; }
/* Đề xuất phim khác (kiểu YouTube): ảnh DỌC 3:4 to bên trái (chủ trang đổi 30/10) + tên/thông tin; máy tính 2 cột, điện thoại 1 cột;
   ảnh bìa dọc phủ kín khung, ảnh ngang (thumbnail YouTube có chữ "P1-5") đặt nguyên giữa khung trên nền mờ như thẻ trang chủ */
.dx-box { margin-top: 22px; }
.dx-h { margin: 0 0 12px; font-size: 18px; }
.dx-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.dx { display: flex; gap: 12px; align-items: flex-start; color: inherit; }
.dx-anh { position: relative; flex: none; width: 130px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--bg-3); }
.dx-anh.tall img { object-fit: cover; }
.dx-anh.tall .bgblur { display: none; }
.dx-anh img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.dx-anh .bgblur { position: absolute; inset: -10px; background-size: cover; background-position: center; filter: blur(12px) brightness(.55); }
.dx-anh .ph { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 800; color: var(--muted); }
.dx-tap { position: absolute; right: 5px; bottom: 5px; background: rgba(0, 0, 0, .8); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.dx-nd { min-width: 0; }
.dx-ten { font-weight: 700; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dx:hover .dx-ten { color: var(--brand); }
.dx-phu { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .dx-list { grid-template-columns: minmax(0, 1fr); } .dx-anh { width: 110px; } }
/* Nút "Hủy" nhỏ cạnh "✓ Đã yêu cầu…" -> hoàn Linh thạch */
.yc-huy { margin-left: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 6px; padding: 1px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.yc-huy:hover { border-color: var(--accent); color: var(--accent); }

/* ==================== GIAO DIỆN 13/11 (theo ảnh mẫu chủ trang gửi) ====================
   Nền đen sâu hơn + điểm nhấn vàng chuyển sắc; cột "Thể loại phim" dính bên trái; thẻ phim: lượt xem góc trên phải,
   thời lượng góc dưới trái, số tập + ngày cập nhật dưới tên; điện thoại: thể loại vuốt ngang + thanh nổi dưới đáy.
   Viết thành MỘT khối ghi đè ở cuối file để gỡ ra là về giao diện cũ. */
:root {
  --bg: #070708; --bg-2: #121214; --bg-3: #1d1d21; --border: #2c2c33; --radius: 14px;
  --vien: rgba(255, 255, 255, .07);
  --vang: linear-gradient(135deg, #fcd34d, #f59e0b 55%, #d97706);
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 420px at 50% -160px, rgba(245, 158, 11, .13), transparent 70%), radial-gradient(700px 400px at 100% 30%, rgba(244, 63, 94, .05), transparent 70%); }
.header { background: rgba(7, 7, 8, .82); border-bottom: 1px solid var(--vien); }
.header .container { height: 68px; }
.logo .mark { background: var(--vang); box-shadow: 0 4px 18px rgba(245, 158, 11, .35); }
.nav a { border-radius: 999px; padding: 8px 14px; transition: .15s; }
.nav a.active { color: #000; background: var(--vang); font-weight: 700; }
.nav a { white-space: nowrap; }
.search { max-width: 520px; min-width: 190px; }
/* màn cỡ vừa (đo 13/11 ở 1100 px: menu bẻ 2 dòng, ô tìm còn 85 px): bớt chữ phụ để nhường chỗ cho menu + ô tìm */
@media (min-width: 761px) and (max-width: 1180px) { .online-dem { display: none; } .nav a { padding: 8px 9px; font-size: 13px; } .header .container { gap: 10px; } }
@media (min-width: 761px) and (max-width: 980px) { .logo span:not(.mark) { display: none; } }
.search input { height: 44px; border-radius: 14px; border-color: var(--vien); padding-left: 44px; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }
.search .ico svg { width: 18px; height: 18px; display: block; }
.suggest { border-color: var(--vien); border-radius: 14px; }
.suggest img, .suggest .ph { width: 42px; height: 56px; }
.btn.primary { background: var(--vang); }
.group-bar { border-radius: 14px; }

/* --- khung: cột thể loại + nội dung --- */
.kh { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 20px; }
.kh-trai { position: sticky; top: 86px; }
.tl-hop { background: var(--bg-2); border: 1px solid var(--vien); border-radius: 18px; padding: 16px 10px 10px; }
.tl-dau { display: flex; align-items: center; gap: 8px; padding: 0 8px 12px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #e4e4e7; }
.tl-dau::before { content: ""; width: 14px; height: 12px; flex: none; background: linear-gradient(var(--brand) 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(var(--brand) 0 0) 0 50% / 70% 2px no-repeat, linear-gradient(var(--brand) 0 0) 0 100% / 100% 2px no-repeat; }
.tl-ds { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 176px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
.tl-ds::-webkit-scrollbar { width: 5px; height: 0; }
.tl-ds::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
.tl-muc { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; padding: 9px 14px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500; background: rgba(255, 255, 255, .02); transition: .15s; }
.tl-muc small { font-size: 11px; opacity: .6; }
.tl-muc:hover { color: var(--text); background: var(--bg-3); }
.tl-muc.active { color: #000; background: var(--vang); font-weight: 800; box-shadow: 0 6px 18px rgba(245, 158, 11, .25); }
.kh-phai > .section:first-child { margin-top: 0; }
.section-head h2::before { background: var(--vang); }
.section-head h2 small { font-size: 13px; font-weight: 500; color: var(--muted); }
.sx { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.sx select { height: 38px; padding: 0 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); outline: none; color: var(--text); font-size: 14px; }
.sx select:focus { border-color: var(--brand); }
@media (max-width: 900px) {
  .kh { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 12px; }
  .kh-trai { position: static; }
  .tl-hop { background: none; border: 0; border-radius: 0; padding: 0; }
  .tl-dau { display: none; }
  .tl-ds { flex-direction: row; gap: 8px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 0 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tl-ds::-webkit-scrollbar { display: none; }
  .tl-muc { white-space: nowrap; border-radius: 999px; padding: 7px 14px; background: var(--bg-2); border: 1px solid var(--vien); font-size: 13px; }
  .tl-muc.active { border-color: transparent; }
}

/* --- thẻ phim --- */
.grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 24px 16px; }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; } }
.card .thumb { border-radius: 14px; border: 1px solid var(--vien); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover .thumb { transform: translateY(-4px); border-color: rgba(245, 158, 11, .65); box-shadow: 0 14px 34px rgba(0, 0, 0, .6), 0 0 28px rgba(245, 158, 11, .2); }
.card .thumb::after { background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent 36%), linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent 22%); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; font-size: 11.5px; }
.badge svg { width: 13px; height: 13px; flex: none; }
.badge.views { background: rgba(10, 10, 12, .62); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.badge.dur { left: 8px; right: auto; background: rgba(10, 10, 12, .72); border: 1px solid rgba(245, 158, 11, .45); color: #fde68a; backdrop-filter: blur(6px); }
.badge.dur svg { color: var(--brand); }
.card .title { margin-top: 10px; font-weight: 700; font-size: 14.5px; }
.c-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.c-tap { color: var(--brand); font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-tap.done { color: var(--green); }
.c-tap.soon { color: #93c5fd; }
.c-ngay { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; padding: 2px 7px; border-radius: 5px; background: var(--bg-3); color: var(--muted); border: 1px solid var(--vien); }
.c-ngay.hn { color: var(--brand); border-color: rgba(245, 158, 11, .55); background: rgba(245, 158, 11, .12); }
.c-ngay.hq { color: #e4e4e7; }
.pager button { border-radius: 10px; border-color: var(--vien); }
.pager button.active { background: var(--vang); border-color: transparent; font-weight: 800; }
.empty { border-color: var(--border); border-radius: 16px; }

/* --- điện thoại: thanh nổi dưới đáy thay hàng menu trên đầu --- */
.day-nav { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .header .container { height: auto; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .day-nav { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    width: min(440px, calc(100% - 20px)); padding: 6px; border-radius: 22px; background: rgba(18, 18, 20, .9); backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 12px 40px rgba(0, 0, 0, .65); }
  .day-nav a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; color: var(--muted); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
  .day-nav svg { width: 22px; height: 22px; }
  .day-nav a.active { color: var(--brand); background: rgba(245, 158, 11, .1); }
}
