.video-generator {
	--video-ink: #17243a;
	--video-muted: #66758a;
	--video-studio: #edf2f8;
	--video-panel: rgba(255, 255, 255, 0.96);
	--video-panel-strong: #f7f9fc;
	--video-line: rgba(34, 56, 82, 0.1);
	--video-accent: #0164b0;
	--video-accent-bright: #167bc8;
	--video-cyan: #169bab;
	--video-code-bg: #172033;
	--video-code-border: rgba(1, 100, 176, 0.24);
	--video-preview-bg: #060b12;
}

.video-generator__lead {
	max-width: 760px;
	text-wrap: pretty;
}

.video-hero {
	border: 1px solid rgba(67, 97, 238, 0.14);
	border-radius: calc(var(--radius-md) + 0.25rem);
	background:
		radial-gradient(circle at 88% 0%, rgba(67, 213, 233, 0.14), transparent 34%),
		linear-gradient(135deg, rgba(67, 97, 238, 0.08), transparent 46%), #fff;
}

.video-hero__body {
	position: relative;
}

.video-hero__body::after {
	position: absolute;
	right: 5%;
	bottom: -3rem;
	width: 10rem;
	height: 10rem;
	border: 1px solid rgba(67, 97, 238, 0.12);
	border-radius: 50%;
	content: '';
	pointer-events: none;
}

.video-hero__icon {
	padding: 0.65rem;
	border-radius: 1rem;
	background: var(--color-primary);
	box-shadow: 0 0.75rem 2rem rgba(67, 97, 238, 0.24);
	color: #fff;
}

.video-hero__footer {
	position: relative;
	background: transparent;
}

.video-local-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	border: 1px solid rgba(15, 157, 108, 0.18);
	background: rgba(225, 249, 240, 0.82);
	color: #087a54;
	font-weight: 600;
}

.video-local-badge__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #17a673;
	box-shadow: 0 0 0 0.25rem rgba(23, 166, 115, 0.12);
}

.video-inline-status {
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.video-mobile-tabs {
	display: none;
}

.video-studio {
	position: relative;
	isolation: isolate;
	padding: 1rem;
	overflow: hidden;
	border: 1px solid rgba(34, 56, 82, 0.11);
	border-radius: 1.25rem;
	background: var(--video-studio);
	background-size: 32px 32px;
	box-shadow: 0 1.2rem 3rem rgba(30, 57, 91, 0.1);
}

.video-studio::before {
	position: absolute;
	z-index: 2;
	top: 0;
	right: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, #0164b0, #294fa9 58%, #530187);
	content: '';
	pointer-events: none;
}

.video-studio__glow {
	position: absolute;
	z-index: -1;
	top: -14rem;
	right: -8rem;
	width: 32rem;
	height: 32rem;
	border-radius: 50%;
	background: rgba(1, 100, 176, 0.08);
	filter: blur(70px);
	pointer-events: none;
}

.video-studio-toolbar,
.video-studio-panel {
	border: 0;
	background: var(--video-panel);
	box-shadow:
		0 1px 2px rgba(32, 59, 92, 0.04),
		0 0.5rem 1.5rem rgba(32, 59, 92, 0.055);
	color: var(--video-ink);
}

.video-studio-toolbar {
	margin-bottom: 1rem;
	border-radius: 0.9rem;
}

.video-studio-toolbar .card-header,
.video-studio-panel .card-header {
	border-bottom: 1px solid rgba(34, 56, 82, 0.08);
	background: linear-gradient(180deg, #fff, #f5f8fc);
	color: var(--video-ink);
}

.video-studio-toolbar .card-body,
.video-studio-panel .card-body {
	background: transparent;
}

.video-studio .form-label {
	color: #43536a;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.015em;
}

.video-studio .form-control:not(.video-code) {
	border-color: rgba(34, 56, 82, 0.14);
	background: #fff;
	color: var(--video-ink);
	font-variant-numeric: tabular-nums;
}

.video-studio .form-control:not(.video-code):focus {
	border-color: var(--video-accent-bright);
	background: #fff;
	box-shadow: 0 0 0 0.2rem rgba(1, 100, 176, 0.12);
}

.video-studio .btn-outline-primary {
	border-color: rgba(34, 56, 82, 0.12);
	background: #fff;
	color: #075f9f;
}

.video-studio .btn-outline-primary:hover,
.video-studio .btn-outline-primary.active {
	border-color: transparent;
	background: linear-gradient(135deg, #075f9f, #3e4c9f);
	color: #fff;
}

.video-project-summary {
	color: var(--video-muted);
	font-size: 0.82rem;
	font-variant-numeric: tabular-nums;
}

.video-studio-panel {
	border-radius: 0.9rem;
	overflow: hidden;
}

.video-code-panel {
	box-shadow:
		0 1px 2px rgba(32, 59, 92, 0.04),
		0 0.5rem 1.5rem rgba(32, 59, 92, 0.055);
}

.video-window-dots {
	display: inline-flex;
	gap: 0.3rem;
}

.video-window-dots i {
	display: block;
	width: 0.48rem;
	height: 0.48rem;
	border-radius: 50%;
	background: #ff6b6b;
}

.video-window-dots i:nth-child(2) {
	background: #ffc857;
}

.video-window-dots i:nth-child(3) {
	background: #42d392;
}

.video-code {
	padding: 1.15rem;
	resize: vertical;
	border-color: var(--video-code-border);
	background: var(--video-code-bg);
	color: #dce6f4;
	font:
		500 0.82rem/1.65 ui-monospace,
		SFMono-Regular,
		Menlo,
		Consolas,
		monospace;
	caret-color: var(--video-cyan);
	tab-size: 2;
}

#videoPaneCode .video-code {
	min-height: min(62vh, 680px);
}

.video-code:focus-visible {
	border-color: var(--video-accent-bright);
	background: var(--video-code-bg);
	color: #fff;
	box-shadow: 0 0 0 0.25rem rgba(109, 124, 255, 0.18);
}

.video-code::selection {
	background: rgba(109, 124, 255, 0.42);
}

.video-studio .form-text,
.video-studio .form-text code {
	color: var(--video-muted);
}

.video-assets {
	border-top: 1px solid rgba(34, 56, 82, 0.08);
	border-bottom: 1px solid rgba(34, 56, 82, 0.08);
	padding: 0.8rem 0;
}

.video-assets summary {
	cursor: pointer;
	color: #315f91;
	touch-action: manipulation;
}

.video-assets summary:focus-visible {
	border-radius: var(--radius-sm);
	outline: 3px solid rgba(109, 124, 255, 0.28);
	outline-offset: 3px;
}

.video-assets-guide {
	padding: 0.9rem;
	border: 1px solid rgba(1, 100, 176, 0.14);
	border-radius: 0.75rem;
	background: #f7faff;
}

.video-assets-guide pre {
	max-height: 18rem;
	padding: 0.85rem;
	overflow: auto;
	border-radius: 0.55rem;
	background: var(--video-code-bg);
	color: #e8eef8;
	font-size: 0.78rem;
}

.video-asset-item {
	display: inline-flex;
	max-width: 100%;
	align-items: stretch;
	overflow: hidden;
	border: 1px solid rgba(34, 56, 82, 0.16);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(30, 57, 91, 0.06);
}

.video-asset-copy,
.video-asset-remove {
	border: 0;
	background: transparent;
	touch-action: manipulation;
}

.video-asset-copy {
	min-width: 0;
	padding: 0.4rem 0.7rem;
	overflow-wrap: anywhere;
	color: #315f91;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.75rem;
}

.video-asset-copy:hover,
.video-asset-copy:focus-visible {
	background: #edf5fb;
}

.video-asset-remove {
	display: inline-flex;
	width: 2.25rem;
	align-items: center;
	justify-content: center;
	border-left: 1px solid rgba(34, 56, 82, 0.12);
	color: #a23942;
}

.video-asset-remove:hover,
.video-asset-remove:focus-visible {
	background: #fff0f1;
	color: #842029;
}

.video-asset-remove .material-icons {
	font-size: 1.1rem;
}

.video-studio .alert {
	border-color: transparent;
	background: #f5f8fc;
	color: #52647b;
}

.video-studio .btn-outline-secondary {
	border-color: rgba(34, 56, 82, 0.12);
	background: #fff;
	color: #55667a;
}

.video-studio .btn-outline-secondary:hover {
	border-color: rgba(1, 100, 176, 0.35);
	background: #edf5fb;
	color: #075f9f;
}

.video-preview-card {
	position: sticky;
	top: 1rem;
}

.video-player-badge {
	border: 0;
	background: #e9f4fb;
	color: #075f9f;
}

.video-preview-shell {
	display: flex;
	width: 100%;
	max-width: 720px;
	max-height: min(62vh, 680px);
	aspect-ratio: 9 / 16;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border: 1px solid rgba(15, 23, 36, 0.34);
	border-radius: 0.75rem;
	background:
		linear-gradient(45deg, #111c29 25%, transparent 25%),
		linear-gradient(-45deg, #111c29 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #111c29 75%),
		linear-gradient(-45deg, transparent 75%, #111c29 75%), var(--video-preview-bg);
	background-position:
		0 0,
		0 10px,
		10px -10px,
		-10px 0;
	background-size: 20px 20px;
	box-shadow:
		0 1.2rem 2.5rem rgba(27, 47, 75, 0.2),
		0 0 0 0.35rem rgba(1, 100, 176, 0.05);
}

.video-preview-shell iframe {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: var(--video-preview-bg);
	pointer-events: auto;
	touch-action: manipulation;
}

.video-playback-button {
	touch-action: manipulation;
}

.video-progress .progress {
	height: 0.75rem;
	overflow: hidden;
	background: #dfe6ef;
}

.video-progress .progress-bar {
	background: linear-gradient(90deg, var(--video-accent), var(--video-cyan));
}

.video-progress .font-monospace,
.video-progress .text-secondary {
	color: var(--video-muted) !important;
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
}

.video-render-button {
	border: 0;
	background: linear-gradient(110deg, #0164b0, #294fa9 58%, #530187);
	box-shadow: 0 0.75rem 1.75rem rgba(32, 73, 145, 0.22);
	color: #fff;
	font-weight: 700;
}

.video-render-button:hover:not(:disabled) {
	background: linear-gradient(110deg, #1478bf, #3c5eb6 58%, #67219b);
	box-shadow: 0 1rem 2rem rgba(32, 73, 145, 0.28);
	color: #fff;
	transform: translateY(-1px);
}

.video-render-button:disabled {
	background: #d8e0ea;
	box-shadow: none;
	color: #7b8898;
}

.video-generator .btn,
.video-generator summary {
	-webkit-tap-highlight-color: rgba(67, 97, 238, 0.12);
}

.video-generator .btn:focus-visible,
.video-generator .form-control:focus-visible {
	outline: 3px solid rgba(109, 124, 255, 0.32);
	outline-offset: 2px;
}

.video-generator h1,
.video-generator h2,
.video-generator h3 {
	text-wrap: balance;
}

.video-guide {
	border: 1px solid rgba(34, 56, 82, 0.09);
	border-radius: calc(var(--radius-md) + 0.15rem);
}

.video-guide p {
	text-wrap: pretty;
}

.prompt-lab,
.idea-lab {
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid rgba(34, 56, 82, 0.1);
	border-radius: var(--radius-md);
	background:
		radial-gradient(circle at 100% 0, rgba(36, 189, 211, 0.13), transparent 34%),
		linear-gradient(145deg, #f8faff, #f2f5ff);
}

.prompt-lab__header {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	margin-bottom: 1.5rem;
}

.prompt-lab__header > .material-icons {
	display: grid;
	width: 2.8rem;
	height: 2.8rem;
	place-items: center;
	border-radius: 0.8rem;
	background: #182445;
	box-shadow: 0 0.6rem 1.2rem rgba(24, 36, 69, 0.18);
	color: #62d8df;
}

.prompt-lab .form-control,
.prompt-lab .form-select,
.idea-lab .form-control {
	border-color: rgba(34, 56, 82, 0.14);
	background-color: rgba(255, 255, 255, 0.92);
}

.prompt-lab__fieldset {
	padding: 1rem;
	border: 1px solid rgba(73, 91, 155, 0.15);
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.48);
}

.prompt-lab__fieldset legend {
	float: none;
	width: auto;
	margin: 0 0 0.75rem;
	padding: 0 0.35rem;
	color: #24345d;
}

.prompt-lab__fieldset .form-check {
	height: 100%;
	padding: 0.65rem 0.75rem 0.65rem 2.25rem;
	border: 1px solid rgba(73, 91, 155, 0.12);
	border-radius: 0.7rem;
	background: rgba(255, 255, 255, 0.72);
}

.prompt-lab__fieldset .form-check-input:checked + .form-check-label {
	color: #3049c8;
	font-weight: 600;
}

.prompt-lab__output,
.idea-lab__output {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.82rem;
	line-height: 1.55;
	resize: vertical;
}

.prompt-lab__output {
	min-height: 31rem;
	border-color: rgba(91, 112, 255, 0.45) !important;
	background: #10182d !important;
	color: #e9edff;
}

.ai-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.ai-links a {
	padding: 0.55rem 0.9rem;
	border: 1px solid rgba(34, 56, 82, 0.12);
	border-radius: 999px;
	background: #fff;
	font-weight: 600;
	text-decoration: none;
}

.ai-links a:hover {
	border-color: var(--video-accent);
	box-shadow: 0 0.35rem 0.9rem rgba(67, 97, 238, 0.12);
}

.idea-lab .accordion-item {
	overflow: hidden;
	border-color: rgba(34, 56, 82, 0.09);
}

.bot-guide {
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid rgba(34, 56, 82, 0.09);
	border-radius: var(--radius-md);
	background: #fff;
	box-shadow: 0 1rem 2.5rem rgba(30, 48, 80, 0.07);
}

.bot-guide__intro {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.bot-guide__intro > .material-icons {
	display: grid;
	width: 3rem;
	height: 3rem;
	flex: 0 0 3rem;
	place-items: center;
	border-radius: 50%;
	background: #17213d;
	color: #6fe1e6;
}

.bot-guide__card {
	padding: 1.35rem;
	border: 1px solid rgba(34, 56, 82, 0.09);
	border-radius: 1rem;
	background: linear-gradient(150deg, #fff, #f7f9ff);
}

.bot-guide__card li {
	margin-bottom: 0.55rem;
}

.bot-guide__label {
	display: inline-block;
	margin-bottom: 0.7rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: #e9edff;
	color: #3448bf;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.bot-guide__label--alice {
	background: #f1eaff;
	color: #6c36b8;
}

.bot-guide__prompt {
	padding: 1rem;
	border-radius: 1rem;
	background: #11192d;
	color: #edf0ff;
}

.bot-guide__prompt textarea {
	min-height: 34rem;
	border-color: rgba(111, 225, 230, 0.32);
	background: #0a1020;
	color: #e9edff;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.8rem;
	line-height: 1.55;
}

.bot-guide__prompt .form-text {
	color: #aeb8da;
}

.video-guide .col-md-4 > div {
	transition:
		border-color 160ms ease,
		transform 160ms ease,
		box-shadow 160ms ease;
}

.video-guide .col-md-4 > div:hover {
	border-color: rgba(67, 97, 238, 0.28) !important;
	box-shadow: 0 0.6rem 1.5rem rgba(30, 48, 80, 0.07);
	transform: translateY(-2px);
}

@media (max-width: 991.98px) {
	.video-mobile-tabs {
		display: flex;
		position: sticky;
		top: 0;
		z-index: 10;
		padding: 0.4rem;
		border: 1px solid var(--border-color);
		border-radius: var(--radius-md);
		background: rgba(255, 255, 255, 0.96);
		box-shadow: var(--shadow-sm);
		backdrop-filter: blur(12px);
	}

	.video-mobile-tabs .nav-link {
		min-height: 44px;
	}

	[data-video-pane] {
		display: none;
	}

	[data-video-pane].is-mobile-active {
		display: block;
	}

	.video-studio {
		padding: 0.75rem;
	}

	.video-preview-card {
		position: static;
	}

	.video-code {
		min-height: 58vh;
	}

	.video-preview-shell {
		max-height: 66vh;
	}
}

@media (max-width: 575.98px) {
	.video-generator {
		padding-right: 0.75rem;
		padding-left: 0.75rem;
	}

	.video-hero__body,
	.video-hero__footer,
	.video-guide .card-body {
		padding-right: 1rem !important;
		padding-left: 1rem !important;
	}

	.video-hero__body::after {
		display: none;
	}

	.video-studio .card-header,
	.video-studio .card-body {
		padding-right: 0.9rem;
		padding-left: 0.9rem;
	}

	.video-code {
		min-height: 54vh;
		font-size: 0.76rem;
	}

	.prompt-lab__output {
		min-height: 24rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.video-generator *,
	.video-generator *::before,
	.video-generator *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
