/* ============================================================
   Video Player — Modern dark theme
   Replaces sprite-based controls with inline SVG via JS.
   Keeps jQuery UI slider for frame-accurate scrubbing.
   ============================================================ */

.video_player {
	width: 100%;
	max-width: 640px;
	background: #1a1a1a;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	box-sizing: border-box;
}

/* Scoped to .video_player so the jQuery plugin's injected <video>
   fills its container. Previously an un-prefixed `video {}` rule
   forced every <video> site-wide to 100% width, blowing up legacy
   400x300 helpful-hint clips to column width with 2x+ upscale. */
.video_player video {
	background: #000;
	position: relative;
	z-index: 1;
	width: 100%;
	height: auto;
	display: block;
}

/* --- Video container --- */
.content_container {
	width: 100%;
	aspect-ratio: 16 / 9;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	background: #000;
}

/* --- Thumbnail + overlay --- */
.video_player .content_container img,
.video_player .content_container .overlay {
	position: absolute;
	top: 0;
	left: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	z-index: 2;
}
.video_player .content_container img {
	object-fit: cover;
}
.video_player .content_container .svg-play-overlay {
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: opacity 0.3s ease;
}
.video_player .content_container .svg-play-overlay svg {
	width: 80px;
	height: 80px;
	filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
	transition: transform 0.2s ease;
}
.video_player .content_container .svg-play-overlay:hover svg {
	transform: scale(1.1);
}

/* --- Controller bar --- */
.controller_container {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 4px;
	height: 44px;
	padding: 0 12px;
	background: #1a1a1a;
}

/* --- Control buttons (SVG-based). Sized for the wider responsive
       player; mobile breakpoint below scales them back down. --- */
.control {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: background-color 0.15s ease;
	background: none;
	border: none;
	padding: 0;
}
.control:hover {
	background: rgba(255,255,255,0.08);
}
.control:active {
	background: rgba(255,255,255,0.15);
}
.control svg {
	width: 24px;
	height: 24px;
	fill: #ccc;
	transition: fill 0.15s ease;
}
.control:hover svg {
	fill: #fff;
}

/* Play button accent */
.play svg { fill: #E9B753; }
.play:hover svg { fill: #facc15; }

/* --- Scrubber track (jQuery UI slider override) --- */
.track_container {
	flex: 1 1 auto;
	min-width: 80px;
	height: 36px;
	display: flex;
	align-items: center;
	padding: 0 4px;
	background: none;
}
.track {
	position: relative;
	height: 6px;
	width: 100%;
	background: #333;
	border-radius: 3px;
	border: none;
}

/* jQuery UI slider overrides */
.track.ui-slider {
	background: #333;
	border: none;
	border-radius: 3px;
}
.track .ui-slider-range {
	background: #E9B753;
	border-radius: 3px;
}
.track .ui-slider-handle,
.track a {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #E9B753;
	border: 2px solid #1a1a1a;
	top: -4px;
	margin-left: -7px;
	cursor: grab;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
	float: none;
	position: absolute;
	z-index: 2;
	outline: none;
	box-shadow: 0 0 0 0 rgba(233,183,83,0);
}
.track .ui-slider-handle:hover,
.track a:hover {
	transform: scale(1.3);
	box-shadow: 0 0 8px rgba(233,183,83,0.4);
}
.track .ui-slider-handle:active,
.track .ui-slider-handle.ui-state-focus,
.track a:active,
.track a.ui-state-focus {
	transform: scale(1.3);
	background: #facc15;
	cursor: grabbing;
}

/* --- Frame counter --- */
input.frame_counter {
	width: 56px;
	height: 36px;
	background: #2a2a2a;
	border: 1px solid #444;
	border-radius: 6px;
	color: #fff;
	font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	padding: 0;
	flex-shrink: 0;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
	transition: border-color 0.15s ease;
}
input.frame_counter:focus {
	border-color: #E9B753;
	outline: none;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.4), 0 0 6px rgba(233,183,83,0.3);
}

/* --- Separator between button groups --- */
.control-sep {
	width: 1px;
	height: 20px;
	background: #333;
	flex-shrink: 0;
	margin: 0 2px;
}

/* --- Responsive --- */
@media screen and (max-width: 640px) {
	.controller_container {
		padding: 0 8px;
		gap: 2px;
	}
	.control {
		width: 32px;
		height: 32px;
	}
	.control svg {
		width: 18px;
		height: 18px;
	}
	input.frame_counter {
		width: 40px;
		height: 28px;
		font-size: 12px;
	}
}

/* --- Legacy layout compat --- */
#movie_content { float: left; }
#rating_text { text-align: center; }
#skip_submit { position: absolute; top: 520px; left: 445px; width: 45px; }
.entry_video_player { margin-bottom: 20px; }
