:root {
	--background-color: #1e002e;
	--secondary-background-color: #27003f;
	--brand-color: #d300c1;
	--secondary-color: #570071;
	--glow: #d300c1cb;
}

@media (max-width: 655px) {
	@supports (-webkit-text-size-adjust:none) and (font: -apple-system-body) { 
		div.demot.preview img {
			max-height: 40% !important;
			min-height: 40% !important;
		}
	}

	body {
		padding-left: 0% !important;
		padding-bottom: 30svh;
		box-sizing: border-box;
	}

	body::before {
		content: "Kreator Demotywatorów";
		color: white;
		font-family: "Kanitos", sans-serif;
		padding: 30px;
		user-select: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		font-size: 25px;
		font-weight: 800;
		text-align: center;
		background-image: linear-gradient(to bottom, #1d002d, transparent);
		text-shadow: 0 5px 10px #00000020;
	}

	div.sidebar {
		right: 10px;
		bottom: 10px !important;
		left: 10px !important;
		top: unset !important;
		width: unset !important;
		border-radius: 10px;
		max-height: 30svh;
		overflow-x: hidden;
		overflow-y: scroll;
	}

	div.sidebar h1 {
		display: none;
	}

	div.demot.preview {
		width: calc(80svw - 20px) !important;
		height: unset !important;
		min-width: unset !important;
		min-height: unset !important;
		overflow: hidden;
		padding: 50px !important;
		box-sizing: border-box;
	}

	div.demot.preview img {
		border: 10px solid white;
		max-width: 90%;
		max-height: 60%;
		min-width: 1px;
		min-height: 60%;
	}

	div.demot.preview h1 {
		font-size: 4.5svw;
		margin-top: 25px;
	}

	div.demot.preview p {
		font-size: 3.5svw;
	}
}

@media (min-width: 655px) {
	div.sidebar button:last-of-type {
		position: absolute;
		bottom: 20px;
		left: 20px;
		right: 20px;
		box-sizing: border-box;
		width: unset !important;
		margin-right: 0 !important;
	}	
}

*::selection {
	color: white;
	background-color: var(--brand-color);
}

body {
	margin: 0;
	padding-left: 25%;
	height: 100svh;
	background-color: var(--background-color);
	background-position: top left;
	overflow: hidden;
}

div.gridBg {
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	background-image: radial-gradient(transparent 30%, var(--background-color) 100%), url("sex.svg");
}

div.demot {
	height: 512px;
	width: 512px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-direction: column;
	background-color: #0d0d0d;
	border-radius: 25px;
	color: white;
	padding: 50px;
	min-width: 512px;
	min-height: 512px;
	box-sizing: border-box;
	font-family: "Times New Roman", serif;
	text-align: center;
	user-select: none;
	aspect-ratio: 1/1;
}

div.demot.preview {
	box-shadow: 0 10px 100px #1d002d;
}

div.demot h1 {
	margin-bottom: 0;
	margin-top: 50px;
	font-weight: bold;
	font-size: 33px;
	transition: color 0.1s ease;
}

div.demot p {
	font-weight: normal;
	font-size: 29px;
}

div.demot img {
	object-fit: cover;
	max-width: 100%;
	max-height: 248px;
	min-width: 1px;
	min-height: 248px;
	border: 19px solid white;
	border-radius: 10px;
	transition: border-color 0.1s ease;
	box-sizing: border-box;
	block-size: auto;
}

div.demot img.scale-up {
	width: 100% !important;
	object-fit: cover !important;
}

div.demot img.fill {
	width: 100% !important;
	object-fit: fill !important;
}

div.sidebar {
	width: calc(25% - 20px);
	position: fixed;
	left: 20px;
	top: 20px;
	bottom: 20px;
	background-color: #30004d;
	background-image: linear-gradient(to bottom, #490062, #30004d);
	display: flex;
	flex-direction: column;
	padding: 20px;
	color: white;
	outline: 1px solid #FFFFFF30;
	overflow-x: hidden;
	border-radius: 10px;
	box-shadow: 0 5px 10px #00000020;
}

input, select {
	padding: 10px;
	border-radius: 5px;
	border: 1px solid #FFFFFF30;
	background-color: var(--background-color);
	color: white;
	font-size: 13px;
	margin-bottom: 10px;
	width: 100%;
	font-family: "Kanit", sans-serif;
	transition: outline 0.1s ease;
	outline: 0px solid var(--brand-color);
	border-top-left-radius: 0 !important;
	border-top-right-radius: 0 !important;
	box-sizing: border-box;
}

input.notEnding, select.notEnding {
	margin-bottom: 0;
	border-radius: 0 !important;
	border-bottom: none !important;
}

input:focus, select:focus {
	outline: 2px solid var(--brand-color);
	z-index: 5;
}

input[type="color"] {
	width: 100%;
	padding: 5px;
	height: 40px;
	min-height: 30px;
}

input[type="color"]::-webkit-color-swatch, input[type="color"]::-moz-color-swatch {
	border: none;
	border-radius: 3px;
}

div.sidebar h1 {
	font-family: "Kanitos", sans-serif;
	margin: 0px 0 20px 0;
	user-select: none;
	text-shadow: 0 5px 10px #00000020;
	font-size: 25px;
}

div.sidebar p {
	font-family: "Kanit";
	background-color: var(--secondary-background-color);
	user-select: none;
	border: 1px solid #FFFFFF30;
	border-bottom: none !important;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
	padding: 8px 10px;
	margin: 0;
}

button, input[type=file]::file-selector-button {
	border: 1px solid transparent;
	background-color: #9a008d;
	color: white;
	text-shadow: 0 3px 10px #00000020;
	padding: 8px 14px;
	font-size: 16px;
	margin-right: 10px;
	border-radius: 5px;
	font-family: Kanit;
	position: relative;
	transition: all 0.2s cubic-bezier(0,.99,.57,1), outline 0.1s ease;
	outline: 0px solid var(--brand-color);
	width: 100%;
}

input[type=file]::file-selector-button {
	padding: 2px 14px;
}

button:hover, input[type=file]::file-selector-button:hover {
	outline: 2px solid var(--brand-color);
	filter: drop-shadow(0 0 30px var(--glow));
}

button:active, input[type=file]::file-selector-button:active {
	filter: brightness(90%);
	transform: scale(0.99);
	outline: 2px solid var(--brand-color);
	filter: drop-shadow(0 0 20px var(--glow));
}

button::after {
	opacity: 0;
	background-position: -40px 40px;
	transition: opacity 0.2s ease, background-position 0.5s cubic-bezier(.14,.57,.2,.9);
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: 0;
	content: " ";
	z-index: 1;
	border-radius: 5px;
	background-image: url("/img/heartgrid.svg");
	background-size: 40px;
	filter: brightness(0%);
}

button:hover:after, button:active:after {
	opacity: 1;
	background-position: 0px 0px;
	transition: opacity 0.2s ease, background-position 0.5s cubic-bezier(0,.96,.27,.96);
}

button:disabled {
	background-color: #EEEEEE;
	color: black;
}

button:disabled:hover, button:disabled:active {
	filter: none;
}