/* ===== GLOBAL & LAYOUT ===== */
html,
body {
	max-width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
}

.video-detail-layout {
	display: grid;
	grid-template-columns: 3fr 1fr;
	gap: 2rem;
	margin-top: 2rem;
	align-items: start;
}

/* ===== VIDEO SECTION ===== */
.video-player-section {
	background: #111;
	padding: 1.2rem;
	border-radius: 8px;
}

.video-player-section .title {
	font-size: 1.6rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #fff;
	line-height: 1.3;
}

.video-thumbnail-container {
	position: relative;
	aspect-ratio: 16/9;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.thumbnail-wrapper {
	width: 100%;
	height: 100%;
	background: center/cover no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.thumbnail-wrapper:hover {
	transform: scale(1.02);
}

.thumbnail-wrapper:hover .play-button-overlay {
	transform: scale(1.1);
	background: rgba(255, 71, 135, 0.9);
}

.play-button-overlay {
	width: 80px;
	height: 80px;
	background: rgba(255, 71, 135, 0.8);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 2rem;
	transition: transform 0.3s ease, background 0.3s ease;
	backdrop-filter: blur(5px);
	border: 3px solid rgba(255, 255, 255, 0.3);
}

.play-button-overlay i {
	margin-left: 5px;
}

.video-player iframe {
	width: 100%;
	aspect-ratio: 16/9;
	border-radius: 8px;
	display: none;
}

.video-meta p {
	color: #ddd;
	margin: 0.3rem 0;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.video-meta strong {
	color: #ff4757;
	font-weight: 600;
}

.video-meta a {
	color: #ff6b81;
	text-decoration: none;
}

.video-meta a:hover {
	color: #ff4757;
	text-decoration: underline;
}

/* ===== SIDEBAR ===== */
.related-sidebar {
	background: rgba(17, 17, 17, 0.8);
	padding: 1rem;
	border-radius: 8px;
	position: sticky;
	top: 100px;
	overflow: auto;
}

.related-sidebar h2 {
	font-size: 1.2rem;
	font-weight: 600;
	color: #fff;
	border-bottom: 2px solid #ff4757;
	padding-bottom: 0.5rem;
	margin-bottom: 1rem;
}

.related-videos-container {
	max-height: 500px;
	overflow-y: auto;
	padding-right: 5px;
}

.related-card {
	margin-bottom: 1rem;
	padding: 0.5rem;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.05);
	transition: background 0.2s ease;
}

.related-card:hover {
	background: rgba(255, 255, 255, 0.1);
}

.related-card img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 5px;
	margin-bottom: 0.5rem;
}

.related-card p {
	font-size: 0.9rem;
	font-weight: 500;
	color: #ddd;
	margin-top: 0.4rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Scrollbar */
.related-videos-container::-webkit-scrollbar {
	width: 5px;
}

.related-videos-container::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 3px;
}

.related-videos-container::-webkit-scrollbar-thumb {
	background: rgba(255, 107, 129, 0.6);
	border-radius: 3px;
}

.related-videos-container::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 71, 87, 0.8);
}

/* ===== BOTTOM GRID ===== */
.related-bottom {
	margin-top: 3rem;
}

.related-bottom h2 {
	font-size: 1.4rem;
	font-weight: 600;
	color: #fff;
	padding-bottom: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid #ff4757;
}

.video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
}

.video-card {
	background: rgba(0, 0, 0, 0.7);
	padding: 0.6rem;
	border-radius: 6px;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.video-card img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 5px;
	margin-bottom: 0.5rem;
}

.video-card p {
	font-size: 0.9rem;
	color: #ddd;
	margin: 0.3rem 0 0;
	height: 40px;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	line-height: 1.3;
}

/* ===== LINKS ===== */
a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: #ff4757;
	text-decoration: underline;
	cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
	.video-detail-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.play-button-overlay {
		width: 70px;
		height: 70px;
		font-size: 1.8rem;
	}

	.related-sidebar {
		order: 2;
		position: static;
	}

	.video-player-section {
		order: 1;
	}

	.related-videos-container {
		max-height: none;
		display: flex;
		gap: 1rem;
		overflow-x: auto;
		padding-bottom: 0.5rem;
	}

	.related-card {
		flex: 0 0 160px;
		margin: 0;
	}

	.related-card img {
		height: 100px;
	}

	.video-meta p {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3rem;
	}
}

@media (max-width: 600px) {
	.play-button-overlay {
		width: 60px;
		height: 60px;
		font-size: 1.5rem;
	}

	.related-card {
		width: 140px;
	}

	.related-card img {
		height: 90px;
	}

	.video-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}

	.video-card img {
		height: 100px;
	}

	.video-player-section .title {
		font-size: 1.4rem;
	}

	.related-sidebar h2,
	.related-bottom h2 {
		font-size: 1.2rem;
	}
}

@media (max-width: 480px) {
	.play-button-overlay {
		width: 50px;
		height: 50px;
		font-size: 1.2rem;
	}

	.related-card {
		width: 120px;
	}

	.related-card img {
		height: 80px;
	}

	.video-grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 0.8rem;
	}

	.video-card img {
		height: 90px;
	}
}