* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	background: #1B1B1B;
	color: #FBFBFB;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
}

body {
	padding: 18px;
}

#page {
	display: flex;
	flex-direction: column;
	padding: 10px;
	width: 100%;
	max-width: 1400px;
	margin: auto;
	height: 100%;
}

h1 {
	display: flex;
	justify-content: space-between;
	font-weight: 600;
	font-size: 26px;
	margin: 0;
	margin-bottom: 14px;
}

#order {
	width: 22px;
	height: 22px;
	background: transparent;
	background-image: url(icons/star-on.svg);
	padding: 0;
	border: none;
	cursor: pointer;
}

#order.time {
	background-image: url(icons/time.svg);
}

.painting .stars::before,
#order {
	display: block;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
}

.painting .stars.toggling {
	cursor: not-allowed;
}

.painting .stars.toggling::before {
	animation: rotating 1.2s linear infinite;
}

#paintings {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	height: 100%;
	overflow-y: auto;
	justify-content: space-between;
}

.painting {
	position: relative;
	box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	border-radius: 2px;
	width: 320px;
}

.painting:not(:hover) .metadata {
	opacity: 0;
}

.painting img {
	width: 100%;
	aspect-ratio: 1/1;
}

.painting .stars,
.painting .metadata {
	position: absolute;
	backdrop-filter: blur(6px);
	background: rgba(27, 27, 27, 0.45);
	box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.1);
}

.painting .stars {
	user-select: none;
	display: flex;
	gap: 4px;
	align-items: center;
	cursor: pointer;
	top: 0;
	right: 0;
	padding: 4px 6px;
	border-bottom-left-radius: 2px;
	font-weight: 500;
}

.painting .stars::before {
	content: "";
	width: 18px;
	height: 18px;
	background-image: url(icons/star-off.svg);
}

.painting.liked .stars {
	color: #FFDB77;
}

.painting.liked .stars::before {
	background-image: url(icons/star-on.svg);
}

.painting .metadata {
	bottom: 0;
	left: 0;
	right: 0;
	transition: 150ms;
	padding: 10px 12px;
}

.painting .name {
	font-weight: 500;
}

.painting .time {
	position: absolute;
	top: 2px;
	right: 2px;
	font-size: 12px;
	font-style: italic;
}

@keyframes rotating {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}