/* Lovely 3D Designer — frontend */

.l3d-app {
	--l3d-bg: #121016;
	--l3d-card: #1d1824;
	--l3d-line: rgba(255, 255, 255, 0.08);
	--l3d-text: #f6eef4;
	--l3d-muted: #c7b3c0;
	--l3d-accent: #e85d7a;
	--l3d-accent-2: #f0b35a;
	--l3d-radius: 18px;
	font-family: "Segoe UI", system-ui, sans-serif;
	color: var(--l3d-text);
	background: radial-gradient(1200px 500px at 20% -10%, #3a1c2c, transparent), var(--l3d-bg);
	border-radius: 24px;
	padding: 28px;
	margin: 16px 0;
}

.l3d-app-header h2 {
	margin: 0 0 6px;
	font-size: 1.8rem;
}

.l3d-app-header p,
.l3d-note,
.l3d-step h3 {
	color: var(--l3d-muted);
}

.l3d-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.l3d-step {
	background: var(--l3d-card);
	border: 1px solid var(--l3d-line);
	border-radius: var(--l3d-radius);
	padding: 18px;
	margin-bottom: 16px;
}

.l3d-templates {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
}

.l3d-card {
	background: #151019;
	border: 2px solid transparent;
	border-radius: 16px;
	overflow: hidden;
	cursor: pointer;
	color: inherit;
	text-align: left;
	padding: 0;
}

.l3d-card img,
.l3d-card .l3d-ph {
	width: 100%;
	height: 120px;
	object-fit: cover;
	background: #2a1d24;
	display: block;
}

.l3d-card span {
	display: block;
	padding: 10px;
	font-weight: 600;
}

.l3d-card.is-active {
	border-color: var(--l3d-accent);
	box-shadow: 0 0 0 4px rgba(232, 93, 122, 0.2);
}

.l3d-drop {
	border: 2px dashed rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	padding: 28px;
	text-align: center;
	display: grid;
	gap: 8px;
	place-items: center;
}

.l3d-drop.is-drag {
	border-color: var(--l3d-accent-2);
	background: rgba(240, 179, 90, 0.08);
}

.l3d-progress {
	width: 100%;
	height: 8px;
	background: #2c2430;
	border-radius: 99px;
	overflow: hidden;
}

.l3d-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--l3d-accent), var(--l3d-accent-2));
}

.l3d-compare {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 12px;
}

.l3d-compare img {
	width: 100%;
	height: 140px;
	object-fit: contain;
	background: repeating-conic-gradient(#2a2430 0% 25%, #1a151c 0% 50%) 50% / 16px 16px;
	border-radius: 12px;
}

.l3d-compare figcaption {
	text-align: center;
	font-size: 12px;
	color: var(--l3d-muted);
}

.l3d-btn,
.l3d-chip {
	border: 0;
	border-radius: 999px;
	padding: 10px 16px;
	cursor: pointer;
	font-weight: 600;
	background: #2c2433;
	color: var(--l3d-text);
}

.l3d-btn:disabled,
.l3d-chip:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.l3d-btn-primary {
	background: linear-gradient(90deg, var(--l3d-accent), #c43b6a);
}

.l3d-sizes,
.l3d-light {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.l3d-chip.is-active {
	background: var(--l3d-accent);
}

.l3d-stage {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	background: #0c0a0e;
}

.l3d-stage canvas {
	width: 100%;
	height: auto;
	display: block;
}

.l3d-loader {
	position: absolute;
	inset: 0;
	background: rgba(8, 6, 10, 0.55);
	display: grid;
	place-items: center;
	gap: 8px;
}

.l3d-spinner {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: var(--l3d-accent-2);
	animation: l3dspin 0.8s linear infinite;
}

@keyframes l3dspin {
	to {
		transform: rotate(360deg);
	}
}

.l3d-toast {
	position: sticky;
	bottom: 8px;
	background: #2a1c24;
	border: 1px solid var(--l3d-line);
	padding: 12px 16px;
	border-radius: 12px;
}

.l3d-custom-size {
	display: grid;
	gap: 6px;
	margin-top: 10px;
}

.l3d-custom-size input {
	background: #151019;
	border: 1px solid var(--l3d-line);
	color: inherit;
	border-radius: 10px;
	padding: 8px;
}

@media (max-width: 860px) {
	.l3d-layout,
	.l3d-compare {
		grid-template-columns: 1fr;
	}
	.l3d-app {
		padding: 16px;
	}
}
