/* Movie info page, layout 4 — full width, values measured from the reference detail page. */

/* ---------- Frames & buttons ---------- */
.tpl-4 .flex { display: flex; }
.tpl-4 .flex-wrap { flex-wrap: wrap; }
.tpl-4 .flex-1 { flex: 1; }
.tpl-4 .flex-hozi-center { align-items: center; }
.tpl-4 .fw-500 { font-weight: 500; }
.tpl-4 .ah-frame-bg {
	box-sizing: border-box;
	margin-bottom: 10px;
	padding: 10px;
	background: rgba(0, 0, 0, .075);
	border-radius: 5px;
}
.tpl-4 .button-default {
	display: inline-flex;
	align-items: center;
	margin-right: 5px;
	padding: 6px 10px;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	line-height: 20.8px;
	background-color: #6b6a6a;
	background-image: linear-gradient(to right, #c61251, #c4002e, #ee0549, #c10606);
	border-radius: 5px;
	cursor: pointer;
}
.tpl-4 .button-default i { margin-right: 5px; }
.tpl-4 .button-default:hover,
.tpl-4 .button-default:focus { color: #dbdbdb; text-decoration: none; }
.tpl-4 .bg-lochinvar {
	background-image: linear-gradient(to right, #fb0, #e43603, #ff6290, #ff5000);
	background-size: 300% 100%;
	transition: all .4s ease-in-out;
}
.tpl-4 .bg-lochinvar:hover { background-position: 100% 0; }
.tpl-4 .bg-trailer { background-image: linear-gradient(to right, #25aae1, #024fd6, #04befe, #3f86ed); background-size: 300% 100%; }
.tpl-4 .bg-copyright { background-image: none; background-color: #7a1d1d; cursor: default; }

/* ---------- Head: poster frame + labelled rows ---------- */
.halim-movie-wrapper.tpl-4 { position: relative; overflow: visible; margin-top: 15px; }
.info-movie.tpl-4 .head {
	display: flex;
	align-items: center;
	color: #fff;
	border-radius: 0;
}
.info-movie.tpl-4 .head .first {
	position: relative;
	flex: 0 0 19%;
	width: 19%;
	padding: 5px;
	background: #000;
}
.info-movie.tpl-4 .head .first img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.info-movie.tpl-4 .head .last { flex: 1; min-width: 0; margin-left: 10px; }
.info-movie.tpl-4 .head .last > div {
	display: flex;
	align-items: center;
	padding: 6px;
	border-top: 1px solid rgba(51, 51, 51, .58);
}
.info-movie.tpl-4 .head .last > div:first-child { border-top: 0; }
.info-movie.tpl-4 .head .last > div > div { flex: .8; min-width: 0; padding: 10px 5px; color: #a7a7a7; font-weight: 500; }
.info-movie.tpl-4 .head .last > div > div:first-child { flex: .2; color: #a7a7a7; font-weight: 700; }
.info-movie.tpl-4 .head .last > div.list_cate > div + div { padding: 3px; }
.info-movie.tpl-4 .head .last > div.list_cate a {
	display: inline-flex;
	margin: 2px;
	padding: 5px;
	color: #efefef;
	font-size: 13px;
	font-weight: 500;
	background: rgba(255, 255, 255, .15);
	border-radius: 5px;
}
.info-movie.tpl-4 .head .last > div.list_cate a:hover { color: #fff; background: rgba(255, 255, 255, .25); }
.info-movie.tpl-4 .head .hh3d-info a { color: #a7a7a7; }
.info-movie.tpl-4 .head .hh3d-info a:hover { color: #fff; }
.info-movie.tpl-4 .head .hh3d-info i { color: #a7a7a7; }
.tpl-4 .movie_name { margin: 0; padding: 0; color: #cf8e19; font-size: 17px; font-weight: 700; line-height: 1.1; }
.tpl-4 .org_title { margin: 0; color: #a7a7a7; font-size: 13px; font-weight: 500; }
.tpl-4 .new-ep {
	padding: 3px 7px;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	text-transform: capitalize;
	background-image: linear-gradient(to right, #25aae1, #043ea5, #04befe, #3f86ed);
	background-size: 300% 100%;
	border-radius: 3px;
}

/* Rating bar: ★ 4.50 / 5 (n lượt) ............ [Đánh Giá] */
.tpl-4 .hh3d-rate .ratings_wrapper { display: block; float: none; width: 100%; margin: 0; padding: 0; overflow: visible; text-align: left; }
.tpl-4 .halim-rating-container {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	height: 40px;
	margin: 10px 0;
	padding: 8px 14px;
	background: #0e1419;
	border-radius: 6px;
}
.tpl-4 .halim-star-rating { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-width: 0; color: #fff; font-size: 14px; line-height: 1; white-space: nowrap; }
.tpl-4 .halim-star-icon { flex-shrink: 0; margin-right: 5px; color: #ffb400; font-size: 16px; }
.tpl-4 .halim-rating-score { flex-shrink: 0; color: #fff; font-size: 15px; font-weight: 700; }
.tpl-4 .halim-rating-slash,
.tpl-4 .halim-rating-max { flex-shrink: 0; color: #888; font-size: 13px; }
.tpl-4 .halim-rating-votes { flex-shrink: 1; min-width: 0; margin-left: 4px; overflow: hidden; color: #888; font-size: 12px; text-overflow: ellipsis; } /* the vote count gives way instead of wrapping the row */
.tpl-4 .halim-rating-button {
	flex-shrink: 0;
	height: 28px;
	margin-left: auto;
	padding: 0 16px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
	background: linear-gradient(180deg, #4a8fdc 0%, #1d5fb8 100%);
	border: 0;
	border-radius: 4px;
	box-shadow: 0 2px 6px rgba(29, 95, 184, .35);
	cursor: pointer;
	transition: filter .15s, transform .15s;
}
.tpl-4 .halim-rating-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.tpl-4 .hh3d-rate-pop { margin: -4px 0 6px; padding: 10px 14px; background: #0e1419; border-radius: 6px; }
.tpl-4 .hh3d-rate-pop[hidden] { display: none; }
.tpl-4 .hh3d-rate-pop .halim_imdbrating { display: none; }
.tpl-4 .hh3d-rate-pop .rate-this { display: flex; align-items: center; gap: 10px; float: none; padding: 0; line-height: 22px; }
.tpl-4 .hh3d-rate-pop .rate-this span.user-rating-text { margin: 0; color: #a7a7a7; font-size: 12px; }

/* ---------- "Xem Phim" ............ "Theo dõi" ---------- */
.tpl-4 .hh3d-actions { align-items: center; }
.tpl-4 .hh3d-actions > .last { margin-left: auto; }
.tpl-4 .hh3d-follow.halim-bookmark-post { position: relative !important; top: auto; left: auto; animation: none; }
.tpl-4 .hh3d-follow .halim-pulse-ring { display: none; }
.tpl-4 .hh3d-follow.active { background-image: linear-gradient(to right, #3a3a3a, #555, #3a3a3a); }

/* ---------- Quick episode search ---------- */
.tpl-4 .filter-episode { margin: 0 0 15px; padding: 8px 0 0; color: #fff; text-align: left; }
.tpl-4 .filter-episode > span { display: block; padding: 4px 0; font-size: 14px; line-height: 25px; }
.tpl-4 .filter-episode > span:first-child { display: inline-block; text-transform: uppercase; }
.tpl-4 .filter-episode > span:first-child i { margin: 0 3px; font-size: 13px; }
.tpl-4 .filter-episode input {
	width: 241px;
	max-width: 100%;
	height: 35px;
	margin: 0;
	padding: 0 34px 0 10px;
	color: #abb7c4;
	font-size: 16px;
	font-weight: 300;
	background: #161616;
	border: 1px solid #4f5b55;
	border-radius: 4px;
	outline: none;
}
.tpl-4 .filter-episode input:focus { border-color: #cf8e19; }

/* ---------- Episode numbers per server (newest first) ---------- */
.tpl-4 .hh3d-list-server .halim-server { margin: 0 0 10px; padding: 0; background: none; }
.tpl-4 .hh3d-list-server .halim-server-name {
	display: inline-block;
	float: none;
	margin: 0;
	padding: 8px 10px 5px;
	color: #ea9b06;
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	text-transform: uppercase;
	background: #0b0f15;
	border-radius: 3px 3px 0 0;
}
.tpl-4 .hh3d-list-server .halim-server-name i { margin-right: 4px; }
.tpl-4 .hh3d-list-server ul.halim-list-eps {
	display: block;
	max-height: 285px;
	margin: 0;
	padding: 5px;
	overflow-y: auto;
	list-style: none;
	background: rgba(51, 51, 51, .29);
	border-radius: 0 3px 3px 3px;
}
.tpl-4 .hh3d-list-server ul.halim-list-eps::after { content: ''; display: table; clear: both; }
.tpl-4 .hh3d-list-server ul.halim-list-eps li { float: left; margin: 0; padding: 0 6px; text-align: center; background: none; border: 0; }
.tpl-4 .hh3d-list-server ul.halim-list-eps li a { display: block; font-family: inherit; font-weight: 400; text-decoration: none; }
.tpl-4 .hh3d-list-server ul.halim-list-eps li a span {
	display: inline-block;
	min-width: 34px;
	margin: 0 0 7px;
	font-family: inherit;
	font-weight: 400;
	padding: 6px 10px;
	color: #fff;
	font-size: 13px;
	line-height: 20.8px;
	background: #333;
	border-radius: 3px;
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .07), 0 1px 3px rgba(0, 0, 0, .29);
	transition: background-color .2s ease;
}
.tpl-4 .hh3d-list-server ul.halim-list-eps li a:hover span,
.tpl-4 .hh3d-list-server ul.halim-list-eps li a:focus span { background: #cf8e19; }

/* ---------- Schedule line + plot ---------- */
body.halim-single-tpl-4 .halim_showtime_movies {
	margin: 0 0 15px;
	padding: 10px 15px 10px 45px;
	color: #bdbdbd;
	font-size: 13.5px;
	line-height: 20.25px;
	background: #232323 url(../images/weekly-calendar.png) no-repeat 10px center;
	background-size: 25px;
	border-radius: 0;
}
body.halim-single-tpl-4 .halim_showtime_movies p { margin: 0; }
body.halim-single-tpl-4 .halim_showtime_movies.is-days { text-transform: uppercase; }
body.halim-single-tpl-4 .halim_showtime_movies a,
body.halim-single-tpl-4 .halim_showtime_movies a span { color: #ffa500; }
body.halim-single-tpl-4 .entry-content.htmlwrap {
	margin: 10px 0;
	padding: 15px;
	background: #292929;
	border: 1px solid rgba(29, 39, 49, .65);
	border-radius: 6px;
}
body.halim-single-tpl-4 .entry-content .item-content { padding: 10px 0; color: #cacaca; font-size: 13.5px; line-height: 24.3px; }
body.halim-single-tpl-4 .entry-content .item-content strong { color: #e6e6e6; }
body.halim-single-tpl-4 .entry-content .item-content-gradient { background: linear-gradient(to bottom, rgba(41, 41, 41, 0), #292929); }
body.halim-single-tpl-4 .entry-content .show-more { padding: 8px 7px 0 0; color: rgba(255, 106, 0, .8); font-size: 13px; }

/* ---------- Phones: same structure, smaller type, labels hidden ---------- */
@media (max-width: 767px) {
	.halim-movie-wrapper.tpl-4 { margin-top: 10px; }
	.info-movie.tpl-4 .head .first { flex-basis: 28%; width: 28%; }
	.info-movie.tpl-4 .head .last { margin-left: 5px; font-size: 12px; }
	.info-movie.tpl-4 .head .last > div { padding: 2px; }
	.info-movie.tpl-4 .head .last > div > div:first-child { display: none !important; }
	.info-movie.tpl-4 .head .last > div > div { flex: 1 !important; }
	.tpl-4 .org_title { font-size: 12px; }
	.info-movie.tpl-4 .head .last > div.list_cate a { margin: 2px; padding: 2px 7px; font-size: 11px; line-height: 1.4; border-radius: 4px; }
	.tpl-4 .halim-rating-container { gap: 6px; height: auto; min-height: 38px; padding: 6px 10px; }
	.tpl-4 .halim-rating-score { font-size: 14px; }
	.tpl-4 .halim-rating-votes { font-size: 11px; }
	.tpl-4 .halim-rating-button { height: 22px; padding: 0 8px; font-size: 10px; letter-spacing: .2px; white-space: nowrap; }
}
@media (max-width: 380px) {
	.info-movie.tpl-4 .head .first { flex-basis: 32%; width: 32%; }
	.tpl-4 .movie_name { font-size: 15px; }
	.tpl-4 .halim-rating-container { gap: 4px; padding: 6px 8px; }
	.tpl-4 .halim-star-rating { gap: 2px; }
	.tpl-4 .halim-star-icon { margin-right: 2px; font-size: 14px; }
	.tpl-4 .halim-rating-score { font-size: 13px; }
	.tpl-4 .halim-rating-slash, .tpl-4 .halim-rating-max { font-size: 12px; }
	.tpl-4 .halim-rating-votes { margin-left: 2px; font-size: 10px; }
}

/* ---------- Rating modal (opened by "Đánh Giá") ---------- */
.movie-rating-modal-overlay { position: fixed; top: 0; left: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background-color: rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.movie-rating-modal { width: 100%; max-width: 600px; overflow: hidden; font-family: Montserrat, sans-serif; background: linear-gradient(135deg, #1a1f38, #2d3250); border-radius: 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, .4); animation: movie-rating-modalAppear .4s ease-out; }
@keyframes movie-rating-modalAppear { 0% { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.movie-rating-modal-header { position: relative; padding: 30px 25px; text-align: center; background: linear-gradient(135deg, #3a1c71, #d76d77 50%, #ffaf7b); }
.movie-rating-modal-close { position: absolute; top: 15px; right: 15px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; color: #fff; font-size: 16px; background-color: rgba(255, 255, 255, .2); border: none; border-radius: 50%; cursor: pointer; transition: all .2s; }
.movie-rating-modal-close:hover { background-color: rgba(255, 255, 255, .3); transform: rotate(90deg); }
.movie-rating-movie-title { margin: 0 0 10px; color: #fff; font-size: 20px; font-weight: 700; line-height: 1.3; text-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.movie-rating-movie-rating { display: inline-flex; align-items: center; padding: 8px 15px; color: #fff; font-size: 14px; background-color: rgba(0, 0, 0, .2); border-radius: 30px; }
.movie-rating-rating-icon { margin-right: 8px; color: gold; font-size: 18px; }
.movie-rating-modal-body { padding: 25px; }
.movie-rating-rating-title { margin: 0 0 20px; color: rgba(255, 255, 255, .9); font-size: 18px; font-weight: 500; text-align: center; }
.movie-rating-rating-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 15px; margin-bottom: 30px; }
.movie-rating-rating-option { position: relative; display: flex; flex-direction: column; align-items: center; padding: 15px 10px; overflow: hidden; background-color: rgba(0, 0, 0, .3); border-radius: 16px; cursor: pointer; outline: none; transition: all .3s; }
.movie-rating-rating-option:hover,
.movie-rating-rating-option:focus-visible { background-color: rgba(255, 255, 255, .1); transform: translateY(-5px); }
.movie-rating-rating-option.selected { background: linear-gradient(135deg, #3a47d5, #00d2ff); box-shadow: 0 10px 20px rgba(0, 210, 255, .2); transform: translateY(-5px); }
.movie-rating-rating-option.selected::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent); animation: movie-rating-shimmer 2s infinite; }
@keyframes movie-rating-shimmer { 0% { transform: translateX(-100%); } to { transform: translateX(100%); } }
.movie-rating-rating-option img { width: 50px; height: 50px; margin-bottom: 10px; border-radius: 50%; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .2)); transition: all .3s; }
.movie-rating-rating-option.selected img { transform: scale(1.1); }
.movie-rating-rating-option-text { color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 500; text-align: center; }
.movie-rating-rating-option.selected .movie-rating-rating-option-text { color: #fff; font-weight: 600; }
.movie-rating-modal-footer { display: flex; justify-content: center; gap: 15px; padding: 0 25px 25px; }
.movie-rating-btn { display: flex; flex: 0 1 auto; align-items: center; justify-content: center; min-width: 120px; padding: 12px 25px; font-size: 16px; font-weight: 600; border: none; border-radius: 12px; cursor: pointer; transition: all .3s; }
.movie-rating-btn[disabled] { opacity: .7; cursor: wait; }
.movie-rating-btn-primary { color: #fff; background: linear-gradient(135deg, #f96, #ff5e62); box-shadow: 0 10px 20px rgba(255, 94, 98, .3); }
.movie-rating-btn-primary:hover { box-shadow: 0 15px 25px rgba(255, 94, 98, .4); transform: translateY(-3px); }
.movie-rating-btn-secondary { color: #fff; background-color: rgba(255, 255, 255, .1); }
.movie-rating-btn-secondary:hover { background-color: rgba(255, 255, 255, .15); }
@media (max-width: 768px) {
	.movie-rating-modal { width: 98%; max-width: 450px; }
	.movie-rating-modal-header { padding: 20px 15px; }
	.movie-rating-movie-rating { padding: 6px 12px; font-size: 12px; }
	.movie-rating-modal-body { padding: 20px 15px; }
	.movie-rating-rating-title { margin-bottom: 15px; font-size: 16px; }
	.movie-rating-rating-options { gap: 10px; margin-bottom: 20px; }
	.movie-rating-rating-option { padding: 10px 8px; }
	.movie-rating-modal-footer { gap: 10px; padding: 0 15px 20px; }
	.movie-rating-btn { padding: 12px; font-size: 14px; }
}
@media (max-width: 500px) {
	.movie-rating-modal { width: 98%; max-width: 400px; }
	.movie-rating-rating-options { grid-template-columns: repeat(2, 1fr); }
	.movie-rating-rating-option { flex-direction: row; justify-content: flex-start; padding: 10px; }
	.movie-rating-rating-option img { width: 35px; height: 35px; margin: 0 10px 0 0; }
	.movie-rating-rating-option-text { font-size: 13px; text-align: left; }
}

/* Toasts */
.hrm-toasts { position: fixed; top: 20px; right: 20px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.hrm-toast { min-width: 220px; max-width: 320px; padding: 12px 16px; color: #fff; font-size: 14px; font-weight: 500; background: #2d3250; border-left: 4px solid #00d2ff; border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); animation: hrm-in .25s ease-out; transition: opacity .3s, transform .3s; }
.hrm-toast-success { border-left-color: #2ecc71; }
.hrm-toast-warning { border-left-color: #f5a623; }
.hrm-toast-error { border-left-color: #ff5e62; }
.hrm-toast.hrm-hide { opacity: 0; transform: translateX(20px); }
@keyframes hrm-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 500px) { .hrm-toasts { right: 10px; left: 10px; } .hrm-toast { max-width: none; } }

/* Episode numbers in fixed columns: 5 per row on phones, 8 on tablets, 12 on PC */
.tpl-4 .hh3d-list-server ul.halim-list-eps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; } /* phones: 4 per row */
.tpl-4 .hh3d-list-server ul.halim-list-eps::after { display: none; }
.tpl-4 .hh3d-list-server ul.halim-list-eps li { float: none; min-width: 0; padding: 0 4px; }
.tpl-4 .hh3d-list-server ul.halim-list-eps li a span { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (min-width: 768px) {
	.tpl-4 .hh3d-list-server ul.halim-list-eps { grid-template-columns: repeat(8, minmax(0, 1fr)); }
	.tpl-4 .hh3d-list-server ul.halim-list-eps li { padding: 0 6px; }
}
@media (min-width: 992px) {
	.tpl-4 .hh3d-list-server ul.halim-list-eps { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

/* ---------- Watch page ---------- */
.hh3d-watch-page { margin-top: 10px; }
.hh3d-watch-page .filter-episode { margin-top: 6px; }

/* Current episode */
.tpl-4 .hh3d-list-server ul.halim-list-eps li.active a span,
.tpl-4 .hh3d-list-server ul.halim-list-eps li a span.active { color: #fff; background: linear-gradient(to right, #fb0, #e43603); box-shadow: 0 0 0 1px rgba(255, 187, 0, .35), 0 2px 8px rgba(228, 54, 3, .35); }
.hh3d-nav-order { display: none !important; }

/* Alternate servers: "Đổi Server:" + pills */
.hh3d-watch-page .halim-ajax-list-server { display: block; margin: 10px 0 0; text-align: left; }
.hh3d-watch-page #halim-ajax-list-server { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 6px 2px; }
.hh3d-watch-page #halim-ajax-list-server .list-svname { display: inline-flex; align-items: center; margin-right: 2px; padding-right: 6px; font-size: 0; line-height: 1; border-right: 1px solid rgba(255, 255, 255, .12); }
.hh3d-watch-page #halim-ajax-list-server .list-svname::before { content: attr(data-text); color: #b0bec5; font-size: 12px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }
.hh3d-watch-page #halim-ajax-list-server .play-listsv {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 5px 14px;
	color: #cdd8e3;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .3px;
	background: #1e3046;
	border: 1px solid rgba(255, 255, 255, .07);
	border-radius: 5px;
	box-shadow: none;
	cursor: pointer;
}
.hh3d-watch-page #halim-ajax-list-server .play-listsv i { margin-right: 4px; font-size: 10px; }
.hh3d-watch-page #halim-ajax-list-server .play-listsv:hover { color: #fff; background: #2a6099; border-color: rgba(255, 255, 255, .15); }
.hh3d-watch-page #halim-ajax-list-server .play-listsv.active { color: #fff; background: #2d7d32; border-color: #46a04a; }

/* Title + rating on one bar */
.tpl-4 .title-block.watch-page.hh3d-title-block {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 0;
	margin: 0 0 14px;
	padding: 6px 12px;
	overflow: visible;
	background: #1f2021;
	border-radius: 6px;
}
.tpl-4 .hh3d-title-block .title-wrapper { flex: 1 1 auto; float: none; width: auto; min-width: 0; margin: 0; padding: 0; border: 0; }
.tpl-4 .hh3d-title-block h1.entry-title { display: -webkit-box; margin: 0; overflow: hidden; color: #fff; font-size: 15px; line-height: 1.2; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.tpl-4 .hh3d-title-block h1.entry-title a,
.tpl-4 .hh3d-title-block h1.entry-title i { color: #fff; }
.tpl-4 .hh3d-title-block h1.entry-title i { margin-right: 4px; }
.tpl-4 .hh3d-title-block .ratings_wrapper { display: flex; flex: 0 0 auto; float: none; align-items: center; width: auto; height: auto; margin: 0; padding: 0; overflow: visible; text-align: right; }
.tpl-4 .hh3d-title-block .halim-rating-container { width: auto; height: 32px; margin: 0; padding: 4px 10px; }
.tpl-4 .hh3d-title-block .halim-rating-button { height: 24px; padding: 0 12px; font-size: 12px; }

@media (max-width: 767px) {
	.hh3d-watch-page #halim-ajax-list-server { gap: 4px; padding: 4px 0; }
	.hh3d-watch-page #halim-ajax-list-server .play-listsv { padding: 4px 10px; font-size: 11px; }
	.tpl-4 .title-block.watch-page.hh3d-title-block { gap: 8px; padding: 8px 10px; }
	.tpl-4 .hh3d-title-block .title-wrapper { flex: 1 1 100%; overflow: hidden; }
	.tpl-4 .hh3d-title-block h1.entry-title { display: block; font-size: 14px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
	.tpl-4 .hh3d-title-block .ratings_wrapper { display: block; flex: 1 1 100%; width: 100%; text-align: left; }
	.tpl-4 .hh3d-title-block .halim-rating-container { justify-content: space-between; width: 100%; height: auto; padding: 8px 12px; }
}

/* Episode buttons: hover + current episode use the same blue gradient as the episode label (.new-ep) */
.tpl-4 .hh3d-list-server ul.halim-list-eps li a span { background-size: 300% 100%; }
.tpl-4 .hh3d-list-server ul.halim-list-eps li a:hover span,
.tpl-4 .hh3d-list-server ul.halim-list-eps li a:focus span,
.tpl-4 .hh3d-list-server ul.halim-list-eps li.active a span,
.tpl-4 .hh3d-list-server ul.halim-list-eps li a span.active {
	color: #fff;
	background-color: #043ea5;
	background-image: linear-gradient(to right, #25aae1, #043ea5, #04befe, #3f86ed);
	background-size: 300% 100%;
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .07), 0 1px 3px rgba(0, 0, 0, .29);
}
.tpl-4 .hh3d-list-server ul.halim-list-eps li.active a span,
.tpl-4 .hh3d-list-server ul.halim-list-eps li a span.active { box-shadow: 0 0 0 1px rgba(37, 170, 225, .5), 0 2px 8px rgba(4, 62, 165, .45); }

/* Legacy style.css paints the whole cell black on hover (li:hover{background:#000!important}): keep only the button colour */
.tpl-4 .hh3d-list-server ul.halim-list-eps li:hover,
.tpl-4 .hh3d-list-server ul.halim-list-eps li.active { background: transparent !important; }

/* ---------- Parts bar ("Phần Chính", "Movie", …) — values from the reference theme ---------- */
.tpl-4 .list-movies-part { max-height: 78px; margin: 0 0 10px; padding: 13px 8px 0 !important; overflow-y: auto; list-style: none; background: rgba(51, 51, 51, .29); border-radius: 3px; }
.tpl-4 .list-movies-part li { display: inline-block; margin: 0 7px 14px 0 !important; }
.tpl-4 .list-movies-part li a { display: inline-block; margin: 0; padding: 7.5px 10px 6px; color: #fff; font-size: 12px; line-height: 1.4; background: #1f2c3e; border-radius: 3px; cursor: pointer; transition: .6s all; }
.tpl-4 .list-movies-part li a.active { background: #1b2a39; background-image: linear-gradient(to right, #f0c 0%, #339 51%, #f0c 100%); background-size: 200% 100%; }
.tpl-4 .list-movies-part li a:hover { color: #f90; background: #1b2a39; background-image: linear-gradient(to right, #070f19 0%, #010408 51%, #6d2323 100%); background-size: 200% 100%; background-position: right center; }
.tpl-4 .list-movies-part li a.active:hover { color: #fff; background-image: linear-gradient(to right, #f0c 0%, #339 51%, #f0c 100%); background-position: right center; }
/* Match the reference exactly: inline links (19.2px line box), transparent 1px border on the active part,
   and the quick-search block 8 + 25 + 35 = 68px tall */
.tpl-4 .list-movies-part li a { display: inline; line-height: 1.6; }
.tpl-4 .list-movies-part li a.active { border: 1px solid transparent; }
.tpl-4 .filter-episode > span:first-child { display: inline; padding: 4px 0; }
.tpl-4 .filter-episode > span.list-episode-filter { display: block; padding: 0; }
.tpl-4 .filter-episode input { display: block; margin: 0; }
/* style.css forces its own gradient on .halim-movie-season li a.active (!important): override it here */
.tpl-4 .list-movies-part li a.active,
.tpl-4 .list-movies-part li a.active:hover {
	background-color: #1b2a39 !important;
	background-image: linear-gradient(to right, #f0c 0%, #339 51%, #f0c 100%) !important;
	background-size: 200% 100% !important;
	background-position: 0 0 !important;
}
.tpl-4 .list-movies-part li a:hover { color: #f90; }

/* ---------- Comments box: iOS 26 glass ---------- */
.hh3d-comments {
	--cm-text: #f5f5f7;
	--cm-dim: rgba(235, 235, 245, .6);
	--cm-faint: rgba(235, 235, 245, .35);
	--cm-hair: rgba(255, 255, 255, .12);
	--cm-fill: rgba(255, 255, 255, .07);
	--cm-blue: #0a84ff;
	--cm-orange: #ff9f0a;
	--cm-red: #ff453a;
	position: relative;
	margin-top: 24px;
	padding: 18px 20px 20px;
	color: var(--cm-text);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Montserrat", sans-serif;
	background: rgba(44, 44, 46, .72);
	border-radius: 24px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 0 0 .5px rgba(255, 255, 255, .08), 0 20px 50px -16px rgba(0, 0, 0, .6);
	-webkit-backdrop-filter: blur(28px) saturate(140%);
	backdrop-filter: blur(28px) saturate(140%);
	overflow: hidden;
}
.hh3d-comments::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, 0) 40%); pointer-events: none; }
.hh3d-comments > * { position: relative; }
/* heading */
.hh3d-comments-head { display: flex; align-items: center; margin-bottom: 16px; padding: 0; background: none; border: 0; }
.hh3d-comments-head .section-title { margin: 0 !important; padding: 0; border: 0; }
body .hh3d-comments-head .section-title > span { display: flex; align-items: center; gap: 10px; color: var(--cm-text) !important; font-size: 20px !important; font-weight: 700 !important; letter-spacing: -.3px; text-transform: none; background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; -webkit-text-fill-color: var(--cm-text) !important; }
body .hh3d-comments-head .section-title > span::before,
body .hh3d-comments-head .section-title > span::after { display: none !important; content: none !important; }
body .hh3d-comments-head .section-title > span i { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0; color: #fff !important; font-size: 14px; background: var(--cm-orange); border-radius: 9px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
body .hh3d-comments-head .section-title > span i::before { margin: 0; width: auto; }
body .hh3d-comments .hh3d-cm-count { position: static !important; float: none !important; margin: 0 !important; padding: 2px 10px !important; color: var(--cm-dim) !important; font-size: 13px !important; font-weight: 600 !important; background: rgba(255, 255, 255, .1) !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; -webkit-text-fill-color: var(--cm-dim) !important; border: 0 !important; border-radius: 999px; }
/* composer */
.hh3d-cm-form { margin-bottom: 16px; padding: 0; border: 0; }
.hh3d-cm-form-row { display: flex; align-items: flex-start; gap: 12px; }
.hh3d-cm-input-wrap { flex: 1; min-width: 0; }
.hh3d-cm-input-wrap textarea { box-sizing: border-box; width: 100%; min-height: 84px; padding: 12px 16px; color: var(--cm-text); font-family: inherit; font-size: 15px; line-height: 1.5; background: var(--cm-fill); border: 0; border-radius: 18px; outline: 0; box-shadow: inset 0 0 0 .5px var(--cm-hair), inset 0 1px 0 rgba(255, 255, 255, .06); resize: vertical; transition: background-color .15s ease, box-shadow .15s ease; }
.hh3d-cm-input-wrap textarea::placeholder { color: var(--cm-faint); }
.hh3d-cm-input-wrap textarea:focus { background: rgba(255, 255, 255, .11); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.hh3d-cm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.hh3d-cm-replying { flex: 1; display: flex; align-items: center; gap: 6px; color: var(--cm-dim); font-size: 13px; }
.hh3d-cm-replying[hidden] { display: none; }
.hh3d-cm-replying b { color: var(--cm-blue); font-weight: 600; }
.hh3d-cm-cancel-reply { width: 22px; height: 22px; padding: 0; color: var(--cm-dim); font-size: 16px; line-height: 22px; background: rgba(255, 255, 255, .12); border: 0; border-radius: 50%; cursor: pointer; }
.hh3d-cm-cancel-reply:hover { color: #fff; background: rgba(255, 255, 255, .2); }
.hh3d-cm-submit { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 20px; color: #fff; font-size: 14px; font-weight: 700; background: linear-gradient(135deg, #25aae1 0%, #043ea5 100%); border: 0; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px rgba(4, 62, 165, .3); cursor: pointer; transition: filter .15s ease, transform .15s ease; }
.hh3d-cm-submit:hover { filter: brightness(1.08); }
.hh3d-cm-submit:active { transform: scale(.985); }
.hh3d-cm-submit:disabled { opacity: .6; cursor: default; }
.hh3d-cm-submit i { width: auto; margin: 0; }
.hh3d-cm-submit i::before { margin: 0; width: auto; }
.hh3d-cm-form.is-busy .hh3d-cm-submit i { animation: hh3d-cm-spin .8s linear infinite; }
@keyframes hh3d-cm-spin { to { transform: rotate(360deg); } }
.hh3d-cm-loginbox { margin-bottom: 16px; padding: 14px 16px; color: var(--cm-dim); font-size: 14px; text-align: center; background: var(--cm-fill); border: 0; border-radius: 16px; box-shadow: inset 0 0 0 .5px var(--cm-hair); }
.hh3d-cm-loginbox i { margin-right: 6px; color: var(--cm-blue); }
.hh3d-cm-loginbox a { color: var(--cm-blue); font-weight: 600; text-decoration: none; }
.hh3d-cm-loginbox a:hover { text-decoration: underline; }
/* list: inset-grouped */
.hh3d-cm-list { padding: 0; background: var(--cm-fill); border-radius: 18px; box-shadow: inset 0 0 0 .5px var(--cm-hair); }
.hh3d-cm-empty { padding: 32px 16px; color: var(--cm-faint); font-size: 14px; text-align: center; }
.hh3d-cm-item { position: relative; display: flex; gap: 12px; padding: 14px 16px; border: 0; }
.hh3d-cm-list > .hh3d-cm-item + .hh3d-cm-item::before { content: ""; position: absolute; top: 0; right: 0; left: 70px; height: .5px; background: var(--cm-hair); }
.hh3d-cm-item.is-new { animation: hh3d-cm-in .6s ease; }
@keyframes hh3d-cm-in { from { background: rgba(10, 132, 255, .18); } to { background: transparent; } }
.hh3d-cm-item.is-pending { opacity: .7; }
.hh3d-cm-avatar { position: relative; display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 42px; height: 42px; color: #fff; font-size: 16px; font-weight: 700; line-height: 1; border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 .5px rgba(255, 255, 255, .15); overflow: hidden; }
.hh3d-cm-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.hh3d-cm-avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.hh3d-cm-body { flex: 1; min-width: 0; }
.hh3d-cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 3px; }
.hh3d-cm-author { color: var(--cm-text); font-size: 15px; font-weight: 600; letter-spacing: -.1px; }
.hh3d-cm-badge { padding: 2px 8px; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; background: var(--cm-blue); border-radius: 999px; }
.hh3d-cm-time { color: var(--cm-faint); font-size: 12px; }
.hh3d-cm-pending { color: var(--cm-orange); font-size: 12px; }
.hh3d-cm-text { color: rgba(235, 235, 245, .9); font-size: 15px; line-height: 1.5; overflow-wrap: break-word; }
.hh3d-cm-text p { margin: 0 0 4px; }
.hh3d-cm-text p:last-child { margin-bottom: 0; }
.hh3d-cm-tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hh3d-cm-reply-btn, .hh3d-cm-delete-btn, .hh3d-cm-like-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; color: var(--cm-dim); font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .08); border: 0; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); cursor: pointer; transition: color .15s ease, background-color .15s ease, transform .15s ease; }
.hh3d-cm-tools i { width: auto; margin: 0; font-size: 12px; }
.hh3d-cm-tools i::before { margin: 0; width: auto; }
.hh3d-cm-reply-btn:hover, .hh3d-cm-like-btn:hover:not([disabled]) { color: #fff; background: rgba(255, 255, 255, .16); }
.hh3d-cm-delete-btn:hover { color: #fff; background: var(--cm-red); }
.hh3d-cm-like-btn i { transition: transform .2s; }
.hh3d-cm-like-btn.liked { color: #fff; background: rgba(255, 69, 58, .85); }
.hh3d-cm-like-btn.liked i { color: #fff; }
.hh3d-cm-like-btn[disabled] { opacity: .5; cursor: not-allowed; }
.hh3d-cm-like-btn.pop i { animation: hh3d-heart-pop .35s ease; }
@keyframes hh3d-heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
.hh3d-cm-like-count { min-width: 8px; font-variant-numeric: tabular-nums; }
/* replies */
.hh3d-cm-replies { margin-top: 12px; padding-left: 12px; border-left: 2px solid rgba(255, 255, 255, .1); }
.hh3d-cm-replies[hidden] { display: none; }
.hh3d-cm-replies .hh3d-cm-item { padding: 10px 0; }
.hh3d-cm-replies .hh3d-cm-item + .hh3d-cm-item::before { content: ""; position: absolute; top: 0; right: 0; left: 44px; height: .5px; background: var(--cm-hair); }
.hh3d-cm-replies .hh3d-cm-item:last-child { padding-bottom: 2px; }
.hh3d-cm-replies .hh3d-cm-text { font-size: 14px; }
/* toast */
.hh3d-cm-toast { position: fixed; bottom: 24px; left: 50%; z-index: 1080; max-width: calc(100% - 32px); padding: 10px 18px; color: #fff; font-size: 13.5px; background: rgba(44, 44, 46, .9); border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 30px rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); opacity: 0; transform: translate(-50%, 10px); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.hh3d-cm-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.tpl-4-tags.the_tag_list { margin: 24px 0 -12px; }
.tpl-4-tags.the_tag_list a { display: inline-block; margin: 0 6px 6px 0; }
@media (max-width: 640px) {
	.hh3d-comments { padding: 14px 14px 16px; border-radius: 20px; }
	.hh3d-cm-item { gap: 10px; padding: 12px; }
	.hh3d-cm-list > .hh3d-cm-item + .hh3d-cm-item::before { left: 58px; }
	.hh3d-cm-avatar { width: 36px; height: 36px; font-size: 14px; }
	.hh3d-cm-author { font-size: 14px; }
	.hh3d-cm-text { font-size: 14px; }
}
@media (prefers-reduced-transparency: reduce) {
	.hh3d-comments { background: #2c2c2e; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* no theme underline/rule under the comments heading */
body .hh3d-comments-head .section-title { width: auto; min-height: 0; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
body .hh3d-comments-head .section-title::before,
body .hh3d-comments-head .section-title::after { display: none !important; content: none !important; }
body .hh3d-comments-head .section-title *::before,
body .hh3d-comments-head .section-title *::after { display: none !important; content: none !important; }
body .hh3d-comments-head .section-title > span i::before { display: inline !important; content: '\e835' !important; }
body .hh3d-comments-head .section-title > span i { width: auto; height: auto; color: #ff9f0a !important; font-size: 18px; background: none; border-radius: 0; box-shadow: none; }
