/* =============================================
   Movie Scraper – Modern UI
   ============================================= */

/* ---- Grid ---- */
.mscr-movies-grid {
	display: grid;
	gap: 18px;
	margin: 24px 0;
}
.mscr-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mscr-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mscr-cols-4 { grid-template-columns: repeat(4, 1fr); }
.mscr-cols-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 900px) {
	.mscr-cols-4,
	.mscr-cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
	.mscr-cols-3,
	.mscr-cols-4,
	.mscr-cols-5 { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Card ---- */
.mscr-movie-card {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #111;
	box-shadow: 0 4px 20px rgba(0,0,0,.4);
	transition: transform .25s cubic-bezier(.25,.46,.45,.94),
	            box-shadow .25s ease;
	aspect-ratio: 2/3;
}
.mscr-movie-card:hover {
	transform: translateY(-6px) scale(1.02);
	box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.mscr-card-link {
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
}
.mscr-poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.mscr-movie-card:hover .mscr-poster {
	transform: scale(1.05);
}
.mscr-no-poster {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	color: #555;
	font-size: 40px;
}

/* Gradient overlay always visible at bottom */
.mscr-card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0,0,0,.92) 0%,
		rgba(0,0,0,.5)  38%,
		rgba(0,0,0,0)   65%
	);
	transition: opacity .25s;
}
/* Darker on hover */
.mscr-movie-card:hover .mscr-card-overlay {
	opacity: 1.4;
}

/* Card text (always visible) */
.mscr-card-body {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 14px 12px 12px;
	z-index: 2;
}
.mscr-card-title {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 5px;
	line-height: 1.3;
	text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.mscr-card-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.mscr-year {
	font-size: 11px;
	color: rgba(255,255,255,.65);
}
.mscr-rating {
	font-size: 11px;
	font-weight: 700;
	color: #f5c518;
	display: flex;
	align-items: center;
	gap: 2px;
}

/* Play button that appears on hover */
.mscr-card-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.7);
	width: 52px;
	height: 52px;
	background: rgba(255,255,255,.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .2s ease, transform .2s ease;
	z-index: 3;
}
.mscr-card-play svg {
	margin-left: 4px;
	color: #111;
}
.mscr-movie-card:hover .mscr-card-play {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* =============================================
   Single Movie Page
   ============================================= */

.mscr-single-wrap {
	max-width: 100%;
	overflow-x: hidden;
}

/* Hero */
.mscr-hero {
	position: relative;
	min-height: 520px;
	background-color: #0d0d0d;
	background-image: var(--poster, none);
	background-size: cover;
	background-position: center top;
	display: flex;
	align-items: flex-end;
}
.mscr-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(0,0,0,.95) 0%,
		rgba(0,0,0,.75) 50%,
		rgba(0,0,0,.2)  100%
	), linear-gradient(
		to top,
		rgba(0,0,0,.9) 0%,
		transparent    40%
	);
}
.mscr-hero-inner {
	position: relative;
	z-index: 2;
	display: flex;
	gap: 36px;
	align-items: flex-end;
	padding: 48px 40px 40px;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
}

/* Poster inside hero */
.mscr-hero-poster {
	flex-shrink: 0;
	width: 200px;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0,0,0,.7);
	border: 2px solid rgba(255,255,255,.08);
}
.mscr-hero-poster img {
	width: 100%;
	display: block;
}
.mscr-hero-no-poster {
	width: 200px;
	aspect-ratio: 2/3;
	background: #1a1a2e;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 56px;
	border-radius: 10px;
}

/* Hero text */
.mscr-hero-info { flex: 1; min-width: 0; }
.mscr-movie-title {
	color: #fff;
	font-size: clamp(24px, 4vw, 42px);
	font-weight: 800;
	margin: 0 0 14px;
	line-height: 1.15;
	text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.mscr-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.mscr-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	background: rgba(255,255,255,.12);
	color: rgba(255,255,255,.9);
	border: 1px solid rgba(255,255,255,.18);
	text-decoration: none;
	backdrop-filter: blur(4px);
}
.mscr-badge-gold { background: rgba(245,197,24,.15); color: #f5c518; border-color: rgba(245,197,24,.3); }
.mscr-badge-genre:hover { background: rgba(255,255,255,.22); color: #fff; }
.mscr-director,
.mscr-cast {
	color: rgba(255,255,255,.7);
	font-size: 13px;
	margin: 0 0 6px;
	line-height: 1.5;
}
.mscr-director span,
.mscr-cast span {
	color: rgba(255,255,255,.4);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-right: 6px;
}
.mscr-action-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 22px;
}

/* Buttons */
.mscr-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	border: none;
	text-decoration: none;
	transition: background .18s, transform .15s, box-shadow .18s;
	letter-spacing: .02em;
}
.mscr-btn:hover { transform: translateY(-2px); }
.mscr-btn-primary {
	background: #fff;
	color: #111;
	box-shadow: 0 4px 18px rgba(255,255,255,.2);
}
.mscr-btn-primary:hover { background: #e8e8e8; box-shadow: 0 6px 24px rgba(255,255,255,.28); }
.mscr-btn-outline {
	background: rgba(255,255,255,.1);
	color: #fff;
	border: 1.5px solid rgba(255,255,255,.35);
	backdrop-filter: blur(4px);
}
.mscr-btn-outline:hover { background: rgba(255,255,255,.2); }
.mscr-btn-watch {
	background: linear-gradient(135deg, #e50914, #b20710);
	color: #fff;
	box-shadow: 0 4px 18px rgba(229,9,20,.3);
}
.mscr-btn-watch:hover { background: linear-gradient(135deg, #f40d1b, #c20810); box-shadow: 0 6px 24px rgba(229,9,20,.45); color: #fff; }

/* ---- Player section ---- */
.mscr-player-section,
.mscr-trailer-section {
	background: #000;
	padding: 0;
}
.mscr-player-wrap {
	max-width: 960px;
	margin: 0 auto;
	position: relative;
	padding: 20px 20px 10px;
}
.mscr-yt-wrap {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 8px;
}
.mscr-yt-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 8px;
}
.mscr-close-player {
	display: block;
	margin: 12px auto 0;
	background: transparent;
	border: 1px solid rgba(255,255,255,.25);
	color: rgba(255,255,255,.6);
	padding: 6px 18px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	transition: color .15s, border-color .15s;
}
.mscr-close-player:hover { color: #fff; border-color: rgba(255,255,255,.6); }

/* Video.js overrides */
.video-js { border-radius: 8px; overflow: hidden; }

/* ---- Overview ---- */
.mscr-content-wrap {
	max-width: 860px;
	margin: 0 auto;
	padding: 40px 24px 60px;
}
.mscr-overview h2 {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 14px;
	border-left: 4px solid #e50914;
	padding-left: 12px;
}
.mscr-overview-text {
	font-size: 16px;
	line-height: 1.8;
	color: #444;
}

/* ---- Hero responsive ---- */
@media (max-width: 700px) {
	.mscr-hero-inner {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px 20px 28px;
		gap: 20px;
	}
	.mscr-hero-poster { width: 130px; }
	.mscr-hero { min-height: 480px; }
}

/* =============================================
   Search Widget (frontend)
   ============================================= */

.mscr-search-widget { max-width: 680px; margin: 0 auto 32px; }
.mscr-search-bar {
	display: flex;
	gap: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.mscr-search-input {
	flex: 1;
	padding: 14px 18px;
	border: none;
	font-size: 15px;
	background: #fff;
	outline: none;
}
.mscr-search-btn {
	padding: 14px 26px;
	background: #111;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	transition: background .18s;
}
.mscr-search-btn:hover { background: #333; }

.mscr-search-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 14px;
	margin-top: 20px;
}
.mscr-sr-card {
	border-radius: 8px;
	overflow: hidden;
	background: #111;
	box-shadow: 0 4px 16px rgba(0,0,0,.3);
	position: relative;
	aspect-ratio: 2/3;
	transition: transform .2s;
}
.mscr-sr-card:hover { transform: scale(1.04); }
.mscr-sr-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mscr-sr-no-img {
	width: 100%;
	height: 100%;
	background: #1a1a2e;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #555;
	font-size: 32px;
}
.mscr-sr-body {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 10px 8px 8px;
	background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 100%);
}
.mscr-sr-title { font-size: 11px; font-weight: 700; color: #fff; line-height: 1.3; }
.mscr-sr-year  { font-size: 10px; color: rgba(255,255,255,.55); }

/* =============================================
   Admin – results grid
   ============================================= */

.mscr-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
	margin-top: 16px;
}
.mscr-admin-card {
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fafafa;
	text-align: center;
}
.mscr-admin-card img { width: 100%; height: 200px; object-fit: cover; }
.mscr-admin-no-img  { width: 100%; height: 200px; background: #eee; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 28px; }
.mscr-admin-body { padding: 8px; }
.mscr-admin-body h4 { margin: 0 0 4px; font-size: 12px; line-height: 1.3; }
.mscr-admin-body .year { font-size: 11px; color: #777; }
.mscr-admin-body .button { margin-top: 6px; font-size: 11px; }
