/**
 * AltEnd Studio — button, modal, player.
 */
.altend-studio {
	--altend-bg: #0b0b0f;
	--altend-accent: #e50914;
	--altend-text: #f5f5f7;
	--altend-muted: #9aa0a6;
	font-family: inherit;
}

.altend-studio .altend-open {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.3rem;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--altend-accent), #b20710);
	color: #fff;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(229, 9, 20, 0.28);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.altend-studio .altend-open:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(229, 9, 20, 0.38);
}

body.altend-locked {
	overflow: hidden;
}

.altend-studio .altend-modal[hidden] {
	display: none;
}

.altend-studio .altend-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.altend-studio .altend-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 4, 8, 0.78);
	backdrop-filter: blur(3px);
}

.altend-studio .altend-modal__panel {
	position: relative;
	width: min(94vw, 560px);
	max-height: 90vh;
	overflow-y: auto;
	padding: 1.6rem;
	border-radius: 16px;
	background: var(--altend-bg);
	color: var(--altend-text);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.altend-studio .altend-modal__x {
	position: absolute;
	top: 0.6rem;
	right: 0.9rem;
	background: transparent;
	border: 0;
	color: var(--altend-muted);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.altend-studio .altend-modal__title {
	margin: 0 0 0.3rem;
	font-size: 1.3rem;
}

.altend-studio .altend-modal__hint {
	margin: 0 0 1rem;
	color: var(--altend-muted);
	font-size: 0.88rem;
}

.altend-studio .altend-field {
	display: block;
	margin-bottom: 0.9rem;
}

.altend-studio .altend-field span {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.85rem;
	color: var(--altend-muted);
}

.altend-studio .altend-field textarea,
.altend-studio .altend-field select {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.05);
	color: var(--altend-text);
	font: inherit;
	font-size: 0.92rem;
	box-sizing: border-box;
}

.altend-studio .altend-form__meta,
.altend-studio .altend-form__legal {
	margin: 0 0 0.7rem;
	font-size: 0.78rem;
	color: var(--altend-muted);
}

.altend-studio .altend-submit {
	width: 100%;
	padding: 0.75rem;
	border: 0;
	border-radius: 10px;
	background: var(--altend-accent);
	color: #fff;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.altend-studio .altend-submit[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.altend-studio .altend-progress__bar {
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	overflow: hidden;
}

.altend-studio .altend-progress__bar span {
	display: block;
	height: 100%;
	width: 2%;
	background: var(--altend-accent);
	transition: width 0.6s ease;
}

.altend-studio .altend-progress__text {
	margin: 0.5rem 0 0;
	font-size: 0.82rem;
	color: var(--altend-muted);
}

.altend-studio .altend-result video {
	width: 100%;
	border-radius: 12px;
	display: block;
}

.altend-studio .altend-result__note {
	margin: 0.6rem 0 0;
	font-size: 0.85rem;
	color: var(--altend-muted);
}

.altend-studio .altend-error {
	margin: 0.8rem 0 0;
	padding: 0.6rem 0.8rem;
	border-radius: 8px;
	background: rgba(229, 9, 20, 0.14);
	color: #ff9aa0;
	font-size: 0.85rem;
}

/* Editor preview */
.altend-editor-preview .altend-preview {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.2rem;
	border-radius: 999px;
	background: linear-gradient(135deg, #e50914, #b20710);
	color: #fff;
	font-weight: 600;
}

.altend-editor-preview .altend-preview__note {
	font-weight: 400;
	font-size: 0.75rem;
	opacity: 0.8;
}
