:root {
	--primary-color: #2563eb;
	--secondary-color: #1e40af;
	--dark-bg: #1f2937;
	--light-bg: #f3f4f6;
	--text-light: #f9fafb;
	--text-dark: #111827;
}

body {
	background-color: var(--dark-bg);
	color: var(--text-light);
	font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.video-container {
	position: fixed;
	top: 0;
	left: 0;
	right: 300px;
	bottom: 80px;
	background-color: rgba(0, 0, 0, 0.9);
	overflow: hidden;
	transition: all 0.3s ease;
}

.video-container.sidebar-collapsed {
	right: 0;
}

.video-container.vertical-mode {
	transform: rotate(90deg) translateY(-100%);
	width: calc(100vh - 100px);
	height: 100vw;
	top: 0;
	left: 0;
	right: auto;
	bottom: auto;
	transform-origin: left top;
	display: flex;
	align-items: center;
	justify-content: center;
}

.video-element {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: all 0.3s ease;
}

.video-element.vertical-mode {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sidebar {
	position: fixed;
	right: 0;
	top: 0;
	bottom: 80px;
	width: 250px;
	background-color: var(--dark-bg);
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	padding: 1rem;
	overflow-y: auto;
	transition: transform 0.3s ease-in-out;
}

.sidebar.collapsed {
	transform: translateX(100%);
}

.form-select {
	width: 100%;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	background-color: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #e5e7eb;
	margin-bottom: 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
	background-position: right 0.75rem center;
	background-repeat: no-repeat;
	background-size: 16px 12px;
	padding-right: 2.5rem;
}

.form-select:focus,
.form-select:active {
	border-color: #4f46e5;
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
	outline: none;
	color: #ffffff;
}

.form-select option {
	background-color: var(--dark-bg);
	color: #e5e7eb;
	padding: 0.5rem;
}

.form-select option:active,
.form-select option:checked {
	background-color: #4f46e5;
	color: #ffffff;
}

.medias {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
	padding: 0.5rem;
}

.media {
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0.75rem;
	overflow: hidden;
	transition: all 0.2s ease;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	width: auto;
	height: 170px;
	margin: 0 auto;
}

.media:hover,
.media:focus {
	transform: translateY(-2px);
	border-color: #4f46e5;
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
	background-color: rgba(255, 255, 255, 0.1);
	outline: none;
}

.media img {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	border-bottom-left-radius: 0.5rem;
	border-bottom-right-radius: 0.5rem;
}

.media .alert {
	padding: 0.75rem;
	margin: 0;
	background: none;
	border: none;
	color: var(--text-light);
	font-size: 0.875rem;
	font-weight: 500;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.media .alert-danger {
	color: var(--text-light);
	background-color: var(--secondary-color);
}

.media .bi {
	font-size: 1rem;
	opacity: 0.7;
}

.media:hover .bi {
	opacity: 1;
}

.js-media.active {
	background-color: #007bff;
	color: white;
}

.js-slowmo.active {
	background-color: #007bff;
	color: white;
	border-color: #0056b3;
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
	width: 6px;
}

.sidebar::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.2);
}

.footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: var(--dark-bg);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 10px;
	display: flex;
	justify-content: flex-start;
	gap: 1rem;
}

.controls-container {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	width: 100%;
}

.progress-container {
	flex: 1;
	margin: 0 2rem;
	min-width: 0px;
}

.progress {
	flex: 1;
	height: 6px;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	cursor: pointer;
	position: relative;
}

.progress-bar {
	background-color: var(--primary-color);
	transition: width 0.2s ease;
}

.filename {
	position: absolute;
	top: 1rem;
	left: 1rem;
	background-color: rgba(0, 0, 0, 0.7);
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
}

select.content-select {
	width: 100%;
	padding: 0.5rem;
	border-radius: 0.5rem;
	background-color: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--text-light);
	margin-bottom: 1rem;
}

/* Modern scrollbar */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Modal styling */
.modal-content {
	background-color: var(--dark-bg);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0.75rem;
	color: var(--text-light);
}

.modal-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.close {
	color: var(--text-light);
	opacity: 0.7;
}

.close:hover {
	color: var(--text-light);
	opacity: 1;
}

.main-content {
	margin-right: 300px;
}

.btn {
	border-radius: 0.5rem;
	padding: 0.5rem 1rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

.btn-primary {
	background-color: var(--primary-color);
	border: none;
}

.btn-primary:hover {
	background-color: var(--secondary-color);
}

.btn-default {
	background-color: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--text-light);
}

.btn-default:hover {
	background-color: rgba(255, 255, 255, 0.2);
	color: var(--text-light);
}

.js-toggle-sidebar {
	margin-left: auto;
	margin-right: 0;
	position: relative;
	animation: pulse 2s infinite;
	background-color: #0d6efd;
	border: 2px solid #0d6efd;
	color: white;
	transition: all 0.3s ease;
}

.js-toggle-sidebar:hover {
	background-color: #0b5ed7;
	border-color: #0b5ed7;
	transform: scale(1.05);
	color: white;
}

.js-toggle-sidebar i {
	transition: transform 0.3s ease;
	color: white;
}

.js-toggle-sidebar:hover i {
	transform: translateX(-2px);
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
	}
}

.js-toggle-sidebar.clicked {
	animation: none;
	background-color: #6c757d;
	border-color: #6c757d;
}

/* Options Modal Styling */
#optionsModal .modal-content {
	background-color: var(--dark-bg);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

#optionsModal .modal-title {
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--text-light);
}

.options-btn {
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	border-radius: 6px;
	transition: all 0.2s ease;
	color: var(--text-light) !important;
	border-color: rgba(255, 255, 255, 0.2) !important;
}

.options-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.3) !important;
	transform: translateY(-1px);
}

.options-btn i {
	opacity: 0.7;
}

#optionsModal .btn-close {
	filter: invert(1) grayscale(100%) brightness(200%);
}

@media (max-width: 768px) {
	.footer {
		height: 80px !important;
	}

	.controls-container {
		flex-wrap: wrap;
		gap: 0.25rem;
		justify-content: center;
	}

	.progress {
		display: none;
	}

	/* Make buttons smaller on mobile */
	.footer .btn {
		padding: 0.25rem 0.5rem;
		font-size: 0.8125rem;
		line-height: 1.2;
		min-height: 28px;
	}

	/* Adjust icon sizes */
	.footer .btn i {
		font-size: 0.875rem;
	}

	.btn-group {
		flex-shrink: 0;
	}

	/* Utility buttons container */
	.controls-container > .ms-auto {
		display: flex;
		gap: 0.25rem;
		width: 100%;
		justify-content: center;
		margin: 0;
		margin-top: 0.25rem;
		padding-top: 0.25rem;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	/* Show rotate button only on mobile */
	.js-rotate-video {
		display: inline-block !important;
	}

	.video-container {
		right: 0;
	}

	.video-container.vertical-mode {
		width: calc(100vh - 100px);
		height: calc(100vw);
		transform: rotate(90deg) translateY(-100%);
		position: fixed;
		top: 0;
		left: 0;
	}

	.video-element.vertical-mode {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}
}
