/**
 * Video Player with iFrame - مشغل الفيديو
 * Player overlay with controls that auto-hide
 */

/* ============================================
   VIDEO PLAYER OVERLAY
============================================ */
.video-player-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	z-index: 9999;
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.video-player-overlay.active {
	display: flex;
	opacity: 1;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

/* ============================================
   VIDEO PLAYER CONTAINER
============================================ */
.video-player-container {
	position: relative;
	width: 100%;
	max-width: 1400px;
	height: 80vh;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* ============================================
   VIDEO IFRAME
============================================ */
.video-iframe-wrapper {
	width: 100%;
	height: 100%;
	position: relative;
}

.video-iframe-wrapper iframe {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

.video-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #29b0ef;
	font-size: 24px;
	font-family: 'Cairo', sans-serif;
	text-align: center;
}

.video-loading i {
	font-size: 48px;
	margin-bottom: 15px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ============================================
   VIDEO PLAYER CONTROLS
============================================ */
.video-controls {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 10;
}

.video-controls.active {
	pointer-events: auto;
}

/* Top Controls Bar */
.video-controls-top {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	padding: 20px 30px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
	display: flex;
	justify-content: space-between;
	align-items: center;
	opacity: 0;
	transform: translateY(-20px);
	transition: all 0.3s ease;
	pointer-events: auto;
}

.video-controls.active .video-controls-top {
	opacity: 1;
	transform: translateY(0);
}

/* Close Button */
.video-close-btn {
	background: rgba(239, 68, 68, 0.9);
	color: #fff;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-family: 'Cairo', sans-serif;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: all 0.3s ease;
}

.video-close-btn:hover {
	background: #dc2626;
	transform: scale(1.05);
}

.video-close-btn i {
	font-size: 18px;
}

/* Server Info */
.video-server-info {
	color: #fff;
	font-size: 16px;
	font-family: 'Cairo', sans-serif;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 10px;
}

.video-server-info i {
	color: #29b0ef;
	font-size: 20px;
}

/* Bottom Controls Bar (Episode Navigation) */
.video-controls-bottom {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 20px 30px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.3s ease;
	pointer-events: auto;
}

.video-controls.active .video-controls-bottom {
	opacity: 1;
	transform: translateY(0);
}

/* Episode Navigation Buttons */
.episode-nav-btn {
	background: rgba(41, 176, 239, 0.9);
	color: #fff;
	border: none;
	padding: 14px 28px;
	border-radius: 8px;
	font-size: 16px;
	font-family: 'Cairo', sans-serif;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: all 0.3s ease;
	text-decoration: none;
}

.episode-nav-btn:hover {
	background: #29b0ef;
	transform: scale(1.05);
	box-shadow: 0 5px 20px rgba(41, 176, 239, 0.4);
}

.episode-nav-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.episode-nav-btn i {
	font-size: 18px;
}

.episode-nav-btn.prev-episode {
	flex-direction: row-reverse;
}

/* Current Episode Info */
.current-episode-info {
	color: #fff;
	font-size: 16px;
	font-family: 'Cairo', sans-serif;
	font-weight: 600;
	background: rgba(41, 176, 239, 0.2);
	padding: 14px 28px;
	border-radius: 8px;
	border: 2px solid rgba(41, 176, 239, 0.4);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
	.video-player-overlay.active {
		padding: 10px;
	}
	
	.video-player-container {
		height: 70vh;
		border-radius: 8px;
	}
	
	.video-controls-top,
	.video-controls-bottom {
		padding: 15px 20px;
	}
	
	.video-close-btn,
	.episode-nav-btn {
		padding: 10px 16px;
		font-size: 14px;
	}
	
	.video-server-info,
	.current-episode-info {
		font-size: 14px;
		padding: 10px 16px;
	}
	
	.episode-nav-btn span {
		display: none;
	}
	
	.episode-nav-btn {
		padding: 10px;
	}
}

@media (max-width: 480px) {
	.video-player-container {
		height: 60vh;
	}
	
	.video-controls-top {
		flex-direction: column;
		gap: 10px;
		align-items: flex-start;
	}
	
	.video-controls-bottom {
		flex-wrap: wrap;
		gap: 10px;
	}
}

/* ============================================
   ANIMATION FOR CONTROLS
============================================ */
.video-controls {
	cursor: default;
}

.video-controls.hiding .video-controls-top {
	opacity: 0;
	transform: translateY(-20px);
}

.video-controls.hiding .video-controls-bottom {
	opacity: 0;
	transform: translateY(20px);
}
