/* =========================================
   Custom Styles - pivxxx.com
   Extracted from inline HTML for DRY code
   ========================================= */

*,
*::before,
*::after {
	-webkit-tap-highlight-color: transparent;
}

/* Hide arrow icons in sidebar list links and navigation */
.sidebar .list a::after,
.sidebar .list a::before,
#share-btn::after,
#share-btn::before,
.navigation .primary .highlight span:after,
.navigation .primary .highlight span:before {
	display: none !important;
}

/* Share icon style */
.share-icon {
	vertical-align: middle;
	margin-right: 6px;
}

/* VIP Menu Item */
.vip-menu-item {
	list-style: none;
	margin: 0 10px;
}

.vip-menu-item a {
	display: inline-block;
	padding: 10px 25px;
	background: linear-gradient(45deg, #f39c12, #e74c3c);
	color: white;
	font-weight: 700;
	border-radius: 25px;
	box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
	text-decoration: none;
	transition: background 0.3s ease, box-shadow 0.3s ease;
	font-size: 1.1rem;
}

.vip-menu-item a:hover {
	background: linear-gradient(45deg, #e74c3c, #f39c12);
	box-shadow: 0 6px 20px rgba(231, 76, 60, 0.7);
}

/* Telegram Banner */
#telegram-banner {
	text-align: center;
	margin: 15px auto;
	font-size: 17px;
}

#telegram-banner a {
	color: #0088cc;
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

#telegram-banner a:hover {
	text-decoration: underline;
}

.tg-icon {
	width: 22px;
	height: 22px;
}

/* Mobile Footer */
.mobile-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: #111;
	box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.7);
	display: flex;
	justify-content: space-around;
	align-items: center;
	padding: 8px 0;
	z-index: 9999;
	transform: translateY(0);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-footer.closed {
	transform: translateY(100%);
	pointer-events: none;
	opacity: 0;
}

.footer-link {
	flex: 1;
	text-align: center;
	color: #ccc;
	text-decoration: none;
	font-size: 11px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 6px 0;
	transition: color 0.3s ease;
}

.footer-link .icon {
	width: 22px;
	height: 22px;
	stroke: #ccc;
	transition: stroke 0.3s ease;
}

.footer-link:hover,
.footer-link.active {
	color: red;
}

.footer-link:hover .icon,
.footer-link.active .icon {
	stroke: red;
}

/* Button footer-link style */
button.footer-link {
	background: none;
	border: none;
	cursor: pointer;
}

/* Categories Popup - Bottom Sheet Style */
.categories-popup {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 60px;
	/* On mobile footer */
	max-height: 60vh;
	background: #1a1a1a;
	border-radius: 16px 16px 0 0;
	z-index: 10001;
	display: flex;
	flex-direction: column;
	transform: translateY(100%);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.categories-popup.open {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

/* Overlay backdrop */
.categories-popup::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 60px;
	background: rgba(0, 0, 0, 0.6);
	z-index: -1;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.categories-popup.open::before {
	opacity: 1;
	pointer-events: auto;
}

.categories-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid #333;
	flex-shrink: 0;
}

/* Drag handle indicator */
.categories-popup-header::before {
	content: '';
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 40px;
	height: 4px;
	background: #555;
	border-radius: 2px;
}

.categories-popup-header h3 {
	color: #fff;
	font-size: 16px;
	margin: 0;
	font-weight: 600;
}

.categories-popup-header button {
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.categories-popup-header button:hover {
	color: #e74c3c;
}

.categories-popup-content {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	background: #1a1a1a;
	-webkit-overflow-scrolling: touch;
}

.categories-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.categories-list li a {
	display: block;
	padding: 10px 8px;
	background: #2a2a2a;
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-size: 12px;
	text-align: center;
	transition: background 0.2s ease, transform 0.1s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.categories-list li a:hover,
.categories-list li a:active {
	background: #e74c3c;
	transform: scale(0.98);
}

.categories-list li.active a {
	background: #e74c3c;
	color: #fff;
}

/* =========================================
   Responsive - Mobile Footer visibility
   ========================================= */

/* Mobile only: < 768px */
@media (max-width: 768px) {
	body {
		padding-bottom: 70px;
	}
}

/* Desktop: >= 769px - Hide mobile elements */
@media (min-width: 769px) {

	.mobile-footer,
	.categories-popup,
	.mobile-all-categories {
		display: none !important;
	}
}

/* =========================================
   Mobile All Categories - inside .primary
   ========================================= */

/* Ẩn trên desktop */
.mobile-all-categories {
	display: none !important;
}

@media (max-width: 768px) {

	/* Primary dạng grid 2 cột trên mobile */
	.navigation .primary {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr);
		gap: 6px;
		max-height: 70vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.navigation .primary>li {
		flex: none !important;
		margin: 0 !important;
	}

	.navigation .primary>li a {
		padding: 10px 8px;
		background: #2a2a2a;
		border-radius: 6px;
		font-size: 12px;
		text-align: center;
		transition: background 0.2s ease, color 0.2s ease;
	}

	.navigation .primary>li a:hover,
	.navigation .primary>li a:active {
		background: #e74c3c;
		color: #fff;
	}

	.navigation .primary>li.selected a {
		background: #e74c3c;
		color: #fff;
	}

	/* Share button và mobile-all-categories chiếm hết chiều rộng */
	.navigation .primary>li.highlight,
	.navigation .primary>li.mobile-all-categories {
		grid-column: 1 / -1;
	}

	/* Hiển thị block categories trên mobile */
	.navigation .primary .mobile-all-categories {
		display: block !important;
		margin: 0;
	}

	.mobile-cats-title {
		color: #999;
		font-size: 11px;
		text-transform: uppercase;
		letter-spacing: 1px;
		padding: 12px 4px 8px;
		margin: 0;
		border-top: 1px solid #333;
		font-weight: 600;
	}

	.mobile-cats-list {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr);
		gap: 6px;
		list-style: none;
		margin: 0;
		padding: 0;
		position: static !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		box-shadow: none !important;
		background: transparent !important;
		border-radius: 0 !important;
	}

	.mobile-cats-list li {
		display: block !important;
		margin: 0 !important;
		flex: none !important;
	}

	.mobile-cats-list li a {
		display: block;
		padding: 10px 8px;
		background: #2a2a2a;
		color: #ccc !important;
		text-decoration: none;
		border-radius: 6px;
		font-size: 12px;
		text-align: center;
		transition: background 0.2s ease, color 0.2s ease;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.mobile-cats-list li a::before {
		display: none !important;
	}

	.mobile-cats-list li a:hover,
	.mobile-cats-list li a:active {
		background: #e74c3c;
		color: #fff !important;
	}

	.mobile-cats-list li.active a {
		background: #e74c3c;
		color: #fff !important;
	}
}

/* =========================================
   Responsive - Video Grid and Sidebar Spacing
   ========================================= */

/* 769px+: Sidebar list items always 100% width (single column) */
@media screen and (min-width: 769px) {

	.sidebar .list li,
	.sidebar .filter li {
		width: 100% !important;
	}

	/* Keep sidebar margin only when big-container is active */
	.big-container .sidebar {
		margin-right: 15px !important;
	}
}

/* 769px - 860px: Video grid 3 columns */
@media screen and (min-width: 769px) and (max-width: 860px) {

	.big-container .sidebar+.main-container .list-videos .item,
	.list-videos .item {
		width: calc(50% - 10px) !important;
	}
}

/* 640px - 768px: Video grid 2 columns */
@media screen and (max-width: 768px) and (min-width: 640px) {

	.big-container .sidebar+.main-container .list-videos .item,
	.list-videos .item {
		width: calc(50% - 10px) !important;
	}
}

/* =========================================
   Video Page Styles
   ========================================= */

/* Main video container */
.player {
	position: relative;
	width: 100%;
}

.player-holder {
	position: relative;
	width: 100%;
}

/* .player-wrap is defined in the Video Player Placeholder section below */

#kt_player,
.kt-player {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	background: #000;
}

.info-holder {
	width: 100%;
}

/* Rating Container */
.rating-container {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rating {
	display: inline-flex;
	align-items: center;
}

.rating_circle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.rating_circle svg {
	width: 50px;
	height: 50px;
}

.object_rating {
	position: absolute;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
}

.e-c-base {
	fill: none;
	stroke: #333;
	stroke-width: 10;
}

.e-c-progress {
	fill: none;
	stroke: #4caf50;
	stroke-width: 10;
}

/* Favourites Button */
.btn-favourites {
	position: relative;
}

.btn-favourites .drop:hover {
	background: #e74c3c;
}

/* Hide dropdown arrow */
.btn-favourites .drop:after {
	display: none !important;
}

/* Keep border-radius on hover and click without dropdown */
.btn-favourites:hover,
.btn-favourites.open-drop,
.btn-favourites:active,
.btn-favourites:focus {
	border-radius: 10px !important;
}

/* Also apply to .drop element */
.btn-favourites:hover .drop,
.btn-favourites.open-drop .drop,
.btn-favourites .drop:hover,
.btn-favourites .drop:active,
.btn-favourites .drop:focus {
	border-radius: 10px !important;
}

.ico-favourite {
	display: block;
	width: 20px;
	height: 20px;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23fff" viewBox="0 0 24 24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') center/contain no-repeat;
}

.btn-favourites ul {
	position: absolute;
	top: 100%;
	left: 0;
	background: #222;
	border-radius: 8px;
	padding: 8px 0;
	min-width: 200px;
	display: none;
	z-index: 100;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.btn-favourites:hover ul {
	display: block;
}

.btn-favourites ul li {
	list-style: none;
}

.btn-favourites ul li a {
	display: block;
	padding: 10px 15px;
	color: #fff;
	text-decoration: none;
	transition: background 0.2s;
}

.btn-favourites ul li a:hover {
	background: #333;
}

/* Tabs Menu */
.tabs-menu {
	margin-left: auto;
}

.tabs-menu ul {
	display: flex;
	gap: 5px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tabs-menu ul li a {
	display: block;
	padding: 10px 20px;
	background: #333;
	color: #fff;
	text-decoration: none;
	border-radius: 20px;
	transition: all 0.3s ease;
}

.tabs-menu ul li a:hover,
.tabs-menu ul li a.active {
	background: #e74c3c;
}

/* Tab Content */
.tab-content {
	padding: 20px 0;
}

.tab-content.hidden {
	display: none !important;
}

.block-details .info {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.block-details .info .item span {
	display: inline-block;
	margin-right: 20px;
	color: #aaa;
}

.block-details .info .item em {
	color: #fff;
	font-style: normal;
}

/* Share Block */
.block-share .row {
	margin-bottom: 15px;
}

.block-share .field-label {
	display: block;
	margin-bottom: 5px;
	color: #aaa;
	font-size: 14px;
}

.block-share .textfield {
	width: 100%;
	padding: 12px;
	background: #333;
	border: 1px solid #444;
	border-radius: 8px;
	color: #fff;
	font-size: 14px;
}

.block-size {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.embed-button {
	padding: 8px 16px;
	background: #333;
	color: #fff;
	text-decoration: none;
	border-radius: 20px;
	font-size: 13px;
	transition: background 0.3s;
}

.embed-button:hover {
	background: #e74c3c;
}

/* Comments Block */
.block-comments {
	padding: 20px 0;
}

.block-comments .field-label {
	display: block;
	margin-bottom: 5px;
	color: #aaa;
	font-size: 14px;
}

.block-comments .hint {
	color: #666;
	font-size: 13px;
}

.block-new-comment .row {
	margin-bottom: 15px;
}

.block-new-comment .textfield,
.block-new-comment .textarea {
	width: 100%;
	padding: 12px;
	background: #333;
	border: 1px solid #444;
	border-radius: 8px;
	color: #fff;
	font-size: 14px;
}

.block-new-comment .textarea {
	resize: vertical;
	min-height: 100px;
}

.block-new-comment .submit {
	padding: 12px 30px;
	background: linear-gradient(45deg, #e74c3c, #f39c12);
	border: none;
	border-radius: 25px;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.block-new-comment .submit:hover {
	box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
}

.smileys-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 10px;
}

.smileys-bar img {
	width: 24px;
	height: 24px;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.smileys-bar img:hover {
	opacity: 1;
}


.info-content a:hover {
	background: #e74c3c;
}

/* Related Videos */
.block-related {
	margin-top: 30px;
}

/* =========================================
   Video Player Placeholder (replaces inline styles)
   ========================================= */

/* Player wrap - using aspect-ratio instead of padding-bottom */
.player-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 0;
	aspect-ratio: 16/9;
	background: #000;
}

/* Player placeholder overlay */
.player-placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

.player-placeholder-icon {
	width: 120px;
	height: 120px;
	opacity: 0.5;
}

.player-placeholder-text {
	color: #fff;
	margin-top: 20px;
	font-size: 18px;
}

.player-placeholder-duration {
	color: #888;
	margin-top: 10px;
	font-size: 14px;
}

/* Play button */
.player-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80px;
	height: 80px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s ease;
}

.player-play-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

.player-play-btn-icon {
	width: 0;
	height: 0;
	border-left: 30px solid #fff;
	border-top: 18px solid transparent;
	border-bottom: 18px solid transparent;
	margin-left: 8px;
}

/* VIP Sponsor Box */
.vip-sponsor-box {
	text-align: center;
	margin: 25px 0 15px;
	padding: 16px;
	background: #111;
	color: #ddd;
	font-size: 14.5px;
	line-height: 1.8;
	border-radius: 8px;
}

/* Nav link icon */
.nav-link-icon {
	height: 20px;
	vertical-align: middle;
	margin-right: 8px;
}

/* Responsive Video Page */
@media (max-width: 768px) {
	.tabs-menu {
		margin-left: 0;
		margin-top: 15px;
		width: 100%;
	}

	.tabs-menu ul {
		flex-wrap: wrap;
	}

	.tabs-menu ul li a {
		padding: 8px 15px;
		font-size: 13px;
	}

}

/* =========================================
   404 Error Page Styles
   ========================================= */
.error-404-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 50vh;
	padding: 40px 20px;
}

.error-404-icon {
	color: #e74c3c;
	margin-bottom: 20px;
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

	0%,
	100% {
		transform: scale(1);
		opacity: 1;
	}

	50% {
		transform: scale(1.05);
		opacity: 0.8;
	}
}

.error-404-title {
	font-size: 120px;
	font-weight: 800;
	line-height: 1;
	margin: 0;
	background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.error-404-subtitle {
	font-size: 28px;
	font-weight: 600;
	color: #fff;
	margin: 15px 0 10px;
}

.error-404-text {
	font-size: 16px;
	color: #888;
	max-width: 400px;
	margin: 0 0 30px;
	line-height: 1.6;
}

.error-404-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 30px;
	background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 30px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.error-404-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.error-404-btn svg {
	stroke: #fff;
}

@media (max-width: 768px) {
	.error-404-title {
		font-size: 80px;
	}

	.error-404-subtitle {
		font-size: 22px;
	}

	.error-404-text {
		font-size: 14px;
	}

	.error-404-icon svg {
		width: 80px;
		height: 80px;
	}
}