/* ============================================
   SINGLE MOVIE PAGE
============================================ */

.single-movie {
	background: #212342;
	min-height: 100vh;
}

/* Container with padding from sides */
.single-movie .container-wide {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

/* Movie Header Section */
.movie-header {
	background: linear-gradient(135deg, #1a1c30 0%, #212342 100%);
	padding: 40px 0;
	margin-bottom: 50px;
	border-bottom: 2px solid #2a2d45;
}

.movie-info-wrapper {
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

/* Movie Poster */
.movie-poster {
	flex-shrink: 0;
	width: 300px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.movie-poster .poster-image {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.movie-poster .no-poster {
	width: 100%;
	height: 450px;
	background: #2a2d45;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #7f8c8d;
}

.movie-poster .no-poster i {
	font-size: 60px;
	margin-bottom: 15px;
}

/* Movie Details */
.movie-details {
	flex: 1;
	color: #fff;
}

.movie-title {
	font-size: 32px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 20px 0;
	font-family: 'Cairo', sans-serif;
	line-height: 1.3;
}

.movie-description {
	color: #bdc3c7;
	font-size: 15px;
	line-height: 1.8;
	margin-bottom: 25px;
	font-family: 'Cairo', sans-serif;
}

.movie-description p {
	margin: 0 0 10px 0;
}

/* Episode Navigation - أزرار التنقل بين الحلقات */
.episode-navigation {
	display: flex;
	gap: 15px;
	margin-top: 25px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	justify-content: center;
}

.nav-episode {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 24px;
	background: rgba(42, 45, 69, 0.6);
	border: 1px solid #3d4266;
	border-radius: 8px;
	color: #fff;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	transition: all 0.3s ease;
}

.nav-episode:hover {
	background: #29b0ef;
	border-color: #29b0ef;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(41, 176, 239, 0.3);
}

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

/* Action Buttons */
.movie-actions {
	display: flex;
	gap: 15px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 32px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
}

.btn-primary {
	background: #29b0ef;
	color: #fff;
}

.btn-primary:hover {
	background: #2196d9;
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(41, 176, 239, 0.4);
}

.btn-secondary {
	background: #e74c3c;
	color: #fff;
}

.btn-secondary:hover {
	background: #c0392b;
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.btn-primary i,
.btn-secondary i {
	font-size: 18px;
}

/* Movie Info Grid */
.movie-info-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
	background: rgba(42, 45, 69, 0.5);
	padding: 25px;
	border-radius: 10px;
	border: 1px solid #3d4266;
}

.info-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.info-item-full {
	grid-column: 1 / -1;
}

.info-icon {
	width: 40px;
	height: 40px;
	background: rgba(41, 176, 239, 0.15);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #29b0ef;
	font-size: 18px;
}

.info-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.info-label {
	font-size: 13px;
	color: #95a5a6;
	font-weight: 500;
	font-family: 'Cairo', sans-serif;
}

.info-value {
	font-size: 15px;
	color: #fff;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	line-height: 1.6;
}

/* Info Tags */
.info-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.info-tag {
	display: inline-block;
	padding: 6px 14px;
	background: rgba(41, 176, 239, 0.15);
	border: 1px solid rgba(41, 176, 239, 0.3);
	border-radius: 6px;
	color: #29b0ef;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	transition: all 0.3s ease;
}

.info-tag:hover {
	background: #29b0ef;
	color: #fff;
	border-color: #29b0ef;
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(41, 176, 239, 0.3);
}

/* Servers Modal */
.servers-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.servers-modal.active {
	opacity: 1;
	visibility: visible;
}

.servers-modal-content {
	background: #1a1c30;
	border-radius: 12px;
	max-width: 600px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	border: 2px solid #2a2d45;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.servers-modal.active .servers-modal-content {
	transform: scale(1);
}

.servers-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 25px;
	border-bottom: 2px solid #2a2d45;
	position: sticky;
	top: 0;
	background: #1a1c30;
	z-index: 10;
}

.servers-modal-header h3 {
	margin: 0;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	font-family: 'Cairo', sans-serif;
}

.close-modal {
	width: 40px;
	height: 40px;
	background: rgba(231, 76, 60, 0.2);
	border: none;
	border-radius: 8px;
	color: #e74c3c;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.close-modal:hover {
	background: #e74c3c;
	color: #fff;
	transform: rotate(90deg);
}

.servers-list {
	padding: 20px 25px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.server-link {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 15px 20px;
	background: rgba(42, 45, 69, 0.6);
	border: 1px solid #3d4266;
	border-radius: 8px;
	color: #fff;
	text-decoration: none;
	font-size: 16px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	transition: all 0.3s ease;
	width: 100%;
	cursor: pointer;
}

.server-link:hover {
	background: #29b0ef;
	border-color: #29b0ef;
	transform: translateX(-5px);
	box-shadow: 0 5px 20px rgba(41, 176, 239, 0.3);
}

.server-link i {
	font-size: 20px;
	color: #29b0ef;
	transition: color 0.3s ease;
}

.server-link:hover i {
	color: #fff;
}

/* Series Episodes Section with Seasons Tabs */
.series-episodes-section {
	background: #212342;
	padding: 50px 0;
}

.seasons-tabs-container {
	margin-bottom: 40px;
	border-bottom: 2px solid #2a2d45;
}

.seasons-tabs {
	display: flex;
	gap: 0;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	direction: rtl;
}

.season-tab {
	background: transparent;
	border: none;
	padding: 15px 30px;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	cursor: pointer;
	position: relative;
	transition: all 0.3s ease;
	border-bottom: 3px solid transparent;
}

.season-tab:hover {
	background: rgba(41, 176, 239, 0.1);
	color: #29b0ef;
}

.season-tab.active {
	color: #29b0ef;
	border-bottom-color: #29b0ef;
}

.episodes-count-tab {
	margin-right: auto;
	padding: 15px 30px;
	color: #29b0ef;
	font-size: 16px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	background: rgba(41, 176, 239, 0.1);
	border-radius: 8px 8px 0 0;
}

.season-episodes-grid {
	display: none;
}

.season-episodes-grid.active {
	display: block;
}

.season-episodes-grid .related-movies-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 15px;
	direction: rtl;
}

/* Related Movies Section */
.related-movies-section {
	background: #212342;
	padding: 50px 0;
}

.related-movies-section .section-title {
	color: #fff;
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 30px 0;
	font-family: 'Cairo', sans-serif;
	text-align: center;
}

.related-movies-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 15px;
	direction: rtl;
}

/* Cards in Related Movies Grid - Same as Home Page */
.related-movies-grid .block-item,
.season-episodes-grid .block-item {
	display: inline-block;
	vertical-align: top;
	position: relative;
	overflow: hidden;
}

.related-movies-grid .block-item a,
.season-episodes-grid .block-item a {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
	text-decoration: none;
}

/* Block Image */
.related-movies-grid .block-image,
.season-episodes-grid .block-image {
	display: block;
	width: 100%;
	height: 100%;
	padding-bottom: 150%;
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	background: #1a252f;
}

.related-movies-grid .block-image img,
.season-episodes-grid .block-image img {
	object-fit: cover;
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 100%;
	transition: .3s;
}

.related-movies-grid .block-item a:hover .block-image img,
.season-episodes-grid .block-item a:hover .block-image img {
	transform: scale(1.1);
}

/* Quality Ribbon */
.related-movies-grid .ribbon,
.season-episodes-grid .ribbon {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 9;
	overflow: hidden;
	width: 110px;
	height: 110px;
	pointer-events: none;
}

.related-movies-grid .ribbon span,
.season-episodes-grid .ribbon span {
	position: absolute;
	top: 30px;
	left: -61px;
	width: 200px;
	height: 27px;
	text-align: center;
	font-size: 13px;
	line-height: 27px;
	color: #ffffff;
	transform: rotate(-45deg);
	z-index: 9;
	box-shadow: 0 0 3px #563e7d;
	background: #563e7d;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
}

.related-movies-grid .block-item a:hover .ribbon span,
.season-episodes-grid .block-item a:hover .ribbon span {
	opacity: 0;
	transition: .3s;
}

/* Block Info - Title at Bottom */
.related-movies-grid .block-info,
.season-episodes-grid .block-info {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 100%;
	background: linear-gradient(180deg, #1d1d1d00, #000 70%);
	padding: 50px 8px 10px;
	opacity: 1;
	z-index: 10;
}

.related-movies-grid .block-info h3,
.season-episodes-grid .block-info h3 {
	font-size: 14px;
	text-align: center;
	direction: rtl;
	font-weight: 400;
	color: #fff;
	margin: 0;
	font-family: 'Cairo', sans-serif;
	line-height: 1.4;
	min-height: 40px;
}

/* Year Badge */
.related-movies-grid .year-badge,
.season-episodes-grid .year-badge {
	display: inline-block;
	font-size: 11px;
	color: #29b5e8;
	background: rgba(41, 176, 239, 0.15);
	padding: 3px 8px;
	border-radius: 4px;
	margin-top: 5px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
}

.no-related {
	text-align: center;
	color: #7f8c8d;
	font-size: 16px;
	padding: 40px 0;
	font-family: 'Cairo', sans-serif;
	grid-column: 1 / -1;
}

/* Responsive Design */
@media (min-width: 993px) {
	.related-movies-grid {
		grid-template-columns: repeat(5, 1fr);
		gap: 15px;
	}
}

@media (max-width: 992px) {
	.movie-info-wrapper {
		flex-direction: column;
		align-items: center;
	}
	
	.movie-poster {
		width: 100%;
		max-width: 350px;
	}
	
	.movie-details {
		width: 100%;
	}
	
	.movie-title {
		font-size: 28px;
		text-align: center;
	}
	
	.movie-description {
		text-align: center;
	}
	
	.movie-actions {
		justify-content: center;
	}
	
	.related-movies-grid,
	.season-episodes-grid .related-movies-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}
	
	.related-movies-grid .block-info h3,
	.season-episodes-grid .block-info h3 {
		font-size: 13px;
		min-height: 36px;
	}
	
	.related-movies-grid .block-info,
	.season-episodes-grid .block-info {
		padding: 40px 8px 8px;
	}
}

@media (max-width: 768px) {
	.movie-header {
		padding: 30px 0;
	}
	
	.movie-info-wrapper {
		gap: 25px;
	}
	
	.movie-poster {
		max-width: 280px;
	}
	
	.movie-title {
		font-size: 24px;
	}
	
	.movie-description {
		font-size: 14px;
	}
	
	.episode-navigation {
		flex-direction: column;
		width: 100%;
		gap: 10px;
		margin-top: 20px;
	}
	
	.nav-episode {
		width: 100%;
		justify-content: center;
		padding: 12px 20px;
		font-size: 14px;
	}
	
	.seasons-tabs {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	
	.season-tab {
		width: 100%;
		text-align: center;
		padding: 12px 20px;
		font-size: 15px;
		border-bottom: 1px solid #2a2d45;
	}
	
	.season-tab.active {
		background: rgba(41, 176, 239, 0.15);
		border-bottom: 3px solid #29b0ef;
	}
	
	.episodes-count-tab {
		margin-right: 0;
		text-align: center;
		border-radius: 0;
		width: 100%;
	}
	
	.movie-info-grid {
		grid-template-columns: 1fr;
		padding: 20px;
		gap: 12px;
	}
	
	.btn-primary,
	.btn-secondary {
		padding: 12px 24px;
		font-size: 15px;
		width: 100%;
		justify-content: center;
	}
	
	.related-movies-grid,
	.season-episodes-grid .related-movies-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	
	.related-movies-section {
		padding: 40px 0;
	}
	
	.related-movies-section .section-title {
		font-size: 24px;
		margin-bottom: 25px;
	}
	
	.related-movies-grid .block-info h3,
	.season-episodes-grid .block-info h3 {
		font-size: 12px;
		min-height: 34px;
	}
	
	.related-movies-grid .block-info,
	.season-episodes-grid .block-info {
		padding: 30px 6px 6px;
	}
	
	.related-movies-grid .ribbon span,
	.season-episodes-grid .ribbon span {
		font-size: 11px;
		height: 24px;
		line-height: 24px;
		top: 25px;
	}
}

@media (max-width: 480px) {
	.movie-poster {
		max-width: 240px;
	}
	
	.movie-title {
		font-size: 20px;
	}
	
	.movie-description {
		font-size: 13px;
	}
	
	.info-icon {
		width: 35px;
		height: 35px;
		font-size: 16px;
	}
	
	.info-label {
		font-size: 12px;
	}
	
	.info-value {
		font-size: 14px;
	}
	
	.info-tag {
		font-size: 13px;
		padding: 5px 12px;
	}
	
	.servers-modal-header h3 {
		font-size: 18px;
	}
	
	.server-link {
		padding: 12px 15px;
		font-size: 14px;
	}
	
	.server-link i {
		font-size: 18px;
	}
	
	.related-movies-grid,
	.season-episodes-grid .related-movies-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
	
	.related-movies-grid .block-info h3,
	.season-episodes-grid .block-info h3 {
		font-size: 11px;
		min-height: 32px;
	}
	
	.related-movies-grid .block-info,
	.season-episodes-grid .block-info {
		padding: 25px 6px 6px;
	}
}
