/* === Game Grid === */

.game-grid {
	display: grid;
	/* grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); */
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.game-card {
	position: relative;
	min-height: 180px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.game-content {
	z-index: 1;
	gap: 1.5rem;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-left: 14px;
	margin-right: 1px;
	border-radius: 8px;
	margin-bottom: 8px;
}

.game-content2 {
	z-index: 1;
	gap: 1.5rem;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-left: 1px;
	margin-right: 14px;
	border-radius: 8px;
	margin-bottom: 8px;
}

.game-content-text-side {
	flex: 1;
	min-width: 250px;
}

.game-content-text-side h2 {
	font-size: 1.3rem;
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 0.3rem;
	margin-bottom: 0.8rem;
}

.game-content .game-content-image-side {
	margin-top: 0.5rem;
	/* margin-bottom: 0.5rem; */
	margin-right: 0.5rem;
	display: flex;
	flex: 1;
	max-width: 300px;
	min-width: 200px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0;
}
.game-content2 .game-content-image-side {
	margin-top: 0.5rem;
	/* margin-bottom: 0.5rem; */
	margin-left: 0.5rem;
	display: flex;
	flex: 1;
	max-width: 300px;
	min-width: 200px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0;
}

.game-img-container {
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.game-img-container>img {
	width: 100%;
}

.game-links {
	height: 2.4rem;
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 1rem;
}

.game-links a {
	display: flex;
	align-items: center;
	text-decoration: none;
}

/* === Slideshow Styles === */

.slideshow {
	background-color: #212121;
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	width: 100%;
	min-height: 120px;
	/* clip-path: fill-box; */
	box-shadow:
		0 0 8px rgba(0, 0, 0, 0.5),
		inset 0 0 20px rgba(0, 0, 0, 0.8);
	/* padding: 1rem; */
}

.slideshow img.slide {
	border-radius: 8px;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
	z-index: 1;
}

@keyframes float-pop {
	0% {
		transform: scale(1) translateY(0);
	}

	50% {
		transform: scale(1.02) translateY(-2px);
	}

	100% {
		transform: scale(1) translateY(0);
	}
}

.slideshow img.active {
	opacity: 1;
	z-index: 2;
}

.slideshow-controls {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: flex;
	justify-content: space-between;
	padding: 0 0.5rem;
	z-index: 10;
	pointer-events: none;
}

.slideshow-controls button {
	pointer-events: all;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	border: none;
	font-size: 1.25rem;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.slideshow-controls button:hover {
	transform: scale(1.1);
	background: rgba(80, 80, 80, 0.7);
}

/* === Slide Animations === */

@keyframes slide-enter-next {
	from {
		transform: translateX(100%) scale(0.6);
		opacity: 0;
	}

	to {
		transform: translateX(0%) scale(1);
		opacity: 1;
	}
}

@keyframes slide-exit-next {
	from {
		transform: translateX(0%) scale(1);
		opacity: 1;
	}

	to {
		transform: translateX(-100%) scale(0.6);
		opacity: 0;
	}
}

@keyframes slide-enter-prev {
	from {
		transform: translateX(-100%) scale(0.6);
		opacity: 0;
	}

	to {
		transform: translateX(0%) scale(1);
		opacity: 1;
	}
}

@keyframes slide-exit-prev {
	from {
		transform: translateX(0%) scale(1);
		opacity: 1;
	}

	to {
		transform: translateX(100%) scale(0.6);
		opacity: 0;
	}
}

/* Animation Classes */
.slide-enter-next {
	animation: slide-enter-next 0.5s forwards;
}

.slide-exit-next {
	animation: slide-exit-next 0.5s forwards;
}

.slide-enter-prev {
	animation: slide-enter-prev 0.5s forwards;
}

.slide-exit-prev {
	animation: slide-exit-prev 0.5s forwards;
}

.lightbox {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.603);
	z-index: 9999;
	transition: opacity 0.3s ease;
}

.lightbox #lightbox-buttons {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	max-width: 190vh;
}

.lightbox.hidden {
	display: none;
}

.lightbox img {
	max-width: 80vw;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 0 10px rgba(211, 211, 211, 0.5);
}

.lightbox button {
	background: none;
	border: none;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	position: absolute;
	user-select: none;
}

.lightbox .close {
	top: 20px;
	right: 30px;
}

.lightbox .prev {
	left: 30px;
}

.lightbox .next {
	right: 30px;
}
