.video-container {
	display: flex;
	position: relative;
	width: auto;
	max-width: 800px;
	margin: 20px auto;
	align-items: center;
}

.video-block video {
	width: 100%;
	display: block;
}

.video-controls {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	padding: 10px;
	opacity: 0;
	transition: opacity 0.3s;
	display: flex;            
	flex-direction: column;
	width: calc(100% - 20px);
}

.video-container:hover .video-controls,
.video-controls:focus-within {
	opacity: 1;
}

.controls-top {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 5px 0;
	width: 100%;
}

.controls-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px 0;
	width: 100%;
}
.video-controls.hidden{
	display: none;
	cursor: none;
}

.video-controls button {
	background: none;
	border: none;
	color: #c2c2c2;
	font-size: 1.2em;
	cursor: pointer;
	padding: 5px; 
	transition: color 0.2s;
}

.video-controls button:hover {
	color: #f70000;
}

.time-bar {
	flex-grow: 1; 
	text-align: center;
	font-size: 0.8em;
	margin: 0 10px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

#progressBar {
	flex-grow: 1;
	margin: 0 5px;
	-webkit-appearance: none;
	background: transparent;
	cursor: pointer;
	height: 8px;
}

#progressBar::-webkit-slider-runnable-track {
	background: #555;
	height: 8px;
	border-radius: 4px;
}

#progressBar::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	background: #f70000;
	border-radius: 50%;
	margin-top: -4px;
	cursor: pointer;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

#progressBar::-moz-range-track {
	background: #555;
	height: 8px;
	border-radius: 4px;
}

#progressBar::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: #f70000;
	border-radius: 50%;
	margin-top: -4px;
	cursor: pointer;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
	border: none;
}

#currentTime, #duration {
	font-size: 0.9em;
	margin: 0 5px; 
	white-space: nowrap;
}


.volume-controls {
	display: flex;
	align-items: center;
	margin-left: 10px;
}

#volumeBar {
	width: 60px;
	-webkit-appearance: none;
	background: transparent;
	cursor: pointer;
	height: 8px;
}

#volumeBar::-webkit-slider-runnable-track {
	background: #555;
	height: 8px;
	border-radius: 4px;
}

#volumeBar::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	background: #f70000;
	border-radius: 50%;
	margin-top: -4px;
	cursor: pointer;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

#volumeBar::-moz-range-track {
	background: #555;
	height: 8px;
	border-radius: 4px;
}

#volumeBar::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: #f70000;
	border-radius: 50%;
	margin-top: -4px;
	cursor: pointer;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
	border: none;
}

.quality-selector, .playback-rate-selector {
	position: relative;
	display: inline-block;
}

.quality-selector button, .playback-rate-selector button {
	background: none;
	border: none;
	color: #c2c2c2;
	font-size: 1em;
	cursor: pointer;
	padding: 5px 10px;
	border-radius: 5px;
}

.quality-selector button:hover, .playback-rate-selector button:hover {
	color: #f70000;
	background-color: rgba(255, 255, 255, 0.1);
}

.options-list {
	position: absolute;
	bottom: 100%;
	left: 0;
	background-color: rgba(0, 0, 0, 0.8);
	list-style: none;
	padding: 5px 0;
	margin: 0;
	min-width: 120px; 
	border-radius: 5px;
	z-index: 10;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.options-list li a {
	display: block;
	padding: 8px 12px;
	text-decoration: none;
	color: #c2c2c2;
	transition: background-color 0.2s, color 0.2s;
}

.options-list li a:hover {
	background-color: #f70000;
	color: #fff;
}

.hidden {
	display: none;
}

#snapshotBtn, #fullScreenBtn {
	background: none;
	border: none;
	color: #c2c2c2;
	font-size: 1.2em;
	cursor: pointer;
	padding: 5px;
	border-radius: 5px;
	transition: color 0.2s;
}

#snapshotBtn:hover, #fullScreenBtn:hover {
	color: #f70000;
}

.video-controls {
	touch-action: manipulation;  /* Important: Prevents scrolling while interacting */
}

#progressBar, #volumeBar {
	touch-action: pan-x; /* Allow horizontal panning */
}

.video-container {
	touch-action: none;  /* Allow scrolling of the entire video container (if needed) */
}

@media (max-width: 768px) {
	.video-container {
		width: 95%;
	}

	.video-controls {
		flex-direction: column;
		padding: 10px;
	}

	.controls-top {
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		padding: 3px 0;
		flex-wrap: wrap; 
	}

	.controls-bottom {
		flex-direction: row; 
		align-items: center;
		justify-content: space-between;
		padding: 3px 0; 
		flex-wrap: wrap;
	}

	button {
		padding: 3px;
		font-size: 1em;
		margin: 2px;
	}

	.volume-controls {
		width: auto;
		margin-left: 5px;
	}

	#volumeBar {
		width: 50px;
	}

	.time-bar {
		flex-basis: 100%;
		order: 1;
		margin-bottom: 5px;
	}
}

@media (max-width: 480px) {
	.volume-controls {
		flex-direction: column;
		align-items: center;
	}

	#volumeBar {
		width: 80%;
		margin-top: 5px;
	}

	.time-bar {
		display: none;
	}

	#currentTime, #duration{
		display: none;
	}
	.quality-selector button, .playback-rate-selector button{
		padding: 3px;
		font-size: 0.9em;
	}
}