* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: Calibri, sans-serif;
	user-select: none;
}

@font-face {
	src: url("../fonts/Elemental End.ttf") format("woff2");
	font-family: "Elemental End";
	font-weight: 400;
	font-display: swap;
	font-style: normal
}

:root {
	--ray: radial-gradient(rgb(83, 196, 255), #0000);
	--ray: radial-gradient(oklch(0.7 0.19 239.17), #0000);
	--accent: rgb(236, 196, 76);
	--accent: oklch(0.89 0.16 88.88);
	scrollbar-width: thin;
	scrollbar-color: #222 #111;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	color-scheme: dark only;
}

.grad-type > p {
	color: #686868;
	text-align: left;
	width: 6ch;
}

.hidden.hidden {
	display: none;
}

header {
	height: 50px;
	line-height: 50px;
	padding-inline: 20px;
	color: white
}

h1, h2 {
	font-family: "Elemental End", Calibri, sans-serif;

	span {
		font-family: inherit;
		font-size: 0.5em;
	}
}

.lights {
	width: 100%;
	height: 100%;
	position: absolute;
	overflow: hidden;
	top: 0;
	left: 0;
	z-index: -1;
}

.light {
	position: absolute;
	border-radius: 100%;
	background: var(--ray);
}

.light1 {
	width: 110px;
	height: 400px;
	transform: rotate(-20deg);
	top: -280px;
	left: 350px;
	opacity: .6;
	filter: blur(60px);
}

.light2 {
	width: 480px;
	height: 680px;
	transform: rotate(80deg);
	top: -540px;
	left: 250px;
	filter: blur(110px);
}

.light3 {
	width: 400px;
	height: 370px;
	top: -350px;
	left: 200px;
	opacity: .6;
	filter: blur(21px);
}

.light4 {
	position: absolute;
	width: 330px;
	height: 370px;
	top: -330px;
	left: 50px;
	opacity: .5;
	filter: blur(21px);
}

.light5 {
	position: absolute;
	width: 110px;
	height: 400px;
	transform: rotate(-40deg);
	top: -280px;
	left: -10px;
	opacity: .8;
	filter: blur(60px);
}

main {
	min-height: 100vh;
	min-height: 100dvh;
	background: #0a0a0a;
	padding: 1px;
	isolation: isolate;
}

section {
	width: 100%;
	display: grid;
	place-items: center;
	padding: 10px;
}

.top-container {
	width: 100%;
	max-width: 480px;

}

.qr {
	perspective: 800px;
	display: flex;
	gap: 20px;
}

.container-controls {
	flex: 0 0 13%;
	padding-block: 10px;
}

.svg-box {
	padding: 5px;
	margin-bottom: 15px;
	text-align: center;
	border-radius: 50%;

	&.settings-open > .setts {
		rotate: -90deg;
		filter: drop-shadow(0 0 1px rgba(255, 199, 0, 0.84));
		fill: white;
	}

	svg {
		transition-property: translate, opacity;
		transition-duration: 450ms;
		transition-timing-function: ease-out;
		transition-delay: calc(var(--d) * 60ms);
		translate: 0 calc(var(--d) * -100%);
		opacity: 0;

		&.setts {
			scale: 1.15;
			transition: rotate steps(3, jump-start) 600ms,
			translate 450ms ease-out,
			opacity 450ms ease-out;
			transition-delay: 0ms, calc(var(--d) * 60ms), calc(var(--d) * -100%);
		}

		width: clamp(30px, 100%, 50px);
		cursor: pointer;

		&.download:hover {
			stroke: rgba(83, 196, 255, 0.84);
			stroke: oklch(0.76 0.15 235.87 / 0.84);
		}

		&.setts:hover {
			fill: var(--accent)
		}

		&.cancel:hover {
			fill: rgba(255, 151, 151, 0.84);
			fill: oklch(0.79 0.16 21.19 / 0.84)
		}

		&.random:hover {
			fill: rgba(174, 255, 151, 0.84);
			fill: oklch(0.92 0.19 139.15 / 0.84)
		}
	}
}

.container {
	flex-grow: 1;
	transform-style: preserve-3d;
	width: 80%;
	max-width: 450px;
	aspect-ratio: 1;
	margin-bottom: 6em;
	transform-origin: 50% 50% -200px;
	transition: rotate 200ms;
	rotate: y 90deg;
	backface-visibility: hidden;
	min-height: 100px;
	svg {
		width: 100%;
		height: 100%;
		user-select: none;
	}
}

.top-container.open {
	svg {
		translate: 0;
		opacity: 1;
	}

	.container {
		rotate: y 0deg;
	}
}

.top-container.reset {
	.container {
		rotate: y -90deg;
	}
}

stop {
	transition: stop-color 1300ms ease;
}

stop.foo {
	stop-color: red;
	stop-color: oklch(64.85% 0.296 29.24);
	transition-duration: 0ms;
}

article {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	overflow: hidden;

	.prompt {
		position: relative;

		border-radius: 10px;
		width: 100%;
		aspect-ratio: 2.4 / 1;
		background: #141414;
		min-height: 140px;

		nav {
			position: absolute;
			inset: -40px 0;
			transition: opacity 350ms ease;
			visibility: hidden;
			opacity: 0;
		}

		.settings {
			border-radius: 8px;
			border: 1px solid rgb(51, 51, 51);
			height: 100%;
			overflow: hidden;
			position: relative;
			isolation: isolate;
		}
	}

	ul {
		display: flex;
		justify-content: center;
		gap: 1em;
	}

	.flex-part {
		display: flex;
		gap: 1em;
		flex: 0 0 fit-content;
		justify-content: center;
	}
;

	li {
		list-style-type: none;
		cursor: pointer;
		color: #d6d6d6;

		&.selected {
			color: var(--accent);
		}

		&:hover:not(.selected) {
			color: rgba(83, 196, 255, 0.84);
			color: oklch(0.76 0.15 235.87 / 0.84);
		}
	}
}

.prompt-main-form {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	position: absolute;
	border-radius: 10px;
	background: #141414;
	overflow: hidden;
	transition: translate 150ms ease;
}

textarea, input, select {
	background: transparent;
	color: #d6d6d6;
	padding: 3px 6px;
	font-size: 1.2em;
	accent-color: var(--accent);
}

select, option, input {
	font-size: 1em;
	vertical-align: middle;
}

select {
	text-align: center;
}

label, option {
	color: #686868;
	vertical-align: middle;
	font-size: 0.9em;
}

.inputbox > label {
	display: block;
}

.inputbox {
	text-align: center;
}

.input-box {
	padding-inline: 10px;
}

.settingsbox {
	height: 100%;
}

.settings-container {
	display: flex;
	justify-content: center;;
	height: 100%;

	&:not(.active) {
		display: none;
	}
}

input, select {
	border: none;
	border-bottom: 1px solid rgb(51, 51, 51);
	background: #141414;
}

label, input {
	vertical-align: middle;
}

textarea {
	scrollbar-width: thin;
	width: 100%;
	height: 75%;
	line-height: 2cap;
	vertical-align: top;
	padding: min(1.5vw, 12px);
	border: none;
	resize: none;
	font-size: 1.15em;
}

:focus {
	outline: none;
}

.light-border-container {
	position: relative;
	width: 99%;
	margin: 0 auto;
	height: 100%;
}

.light-border {
	--prompt-container-offset: 50px;
	--prompt-line-stroke-width: 1.2px;
	position: absolute;
	pointer-events: none;
	inset: calc(var(--prompt-container-offset) / -2);
	width: calc(100% + var(--prompt-container-offset));
	height: calc(100% + var(--prompt-container-offset));
}

.shine {
	fill: url(#shine-gradient);
	mix-blend-mode: overlay;
}

.light-border-main {
	width: calc(100% - var(--prompt-container-offset) + var(--prompt-line-stroke-width));
	height: calc(96% - var(--prompt-container-offset) + var(--prompt-line-stroke-width));
	x: calc(var(--prompt-container-offset) / 2 - var(--prompt-line-stroke-width) / 2);
	y: calc(var(--prompt-container-offset) / 2 - var(--prompt-line-stroke-width) / 2);
	rx: calc(8px - var(--prompt-line-stroke-width));
	fill: transparent;
	stroke-width: var(--prompt-line-stroke-width);
	stroke: url(#line-gradient);
	stroke-dasharray: 35px 65px;
	stroke-dashoffset: 10;
}

.controls {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 25%;
	background-clip: text;

	input {
		background: transparent;
		border: none;
		color: #b9b9b9;
		cursor: pointer;
		margin: 2px 10px;
		font-size: 1.15em;
		font-weight: 400;

		&:hover, &:focus {
			color: transparent;
		}
	}
}

.gradient-bg:first-child:has(>:is(input:hover, input:focus)) {
	background: linear-gradient(90deg, #4ccbff 35%, #b9b9b9);
	background: linear-gradient(90deg, oklch(0.76 0.15 235.87 / 0.84) 35%, #b9b9b9);
	background-clip: text;
}

.gradient-bg:last-child:has(>:is(input:hover, input:focus)) {
	background: linear-gradient(90deg, #b9b9b9, #ff5656);
	background: linear-gradient(90deg, #b9b9b9, oklch(0.677 0.211 24.734));
	background-clip: text;
}

.prompt.settings-open {
	.prompt-main-form {
		translate: 0 100%;

	}

	nav {
		visibility: visible;
		opacity: 1;
	}
}

.row {
	display: flex;
	justify-content: center;
	margin: 0 auto;
	gap: 20px;
}

[class$="solid-color"], [class$="gradient-color"] {
	text-align: center;
	width: 100%;

	input[type="color"] {
		-webkit-appearance: none;
		-moz-appearance: none;
		appearance: none;
		background-color: transparent;
		width: 100px;
		height: 40px;
		border: none;
		cursor: pointer;
		margin: 5px;
		padding: 1px;
	}

	::-webkit-color-swatch {
		border-radius: 6px;
		border: none;
	}

	::-moz-color-swatch {
		border-radius: 6px;
		border: none;
		padding: 1px;
	}
}

.gradient-color {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

.mainpart {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;

	.inputbox {
		flex: 1 1 30%;
	}
}

.part {
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 20px;
	height: 100%;

	&:first-child {
		flex: 0 0 44%;
	}

	&:last-child {
		flex: 0 0 56%;
	}
}

.controls > .part {
	width: auto;
}

input[type=range] {
	border: none;
	width: max(80%, 100px);
}

input[type=range]::-webkit-slider-runnable-track, input[type=range]::-webkit-slider-thumb, input[type=range] {
	-webkit-appearance: none;
}

input[type=range]::-webkit-slider-runnable-track {
	height: 0.4em;
	border-radius: 0.5em;
	box-shadow: 0 1px 1px #616266, inset 0 1px 1px #111, inset 0 0 0 2px #323033, inset 0 1px 1px 2px #111, inset 0 -1px 1px 2px rgba(238, 238, 238, 0.32);
	background: linear-gradient(90deg, #1c206a, #5fa0be);
}

input[type=range]::-moz-range-track {
	height: 0.4em;
	border-radius: 0.5em;
	box-shadow: 0 1px 1px #616266, inset 0 1px 1px #111, inset 0 0 0 2px #323033, inset 0 1px 1px 2px #111, inset 0 -1px 1px 2px rgba(238, 238, 238, 0.32);
	background: linear-gradient(90deg, #1c206a, #5fa0be);
}

input[type=range]::-webkit-slider-thumb {
	margin-top: -2px;
	border: none;
	width: .5em;
	height: .5em;
	padding: 0.375em;
	border-radius: 50%;
	box-shadow: inset 0 1px #fefefe, 0 1px 1px #232426, 0 1px 0.25em #232426;
	background: radial-gradient(#61c0f6 50%, #35729e 53%) content-box, repeating-conic-gradient(from 5deg, #5f5f5f, #ddd, #5f5f5f 25%);
}

input[type=range]::-moz-range-thumb {
	border: none;
	width: .5em;
	height: .5em;
	padding: 0.375em;
	border-radius: 50%;
	box-shadow: inset 0 1px #fefefe, 0 1px 1px #232426, 0 1px 0.25em #232426;
	background: radial-gradient(#61c0f6 50%, #35729e 53%) content-box, repeating-conic-gradient(from 5deg, #5f5f5f, #ddd, #5f5f5f 25%);
}

.radial {
	display: flex;
	align-items: center;
	padding-block: 12px;

	input {
		margin-left: 6px;
	}
}

.grad-type {
	display: flex;
	align-items: center;
	justify-content: center;
}

@media only screen and (max-width: 460px) {
	.prompt.prompt > nav {
		top: -80px;

		ul {
			flex-direction: column;
		}
	}

	.svg-box {
		margin-bottom: 10px;
	}

	select {
		font-size: 0.9em;
	}

	label, p, span {
		font-size: 0.8em;
	}

	.inputbox > input[type="color"] {
		width: 40px;
	}

	::-webkit-color-swatch {
		border-radius: 6px;
	}

	::-moz-color-swatch {
		border-radius: 6px;
	}

	.row {
		gap: 0
	}
}

dialog {
	transition: display, overlay;
	transition-duration: 400ms;
	transition-timing-function: ease-in-out;
	transition-behavior: allow-discrete;
	backdrop-filter: blur(3px);
	border: none;
	max-width: none;
	max-height: none;
	perspective: 1000px;
	margin: auto;
	position: fixed;
	top: 0;
	width: 100%;
	height: 100vh;
	background: none;
	padding: 0;
	background: rgba(0, 0, 0, 0.73);

	&[open] {
		display: block;
		@starting-style {
			display: block;
		}
	}

	p {
		margin-bottom: 10px;
	}

	:last-child {
		align-self: center;
		margin-top: auto
	}
}

h2 {
	text-align: center;
	margin-bottom: 1em;
}

.dialog-content {
	backface-visibility: hidden;
	position: absolute;
	inset: 0;
	margin: auto;
	max-width: 500px;
	height: 300px;
	padding: 1.2em 2em;
	rotate: x 0deg;
	transition-property: rotate, display;
	transition-timing-function: ease-out;
	transition-duration: 300ms;
	border: 1px solid rgb(51, 51, 51);
	border-radius: 10px;
	background-image: linear-gradient(90deg, hsl(0deg 0% 0%) 0%, hsl(339deg 0% 0%) 0%, hsl(339deg 0% 0%) 1%, hsl(339deg 0% 0%) 4%, hsl(203deg 100% 10%) 8%, hsl(194deg 100% 19%) 14%, hsl(194deg 56% 36%) 27%, hsl(196deg 44% 57%) 50%, hsl(192deg 43% 65%) 73%, hsl(188deg 42% 74%) 86%, hsl(182deg 43% 83%) 92%, hsl(178deg 48% 90%) 96%, hsl(178deg 48% 93%) 99%, hsl(178deg 48% 97%) 100%, hsl(188deg 42% 74%) 86%);
	display: flex;
	flex-direction: column;

	p {
		text-shadow: 0 0 2px rgba(0, 0, 0, 0.76);
	}

	p > span {
		font-family: monospace;
		font-size: 1.2em;
	}

	input {
		border-radius: 6px;
		padding: 4px 10px;
		background: #0a0a0a;
		border: none;
		cursor: pointer;
		&:hover {
			color: rgb(83, 196, 255);
			color: oklch(0.76 0.15 235.87 / 0.84);
		}
	}

	@starting-style {
		rotate: x 91deg;
	}
}

dialog:not([open]) .dialog-content {
	rotate: x -91deg;
}

:any-link {
	color: black;
	font-family: "Agency FB", Tahoma, sans-serif;
	font-size: 1.2em;
	text-decoration: none;
}