/* Reset Margins and Padding */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Ensure html and body take full height */
html,
body {
	height: 100%;
	width: 100%;
	overflow-x: hidden;
	/* Prevent horizontal scroll */
}

/* Body Styles */
body {
	background-color: #000;
	/* Black background */
	color: #FFD700;
	/* Gold color for a regal theme */
	font-family: 'Courier New', Courier, monospace;
	display: flex;
	justify-content: center;
	/* Remove vertical centering to prevent content from being pushed off */
	/* align-items: center; */
	/* Commented out */
	min-height: 100vh;
}

/* Main Container */
#main {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px;
	max-width: 1200px;
	width: 100%;
}

/* Preformatted Text Styles */
pre {
	text-align: center;
	white-space: pre;
	margin: 5px 0px 0px -180px;
	font-size: clamp(12px, 2vw, 16px);
	/* Responsive font size */
}

/* Gallery Grid */
#gallery {
	display: grid;
	grid-template-columns: 1fr;
	/* Default: single column */
	gap: 20px;
	justify-items: center;
	padding: 20px 0;
	width: 100%;
}

/* Image Container */
.image-container {
	position: relative;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Images */
.image-container img {
	width: 100%;
	max-width: 300px;
	/* Adjust as needed */
	height: auto;
	border: 2px solid #FFD700;
	transition: transform 0.3s;
	border-radius: 5px;
	/* Adds slight rounding for aesthetics */
}

.image-container img:hover {
	transform: scale(1.05);
}

/* ASCII Art Borders for Images */
.image-container::before {
	content: "╔══════════════╗";
	display: block;
	text-align: center;
	margin-bottom: 5px;
	font-size: 14px;
}

.image-container::after {
	content: "╚══════════════╝";
	display: block;
	text-align: center;
	margin-top: 5px;
	font-size: 14px;
}

/* Modal Styles */
#modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.95);
	/* More opaque for full-black feel */
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

#modal.hidden {
	display: none;
}

#modal-content {
	background-color: #111;
	padding: 20px;
	text-align: center;
	border: 2px solid #FFD700;
	max-width: 90%;
	max-height: 90%;
	overflow: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	border-radius: 8px;
	/* Adds rounded corners for aesthetics */
}

/* Modal Image */
#modal-image {
	width: 100%;
	max-width: 80vw;
	max-height: 60vh;
	object-fit: contain;
	margin-bottom: 15px;
}

/* Modal Description */
#modal-description {
	margin: 10px 0;
	font-size: 1.2em;
}

/* Close Modal Link */
#close-modal {
	color: #FFD700;
	text-decoration: none;
	margin-top: 10px;
}

#close-modal:hover {
	text-decoration: underline;
}

/* Blur Effect */
.blur {
	filter: blur(5px);
}

/* Link Styles */
a {
	color: #FFD700;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Responsive ASCII Art */
@media (max-width: 600px) {
	pre {
		font-size: clamp(10px, 3vw, 14px);
	}

	#modal-image {
		max-width: 90vw;
		max-height: 50vh;
	}

	/* Adjust ASCII borders for smaller screens */
	.image-container::before,
	.image-container::after {
		font-size: 12px;
	}

	/* Reduce padding on smaller screens */
	#main {
		padding: 10px;
	}

	#gallery {
		padding: 10px 0;
	}
}

/* Medium Screens (Tablets) */
@media (min-width: 601px) and (max-width: 900px) {
	#gallery {
		grid-template-columns: repeat(2, 1fr);
		/* Two columns */
	}

	.image-container img {
		max-width: 250px;
	}
}

/* Large Screens (Desktops & Large Tablets) */
@media (min-width: 901px) and (max-width: 1200px) {
	#gallery {
		grid-template-columns: repeat(3, 1fr);
		/* Three columns */
	}

	.image-container img {
		max-width: 300px;
	}
}

/* Extra Large Screens (Large Desktops) */
@media (min-width: 1201px) {
	#gallery {
		grid-template-columns: repeat(4, 1fr);
		/* Four columns */
	}

	.image-container img {
		max-width: 350px;
	}
}

/* Very Large Screens */
@media (min-width: 1600px) {
	#gallery {
		grid-template-columns: repeat(5, 1fr);
		/* Five columns */
	}

	.image-container img {
		max-width: 400px;
	}
}

/* Additional Media Queries for Enhanced Responsiveness */
@media (max-width: 400px) {
	pre {
		font-size: clamp(8px, 4vw, 12px);
	}

	.image-container img {
		max-width: 150px;
	}

	#modal-description {
		font-size: 1em;
	}

	#modal-content {
		padding: 10px;
	}

	#close-modal {
		margin-top: 5px;
		font-size: 0.9em;
	}
}
