/**
 * GCX Upload Manager — Version 6.0 Game Page modernization.
 *
 * Styles `[gcxum_game_header]`, `[gcxum_game_gallery]`,
 * `[gcxum_game_info]` and `[gcxum_related_games]` — the "Modern Game
 * Header / Responsive Gallery / Game Information / Developer
 * Information / Related Games" pieces of the brief's Game Page
 * modernization. Mobile-first throughout: base rules already fit a
 * phone, wider breakpoints only ADD columns/spacing, per the brief's
 * "Responsive Game Page" requirement that nothing needs a desktop-only
 * sidebar to be usable.
 *
 * Scoped entirely under .gcxum- classes so it never fights with the
 * visitor's own theme.
 */

/* -- Modern Game Header -------------------------------------------------- */

.gcxum-game-header {
	position: relative;
	min-height: 220px;
	margin: 0 0 1.5em;
	border-radius: 12px;
	background-color: #1e293b;
	background-size: cover;
	background-position: center;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
}

.gcxum-game-header-overlay {
	width: 100%;
	padding: 1.25em;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.35) 70%, rgba(15, 23, 42, 0) 100%);
	color: #ffffff;
}

.gcxum-game-header-title {
	margin: 0 0 0.5em;
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1.2;
	color: #ffffff;
}

.gcxum-header-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: 0.75em;
}

.gcxum-header-badge {
	display: inline-block;
	padding: 0.25em 0.75em;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	font-size: 0.8em;
	font-weight: 600;
}

.gcxum-header-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25em;
}

.gcxum-header-stat {
	display: flex;
	flex-direction: column;
}

.gcxum-header-stat-value {
	font-size: 1.1em;
	font-weight: 700;
}

.gcxum-header-stat-label {
	font-size: 0.75em;
	opacity: 0.8;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* -- Responsive Gallery ---------------------------------------------------- */

.gcxum-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.6em;
	margin: 1.5em 0;
}

.gcxum-gallery-item {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #e2e8f0;
}

.gcxum-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.gcxum-gallery-item:hover img,
.gcxum-gallery-item:focus img {
	transform: scale(1.04);
}

.gcxum-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.gcxum-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 6px;
}

.gcxum-lightbox-close {
	position: absolute;
	top: 1em;
	right: 1em;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: 0;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 1.25em;
	cursor: pointer;
}

/* -- Game / Developer Information cards ------------------------------------ */

.gcxum-game-info {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1em;
	margin: 1.5em 0;
}

.gcxum-info-card {
	padding: 1em 1.25em;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

.gcxum-info-card h3 {
	margin: 0 0 0.75em;
	font-size: 1em;
	font-weight: 700;
}

.gcxum-info-card dl {
	margin: 0;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.4em 1em;
}

.gcxum-info-card dt {
	font-weight: 600;
	color: #64748b;
}

.gcxum-info-card dd {
	margin: 0;
	word-break: break-word;
}

/* -- Related Games ----------------------------------------------------------- */

.gcxum-related-games {
	margin: 2em 0 1em;
}

.gcxum-related-games h3 {
	margin: 0 0 0.75em;
	font-size: 1.1em;
	font-weight: 700;
}

.gcxum-related-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75em;
}

.gcxum-related-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}

.gcxum-related-card img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

.gcxum-related-title {
	display: block;
	padding: 0.5em 0.6em;
	font-size: 0.9em;
	font-weight: 600;
}

/* -- Breakpoints: Tablet and up add columns, never fixed pixel sizing ------ */

@media (min-width: 600px) {
	.gcxum-gallery {
		grid-template-columns: repeat(3, 1fr);
	}

	.gcxum-related-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.gcxum-game-info {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 900px) {
	.gcxum-game-header {
		min-height: 320px;
	}

	.gcxum-game-header-title {
		font-size: 2em;
	}

	.gcxum-gallery {
		grid-template-columns: repeat(4, 1fr);
	}

	.gcxum-related-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (prefers-color-scheme: dark) {
	.gcxum-info-card {
		border-color: #334155;
	}

	.gcxum-info-card dt {
		color: #94a3b8;
	}

	.gcxum-related-card {
		border-color: #334155;
	}
}
