#gallery {
	margin-top: 0;
	width: calc(95vw);
	border-bottom: 1px solid #ccc;
	z-index: 1;
}

#galleryContainer {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	padding: 16px;
}

#galleryModal {
	display: none;
	position: fixed;
	z-index: 3;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	scrollbar-color: transparent transparent;
	scrollbar-width: thin;
	background-color: rgba(0, 0, 0, 0.4);
}

#imgModal {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
}

.pixelArtModal {
	display: flex;
	min-width: 64px;
	cursor: pointer;
	background-color: white;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	border: 1px solid #ccc;
	border-radius: 8px;
	text-align: center;
	box-shadow: 2px 2px 0px 3px var(--base-color);
}

.pixelArtModal img {
	width: 100%;
	max-height: 90dvh;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.pixelArtModal p,
.pixelArtModal h3 {
	margin: 2px;
	width: 80%;
	text-align: center;
	word-wrap: break-word;
	color: black;
	font-family: monospace;
}

.pixelArt {
	cursor: pointer;
	background-color: white;
	display: flex;
	flex-direction: column;
	justify-content: center;
	border: 1px solid #ccc;
	border-radius: 8px;
	text-align: center;
	box-shadow: 2px 2px 0px 3px var(--base-color);
}

.pixelArt img {
	width: 100%;
	height: 100%;
	max-height: 640px;
	object-fit: contain; /* Mantém proporção sem cortar */
	display: block;
	margin: 0 auto;
}

.pixelArt h3,
.pixelArt p {
	color: black;
	font-family: monospace;
	margin: 8px 0;
}

.size-1x1 {
	grid-column: span 1;
	grid-row: span 1;
}

.size-2x1 {
	grid-column: span 2;
	grid-row: span 1;
}

.size-1x2 {
	grid-column: span 1;
	grid-row: span 2;
}

.size-2x2 {
	grid-column: span 2;
	grid-row: span 2;
}

@media (max-width: 750px) {
	#gallery {
		top: 36px;
	}
}

@media (max-width: 480px) {
	#galleryContainer {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
	}

	.size-1x2,
	.size-2x1,
	.size-2x2 {
		grid-column: span 1;
		grid-row: span 1;
	}

	.pixelArt {
		aspect-ratio: auto;
	}
}
