/* Phần bổ sung của theme Gumy. Giao diện chính nằm ở mz/css/site.css (CSS gốc của mizhiady). */

.gm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gm-inline { display: inline; font-size: inherit; font-weight: inherit; }
.gm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--theme-color); outline-offset: 2px; }

/* Thẻ heading dùng thay cho div của bản gốc: giữ nguyên kiểu chữ cũ. */
h3.title, .vod-content h2.title, .title_num { font-weight: 400; }


.gm-h1 { margin: 24px 0 4px; font-size: 28px; font-weight: 600; line-height: 1.3; color: var(--font-color); }
.gm-h1 small { font-size: 14px; font-weight: 400; color: var(--font-color-6); margin-left: 8px; }
.gm-empty { width: 100%; padding: 60px 20px; text-align: center; color: var(--font-color-6); line-height: 1.6; }
.gm-empty a, .gm-link { color: var(--theme-color); }
.gm-msg { width: 100%; margin: 0 0 12px; color: #ff5b5b; font-size: 14px; line-height: 1.4; text-align: center; }
.gm-msg.is-ok { color: #2fbf71; }
.gm-msg:empty { display: none; }

.gm-crumb { padding: 4px 0 16px; font-size: 14px; line-height: 1.4; color: var(--font-color-6); }
.gm-crumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.gm-crumb li + li::before { content: "›"; margin-right: 8px; }
.gm-crumb a:hover { color: var(--theme-color); }
.gm-crumb [aria-current] { color: var(--font-color); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show .gm-crumb { padding-top: 0; }

.gm-prose { margin: 30px 0; color: var(--font-color-6); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.gm-prose p + p, .gm-prose ul, .gm-prose ol, .gm-prose h2, .gm-prose h3 { margin-top: 12px; }
.gm-prose a { color: var(--theme-color); }
.gm-prose img { height: auto; border-radius: 10px; }
.gm-article .gm-prose { margin: 0; color: var(--font-color); }
.gm-post { display: block; }
.gm-post h2 { font-size: 20px; line-height: 1.4; color: var(--font-color); margin-bottom: 8px; }
.gm-post p { color: var(--font-color-6); line-height: 1.6; }

/* Logo chữ khi chưa tải logo ảnh. */
.gm-logo { display: flex; align-items: center; height: 50px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--theme-color); white-space: nowrap; }
/* Khách chưa đăng nhập: hiện ảnh đại diện mặc định của theme (hình người), bấm vào để đăng nhập. */
header .icon5 .gm-login { background: url(../mz/images/default-avatar.png) center / cover no-repeat; background-color: transparent; }
[data-theme="dark"] header .icon5 .gm-login { background-image: url(../mz/images/dark-avatar.png); }
.admin-bar header.myui-header__top { top: 32px; }
@media (max-width: 782px) { .admin-bar header.myui-header__top { top: 46px; } }
header .icon5.islogin { position: relative; }

/* Gợi ý tìm kiếm trực tiếp. */
.gm-suggest { padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.gm-suggest a { display: flex !important; align-items: center; gap: 12px; padding: 8px 12px; }
.gm-suggest a:hover { background: var(--item-hover-bg); }
.gm-suggest img { width: 40px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; }
.gm-suggest span { min-width: 0; white-space: normal; }
.gm-suggest strong, .gm-suggest small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.gm-suggest strong { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.gm-suggest small { font-size: 12px; color: var(--text-tertiary); }
.history-box .list a { display: block; }
.history-box .list:not(:has(a)) { font-size: 14px; }
.history-box .list:has(a) { line-height: normal; min-height: 0; max-height: 400px; overflow-y: auto; }

/* Slider: cuộn bằng scroll-snap của trình duyệt thay cho thư viện Swiper. */
.banner-pic > .swiper-wrapper { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; box-sizing: border-box; }
.banner-pic > .swiper-wrapper::-webkit-scrollbar { display: none; }
.banner-pic .swiper-slide { scroll-snap-align: start; scroll-snap-stop: always; height: auto; }
.gm-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }

.banner-box .slide-btn-box .fav-btn.active { background: var(--theme-color); }

/* Danh sách tập: tab server. */
.player-box .nav-btn { display: flex; }
.player-box .swiper-container { overflow-x: auto; scrollbar-width: none; }
.episodes_wrap .swiper-wrapper { box-sizing: border-box; height: auto; }
.lists-box .listitem a { padding: 0 6px; }
.lists-box .listitem.is-seen:not(.active) { opacity: .55; }
.sort-btn { cursor: pointer; }

/* Trình phát: chỉ tạo video/iframe sau khi bấm phát. */
.gm-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.gm-facade img { width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .55; }
.gm-facade__play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; background: url(../mz/images/icon/play-icon.png) center / cover no-repeat; transition: transform .2s; }
.gm-facade:hover .gm-facade__play { transform: scale(1.12); }
.gm-player-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; color: rgba(255, 255, 255, .75); font-size: 15px; line-height: 1.5; text-align: center; }
.player-foot .data .item a.disabled { pointer-events: none; }
.player-foot .digg_link.active .item-icon span, .player-foot .favorite.active .item-icon span { color: var(--theme-color); }
.player-foot .digg_link.active svg path, .player-foot .favorite.active svg path { fill: var(--theme-color); }
.other-box .top .collect-btn.active { background: var(--theme-color); }
.other-box .top .collect-btn.active .shouc-icon { background-image: url(../mz/images/icon/shouc.png); }
.other-box .top .play-btn { font-family: inherit; cursor: pointer; }
.title-box .director a, .title-box .roles a { color: inherit; }

/* Chấm điểm. */
.gm-rate { display: flex; align-items: center; gap: 2px; margin-top: 14px; color: var(--font-color-6); font-size: 14px; }
.gm-rate span { margin-right: 8px; }
.gm-rate button { padding: 0 2px; border: 0; background: none; cursor: pointer; }
.gm-rate .iconfont { font-size: 22px; color: var(--top-bg); margin: 0; transition: color .15s; }
.gm-rate button.is-on .iconfont, .gm-rate:not(.is-done) button:hover .iconfont, .gm-rate:not(.is-done) button:has(~ button:hover) .iconfont { color: #ffb400; }
.gm-rate.is-done button { cursor: default; }

/* Bình luận / form gửi yêu cầu. */
.comment-body textarea { display: block; color: #20242d; font-family: inherit; resize: none; }
.comment-body textarea::placeholder { color: #74829b; }
.comment-body .comment_data_foot .verify.gm-cname { width: 190px; height: 38px; background: var(--input-bg); color: var(--font-color); }
.comment-body .comment_data_foot button { cursor: pointer; font-family: inherit; }
.styu-message__list .data .name { line-height: 1.4; }
.styu-message__list .text-muted { color: var(--font-color-5); font-size: 13px; }
.comment-box h1.title { font-weight: 500; }
.comment-box .nav-links { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.comment-box .nav-links .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: 8px; background: var(--input-bg); color: var(--font-color); font-size: 12px; }
.comment-box .nav-links .current { background: var(--theme-color); color: #fff; }
.pagination span.page { cursor: default; }
.pagination { margin: 40px 0; }

/* Hộp thoại (đăng nhập, chia sẻ) dùng <dialog> của trình duyệt thay cho layer.js. */
.gm-dialog { padding: 0; border: 0; border-radius: 16px; background: var(--basic-bg); color: var(--font-color); max-width: calc(100vw - 30px); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); overflow: visible; }
.gm-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.gm-dialog[open] { animation: fadeIn .2s; }
.gm-dialog__close { position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--theme-color); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gm-dialog__close .iconfont { font-size: 12px; }
.gm-dialog .ajax_login-box { min-width: 320px; }
.gm-dialog .share-tan { min-width: 340px; }
.login-button { cursor: pointer; font-family: inherit; }
a.login-button { display: inline-block; width: auto; padding: 0 28px; }
[data-theme="dark"] .login-input { background: var(--input-bg); color: #fff; }
.user-info .input-box button, .right-side button { cursor: pointer; font-family: inherit; }

.gm-toast { position: fixed; left: 50%; bottom: 90px; z-index: 100000; transform: translate(-50%, 20px); max-width: calc(100vw - 30px); padding: 10px 20px; border-radius: 50px; background: #20242d; color: #fff; font-size: 14px; line-height: 1.4; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.gm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.gm-404 { padding: 60px 0 40px; text-align: center; color: var(--font-color-6); line-height: 1.6; }
.gm-404__code { font-size: 110px; font-weight: 800; line-height: 1; color: var(--theme-color); }
.gm-404 h1 { font-size: 26px; margin: 10px 0; color: var(--font-color); }
.gm-404 p { margin-bottom: 16px; }

.gm-install { position: fixed; left: 12px; right: 12px; bottom: 70px; z-index: 998; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--history-bg); color: var(--font-color); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); font-size: 14px; line-height: 1.4; }
.gm-install p { flex: 1; }
.gm-install button { border: 0; background: none; color: inherit; cursor: pointer; font-family: inherit; }
.gm-install .gm-install__ok { padding: 6px 14px; border-radius: 8px; background: var(--theme-color); color: #fff; }

/* Thanh điều hướng dưới trên điện thoại (phần style nằm trong footer.html của bản gốc). */
.mzadywapdbfoot { position: fixed; bottom: 0; width: 100%; padding: 5px 0 0; z-index: 999; display: flex; border-top: 1px solid; }
.size20 { font-size: 18px !important; line-height: 0; }
.mzadywapdbfoot .item { display: block; text-align: center; flex: 1; margin: 5px 0; transition: all .3s ease; }
.mzadywapdbfoot .grid-item-name { font-size: 12px; line-height: 1.6; }
.mzadywapdbfoot .item.active, .mzadywapdbfoot .item.active .size20, .mzadywapdbfoot .item.active .grid-item-name { font-weight: 500; color: var(--theme-color) !important; }
[data-theme="light"] .mzadywapdbfoot { background: #fff; border-top-color: #e0e0e0; }
[data-theme="light"] .mzadywapdbfoot .item { color: #333; }
[data-theme="light"] .mzadywapdbfoot .grid-item-name { color: #666; }
[data-theme="dark"] .mzadywapdbfoot { background: #1e1e1e; border-top-color: #333; }
[data-theme="dark"] .mzadywapdbfoot .item { color: #eee; }
[data-theme="dark"] .mzadywapdbfoot .grid-item-name { color: #aaa; }
@media (min-width: 559px) { .mzadywapdbfoot { display: none !important; } }
@media (max-width: 558px) { .site-footer { padding-bottom: 60px; } }

@media (max-width: 768px) {
    .gm-h1 { font-size: 20px; margin-top: 12px; }
    .gm-logo { height: 30px; font-size: 18px; }
    .comment-body .comment_data_foot .pull-right { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
    .comment-body .comment_data_foot .verify.gm-cname { width: 140px; height: 30px; }
    .gm-dialog .ajax_login-box, .gm-dialog .share-tan { min-width: 0; width: calc(100vw - 60px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Hỏi đáp về phim. */
.gm-faq { margin-top: 0; }
.gm-faq details { border-bottom: 1px solid var(--top-bg); color: var(--font-color); }
.gm-faq summary { padding: 12px 0; cursor: pointer; font-size: 15px; font-weight: 500; line-height: 1.5; }
.gm-faq details p { padding: 0 0 14px; color: var(--font-color-6); line-height: 1.6; }

/* Việt hoá các nhãn nằm trong CSS gốc + chỉnh cho chữ tiếng Việt dài hơn chữ Hán. */
.vod-content .intro .wrapper_more .wrapper_more_btn::after { content: "Xem thêm"; }
.vod-content .intro .wrapper_more .wrapper_more_exp:checked + .wrapper_more_text .wrapper_more_btn::after { content: "Thu gọn"; }
.myui-vodbox .top .left .title .iconfont, .hot-vod-list .content-title .iconfont { font-size: inherit; margin-right: 8px; color: var(--theme-color); }
.hot-vod-list .content-title .iconfont { color: inherit; }
.vod-list-box .share .iconfont { font-size: 16px; margin-right: 4px; }
.category-box .item .content a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-box .item .head { min-width: 88px; white-space: nowrap; }


/* Chữ tiếng Việt có dấu trên/dưới: CSS gốc đặt line-height bằng đúng cỡ chữ nên dấu bị cắt → nới dòng. */
.title-box .title { line-height: 1.3; margin-bottom: 10px; }
.myui-vodbox-content .content-card .card-info .title { line-height: 1.35; margin-top: 8px; margin-bottom: 4px; }
.myui-vodbox-content .content-card .card-info .role { line-height: 1.35; }
.vod-detail .info-title-box .title { line-height: 1.3; }
.vod-detail .info-roles { line-height: 1.35; }
.banner-box .nav-name .name h3 { line-height: 1.35; overflow: hidden; margin-bottom: 4px; }
.banner-box .nav-name .name.active p { line-height: 1.35; }
.other-box .bottom .item .item-top, .other-box .bottom .item .item-bottom { line-height: 1.35; }
.other-box .bottom .item .item-top { margin-bottom: 5px; }
.player-box .player_name, .m-slide-btn-box .m-detail-box .title { line-height: 1.35; }
.title-box .director a:not(:last-child)::after { content: ","; }

/* Màn hình dưới 1600px: thu gọn danh sách tên bên phải slider để không đè lên header. */
@media (max-width: 1600px) {
    .banner-box .nav-name .name { padding: 7px 20px; }
    .banner-box .nav-name .name h3 { font-size: 18px; margin-bottom: 2px; }
    .banner-box .nav-name .name.active { margin-bottom: 6px; }
}

/* Header: hai quy tắc nằm trong <style> của header.html bản gốc. */
.menu .nav { padding: 0 10px !important; }
.tab_head .tab_item { margin: 0 5px !important; }

/* Header: nhãn tiếng Việt dài hơn chữ Hán nên ở màn hình hẹp menu đẩy ô tìm kiếm ra ngoài → thu gọn dần. */
header .menu { min-width: 0; }
header .search { min-width: 0; }
@media (max-width: 1360px) {
    header .menu { margin-right: 12px; }
    header .menu .nav { margin-right: 6px; margin-left: 0; }
    header .menu .logo { margin-left: 0; margin-right: 12px; }
}
@media (max-width: 1100px) {
    header .menu .nav .iconfont { display: none; }
    header .menu .nav { margin-right: 2px; padding: 0 8px !important; }
}
@media (max-width: 880px) and (min-width: 769px) {
    header .menu .logo { display: none; }
}
/* Hộp gợi ý tìm kiếm: bản gốc ép cao tối thiểu 585px, ít từ khoá thì thừa một khoảng trống lớn. */
.hot-recommend-box { min-height: 0; max-height: calc(100vh - 90px); overflow-y: auto; }

/* ---------- Bảng "tìm nhiều" khi bấm vào ô tìm kiếm (theo D:\Gimy\web: SearchBox) ----------
   Bảng 672px canh giữa dưới ô tìm, tab cách nhau 32px, hai cột poster 54x72
   với số thứ hạng nghiêng 26px treo ở góc trên trái. Hiện bằng :focus-within. */
header .search .search-box { overflow: visible; }
.gm-hot {
    position: absolute; top: 46px; left: 50%; z-index: 20; width: 672px; max-height: 80vh; padding: 24px 0;
    border-radius: 8px; background: rgba(35, 34, 34, .6); backdrop-filter: blur(82px); -webkit-backdrop-filter: blur(82px);
    overflow: hidden; outline: 0; text-align: left; white-space: normal; line-height: 1.4;
    opacity: 0; visibility: hidden; transform: translate(-50%, -6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.search-box:focus-within .gm-hot { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
header .search .gm-hot a { display: flex; }

.gm-hot__recent { margin: 0 24px 24px; }
.gm-hot__recent-top { display: flex; align-items: center; justify-content: space-between; color: #f5f5f5; font-size: 18px; font-weight: 500; line-height: 25px; }
.gm-hot__clear { display: grid; place-items: center; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; opacity: .6; position: static !important; height: auto !important; }
.gm-hot__clear:hover { opacity: 1; }
.gm-hot__recent-list { display: flex; flex-wrap: wrap; gap: 12px; max-height: 84px; margin-top: 12px; overflow: hidden; }
header .search .gm-hot__recent-list a {
    display: block; max-width: 100%; padding: 8px 12px; border-radius: 18px; background: rgba(245, 245, 245, .05);
    color: rgba(255, 255, 255, .5); font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
header .search .gm-hot__recent-list a:hover, header .search .gm-hot__recent-list a:focus-visible { color: #fff; }

.gm-hot__tabs { display: flex; align-items: center; gap: 32px; margin-bottom: 12px; padding: 0 24px; overflow-x: auto; scrollbar-width: none; }
.gm-hot__tabs::-webkit-scrollbar { display: none; }
header .search .gm-hot__tabs button {
    position: static; flex: none; height: auto; padding: 0; background: none; border: 0; color: rgba(255, 255, 255, .6);
    font-family: inherit; font-size: 18px; font-weight: 400; line-height: 25px; white-space: nowrap; cursor: pointer;
}
header .search .gm-hot__tabs button:hover { color: rgba(255, 255, 255, .8); }
header .search .gm-hot__tabs button.is-active { color: #fff; font-weight: 500; }

/* Năm hàng 82px để bảng giữ nguyên chiều cao trong lúc một tab đang tải. */
.gm-hot__list { display: grid; grid-template-columns: 1fr 1fr; min-height: 410px; align-content: start; margin: 0; padding: 0; }
.gm-hot__list li { min-width: 0; }
.gm-hot__item { align-items: center; min-width: 0; padding: 5px 24px; color: #fff; font-size: 16px; }
.gm-hot__item:hover, .gm-hot__item:focus-visible { background: rgba(255, 255, 255, .04); }
.gm-hot__thumb { position: relative; width: 54px; height: 72px; flex: none; margin-right: 6px; border-radius: 8px; background: #2b2c2e; }
.gm-hot__thumb img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
/* Làm tối góc sau con số để số luôn đọc được trên mọi poster; ba hạng đầu có góc xanh. */
.gm-hot__thumb::before {
    content: ""; position: absolute; top: 0; left: 0; z-index: 1; width: 54px; height: 54px; border-radius: 8px 0 0 0;
    background: linear-gradient(135deg, rgba(20, 20, 20, .6), rgba(20, 20, 20, 0) 50.35%); pointer-events: none;
}
.gm-hot__thumb.is-top::before { background: linear-gradient(135deg, #274bff, rgba(0, 128, 255, 0) 50.35%); }
.gm-hot__no {
    position: absolute; top: -11px; left: -4px; z-index: 2; color: #fff;
    font-family: "Bahnschrift", "DIN Alternate", Arial, sans-serif; font-size: 26px; font-weight: 800; font-style: italic;
    letter-spacing: -.03em; line-height: 36px; pointer-events: none;
}
.gm-hot__text { flex: 1; min-width: 0; }
.gm-hot__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #fff; font-size: 16px; font-weight: 500; line-height: 22px; }
.gm-hot__sub { display: block; color: rgba(255, 255, 255, .4); font-size: 12px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Kết quả khớp khi đang gõ: cùng bề rộng, mỗi phim một hàng poster với nút trắng. */
.gm-hot.is-sug { padding: 12px 0 24px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; background: rgba(36, 38, 40, .9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.gm-sug__item { align-items: center; padding: 12px 24px; color: #fff; font-size: 16px; }
.gm-sug__item:hover, .gm-sug__item:focus-visible { background: rgba(255, 255, 255, .04); }
.gm-sug__thumb { width: 54px; height: 72px; flex: none; margin-right: 8px; border: .5px solid rgba(255, 255, 255, .15); border-radius: 8px; background: #2b2c2e; overflow: hidden; }
.gm-sug__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gm-sug__text { flex: 1; min-width: 0; }
.gm-sug__name { display: block; color: #ccc; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-sug__name em { color: #00a9f5; font-style: normal; }
.gm-sug__tag { display: inline-block; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: rgba(255, 255, 255, .1); font-size: 12px; font-weight: 400; line-height: 20px; vertical-align: 2px; }
.gm-sug__sub { display: block; margin-top: 4px; font-size: 12px; opacity: .3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-sug__play { flex: none; height: 30px; margin-left: 16px; padding: 0 16px; border-radius: 8px; background: #fff; color: #000; font-size: 14px; font-weight: 500; line-height: 30px; white-space: nowrap; }
.gm-sug__empty { margin: 12px 24px 0; color: rgba(255, 255, 255, .5); font-size: 14px; line-height: 22px; }

/* Ô tìm nằm sát mép phải ở màn hình hẹp → neo bảng theo mép phải để không tràn. */
@media (max-width: 1360px) and (min-width: 769px) {
    .gm-hot { left: auto; right: 0; transform: translateY(-6px); max-width: calc(100vw - 40px); }
    .search-box:focus-within .gm-hot { transform: none; }
}
@media (max-width: 768px) {
    .gm-hot {
        position: fixed; top: 46px; right: 8px; left: 8px; width: auto; max-height: calc(100vh - 130px); overflow-y: auto;
        padding: 18px 0; background: rgba(35, 34, 34, .96); transform: translateY(-6px);
    }
    .search-box:focus-within .gm-hot { transform: none; }
    /* Điện thoại: giữ hai cột gọn như máy tính, thu nhỏ poster và chữ. */
    .gm-hot { padding: 14px 0 10px; }
    .gm-hot__recent { margin: 0 12px 14px; }
    .gm-hot__recent-top { font-size: 15px; line-height: 22px; }
    .gm-hot__recent-list { gap: 8px; max-height: 68px; margin-top: 8px; }
    header .search .gm-hot__recent-list a { padding: 5px 10px; font-size: 12px; }
    .gm-hot__tabs { gap: 18px; padding: 0 12px; margin-bottom: 8px; }
    header .search .gm-hot__tabs button { font-size: 15px; line-height: 22px; }
    .gm-hot__list { min-height: 0; }
    .gm-hot__item { padding: 6px 4px 6px 12px; }
    .gm-hot__thumb { width: 39px; height: 52px; border-radius: 6px; }
    .gm-hot__thumb img { border-radius: 6px; }
    .gm-hot__thumb::before { width: 39px; height: 39px; border-radius: 6px 0 0 0; }
    .gm-hot__no { top: -9px; left: -3px; font-size: 19px; line-height: 28px; }
    .gm-hot__name { font-size: 13px; line-height: 18px; }
    .gm-hot__sub { font-size: 11px; line-height: 15px; }
    .gm-sug__item { padding: 8px 12px; font-size: 14px; }
    .gm-sug__thumb { width: 39px; height: 52px; border-radius: 6px; }
    .gm-sug__play { height: 26px; margin-left: 8px; padding: 0 10px; font-size: 12px; line-height: 26px; }
}

/* Bảng tìm kiếm cao hơn màn hình thì cuộn được; đang mở bảng thì ẩn cụm nút nổi để không che. */
.gm-hot { overflow-y: auto; scrollbar-width: none; }
.gm-hot::-webkit-scrollbar { display: none; }
body:has(.search-box:focus-within) .side-top { visibility: hidden; }

/* Menu ngang trên điện thoại: ẩn thanh cuộn, canh icon thẳng hàng với chữ. */
.main_nav .tab_head { scrollbar-width: none; -ms-overflow-style: none; }
.main_nav .tab_head::-webkit-scrollbar { display: none; }
.main_nav .tab_head .tab_item .nav { gap: 4px; line-height: 1; border-bottom: 3px solid transparent; border-radius: 0; white-space: nowrap; }
.main_nav .tab_head .nav.active { border-bottom: 3px solid var(--theme-color); border-radius: 0; }
.main_nav .tab_head .nav .iconfont { display: block; margin: 0 !important; font-size: 18px; line-height: 1; }
.main_nav .tab_head .nav span { line-height: 1.2; }

/* Nút xếp hạng luôn nằm cạnh nút đăng nhập, kể cả trên máy tính bảng và điện thoại. */
@media (max-width: 1024px) {
    header .icons.icon1 { width: 40px; flex: none; margin-left: 4px; }
    header .icons.icon1 .iconName { display: none !important; }
    header .icons.icon1:hover .iconfont, header .icons.icon1:active .iconfont { margin-top: 0; }
}
@media (max-width: 768px) {
    header .icons.icon1 { width: 30px; margin-top: 8px; margin-left: 6px; }
    header .icons.icon1 .iconfont { font-size: 24px; }
    header .icons.icon5 { margin-left: 4px; padding-left: 4px; }
}

/* Điện thoại: ô tìm kiếm chiếm hết khoảng trống giữa logo và cụm nút bên phải. */
@media (max-width: 768px) {
    header .search { justify-content: flex-start; gap: 8px; }
    header .search .search-box { flex: 1; width: auto; min-width: 0; max-width: none; }
    header .icons.icon1 { margin-left: 0; }
    header .icons.icon5 { margin-left: 0; padding-left: 0; }
    header .menu { margin-right: 8px; }
}
@media (max-width: 768px) {
    header .search { gap: 6px; }
    header .search .search-box input.search-field { margin-right: 0 !important; }
    header .icons.icon1 { width: 28px; }
}
@media (max-width: 768px) {
    /* Nút đăng nhập sát lề phải, thẳng hàng với nội dung bên dưới (lề 15px). */
    header .icons.icon5 { width: auto; height: auto; margin-top: 8px; align-self: flex-start; justify-content: flex-end; }
    header .icons.icon5 > a { display: block; }
}

/* Các hàng cuộn ngang (thẻ thể loại, bộ lọc, hàng phim, tab nguồn phát...): vẫn vuốt được nhưng không hiện thanh trượt. */
.tags, .screen-box .filter-box .filter-ul, .myui-vodbox-item .content .card-box, .vod-list, .title-box .director, .title-box .roles,
.player-box .swiper-container, .episodes_wrap, .player-foot .data, .category-box .item .content { scrollbar-width: none; -ms-overflow-style: none; }
.tags::-webkit-scrollbar, .screen-box .filter-box .filter-ul::-webkit-scrollbar, .myui-vodbox-item .content .card-box::-webkit-scrollbar, .vod-list::-webkit-scrollbar,
.title-box .director::-webkit-scrollbar, .title-box .roles::-webkit-scrollbar, .player-box .swiper-container::-webkit-scrollbar, .episodes_wrap::-webkit-scrollbar,
.player-foot .data::-webkit-scrollbar, .category-box .item .content::-webkit-scrollbar { display: none; }

/* Trang xem trên điện thoại: trình phát ghim cố định dưới header (như bản gốc). Bản gốc dùng JS để chừa chỗ;
   ở đây chừa bằng CSS (video 16:9 = 56.25% bề rộng màn hình) để tên phim và mô tả không bị che. */
@media (max-width: 768px) {
    .mizhiady-player-zz { display: block; height: 56.25vw; }
    .mizhiady-player-box { z-index: 90; }
    .mizhiady-player-detail { padding-top: 14px; }
}
.site-footer .footer-left, .site-footer .footer-right { line-height: 1.7; }

/* Nút "Đăng nhập" trong khung bình luận: bản gốc đặt bề rộng cố định cho 2 chữ Hán nên chữ Việt bị xuống dòng. */
.no-login-box .go-login { width: auto; min-width: 111px; padding: 0 18px; white-space: nowrap; color: #fff; }
@media (max-width: 768px) {
    .no-login-box .go-login { min-width: 60px; padding: 0 14px; font-size: 13px; }
    .no-login-box .text { line-height: 1.4; padding: 0 12px; text-align: center; }
}

/* Nút "Đổi mới" / "Xem thêm" ở đầu mỗi mục: nhãn tiếng Việt dài hơn nên thu nhỏ lại cho gọn. */
.myui-vodbox .top .right .more, .myui-vodbox .top .right .right_change { height: 22px; margin-left: 6px; padding: 0 6px 0 9px; font-size: 12px; line-height: 22px; white-space: nowrap; }
.myui-vodbox .top .right .iconfont { font-size: 11px; }
@media (max-width: 768px) {
    .myui-vodbox .top .right .more, .myui-vodbox .top .right .right_change { height: 17px; margin-left: 5px; padding: 0 4px 0 6px; font-size: 10px; line-height: 17px; }
    .myui-vodbox .top .right .iconfont { font-size: 9px; }
}

/* Cụm nút bên phải tiêu đề mục: sát lề phải, đối xứng với tiêu đề sát lề trái. */
.myui-vodbox .top .right > :last-child, .myui-vodbox .top .right > :last-child .more { margin-right: 0; }
.myui-vodbox .top .right > .right_change:last-child { margin-right: 0; }
.myui-vodbox .top .right .right_change .iconfont, .myui-vodbox .top .right .more .iconfont { margin-left: 4px; margin-top: 0; }
@media (max-width: 768px) { .myui-vodbox .top .right .right_change .iconfont, .myui-vodbox .top .right .more .iconfont { margin-left: 3px; } }

/* Huy hiệu phim mới cập nhật: bản gốc là ảnh chữ Hán "新" → thay bằng nhãn chữ "Mới",
   giữ đúng kiểu của ảnh gốc: nền chuyển màu đào sang cam hồng, chữ nâu sẫm nét thường, bo hai góc chéo. */
.new-box { top: 0; right: 0; }
.new-box .tag { width: auto; height: auto; min-width: 0; margin: 0; padding: 2px 8px; border-radius: 0 10px 0 10px; background: linear-gradient(135deg, #ffbd9d, #fe7a5f); font-size: 12px; font-weight: 400; line-height: 1.35; color: #523000; }
.new-box .tag::after { content: "Mới"; }
@media (max-width: 768px) { .new-box .tag { padding: 1px 6px; font-size: 10px; border-radius: 0 8px 0 8px; } }

/* Slider trên điện thoại: nhãn thể loại nhỏ gọn và thẳng lề trái với tên phim, mô tả. */
.m-slide-btn-box .m-detail-box .tags { margin: 6px 0; gap: 6px; }
.m-slide-btn-box .m-detail-box .tag, .m-slide-btn-box .m-detail-box .score { margin: 0; padding: 2px 7px; border-radius: 5px; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.m-slide-btn-box .m-detail-box .score { display: inline-flex; align-items: center; }
.m-slide-btn-box .m-detail-box .score .icon-pingfen { font-size: 11px; }

/* ---------- Tên phim kiểu thư pháp bút lông ----------
   Font Thư pháp Xuân (thư pháp Việt nét bay, do người dùng cung cấp; giấy phép OFL, tự lưu trong theme, có đủ dấu tiếng Việt). Chỉ dùng cho tên phim trên slider trang chủ;
   chữ Hán trong tên phim tự rơi về font hệ thống. */
@font-face { font-family: "Gumy Brush"; font-weight: 700; font-display: swap; src: url(../fonts/thuphap.ttf) format("truetype"); unicode-range: U+0020, U+0041-005A, U+0061-007A, U+00C0-024F, U+0300-0323, U+1EA0-1EF9; }
/* Chỉ lấy chữ cái từ font thư pháp: dấu câu và chữ số của font này vẽ không chuẩn (dấu ":" thành nét ngoằn) nên để font thường hiển thị. */
.banner-box .nav-name .name h3, .m-slide-btn-box .m-detail-box .title {
    font-family: "Gumy Brush", "PingFang SC", system-ui, "Segoe UI", sans-serif; font-weight: 700; letter-spacing: .01em;
}
.banner-box .nav-name .name h3 { font-size: 21px; font-weight: 700; line-height: 1.45; }
.banner-box .nav-name .name.active h3 { font-size: 24px; }
.m-slide-btn-box .m-detail-box .title { font-size: 20px; line-height: 1.4; }
@media (max-width: 1600px) { .banner-box .nav-name .name h3 { font-size: 19px; } .banner-box .nav-name .name.active h3 { font-size: 21px; } }

/* Menu ngang trên điện thoại: chỉ để chữ, bỏ icon. */
.main_nav .tab_head .nav .iconfont { display: none; }

/* ---------- Menu ngang trên điện thoại theo thanh tab của app StoryHub (HeaderTabBar) ----------
   Thanh cao 46px chỉ có chữ. Mục thường 16px nét mảnh, màu chữ 70%; mục đang chọn 17.5px nét đậm vừa,
   bên dưới có nét cong "mặt cười" màu hồng (18.5 x 6.85px, nét 3.5px bo tròn hai đầu).
   Mục đang chọn có lề hai bên 9px, mục thường 15.2px; nhãn nằm cách mép trên 12.1px, nét cong cách nhãn 5.6px. */
@media (max-width: 768px) {
    .main_nav .tab_head { height: 46px; padding: 0 12px 0 15px; justify-content: flex-start; }
    .main_nav .tab_head .tab_item { flex: none; margin: 0 !important; align-items: flex-start; }
    .main_nav .tab_head .tab_item a { display: block; height: auto; }
    .main_nav .tab_head .tab_item .nav {
        display: flex; flex-direction: column; align-items: center; gap: 0; height: auto;
        padding: 12.1px 15.2px 0; border: 0; border-radius: 0;
        color: rgba(255, 255, 255, .7); font-size: 16px; font-weight: 300; line-height: 1;
        transition: padding .24s cubic-bezier(.33, 1, .68, 1), font-size .24s cubic-bezier(.33, 1, .68, 1), color .24s;
    }
    .main_nav .tab_head .tab_item:first-child .nav { padding-left: 0; }
    /* Nhãn canh đáy trong hộp cao cố định để mục thường và mục đang chọn chung đường chân chữ. */
    .main_nav .tab_head .nav span { display: flex; align-items: flex-end; height: 17.5px; line-height: 1; white-space: nowrap; }
    .main_nav .tab_head .nav::after {
        content: ""; width: 18.5px; height: 6.85px; margin-top: 5.6px; opacity: 0; transform: scale(.4);
        /* Nét cong tô bằng màu chủ đạo của web (dùng mask để ăn theo biến màu). */
        background: var(--theme-color);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
        transition: opacity .2s, transform .24s cubic-bezier(.34, 1.56, .64, 1);
    }
    .main_nav .tab_head .nav.active { padding-right: 9px; padding-left: 9px; border: 0; color: #fff; font-size: 17.5px; font-weight: 500; }
    .main_nav .tab_head .tab_item:first-child .nav.active { padding-left: 0; }
    .main_nav .tab_head .nav.active::after { opacity: 1; transform: scale(1); }
    [data-theme="light"] .main_nav .tab_head .tab_item .nav { color: #666; }
    [data-theme="light"] .main_nav .tab_head .nav.active { color: #333; }
    /* Thanh tab cao hơn bản gốc 6px → đẩy nội dung xuống tương ứng. */
    body#index, body.show, body.type, body { padding-top: 86px; }
    body#detail, body#play { padding-top: 45px; }
}

/* Icon xếp hạng kiểu app StoryHub: trắng ở giao diện tối, #333 ở giao diện sáng; rê chuột thì nhấc lên và đổi màu như các icon khác. */
header .icons.icon1 .gm-rank { display: block; width: 26px; height: 25px; color: #fff; transition: all .2s ease 0s; }
[data-theme="light"] header .icons.icon1 .gm-rank { color: #333; }
header .icons.icon1:hover .gm-rank, header .icons.icon1:active .gm-rank { margin-top: -20px; color: var(--theme-color); }
@media (max-width: 1024px) {
    header .icons.icon1:hover .gm-rank, header .icons.icon1:active .gm-rank { margin-top: 0; }
}
@media (max-width: 768px) {
    header .icons.icon1 { width: 21px; margin-right: 6px; }
    header .icons.icon1 .gm-rank { width: 21px; height: 20px; }
}

/* Kính lúp nằm sát mép phải ô tìm kiếm hơn (bản gốc cách mép khoảng 27px). */
header .search .search-box #search_btn { right: 4px; padding: 0 8px !important; }
header .search .search-box input.search-field { padding-right: 36px; }

/* Điện thoại: ô tìm kiếm, icon xếp hạng và ảnh đại diện cách đều nhau 10px. */
@media (max-width: 768px) {
    header .search { gap: 10px; }
    header .icons.icon1 { margin: 8px 0 0; width: 21px; height: 30px; align-self: flex-start; }
    header .icons.icon5 { margin-left: 0; padding-left: 0; }
}

/* Đường dẫn (breadcrumb) luôn gọn trên một dòng: mục cuối tự cắt bằng dấu ba chấm khi tên phim dài. */
.gm-crumb ol { flex-wrap: nowrap; gap: 0 6px; min-width: 0; }
.gm-crumb li { flex: none; white-space: nowrap; }
.gm-crumb li + li::before { margin-right: 6px; }
.gm-crumb [aria-current] { flex: 0 1 auto; min-width: 0; max-width: none; }
@media (max-width: 768px) {
    .gm-crumb { padding: 0 0 10px; font-size: 12px; line-height: 1.3; }
}

/* Điện thoại, trang xem: tên phim gọn trên một dòng (dài quá thì ba chấm), số tập đi liền ngay sau. */
@media (max-width: 768px) {
    .mizhiady-player-detail .title-box { align-items: baseline; gap: 2px; line-height: 1.35; }
    .mizhiady-player-detail .title-box a { flex: 0 1 auto; min-width: 0; }
    .mizhiady-player-detail .title-box .title_name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
    .mizhiady-player-detail .title-box .title_num { flex: none; display: inline-flex; align-items: center; font-size: 14px; line-height: 1.35; }
    .mizhiady-player-detail .title-box .title_num svg { width: 14px; height: 14px; }
    /* Nhãn thể loại nhỏ gọn hơn ở trang phim và trang xem. */
    .tags { gap: 6px !important; margin-bottom: 6px; padding-bottom: 0 !important; }
    .tags .tag { margin-right: 0; padding: 3px 9px; border-radius: 6px; font-size: 11px; line-height: 1.5; white-space: nowrap; }
    .mizhiady-player-detail .tags { margin-top: 8px; }
    .mizhiady-player-detail .detail-box { margin-top: 6px; }
}

/* Điện thoại, trang xem: hàng nút thích / không thích / yêu thích / báo lỗi / chia sẻ gọn lại để vừa một hàng. */
@media (max-width: 768px) {
    .player-foot.m_player_foot { margin: 10px 0 14px; top: 0; }
    .player-foot.m_player_foot .data { justify-content: flex-start; gap: 6px; overflow-x: auto; }
    .player-foot.m_player_foot .data .item { flex: none; padding: 1px 8px; }
    .player-foot.m_player_foot .data .item .item-icon { height: 22px; }
    .player-foot.m_player_foot .data .item .item-icon span { font-size: 11px; white-space: nowrap; }
    .player-foot.m_player_foot .data .item .item-icon svg { width: 14px; height: 14px; margin-right: 3px; }
}

/* Trang danh sách: bản gốc để nội dung cách header 20px (lề trên của khung lọc) → đường dẫn cũng cách header như vậy. */
.show .gm-crumb { padding-top: 20px; padding-bottom: 6px; }
.show .gm-h1 { margin-top: 8px; }
@media (max-width: 768px) {
    .show .gm-crumb { padding-top: 14px; padding-bottom: 4px; }
    .vod-detail-box .gm-crumb { padding-top: 2px; }
}

/* Hàng nút trên điện thoại trải đều hết bề ngang, hai mép thẳng với khung danh sách tập bên dưới. */
@media (max-width: 768px) {
    .player-foot.m_player_foot { width: 100%; }
    .player-foot.m_player_foot .data { justify-content: space-between; }
    .player-foot.m_player_foot .data .item { flex: 1 1 auto; justify-content: center; }
    .player-foot.m_player_foot .data .item a { display: flex; justify-content: center; }
}

/* Điện thoại: danh sách tập xếp 4 tập một hàng. */
@media (max-width: 768px) {
    .lists-box { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .lists-box .listitem { height: 36px; line-height: 36px; }
}

/* Slider trên điện thoại: thêm lớp mờ ở mép trên, hoà dần từ màu thanh menu vào ảnh (giống lớp mờ ở mép dưới). */
@media (max-width: 768px) {
    .banner-pic .swiper-slide::before {
        content: ""; position: absolute; inset: 0 0 auto 0; z-index: 2; height: 56px; pointer-events: none;
        background: linear-gradient(to bottom, var(--basic-bg), rgba(25, 25, 25, .55) 35%, transparent);
    }
    [data-theme="light"] .banner-pic .swiper-slide::before { background: linear-gradient(to bottom, var(--basic-bg), rgba(255, 255, 255, .55) 35%, transparent); }
    .banner { margin-top: 0; }
}

/* ---------- Slider máy tính: ba poster nhỏ thay cho danh sách tên phim ----------
   Luôn hiện đúng ba poster: phim trước, phim đang chiếu (ở giữa, viền trắng) và phim sau.
   Danh sách xoay vòng nên ở phim đầu/cuối vẫn đủ ba poster. */
.gm-thumbs { position: absolute; right: 100px; bottom: 170px; z-index: 2; width: 460px; }
.gm-thumbs__title { margin-bottom: 10px; text-align: center; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.gm-thumbs__title h3 { font-family: "Gumy Brush", "PingFang SC", system-ui, "Segoe UI", sans-serif; font-size: 28px; font-weight: 700; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-thumbs__title p { min-height: 20px; font-size: 14px; line-height: 20px; color: #e1e1e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-thumbs__row { --tw: 144px; position: relative; height: calc(var(--tw) * 1.5 + 8px); perspective: 900px; }
.gm-thumb {
    position: absolute; top: 4px; left: 50%; width: var(--tw); aspect-ratio: 2 / 3; margin-left: calc(var(--tw) / -2); padding: 0;
    border: 2px solid transparent; border-radius: 14px; overflow: hidden; background: #0a0b0f; cursor: pointer;
    opacity: 0; pointer-events: none; transform: scale(.6);
    transition: transform .6s ease, opacity .6s ease, border-color .6s ease;
}
.gm-thumb img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.gm-thumb.is-prev, .gm-thumb.is-next { opacity: .8; pointer-events: auto; }
.gm-thumb.is-prev { transform: translateX(-104%) scale(.84) rotateY(40deg); }
.gm-thumb.is-next { transform: translateX(104%) scale(.84) rotateY(-40deg); }
.gm-thumb.is-prev:hover, .gm-thumb.is-next:hover { opacity: 1; }
.gm-thumb.active { z-index: 2; border-color: rgba(255, 255, 255, .92); opacity: 1; pointer-events: auto; transform: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
@media (max-width: 1600px) {
    .gm-thumbs { right: 96px; bottom: 160px; width: 400px; }
    .gm-thumbs__row { --tw: 124px; }
    .gm-thumb { border-radius: 12px; }
    .gm-thumbs__title h3 { font-size: 24px; }
}
@media (max-width: 1024px) {
    .gm-thumbs { right: 30px; bottom: 30px; width: 300px; }
    .gm-thumbs__row { --tw: 92px; }
    .gm-thumb { border-radius: 10px; }
    .gm-thumbs__title h3 { font-size: 20px; }
}
/* Máy tính: kính lúp cách mép ô tìm kiếm rộng hơn điện thoại (ô cao 40px nên cần thoáng hơn). */
@media (min-width: 769px) {
    header .search .search-box #search_btn { right: 18px; }
    header .search .search-box input.search-field { padding-right: 54px; }
}

/* ---------- Menu trên máy tính: cùng kiểu với thanh tab điện thoại ----------
   Chỉ có chữ, không icon, không nền xanh. Mục đang chọn chữ to và đậm hơn, bên dưới có nét cong màu chủ đạo. */
@media (min-width: 769px) {
    header .menu .nav .iconfont { display: none; }
    header .menu .nav, header .menu .nav.active, header .menu .nav:hover {
        position: relative; height: 69px; margin: 0; padding: 0 16px !important; border-radius: 0; background: none;
        font-size: 17px; font-weight: 400; line-height: 1; transition: font-size .24s cubic-bezier(.33, 1, .68, 1), color .24s;
    }
    [data-theme="dark"] header .menu .nav { color: rgba(255, 255, 255, .75) !important; }
    [data-theme="light"] header .menu .nav { color: #666 !important; }
    header .menu .nav:hover { color: var(--theme-color) !important; background: none; }
    header .menu .nav.active { font-size: 19px; font-weight: 600; }
    [data-theme="dark"] header .menu .nav.active { color: #fff !important; }
    [data-theme="light"] header .menu .nav.active { color: #333 !important; }
    header .menu .nav::after {
        content: ""; position: absolute; left: 50%; bottom: 8px; width: 18.5px; height: 6.85px; margin-left: -9.25px;
        background: var(--theme-color); opacity: 0; transform: scale(.4);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
        transition: opacity .2s, transform .24s cubic-bezier(.34, 1.56, .64, 1);
    }
    header .menu .nav.active::after { opacity: 1; transform: scale(1); }
}
@media (min-width: 769px) and (max-width: 1100px) {
    header .menu .nav, header .menu .nav.active, header .menu .nav:hover { padding: 0 10px !important; font-size: 15px; }
    header .menu .nav.active { font-size: 16px; }
}

/* ---------- Slider máy tính: tên phim cỡ lớn bên trái, ngay trên hai nút ---------- */
.gm-slide-title { position: absolute; left: 90px; bottom: 280px; z-index: 3; width: min(620px, 46vw); color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .65); }
.gm-slide-title .gm-slide-title__name {
    font-family: "Gumy Brush", "PingFang SC", system-ui, "Segoe UI", sans-serif; font-size: clamp(34px, 3.6vw, 60px); font-weight: 700; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.banner-box .banner-pic .gm-slide-title a { display: inline; width: auto; height: auto; position: static; overflow: visible; }
.gm-slide-title__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; text-shadow: none; }
.gm-slide-title__meta span { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, .22); backdrop-filter: blur(4.5px); -webkit-backdrop-filter: blur(4.5px); font-size: 14px; line-height: 1.4; white-space: nowrap; }
.gm-slide-title__meta .is-score { font-weight: 700; }
.gm-slide-title__meta .iconfont { font-size: 14px; color: #ffc93c; margin-right: 4px; }
@media (max-width: 1024px) {
    .gm-slide-title { left: 60px; bottom: 270px; }
}
/* Mô tả ngắn dưới hàng nhãn trên slider máy tính: tối đa hai dòng. */
.gm-slide-title__desc { margin-top: 12px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .88); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Font bút lông vốn đậm và nghiêng sẵn: không cho trình duyệt tô đậm giả thêm, chỉnh khoảng dòng cho dấu tiếng Việt. */
.gm-slide-title .gm-slide-title__name, .m-slide-btn-box .m-detail-box .title { font-synthesis: none; letter-spacing: 0; }
.gm-slide-title .gm-slide-title__name { line-height: 1.25; padding: 4px 6px 4px 0; }
/* Dấu tiếng Việt của font bút lông cao hơn font thường → chừa chỗ phía trên để dấu không bị cắt. */
.m-slide-btn-box .m-detail-box .title { line-height: 1.6; padding-top: 4px; }
.m-slide-btn-box { height: 130px; }

/* ---------- Slider máy tính: chuyển cảnh mờ dần (crossfade) như chibiflix ----------
   Các slide xếp chồng lên nhau trong cùng một ô lưới; slide đang chiếu hiện dần trong 0,9 giây. */
@media (min-width: 769px) {
    .banner-pic > .swiper-wrapper { display: grid; overflow: hidden; scroll-snap-type: none; }
    .banner-pic > .swiper-wrapper > .swiper-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
    .banner-pic > .swiper-wrapper > .swiper-slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
    /* Chữ và nút trượt nhẹ lên khi slide hiện ra. */
    .banner-pic .swiper-slide .gm-slide-title, .banner-pic .swiper-slide .slide-btn-box { transform: translateY(14px); transition: transform .9s ease; }
    .banner-pic .swiper-slide.is-active .gm-slide-title, .banner-pic .swiper-slide.is-active .slide-btn-box { transform: none; }
}
/* ---------- Nhãn điểm đánh giá trên slider theo kiểu chibiflix (.tag-imdb) ----------
   Nền trong suốt, viền xanh ngọc 1px, bo 5px (theme này đặt cỡ chữ gốc theo vw nên không dùng rem), số trắng đậm vừa, phía trước có chữ nhỏ màu xanh ngọc.
   Điểm ở đây là điểm người xem chấm trên site nên tiền tố ghi "Điểm", không ghi "IMDb". */
.gm-slide-title__meta .is-score, .m-slide-btn-box .m-detail-box .score {
    display: inline-flex; align-items: center; flex-shrink: 0; padding: 0 6px; border: 1px solid #84e8fc; border-radius: 5px;
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; font-size: 12px; font-weight: 500; line-height: 24px; cursor: default;
}
.gm-slide-title__meta .is-score .iconfont, .m-slide-btn-box .m-detail-box .score .iconfont { display: none; }
.gm-slide-title__meta .is-score::before, .m-slide-btn-box .m-detail-box .score::before { content: "Điểm"; padding-right: 4px; color: #84e8fc; font-size: 10px; font-weight: 500; line-height: 1; }
@media (max-width: 768px) {
    .m-slide-btn-box .m-detail-box .score { padding: 0 4px; font-size: 10px; line-height: 18px; }
    .m-slide-btn-box .m-detail-box .score::before { font-size: 9px; }
}
/* Nhãn điểm: viền trắng, bo góc và kích thước bằng các nhãn bên cạnh (viền 1px nên đệm bớt 1px). */
.gm-slide-title__meta .is-score { padding: 3px 9px; border-color: #fff; border-radius: 6px; font-size: 14px; line-height: 1.4; }
.gm-slide-title__meta .is-score::before { color: #fff; font-size: 12px; opacity: .85; }
@media (max-width: 768px) {
    .m-slide-btn-box .m-detail-box .score { padding: 1px 6px; border-color: #fff; border-radius: 5px; font-size: 11px; line-height: 1.5; }
    .m-slide-btn-box .m-detail-box .score::before { color: #fff; opacity: .85; }
}

/* Font thư pháp có nét vút dài ra ngoài khung chữ → chừa chỗ để nét không bị cắt. */
.gm-slide-title .gm-slide-title__name { font-size: clamp(40px, 4.4vw, 72px); line-height: 1.45; padding: 20px 30px 16px 10px; margin: -20px 0 -10px -10px; -webkit-line-clamp: 2; }
.m-slide-btn-box .m-detail-box .title { font-size: 26px; line-height: 1.6; padding: 10px 14px 4px 4px; margin-left: -4px; }
.m-slide-btn-box .m-detail-box { width: 92%; }
.m-slide-btn-box { height: 142px; }

/* Ô nhập (bình luận, yêu cầu phim, báo lỗi) ở giao diện tối: nền tối trong suốt thay cho nền xám trắng của bản gốc. */
[data-theme="dark"] .comment-body textarea { background: var(--input-bg); border-color: rgba(255, 255, 255, .12); color: #fff; }
[data-theme="dark"] .comment-body textarea::placeholder { color: rgba(255, 255, 255, .45); }
[data-theme="dark"] .comment-body textarea:focus { border-color: var(--theme-color); }
[data-theme="dark"] .comment-body .comment_data_foot .verify { background: var(--input-bg); border-color: rgba(255, 255, 255, .12); color: #fff; }

/* Khối giới thiệu + hỏi đáp cuối trang chủ. */
.gm-about { margin: 10px 0 50px; padding: 30px 40px; border-radius: 20px; background: var(--playlist-bg); border: 1px solid rgba(255, 255, 255, .08); }
[data-theme="light"] .gm-about { border-color: #e0e5ee; }
.gm-about__title { font-size: 22px; font-weight: 600; line-height: 1.4; color: var(--font-color); }
.gm-about__sub { margin: 20px 0 4px; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--font-color); }
.gm-about__text { margin: 12px 0 0; }
@media (max-width: 768px) { .gm-about { padding: 18px 16px; border-radius: 10px; margin-bottom: 26px; } .gm-about__title { font-size: 17px; } .gm-about__sub { font-size: 15px; } }

/* Khối diễn viên có ảnh (dữ liệu TMDB) ở trang phim. */
.gm-cast { margin-top: 0; }
.gm-cast__row { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 6px 0; }
.gm-cast__row::-webkit-scrollbar { display: none; }
.gm-cast__item { flex: none; width: 92px; text-align: center; color: var(--font-color); }
.gm-cast__item img { width: 80px; height: 80px; margin: 0 auto 6px; border-radius: 50%; object-fit: cover; background: var(--input-bg); }
.gm-cast__item strong, .gm-cast__item small { display: block; font-size: 13px; font-weight: 500; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-cast__item small { color: var(--font-color-6); font-size: 12px; font-weight: 400; }
a.gm-cast__item:hover strong { color: var(--theme-color); }

/* Trang đăng nhập / đăng ký trên điện thoại: khung gốc rộng cố định 543px làm cả trang bị tràn ngang → co theo màn hình. */
@media (max-width: 768px) {
    .login-box { height: auto; min-height: calc(100vh - 150px); padding: 20px 15px 40px; background-image: none !important; }
    .box-login-bg, .box-login-bg.box-reg-bg { width: 100%; min-width: 0; max-width: 380px; height: auto; margin-top: 10px; padding: 28px 20px; transform: none; background: var(--playlist-bg); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; }
    .box-login-bg form { width: 100%; }
}
.login-href { font-family: inherit; }

.gm-updated { margin-top: 10px; color: var(--font-color-6); font-size: 13px; line-height: 1.5; }

/* Mục phim kiểu lưới xuống hàng trên màn hình nhỏ (widget, kiểu "Lưới"). */
@media (max-width: 1024px) { .myui-vodbox-item .content .card-box.gm-wrap { flex-wrap: wrap; overflow-x: visible; } }
/* Kiểu lưới xuống hàng trên điện thoại: ba thẻ chia đều hết bề ngang (bản gốc để thẻ hẹp hơn vì vốn dành cho hàng vuốt ngang). */
@media (max-width: 768px) {
    .myui-vodbox-item .content .card-box.gm-wrap .myui-vodbox-content { width: calc(33.333% - 10px); min-width: calc(33.333% - 10px); margin-bottom: 30px; }
}

/* Thanh mời cài ứng dụng: nằm trên cụm nút nổi, và đẩy cụm nút lên để không đè nhau. */
.gm-install { z-index: 1001; }
body:has(.gm-install) .side-top { bottom: 140px; }

/* Giao diện sáng: lớp phủ mép trên slider dùng bóng tối nhẹ (cùng tông với lớp phủ mép dưới) thay cho màu trắng làm ảnh bị bạc. */
@media (max-width: 768px) {
    [data-theme="light"] .banner-pic .swiper-slide::before { height: 44px; background: linear-gradient(to bottom, rgba(0, 0, 0, .32), transparent); }
}

/* Tên phim trên slider máy tính: cỡ chữ vừa phải và khung rộng hơn để tên dài vẫn đủ trong hai dòng, không bị cắt "…". */
.gm-slide-title { width: min(820px, 52vw); }
.gm-slide-title .gm-slide-title__name { font-size: clamp(32px, 3.1vw, 54px); }
.gm-slide-title__meta, .gm-slide-title__desc { max-width: 640px; }

/* Giao diện sáng, máy tính: chân slider mờ dần vào nền sáng thay vì bị cắt ngang bằng một dải màu đặc. */
@media (min-width: 1025px) {
    [data-theme="light"] .banner::after { height: 260px; background: linear-gradient(to bottom, rgba(241, 245, 248, 0), rgba(241, 245, 248, .55) 30%, rgba(241, 245, 248, .92) 52%, #f1f5f8 66%); pointer-events: none; }
}

/* Giao diện sáng, máy tính, trang chủ: header trong suốt nằm trên slider (như giao diện tối); cuộn xuống thì thành nền trắng. */
@media (min-width: 769px) {
    [data-theme="light"] body#index header:not(.header-bg) { background: linear-gradient(rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, 0) 100%); box-shadow: none; }
    [data-theme="light"] body#index header:not(.header-bg) .menu .nav { color: rgba(255, 255, 255, .8) !important; }
    [data-theme="light"] body#index header:not(.header-bg) .menu .nav.active { color: #fff !important; }
    [data-theme="light"] body#index header:not(.header-bg) .menu .nav:hover { color: #fff !important; }
    [data-theme="light"] body#index header:not(.header-bg) .gm-logo { color: #fff; }
    [data-theme="light"] body#index header:not(.header-bg) .search .search-box input { background: rgba(255, 255, 255, .22); color: #fff; }
    [data-theme="light"] body#index header:not(.header-bg) .search .search-box input::placeholder,
    [data-theme="light"] body#index header:not(.header-bg) .search .search-box .iconfont { color: rgba(255, 255, 255, .8); }
    [data-theme="light"] body#index header:not(.header-bg) .icons.icon1 .gm-rank { color: #fff; }
    [data-theme="light"] body#index header:not(.header-bg) .icons .iconfont { color: rgba(255, 255, 255, .85); }
    [data-theme="light"] header { transition: background .2s linear; }
    [data-theme="light"] header.header-bg { background: #fff; }
}

/* ---------- Trang bảng xếp hạng theo màn "Bảng Xếp Hạng" của app StoryHub ----------
   Tab danh mục 14.3px (mục chọn đậm, có nét cong), cột menu 100px (mục chọn nền sáng + vạch 4x12px),
   mỗi dòng: bìa 60x80 có huy hiệu thứ hạng 24px, tên phim 14px tối đa 2 dòng, nhãn thể loại, dòng lượt xem 12.5px. */
.gm-rank-page { --rk-line: rgba(255, 255, 255, .08); --rk-menu: rgba(255, 255, 255, .04); --rk-on: rgba(255, 255, 255, .09); --rk-chip: #2a2a2e; margin: 20px auto 60px; max-width: 1100px; border: 1px solid var(--rk-line); border-radius: 20px; overflow: hidden; background: var(--playlist-bg); }
[data-theme="light"] .gm-rank-page { --rk-line: #eee; --rk-menu: #f6f6f6; --rk-on: #fff; --rk-chip: #f6f6f6; background: #fff; }
.gm-rank-page__title { padding: 18px 16px 6px; font-size: 18px; font-weight: 600; line-height: 1.4; text-align: center; color: var(--font-color); }
.gm-rank-tabs { display: flex; height: 47px; border-bottom: 1px solid var(--rk-line); overflow-x: auto; scrollbar-width: none; }
.gm-rank-tabs::-webkit-scrollbar { display: none; }
.gm-rank-tabs a { position: relative; flex: 1 0 auto; min-width: 90px; padding: 0 14px; display: flex; justify-content: center; color: var(--font-color-6); font-size: 14.3px; line-height: 1; white-space: nowrap; }
.gm-rank-tabs a span { margin-top: 12px; height: 16px; display: flex; align-items: flex-end; }
.gm-rank-tabs a.is-active { color: var(--font-color); font-weight: 600; }
.gm-rank-tabs a::after {
    content: ""; position: absolute; left: 50%; top: 36px; width: 18.5px; height: 6.85px; margin-left: -9.25px; background: var(--theme-color); opacity: 0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.gm-rank-tabs a.is-active::after { opacity: 1; }
.gm-rank-body { display: flex; align-items: stretch; }
.gm-rank-menu { flex: 0 0 100px; background: var(--rk-menu); }
.gm-rank-menu a { position: relative; display: flex; align-items: center; justify-content: center; height: 60px; padding: 0 6px; color: var(--font-color-6); font-size: 11.3px; line-height: 1.3; letter-spacing: -.3px; text-align: center; }
.gm-rank-menu a.is-active { background: var(--rk-on); color: var(--font-color); font-weight: 600; }
.gm-rank-menu a.is-active::before { content: ""; position: absolute; left: 2px; top: 50%; width: 4px; height: 12px; margin-top: -6px; border-radius: 2px; background: var(--theme-color); }
.gm-rank-list { flex: 1; min-width: 0; padding: 15px 16px 0; }
.gm-rank-row { display: flex; gap: 12.3px; margin-bottom: 24.3px; min-width: 0; }
.gm-rank-row__cover { position: relative; flex: none; width: 60px; height: 80px; border-radius: 4px; overflow: hidden; background: var(--input-bg); }
.gm-rank-row__cover img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.gm-rank-row__no { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px 0 12px 0; background: rgba(60, 60, 64, .85); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; }
.gm-rank-row__no.is-1 { background: #f5452d; }
.gm-rank-row__no.is-2 { background: #ff8a1f; }
.gm-rank-row__no.is-3 { background: #f5b800; }
.gm-rank-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: 2.5px; }
.gm-rank-row__info strong { color: var(--font-color); font-size: 14px; font-weight: 500; line-height: 1.35; letter-spacing: -.2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gm-rank-row:hover strong { color: var(--theme-color); }
.gm-rank-row__chips { display: flex; gap: 6px; margin-top: 6px; overflow: hidden; }
.gm-rank-row__chips em { flex: none; padding: 2px 6px; border-radius: 3px; background: var(--rk-chip); color: var(--font-color-6); font-size: 11px; font-style: normal; line-height: 1.4; white-space: nowrap; }
.gm-rank-row__info small { margin-top: auto; padding-top: 6px; color: var(--font-color-6); font-size: 12.5px; line-height: 1.25; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
    .gm-rank-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-content: start; padding: 20px 24px 0; }
    .gm-rank-list .gm-empty { grid-column: 1 / -1; }
    .gm-rank-menu { flex-basis: 130px; }
    .gm-rank-menu a { font-size: 13px; letter-spacing: 0; }
    .gm-rank-tabs a { flex: 0 0 auto; min-width: 120px; }
    .gm-rank-tabs { justify-content: center; }
}
@media (max-width: 768px) {
    .gm-rank-page { margin: 0 -15px 20px; border: 0; border-radius: 0; }
    .gm-rank-page__title { padding-top: 12px; font-size: 16px; }
}

/* Số thứ hạng ở trang xếp hạng: cùng kiểu với bảng tìm kiếm (số nghiêng treo ở góc trên trái, góc bìa phủ mờ; ba hạng đầu phủ xanh). */
.gm-rank-row__cover { overflow: visible; border-radius: 8px; }
.gm-rank-row__cover img { border-radius: 8px; }
.gm-rank-row__cover::before {
    content: ""; position: absolute; top: 0; left: 0; z-index: 1; width: 60px; height: 60px; border-radius: 8px 0 0 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(20, 20, 20, .6), rgba(20, 20, 20, 0) 50.35%);
}
.gm-rank-row__cover:has(.is-1)::before, .gm-rank-row__cover:has(.is-2)::before, .gm-rank-row__cover:has(.is-3)::before { background: linear-gradient(135deg, #274bff, rgba(0, 128, 255, 0) 50.35%); }
.gm-rank-row__no, .gm-rank-row__no.is-1, .gm-rank-row__no.is-2, .gm-rank-row__no.is-3 {
    top: -11px; left: -4px; z-index: 2; display: block; width: auto; height: auto; border-radius: 0; background: none; color: #fff;
    font-family: "Bahnschrift", "DIN Alternate", Arial, sans-serif; font-size: 26px; font-weight: 800; font-style: italic; letter-spacing: -.03em; line-height: 36px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45); pointer-events: none;
}
.gm-rank-list { padding-top: 22px; }
@media (min-width: 900px) { .gm-rank-list { padding-top: 26px; } }

/* ---------- Chân trang: giới thiệu + các cột liên kết nhóm phim ---------- */
.gm-foot { max-width: 1560px; margin: 0 auto; padding: 36px 80px 24px; display: grid; grid-template-columns: minmax(220px, 1.3fr) repeat(5, auto); gap: 24px 40px; border-bottom: 1px solid var(--border-color); font-size: 13px; line-height: 1.6; }
.gm-foot__about p { margin-top: 10px; max-width: 340px; }
.gm-foot__logo { display: inline-block; color: var(--theme-color) !important; font-size: 22px; font-weight: 800; line-height: 1.2; }
.gm-foot__logo img { height: 36px; width: auto; }
.gm-foot__head { margin-bottom: 10px; color: var(--link-hover-color); font-size: 14px; font-weight: 600; }
.gm-foot__col ul { display: grid; gap: 6px; }
.gm-foot__col.is-wide ul { grid-template-columns: repeat(2, auto); column-gap: 24px; }
.gm-foot__col a { white-space: nowrap; }
.gm-foot__col a:hover { color: var(--theme-color) !important; }
.footer-container { max-width: 1560px; padding: 15px 80px; }
@media (max-width: 1280px) {
    .gm-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 30px 60px 20px; }
    .gm-foot__about { grid-column: 1 / -1; }
    .gm-foot__about p { max-width: none; }
    .footer-container { padding: 15px 60px; }
}
@media (max-width: 768px) {
    .gm-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; padding: 22px 15px 16px; }
    .gm-foot__col.is-wide { grid-column: 1 / -1; }
    .gm-foot__col.is-wide ul { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; }
    .gm-foot__col a { white-space: normal; }
    .footer-container { padding: 10px 15px; }
}@media (max-width: 768px) {
    /* Chân trang trên điện thoại: mỗi nhóm liên kết chiếm trọn bề ngang và xếp nhiều cột cho gọn. */
    .gm-foot { grid-template-columns: 1fr; gap: 14px; }
    .gm-foot__about, .gm-foot__col { grid-column: 1 / -1; }
    .gm-foot__col ul, .gm-foot__col.is-wide ul { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; gap: 4px 10px; }
    .gm-foot__head { margin-bottom: 6px; }
}

/* Hàng 4 thông số ở trang phim: mỗi ô rộng bằng nhau, chữ canh giữa và được xuống dòng,
   để giá trị dài ("Vietsub + Thuyết Minh", "Đang cập nhật") không tràn sang ô bên cạnh và nhãn nằm đúng dưới giá trị. */
.other-box .bottom { max-width: 560px; justify-content: flex-start; white-space: normal; margin-right: 0; }
.other-box .bottom .item { flex: 1 1 0; min-width: 0; padding: 0 10px; text-align: center; justify-content: flex-start; }
.other-box .bottom .item:first-child { padding-left: 0; }
.other-box .bottom .item .item-top { justify-content: center; text-align: center; overflow-wrap: anywhere; }
.other-box .bottom .line { flex: none; align-self: stretch; }
@media (max-width: 768px) {
    .other-box .bottom { max-width: none; }
    .other-box .bottom .item { padding: 0 6px; }
    .other-box .bottom .item .item-top { font-size: 13px; }
}
.other-box .bottom .item .item-bottom { margin-top: auto; }

/* Trang xem trên điện thoại: dòng thông tin (điểm | cập nhật | thời lượng | trạng thái | số tập) chảy liền như một câu,
   thay vì chia cột hẹp làm mỗi mục gãy thành hai dòng. */
@media (max-width: 768px) {
    .mizhiady-player-detail .detail-box { display: block; font-size: 12px; line-height: 1.7; white-space: normal; }
    .mizhiady-player-detail .detail-box .line { margin: 0 7px; }
    .mizhiady-player-detail .detail-box .iconfont { font-size: 12px; margin-right: 3px; }
}

/* ---------- Widget "Cộng đồng": top bình luận lướt ngang + bảng 4 cột (cấu trúc như chibiflix, màu và bo góc theo web) ---------- */
.gm-comm { margin-bottom: 40px; padding: 24px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; background: var(--playlist-bg); }
[data-theme="light"] .gm-comm { border-color: #e0e5ee; }
.gm-comm__title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--font-color); font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: .04em; text-transform: uppercase; }
.gm-comm__title .iconfont { font-size: 18px; color: var(--theme-color); margin: 0; }
.gm-comm__slider { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-bottom: 2px; }
.gm-comm__slider::-webkit-scrollbar { display: none; }
.gm-comm__card { position: relative; flex: 0 0 340px; display: flex; gap: 12px; min-width: 0; padding: 14px; border-radius: 14px; overflow: hidden; background: #1b1d22; scroll-snap-align: start; isolation: isolate; }
.gm-comm__bg { position: absolute; inset: -20px; z-index: -1; width: calc(100% + 40px); height: calc(100% + 40px); max-width: none; object-fit: cover; filter: blur(18px) brightness(.42) saturate(1.2); }
.gm-comm__user img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); }
.gm-comm__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; color: #fff; }
.gm-comm__body strong { font-size: 14px; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-comm__text { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 39px; }
.gm-comm__body small { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: rgba(255, 255, 255, .6); font-size: 12px; line-height: 1.4; }
.gm-comm__body small .iconfont { font-size: 12px; margin: 0; }
.gm-comm__thumb { flex: none; width: 50px; height: 67px; border-radius: 8px; object-fit: cover; align-self: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); transition: transform .2s; }
.gm-comm__card:hover .gm-comm__thumb { transform: scale(1.06); }
.gm-comm__table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); margin-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); }
[data-theme="light"] .gm-comm__table { border-top-color: #e0e5ee; }
.gm-comm__col { min-width: 0; padding: 20px 20px 0; border-left: 1px solid rgba(255, 255, 255, .08); }
[data-theme="light"] .gm-comm__col { border-left-color: #e0e5ee; }
.gm-comm__col:first-child { padding-left: 0; border-left: 0; }
.gm-comm__col:last-child { padding-right: 0; }
.gm-comm__chart li { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 10px; }
.gm-comm__chart b { flex: 0 0 18px; color: var(--font-color-6); font-size: 14px; font-weight: 600; }
.gm-comm__chart li:nth-child(-n+3) b { color: var(--theme-color); }
.gm-comm__chart img { flex: none; width: 30px; height: 40px; border-radius: 5px; object-fit: cover; }
.gm-comm__chart a { min-width: 0; color: var(--font-color); font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-comm__chart a:hover { color: var(--theme-color); }
.gm-comm__chart--tags li { height: 40px; }
.gm-comm__chart .gm-comm__tag { padding: 5px 14px; border-radius: 50px; background: var(--input-bg); font-size: 13px; }
.gm-comm__chart .gm-comm__tag:hover { background: var(--theme-color); color: #fff; }
.gm-comm__new li + li { margin-top: 8px; }
.gm-comm__new a { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 8px; padding: 8px 10px; border-radius: 10px; background: var(--input-bg); color: var(--font-color-6); font-size: 13px; line-height: 1.45; }
.gm-comm__new a:hover { outline: 1px solid var(--theme-color); }
.gm-comm__new img { width: 24px; height: 24px; border-radius: 50%; grid-row: 1 / span 2; }
.gm-comm__new span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-comm__new strong { color: var(--font-color); font-weight: 600; }
.gm-comm__new small { display: flex; align-items: center; gap: 3px; min-width: 0; color: var(--theme-color); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-comm__new small .iconfont { font-size: 11px; margin: 0; color: inherit; }
@media (max-width: 1100px) {
    .gm-comm__table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gm-comm__col:nth-child(odd) { padding-left: 0; border-left: 0; }
    .gm-comm__col:nth-child(even) { padding-right: 0; }
}
@media (max-width: 768px) {
    .gm-comm { margin: 0 0 26px; padding: 14px; border-radius: 12px; }
    .gm-comm__title { font-size: 13px; margin-bottom: 10px; }
    .gm-comm__card { flex-basis: 84%; padding: 12px; }
    .gm-comm__table { grid-template-columns: 1fr; margin-top: 14px; }
    .gm-comm__col, .gm-comm__col:nth-child(even) { padding: 16px 0 0; border-left: 0; }
    .gm-comm__chart--tags { display: flex; flex-wrap: wrap; gap: 8px; }
    .gm-comm__chart--tags li { height: auto; margin: 0; }
    .gm-comm__chart--tags b { display: none; }
}

/* Chân trang gọn: mỗi nhóm liên kết nằm trên một hàng ngang (nhãn bên trái, các liên kết nối tiếp nhau) thay vì cột dọc. */
.gm-foot { grid-template-columns: minmax(220px, 1fr) minmax(0, 2.2fr); gap: 6px 48px; padding-top: 24px; padding-bottom: 16px; align-items: start; }
.gm-foot__about { grid-column: 1; grid-row: 1 / span 5; }
.gm-foot__about p { margin-top: 6px; }
.gm-foot__col, .gm-foot__col.is-wide { grid-column: 2; display: flex; align-items: baseline; gap: 12px; }
.gm-foot__head { flex: 0 0 76px; margin: 0; font-size: 13px; }
.gm-foot__col ul, .gm-foot__col.is-wide ul { display: flex; flex-wrap: wrap; gap: 2px 18px; }
@media (max-width: 1280px) {
    .gm-foot { grid-template-columns: 1fr; gap: 6px; }
    .gm-foot__about, .gm-foot__col, .gm-foot__col.is-wide { grid-column: 1; grid-row: auto; }
    .gm-foot__about { margin-bottom: 8px; }
}
@media (max-width: 768px) {
    .gm-foot { padding-top: 18px; gap: 8px; }
    .gm-foot__col, .gm-foot__col.is-wide { gap: 8px; }
    .gm-foot__head { flex-basis: 64px; }
    .gm-foot__col ul, .gm-foot__col.is-wide ul { display: flex; gap: 2px 12px; }
    .gm-foot__col a { white-space: nowrap; }
}
/* Bài viết / trang tĩnh: khoảng cách giữa đoạn, tiêu đề và danh sách. */
.gm-article .gm-prose h2 { margin-top: 22px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.gm-article .gm-prose h2 + p, .gm-article .gm-prose h2 + ul { margin-top: 8px; }
.gm-article .gm-prose ul { padding-left: 18px; list-style: disc outside; }
.gm-article .gm-prose li { list-style: disc outside; margin-top: 6px; }
.gm-article .gm-prose a { text-decoration: underline; text-underline-offset: 3px; }
/* Icon trong widget Cộng đồng: cùng màu với chữ tiêu đề (trắng ở giao diện tối) thay cho màu chủ đạo. */
.gm-comm__title .iconfont { color: var(--font-color); }
.gm-comm__new small, .gm-comm__new small .iconfont { color: var(--font-color-6); }

/* Số thứ hạng trong widget Cộng đồng: cùng kiểu trang xếp hạng (số nghiêng đậm "01" treo ở góc poster, góc poster phủ mờ; ba hạng đầu phủ xanh). */
.gm-comm__chart li { position: relative; padding-left: 6px; margin-bottom: 12px; }
.gm-comm__chart img { width: 36px; height: 48px; border-radius: 6px; }
.gm-comm__chart b, .gm-comm__chart li:nth-child(-n+3) b {
    position: absolute; left: 0; top: -9px; z-index: 2; flex: none; color: #fff; pointer-events: none;
    font-family: "Bahnschrift", "DIN Alternate", Arial, sans-serif; font-size: 17px; font-weight: 800; font-style: italic; letter-spacing: -.03em; line-height: 24px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.gm-comm__chart li::before { content: ""; position: absolute; left: 6px; top: 0; z-index: 1; width: 36px; height: 36px; border-radius: 6px 0 0 0; pointer-events: none; background: linear-gradient(135deg, rgba(20, 20, 20, .6), rgba(20, 20, 20, 0) 50.35%); }
.gm-comm__chart li:nth-child(-n+3)::before { background: linear-gradient(135deg, #274bff, rgba(0, 128, 255, 0) 50.35%); }
/* Cột thể loại không có poster: số đứng riêng, cùng kiểu chữ. */
.gm-comm__chart--tags li { padding-left: 0; }
.gm-comm__chart--tags li::before { display: none; }
.gm-comm__chart--tags b, .gm-comm__chart--tags li:nth-child(-n+3) b { position: static; flex: 0 0 26px; color: var(--font-color-6); text-shadow: none; font-size: 18px; }
.gm-comm__chart--tags li:nth-child(-n+3) b { color: #4f7dff; }

/* ---------- Widget "Top 10 phim": hàng poster có số thứ hạng lớn ---------- */
.gm-top { margin-bottom: 40px; }
.gm-top__title { margin-bottom: 14px; font-size: 28px; font-weight: 600; line-height: 1.25; color: var(--font-color); }
.gm-top__title a { display: inline-flex; align-items: center; gap: 6px; }
.gm-top__title .iconfont { font-size: 18px; color: var(--font-color-6); transform: rotate(180deg); margin: 0; }
.gm-top__title a:hover, .gm-top__title a:hover .iconfont { color: var(--theme-color); }
.gm-top__wrap { position: relative; }
.gm-top__row { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 16px 0 0 6px; margin-left: -6px; }
.gm-top__row::-webkit-scrollbar { display: none; }
.gm-top__item { flex: 0 0 calc((100% - 16px * 6) / 7); min-width: 0; scroll-snap-align: start; }
.gm-top__cover { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; background: var(--input-bg); }
.gm-top__cover img { width: 100%; height: 100%; max-width: none; border-radius: 10px; object-fit: cover; }
.gm-top__cover::before { content: ""; position: absolute; top: 0; left: 0; z-index: 1; width: 70%; aspect-ratio: 1; border-radius: 10px 0 0 0; pointer-events: none; background: linear-gradient(135deg, #274bff, rgba(0, 128, 255, 0) 50.35%); }
.gm-top__cover b { position: absolute; top: -16px; left: -4px; z-index: 2; color: #fff; font-family: "Bahnschrift", "DIN Alternate", Arial, sans-serif; font-size: 46px; font-weight: 800; font-style: italic; letter-spacing: -.03em; line-height: 1.1; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); pointer-events: none; }
.gm-top__cover em { position: absolute; left: 8px; right: 8px; bottom: 7px; color: #fff; font-size: 13px; font-style: normal; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 2px rgba(0, 0, 0, .95), 0 0 8px rgba(0, 0, 0, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-top__item strong { display: block; margin-top: 10px; color: var(--font-color); font-size: 16px; font-weight: 400; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-top__item:hover strong { color: var(--theme-color); }
.gm-top__item:hover img { filter: brightness(1.1); }
.gm-top__nav { position: absolute; top: 16px; bottom: 32px; z-index: 3; width: 48px; border: 0; padding: 0; color: #fff; cursor: pointer; background: linear-gradient(to left, rgba(19, 20, 22, .92), rgba(19, 20, 22, 0)); }
.gm-top__nav--next { right: 0; }
.gm-top__nav--next .iconfont { display: inline-block; transform: rotate(180deg); }
.gm-top__nav--prev { left: -6px; background: linear-gradient(to right, rgba(19, 20, 22, .92), rgba(19, 20, 22, 0)); }
[data-theme="light"] .gm-top__nav { background: linear-gradient(to left, rgba(241, 245, 248, .94), rgba(241, 245, 248, 0)); color: #20242d; }
[data-theme="light"] .gm-top__nav--prev { background: linear-gradient(to right, rgba(241, 245, 248, .94), rgba(241, 245, 248, 0)); }
.gm-top__nav .iconfont { font-size: 22px; margin: 0; }
@media (max-width: 1280px) { .gm-top__item { flex-basis: calc((100% - 16px * 4) / 5.3); } }
@media (max-width: 768px) {
    .gm-top { margin-bottom: 26px; }
    .gm-top__title { font-size: 16px; margin-bottom: 6px; }
    .gm-top__title .iconfont { font-size: 12px; }
    .gm-top__row { gap: 10px; margin: 0 -15px; padding: 12px 15px 0; scroll-padding-left: 15px; }
    .gm-top__item { flex-basis: calc((100% - 20px) / 3.25); }
    .gm-top__cover, .gm-top__cover img { border-radius: 8px; }
    .gm-top__cover b { top: -11px; left: -3px; font-size: 30px; }
    .gm-top__cover em { left: 6px; right: 6px; bottom: 5px; font-size: 11px; }
    .gm-top__item strong { margin-top: 8px; font-size: 14px; }
    .gm-top__nav { display: none; }
}

/* Slider trên máy tính: lớp phủ tối nhẹ phía trái và phía dưới để tiêu đề, nhãn, mô tả luôn rõ trên ảnh sáng. */
@media (min-width: 769px) {
    .banner-pic .swiper-slide > .swiper-lazy::after {
        content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
        background:
            linear-gradient(to right, rgba(10, 11, 14, .62), rgba(10, 11, 14, .38) 32%, rgba(10, 11, 14, 0) 64%),
            linear-gradient(to top, rgba(10, 11, 14, .5), rgba(10, 11, 14, 0) 48%);
    }
}

/* Widget Top 10: điểm phim lẻ giống thẻ phim ở các mục thường (số to đậm góc dưới phải) */
.gm-top__cover em.is-score { left: auto; right: 12px; bottom: 13px; font-size: 24px; font-weight: 700; line-height: 18px; overflow: visible; }
@media (max-width: 768px) { .gm-top__cover em.is-score { right: 6px; bottom: 6px; font-size: 14px; } }

/* Nút "Xem ngay" + yêu thích trên slider: kiểu nút của Gimy (kính mờ, bo 8px, rê chuột chuyển trắng). */
.banner-box .slide-btn-box { --gm-btn-h: clamp(40px, 2.8125vw, 54px); bottom: calc(246px - var(--gm-btn-h)) !important; white-space: nowrap; font-size: 0; }
.banner-box .slide-btn-box .play-btn { display: inline-flex !important; margin-right: 12px; }
.banner-box .slide-btn-box a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; float: none; margin: 0; vertical-align: top;
    height: clamp(40px, 2.8125vw, 54px) !important; padding: 0 clamp(18px, 1.6667vw, 32px) !important;
    border: 0; border-radius: 8px; background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: #fff; font-size: clamp(15px, 1.0417vw, 20px); font-weight: 500; line-height: 1;
    transition: background-color .15s, color .15s;
}
.banner-box .slide-btn-box .play-btn { border-radius: 8px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.banner-box .slide-btn-box .fav-btn { width: clamp(40px, 2.8125vw, 54px) !important; padding: 0 !important; }
.banner-box .slide-btn-box a .iconfont { font-size: 1.1em; margin: 0; }
.banner-box .slide-btn-box a:hover { background: #fff; color: #000; }
.banner-box .slide-btn-box .fav-btn.active, .banner-box .slide-btn-box .fav-btn.active:hover { background: var(--theme-color); color: #fff; }

/* ---------- Tập sắp chiếu (tạo trước để index sớm) ---------- */
.lists-box .listitem.is-soon:not(.active) a { opacity: .5; border-style: dashed; }
.gm-soon { position: relative; overflow: hidden; background: #000; }
.gm-soon > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.35); transform: scale(1.06); }
.gm-soon__box { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; color: #fff; }
.gm-soon__box strong { font-size: 22px; font-weight: 600; line-height: 1.35; }
.gm-soon__box span { max-width: 460px; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.gm-soon__btn { margin-top: 6px; padding: 9px 22px; border-radius: 8px; background: var(--theme-color); color: #fff; font-size: 14px; font-weight: 500; }
.gm-soon__btn:hover { color: #fff; filter: brightness(1.1); }
@media (max-width: 768px) {
    .gm-soon__box { gap: 6px; }
    .gm-soon__box strong { font-size: 16px; }
    .gm-soon__box span { font-size: 12px; }
    .gm-soon__btn { padding: 6px 16px; font-size: 13px; }
}

/* Tiêu đề hộp chia sẻ (trước là h3 của bản gốc) */
.share-tan .gm-share-title { font-size: 22px; font-weight: 500; color: var(--font-color); text-align: center; }

/* Khối diễn viên khi chưa có ảnh TMDB: ô tròn chữ cái đầu; khối trailer (bấm mới nạp YouTube) */
.gm-cast__ph { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; margin: 0 auto 6px; border-radius: 50%; background: var(--input-bg); color: var(--font-color-6); font-size: 28px; font-weight: 600; line-height: 1; }
a.gm-cast__item:hover .gm-cast__ph { background: var(--theme-color); color: #fff; }
.gm-trailer-box { margin-top: 0; }
.gm-trailer { position: relative; display: block; width: min(560px, 100%); aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.gm-trailer img, .gm-trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
@media (max-width: 768px) {
    .gm-cast__row { gap: 10px; }
    .gm-cast__item { width: 72px; }
    .gm-cast__item img, .gm-cast__ph { width: 60px; height: 60px; font-size: 22px; }
}

/* ---------- Trang chi tiết: khối hình ảnh + xem ảnh lớn ---------- */
.gm-photos { margin-top: 0; }
.gm-photos__row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 6px 0; }
.gm-photos__row::-webkit-scrollbar { display: none; }
.gm-photos__item { flex: none; height: 180px; border-radius: 10px; overflow: hidden; background: var(--input-bg); }
.gm-photos__item img { display: block; width: auto; height: 100%; max-width: none; object-fit: cover; transition: transform .25s; }
.gm-photos__item:hover img { transform: scale(1.04); }
.gm-lightbox { padding: 0; border: 0; background: none; max-width: 94vw; max-height: 92vh; overflow: visible; }
.gm-lightbox::backdrop { background: rgba(0, 0, 0, .86); }
.gm-lightbox img { display: block; max-width: 94vw; max-height: 86vh; border-radius: 10px; }
.gm-lightbox__nav { position: fixed; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.gm-lightbox__nav[data-step="-1"] { left: 14px; }
.gm-lightbox__nav[data-step="1"] { right: 14px; transform: rotate(180deg); }
.gm-lightbox__close { position: fixed; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.gm-lightbox__count { position: fixed; left: 0; right: 0; bottom: 16px; text-align: center; color: rgba(255, 255, 255, .8); font-size: 13px; }
@media (max-width: 768px) {
    .gm-photos__row { gap: 8px; }
    .gm-photos__item { height: 120px; border-radius: 8px; }
}

/* ---------- Trang chi tiết phim: bố cục kiểu Gimy (nền mờ, poster + bảng thông tin, các khối có vạch màu) ---------- */
.gm-dt { position: relative; }
.gm-dt__bg { position: absolute; z-index: 0; top: -90px; left: 50%; width: 100vw; height: 560px; margin-left: -50vw; overflow: hidden; pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent); mask-image: linear-gradient(to bottom, #000 30%, transparent); }
.gm-dt__bg img { width: 100%; height: 100%; max-width: none; object-fit: cover; filter: blur(46px) saturate(1.25); opacity: .42; transform: scale(1.15); }
[data-theme="light"] .gm-dt__bg img { opacity: .5; }
.gm-dt > *:not(.gm-dt__bg) { position: relative; z-index: 1; }

.gm-dt__hero { display: flex; gap: 32px; align-items: flex-start; margin-bottom: 34px; }
.gm-dt__poster { position: relative; flex: none; width: 224px; aspect-ratio: 5 / 7; border-radius: 12px; overflow: hidden; background: var(--input-bg); box-shadow: 0 12px 34px rgba(0, 0, 0, .35); }
.gm-dt__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gm-dt__poster:hover img { transform: scale(1.04); }
.gm-dt__poster span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 8px; background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent); color: #fff; font-size: 13px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-dt__info { flex: 1; min-width: 0; }
.gm-dt__title { margin: 0 0 18px; color: var(--font-color); font-size: 30px; font-weight: 600; line-height: 1.3; }
.gm-dt__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 40px; margin: 0; font-size: 14px; line-height: 1.5; }
.gm-dt__meta > div { display: flex; gap: 6px; min-width: 0; }
.gm-dt__meta > .is-wide { grid-column: 1 / -1; }
.gm-dt__meta dt { flex: none; color: var(--font-color-6); font-weight: 400; }
.gm-dt__meta dd { flex: 1; min-width: 0; margin: 0; color: var(--font-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-dt__meta .is-wide dd { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gm-dt__meta a:hover { color: var(--theme-color); }

.gm-dt__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.gm-dt__play, .gm-dt__btn, .gm-dt__digg { display: inline-flex; align-items: center; height: 44px; border-radius: 22px; font-size: 15px; line-height: 1; white-space: nowrap; }
.gm-dt__play { gap: 8px; padding: 0 26px; background: var(--theme-color); color: #fff; font-weight: 500; }
.gm-dt__play:hover { color: #fff; filter: brightness(1.1); }
.gm-dt__play.is-off { filter: grayscale(1); opacity: .6; }
.gm-dt__btn, .gm-dt__digg { background: var(--input-bg); color: var(--font-color); }
.gm-dt__btn { gap: 6px; padding: 0 18px; }
.gm-dt__btn:hover { color: var(--theme-color); }
.gm-dt__btn.favorite.active { color: #ff4d6a; }
.gm-dt__digg a { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 14px; color: var(--font-color); }
.gm-dt__digg a:first-child { padding-left: 18px; }
.gm-dt__digg a:last-child { padding-right: 18px; }
.gm-dt__digg a:hover { color: var(--theme-color); }
.gm-dt__digg .is-down .iconfont { display: inline-block; transform: rotate(180deg); }
.gm-dt__actions .iconfont { margin: 0; font-size: 17px; }

/* Tiêu đề các khối */
.gm-dt .vod-content { margin-top: 0; margin-bottom: 30px; }
.gm-dt .vod-content > .title { margin: 0 0 14px; color: var(--font-color); font-size: 18px; font-weight: 600; line-height: 1.45; }
.gm-dt__eps .vod-list-box { margin-top: 0; }
.gm-dt__eps .vod-list-box .share { display: none; }

@media (max-width: 768px) {
    .gm-dt__bg { top: -60px; height: 420px; }
    .gm-dt__hero { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 24px; }
    .gm-dt__poster { width: 150px; margin: 4px auto 0; }
    .gm-dt__title { margin-bottom: 12px; font-size: 20px; text-align: center; }
    .gm-dt__meta { grid-template-columns: minmax(0, 1fr); gap: 7px; font-size: 13px; }
    .gm-dt__actions { justify-content: center; gap: 8px; margin-top: 16px; }
    .gm-dt__play, .gm-dt__btn, .gm-dt__digg { height: 38px; font-size: 13px; }
    .gm-dt__actions { flex-wrap: nowrap; gap: 6px; }
    .gm-dt__play, .gm-dt__btn, .gm-dt__digg { height: 36px; font-size: 12px; }
    .gm-dt__play { padding: 0 12px; gap: 4px; }
    .gm-dt__btn { padding: 0 10px; gap: 4px; }
    .gm-dt__digg a, .gm-dt__digg a:first-child, .gm-dt__digg a:last-child { padding: 0 8px; gap: 4px; }
    .gm-dt__actions .iconfont { font-size: 14px; }
    .gm-dt__digg a { padding: 0 10px; }
    .gm-dt__digg a:first-child { padding-left: 14px; }
    .gm-dt__digg a:last-child { padding-right: 14px; }
    .gm-dt .vod-content { margin-bottom: 22px; }
    .gm-dt .vod-content > .title { font-size: 16px; margin-bottom: 10px; }
}

/* Bảng thông tin phim: nhãn cùng bề rộng để cột giá trị thẳng hàng */
.gm-dt__meta dt { width: 5.8em; }
@media (max-width: 768px) {
    .gm-dt__meta dt { width: 5.6em; }
    /* nút chia sẻ chỉ còn biểu tượng để cả hàng nút vừa một dòng */
    .gm-dt__btn[data-share] { width: 36px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
}

/* Trang chi tiết: hình ảnh và diễn viên đứng cạnh nhau, phía trên danh sách tập */
.gm-dt__extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.gm-dt__extra:empty { display: none; }
.gm-dt__extra > :only-child { grid-column: 1 / -1; }
.gm-dt__extra .gm-photos__item { height: 150px; }
.gm-dt__extra .gm-cast__row { gap: 10px; }
.gm-dt__extra .gm-cast__item { width: 84px; }
.gm-dt__extra .gm-cast__item img, .gm-dt__extra .gm-cast__ph { width: 68px; height: 68px; font-size: 24px; }
@media (max-width: 992px) {
    .gm-dt__extra { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
    .gm-dt__extra .gm-photos__item { height: 120px; }
    .gm-dt__extra .gm-cast__item { width: 72px; }
    .gm-dt__extra .gm-cast__item img, .gm-dt__extra .gm-cast__ph { width: 60px; height: 60px; font-size: 22px; }
}

/* Trang chi tiết: tab Nội dung / Hình ảnh / Diễn viên / Trailer / Hỏi đáp */
.gm-dt__tabs { margin-bottom: 30px; }
.gm-dt__tabbar { display: flex; gap: 28px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.gm-dt__tabbar::-webkit-scrollbar { display: none; }
.gm-dt__tabbar button { position: relative; flex: none; padding: 0 0 14px; border: 0; background: none; color: var(--font-color-6); font-size: 16px; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.gm-dt__tabbar button:hover { color: var(--font-color); }
.gm-dt__tabbar button.is-active { color: var(--font-color); font-weight: 600; }
/* Dấu tab đang chọn: nét cong giống menu chính */
.gm-dt__tabbar button::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18.5px; height: 6.85px; margin-left: -9.25px; background: var(--theme-color); opacity: 0; transform: scale(.4);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.5 6.85'%3E%3Cpath d='M1.75 1.75A10.07 10.07 0 0 0 16.75 1.75' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: opacity .2s, transform .24s cubic-bezier(.34, 1.56, .64, 1); }
.gm-dt__tabbar button.is-active::after { opacity: 1; transform: scale(1); }
.gm-dt__panel > .vod-content { margin-bottom: 0; }
.gm-dt__panel > .vod-content + .vod-content { margin-top: 24px; }
@media (max-width: 768px) {
    .gm-dt__tabs { margin-bottom: 22px; }
    .gm-dt__tabbar { gap: 20px; margin-bottom: 14px; }
    .gm-dt__tabbar button { padding-bottom: 12px; font-size: 14px; }
}

/* Chấm điểm nằm ngay trên hàng nút ở đầu trang chi tiết */
.gm-dt__info .gm-rate { margin-top: 16px; }
.gm-dt__info .gm-rate + .gm-dt__actions { margin-top: 14px; }
@media (max-width: 768px) {
    .gm-dt__info .gm-rate { justify-content: center; margin-top: 12px; }
    .gm-dt__info .gm-rate + .gm-dt__actions { margin-top: 10px; }
}

/* Đường kẻ dưới hàng tab: nét tóc nửa điểm ảnh (thu nhỏ theo chiều dọc) */
.gm-dt__tabbar { position: relative; }
.gm-dt__tabbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(128, 128, 128, .36); transform: scaleY(.5); transform-origin: 0 100%; pointer-events: none; }

/* Trang xem: tiêu đề (tên phim + số tập) là một thẻ H1; khối diễn viên dưới phần nội dung */
.mizhiady-player-detail h1.title-box { margin: 0; }
#player video, #player iframe { background: #000; }
.row > .gm-cast { margin-bottom: 24px; }

/* Trang xem: ảnh bìa nằm trên trình phát đã nạp sẵn */
#player .gm-facade { z-index: 2; }

/* Trang danh sách: số phim nằm cạnh H1 chứ không nằm trong H1 */
.gm-h1-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 24px 0 4px; }
.gm-h1-row .gm-h1 { margin: 0; }
.gm-h1__count { font-size: 14px; color: var(--font-color-6); }
.show .gm-h1-row { margin-top: 8px; }
@media (max-width: 768px) { .gm-h1-row { margin-top: 12px; } }

/* Điện thoại: nút nổi không che nội dung — bỏ nút trang chủ (đã có ở thanh dưới), nút lên đầu chỉ hiện khi đã cuộn, cả cụm nhỏ lại */
@media (max-width: 768px) {
    .side-top { right: 10px; }
    .side-top .svg-box { min-width: 34px; min-height: 34px; padding: 6px; margin-top: 10px; opacity: .88; }
    .side-top .svg-box .iconfont { font-size: 17px; }
    .side-top .svg-box:first-child { display: none; }
    .side-top .backtop { visibility: hidden; opacity: 0; transition: opacity .2s; }
    .gm-scrolled .side-top .backtop { visibility: visible; opacity: .88; }
    /* "Xem thêm" của phần nội dung: chừa chỗ cho nút nổi để luôn bấm được */
    .vod-content .intro .wrapper_more .wrapper_more_btn { margin-right: 44px; }
}

/* Tiêu đề con trong bài giới thiệu phim (bài AI dùng h3) */
.vod-content .intro h3 { margin: 12px 0 4px; color: var(--font-color); font-size: 15px; font-weight: 600; line-height: 1.5; }
.vod-content .intro h3:first-child { margin-top: 0; }
.vod-content .intro p + p { margin-top: 6px; }

/* Nút "Sắp xếp" ở danh sách tập: biểu tượng và chữ canh giữa theo chiều dọc, biểu tượng không bị bóp */
.vod-list-box .sort-btn { display: flex; align-items: center; gap: 4px; }
.vod-list-box .sort-btn svg { flex: none; width: 18px; height: 18px; }
.vod-list-box .sort-btn .sort_text { line-height: 1; }
@media (max-width: 768px) {
    .vod-list-box .sort-btn svg { width: 14px; height: 14px; }
}

/* Khối nội dung khi đang thu gọn (cao đúng 3 dòng × 20px): mọi dòng phải nằm trên lưới 20px, nếu không dòng cuối bị cắt ngang.
   Khoảng cách đoạn và tiêu đề con chỉ áp dụng khi đã bấm "Xem thêm". */
.vod-content .intro .wrapper_more_exp:not(:checked) + .wrapper_more_text p,
.vod-content .intro .wrapper_more_exp:not(:checked) + .wrapper_more_text h3,
.vod-content .intro .wrapper_more_exp:not(:checked) + .wrapper_more_text .gm-ep-note,
.vod-content .intro .wrapper_more_exp:not(:checked) + .wrapper_more_text .gm-ep-note > * { margin: 0; padding: 0; line-height: 20px; }
.vod-content .intro .wrapper_more_exp:not(:checked) + .wrapper_more_text h3 { font-size: inherit; }

/* ---------- Mục phim kiểu "một hàng lướt ngang": không xuống hàng, có mũi tên trên máy tính, vuốt trên điện thoại ---------- */
.gm-slide__wrap { position: relative; }
.myui-vodbox-item .content .card-box.gm-slide__row { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.myui-vodbox-item .content .card-box.gm-slide__row::-webkit-scrollbar { display: none; }
.gm-slide__row .myui-vodbox-content { flex: none; scroll-snap-align: start; scroll-margin-left: 10px; }
.gm-slide__wrap .gm-top__nav { top: 0; bottom: 96px; }
.gm-slide__wrap .gm-top__nav--prev { left: 0; }
/* Tiêu đề mục luôn gọn một dòng */
.myui-vodbox .top .left { min-width: 0; }
.myui-vodbox .top .left .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
