/* ── Game Library Frontend ────────────────────────────────── */
:root { --gl-accent: #6c63ff; }

/* ── Grid ─────────────────────────────────────────────────── */
.gl-library__title {
	margin: 0 0 20px;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	color: #0f172a;
}

.gl-library__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 18px;
}
.gl-library__grid[style*="--gl-cols"] {
	grid-template-columns: repeat(var(--gl-cols, 4), 1fr);
}

/* ── Filters bar ───────────────────────────────────────────── */
.gl-library__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
	padding: 14px 16px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
}
.gl-library__search {
	flex: 1 1 180px;
	padding: 9px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.9rem;
	background: #fff;
}
.gl-library__filter {
	padding: 9px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.85rem;
	background: #fff;
	min-width: 140px;
}
.gl-library__count {
	margin-right: auto;
	font-size: 0.82rem;
	font-weight: 700;
	color: #64748b;
	white-space: nowrap;
}

/* ── Games tables ──────────────────────────────────────────── */
.gl-library--tables .gl-table-section {
	margin-bottom: 40px;
}
.gl-library--tables .gl-table-section:last-child {
	margin-bottom: 0;
}
.gl-table-section__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 1.2rem;
	font-weight: 800;
	color: #0f172a;
}
.gl-table-section__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--gl-accent);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 800;
}
.gl-table-section__empty {
	color: #94a3b8;
	font-size: 0.92rem;
	margin: 0 0 8px;
	padding: 16px;
	background: #f8fafc;
	border-radius: 10px;
	text-align: center;
}
.gl-table-wrap {
	overflow-x: auto;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.gl-games-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}
.gl-games-table thead {
	background: #f8fafc;
	border-bottom: 2px solid #e2e8f0;
}
.gl-games-table th {
	padding: 10px 12px;
	text-align: right;
	font-size: 0.78rem;
	font-weight: 800;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: .4px;
	white-space: nowrap;
}
.gl-games-table td {
	padding: 8px 12px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}
.gl-games-table__row:last-child td {
	border-bottom: none;
}
.gl-games-table__row:hover {
	background: #fafbff;
}
.gl-games-table__th-cover,
.gl-games-table__cover {
	width: 56px;
}
.gl-games-table__cover img {
	width: 44px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.gl-games-table__cover-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 56px;
	background: #f1f5f9;
	border-radius: 8px;
	color: #cbd5e1;
	font-size: 1.2rem;
}
.gl-games-table__name a {
	font-weight: 700;
	color: #0f172a;
	text-decoration: none;
	font-size: 0.95rem;
}
.gl-games-table__name a:hover {
	color: var(--gl-accent);
}
.gl-games-table__genres {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 5px;
}
.gl-games-table__date {
	color: #64748b;
	font-weight: 500;
	white-space: nowrap;
}
.gl-games-table__platforms {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.gl-games-table__score {
	text-align: center;
}
.gl-score-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--gl-accent);
	color: #fff;
	font-weight: 800;
	font-size: 0.85rem;
}
.gl-games-table__review-link {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	background: var(--gl-accent);
	color: #fff !important;
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}
.gl-games-table__review-link:hover {
	opacity: .88;
}

@media (max-width: 768px) {
	.gl-games-table th,
	.gl-games-table td {
		padding: 10px 8px;
		font-size: 0.82rem;
	}
	.gl-games-table__th-score,
	.gl-games-table__score {
		display: none;
	}
}

/* ── Release tabs ──────────────────────────────────────────── */
.gl-library__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.gl-library__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 2px solid #e2e8f0;
	border-radius: 999px;
	background: #fff;
	color: #475569;
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	transition: all .15s ease;
	font-family: inherit;
}
.gl-library__tab:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent);
}
.gl-library__tab.is-active {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
}
.gl-library__tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(0,0,0,.12);
	font-size: 0.72rem;
	font-weight: 800;
}
.gl-library__tab.is-active .gl-library__tab-count {
	background: rgba(255,255,255,.22);
}

/* ── Release sections ──────────────────────────────────────── */
.gl-library__section {
	margin-bottom: 36px;
}
.gl-library__section:last-child {
	margin-bottom: 0;
}
.gl-library__section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 1.15rem;
	font-weight: 800;
	color: #0f172a;
	padding-bottom: 10px;
	border-bottom: 2px solid #e2e8f0;
}
.gl-library__section-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #64748b;
	font-size: 0.78rem;
	font-weight: 800;
}
.gl-library__section-empty {
	color: #94a3b8;
	font-size: 0.92rem;
	margin: 0;
	padding: 12px 0 4px;
}

.gl-library__no-results {
	text-align: center;
	color: #94a3b8;
	padding: 32px 16px;
	font-size: 0.95rem;
}

/* ── Archive page wrapper ──────────────────────────────────── */
.gl-archive-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 20px 60px;
}
.gl-archive-page__header {
	text-align: center;
	margin-bottom: 32px;
}
.gl-archive-page__title {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	font-weight: 900;
	margin: 0 0 8px;
	color: #0f172a;
}
.gl-archive-page__desc {
	margin: 0;
	color: #64748b;
	font-size: 1rem;
}

[data-layout="list"] .gl-library__grid {
	grid-template-columns: 1fr;
	gap: 16px;
}
[data-layout="list"] .gl-card {
	display: flex;
	flex-direction: row;
	gap: 0;
}
[data-layout="list"] .gl-card__cover-link {
	flex: 0 0 100px;
	aspect-ratio: auto;
	height: 120px;
}
[data-layout="list"] .gl-card__body { flex: 1; }

/* ── Card ─────────────────────────────────────────────────── */
.gl-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,.07);
	transition: transform .2s ease, box-shadow .2s ease;
	position: relative;
	display: flex;
	flex-direction: column;
}
.gl-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

/* ── Cover ─────────────────────────────────────────────────── */
.gl-card__cover-link {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}
.gl-card__cover { width: 100%; height: 100%; }
.gl-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.gl-card:hover .gl-card__cover img { transform: scale(1.04); }
.gl-card__cover--placeholder {
	background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #cbd5e1;
	font-size: 2rem;
	height: 100%;
}

/* ── Score badge ───────────────────────────────────────────── */
.gl-card__score {
	position: absolute;
	top: 8px;
	left: 8px;
	min-width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 0.78rem;
	color: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,.35);
	backdrop-filter: blur(2px);
}
.gl-card__score[data-score^="1"],
.gl-card__score[data-score^="2"],
.gl-card__score[data-score^="3"] { background: #ef4444; }
.gl-card__score[data-score^="4"],
.gl-card__score[data-score^="5"] { background: #f59e0b; }
.gl-card__score[data-score^="6"] { background: #eab308; }
.gl-card__score[data-score^="7"] { background: #84cc16; }
.gl-card__score[data-score^="8"],
.gl-card__score[data-score^="9"],
.gl-card__score[data-score^="10"] { background: #22c55e; }

/* ── Status badge ──────────────────────────────────────────── */
.gl-card__status {
	position: absolute;
	bottom: 8px;
	right: 8px;
	font-size: 0.62rem;
	padding: 2px 8px;
	border-radius: 20px;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
	backdrop-filter: blur(4px);
}
.gl-status--released     { background: rgba(34,197,94,.88);  color: #fff; }
.gl-status--coming_soon  { background: rgba(59,130,246,.88);  color: #fff; }
.gl-status--early_access { background: rgba(245,158,11,.88);  color: #fff; }
.gl-status--cancelled    { background: rgba(239,68,68,.88);   color: #fff; }

/* ── Card body ─────────────────────────────────────────────── */
.gl-card__body {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.gl-card__title {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.25;
}
.gl-card__title a { text-decoration: none; color: inherit; }
.gl-card__title a:hover { color: var(--gl-accent); }

/* ── Release date ──────────────────────────────────────────── */
.gl-card__release {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 0.72rem;
	color: #64748b;
	font-weight: 500;
}
.gl-icon {
	width: 12px;
	height: 12px;
	fill: currentColor;
	flex-shrink: 0;
}

/* ── Genre tags ────────────────────────────────────────────── */
.gl-card__genres { display: flex; flex-wrap: wrap; gap: 4px; }
.gl-tag {
	display: inline-block;
	background: #f1f5f9;
	color: #475569;
	font-size: 0.68rem;
	padding: 2px 8px;
	border-radius: 4px;
	font-weight: 600;
}

/* ── Platform badges ───────────────────────────────────────── */
.gl-card__platforms { display: flex; flex-wrap: wrap; gap: 4px; }
.gl-platform {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 0.65rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: .2px;
}
.gl-platform--pc       { background: #1b2838; }
.gl-platform--ps5,
.gl-platform--ps4      { background: #003087; }
.gl-platform--xbox_s,
.gl-platform--xbox_one { background: #107c10; }
.gl-platform--switch   { background: #e4000f; }
.gl-platform--ios,
.gl-platform--android  { background: #555; }

/* ── Review button ─────────────────────────────────────────── */
.gl-card__review-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: auto;
	padding: 5px 10px;
	background: var(--gl-accent);
	color: #fff !important;
	font-size: 0.74rem;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none !important;
	transition: background .18s ease, transform .15s ease;
	align-self: flex-start;
}
.gl-card__review-btn:hover {
	background: color-mix(in srgb, var(--gl-accent) 85%, #000);
	transform: translateY(-1px);
}
.gl-card__review-btn .gl-icon {
	width: 13px;
	height: 13px;
}

/* ══════════════════════════════════════════════════════════
   SINGLE GAME PAGE
   ══════════════════════════════════════════════════════════ */

/* ── Container ─────────────────────────────────────────────── */
.gl-single {
	--gl-hero-text: #ffffff;
	direction: rtl;
	font-family: inherit;
	color: #1e293b;
}

/* ── Hero ───────────────────────────────────────────────────── */
.gl-single__hero {
	position: relative;
	min-height: 420px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}
.gl-single__hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center top;
	filter: blur(22px) saturate(1.2);
	transform: scale(1.08);
	z-index: 0;
}
.gl-single__hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(var(--gl-accent-rgb), .45) 0%,
		rgba(10, 10, 20, .82) 100%
	);
	z-index: 1;
}
.gl-single__hero-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	gap: 32px;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 24px 36px;
}

/* ── Poster ─────────────────────────────────────────────────── */
.gl-single__poster {
	flex-shrink: 0;
	position: relative;
	width: 180px;
}
.gl-single__cover-img {
	width: 100%;
	aspect-ratio: 3/4;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0,0,0,.55);
	display: block;
}
.gl-single__poster-placeholder {
	width: 100%;
	aspect-ratio: 3/4;
	background: rgba(255,255,255,.1);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	color: rgba(255,255,255,.4);
}

/* Score badge on poster */
.gl-single__score-badge {
	position: absolute;
	bottom: -14px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--gl-accent);
	color: #fff;
	border-radius: 12px;
	padding: 6px 14px;
	text-align: center;
	box-shadow: 0 4px 16px rgba(var(--gl-accent-rgb),.5);
	min-width: 64px;
}
.gl-single__score-num {
	display: block;
	font-size: 1.5rem;
	font-weight: 900;
	line-height: 1;
}
.gl-single__score-label {
	display: block;
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	opacity: .85;
	margin-top: 2px;
}

/* ── Hero meta ──────────────────────────────────────────────── */
.gl-single__hero-meta {
	flex: 1;
	color: var(--gl-hero-text);
	padding-bottom: 18px;
}
.gl-single__title {
	font-size: clamp(1.6rem, 4vw, 2.8rem);
	font-weight: 900;
	line-height: 1.15;
	margin: 8px 0 10px;
	color: var(--gl-hero-text);
	text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.gl-single__devpub {
	font-size: 0.95rem;
	opacity: .85;
	margin: 0 0 10px;
	font-weight: 500;
}
.gl-single__release {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.88rem;
	opacity: .9;
	margin-bottom: 12px;
}
.gl-single__hero-platforms {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
}

/* ── Hero CTA buttons ───────────────────────────────────────── */
.gl-single__hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.gl-single__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 20px;
	border-radius: 10px;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none !important;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	cursor: pointer;
	border: none;
}
.gl-single__btn--primary {
	background: var(--gl-accent);
	color: #fff !important;
	box-shadow: 0 4px 16px rgba(var(--gl-accent-rgb),.4);
}
.gl-single__btn--primary:hover {
	background: color-mix(in srgb, var(--gl-accent) 85%, #000);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(var(--gl-accent-rgb),.5);
}
.gl-single__btn--ghost {
	background: rgba(255,255,255,.15);
	color: #fff !important;
	border: 2px solid rgba(255,255,255,.35);
	backdrop-filter: blur(4px);
}
.gl-single__btn--ghost:hover {
	background: rgba(255,255,255,.25);
	transform: translateY(-2px);
}
.gl-single__btn--full { width: 100%; justify-content: center; }

/* ── Body layout ────────────────────────────────────────────── */
.gl-single__body {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 32px;
	max-width: 1100px;
	margin: 36px auto;
	padding: 0 24px 60px;
}
.gl-single__body--details-only {
	grid-template-columns: 1fr;
	max-width: 720px;
}

/* ── Main content ───────────────────────────────────────────── */
.gl-single__section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.15rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid #e2e8f0;
}
.gl-single__section-title .gl-icon { color: var(--gl-accent); width: 18px; height: 18px; }

/* ── Trailer ────────────────────────────────────────────────── */
.gl-single__trailer { margin-top: 0; }
.gl-single__trailer-frame {
	position: relative;
	padding-top: 56.25%;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.gl-single__trailer-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.gl-single__sidebar { display: flex; flex-direction: column; gap: 20px; }
.gl-single__widget {
	background: #fff;
	border-radius: 14px;
	padding: 18px 20px;
	box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.gl-single__widget--review {
	background: linear-gradient(135deg, rgba(var(--gl-accent-rgb),.06), rgba(var(--gl-accent-rgb),.12));
	border: 1px solid rgba(var(--gl-accent-rgb),.2);
}
.gl-single__widget-title {
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: #64748b;
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid #f1f5f9;
}

/* Details DL */
.gl-single__details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 16px;
	margin: 0;
	font-size: 0.88rem;
}
.gl-single__details dt { color: #64748b; font-weight: 600; white-space: nowrap; }
.gl-single__details dd { margin: 0; color: #1e293b; font-weight: 500; }

/* Platforms in sidebar */
.gl-single__platforms-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-platform--lg { font-size: 0.75rem; padding: 4px 10px; }

/* Genres in sidebar */
.gl-single__genres { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-tag--lg { font-size: 0.78rem; padding: 4px 10px; }

/* Metacritic */
.gl-single__mc { display: flex; align-items: center; gap: 14px; }
.gl-single__mc-score {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 1.3rem;
	color: #fff;
	flex-shrink: 0;
}
.gl-single__mc-score[data-score] { background: #6c3; }
.gl-single__mc-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--gl-accent) !important;
	text-decoration: none;
}
.gl-single__mc-link:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
	.gl-single__body {
		grid-template-columns: 1fr;
	}
	.gl-single__sidebar {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}
}
@media (max-width: 640px) {
	.gl-single__hero-inner {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 32px 16px 28px;
	}
	.gl-single__poster { width: 140px; }
	.gl-single__hero-platforms,
	.gl-single__hero-actions { justify-content: center; }
	.gl-single__body { padding: 0 16px 40px; gap: 20px; }
	.gl-single__sidebar { grid-template-columns: 1fr; }
}

/* ── Upcoming list ─────────────────────────────────────────── */
.gl-upcoming { list-style: none; margin: 0; padding: 0; }
.gl-upcoming__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
}
.gl-upcoming__item:last-child { border-bottom: none; }
.gl-upcoming__thumb img { width: 42px; height: 56px; object-fit: cover; border-radius: 5px; display: block; }
.gl-upcoming__info { flex: 1; }
.gl-upcoming__name { font-weight: 600; font-size: 0.9rem; text-decoration: none; color: inherit; }
.gl-upcoming__name:hover { color: var(--gl-accent); }
.gl-upcoming__date { display: block; font-size: 0.78rem; color: #64748b; margin-top: 2px; }

/* ── Empty ─────────────────────────────────────────────────── */
.gl-library__empty { text-align: center; color: #94a3b8; padding: 48px 20px; font-size: 1rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
	.gl-library__grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
	.gl-library__grid[style*="--gl-cols"] { grid-template-columns: repeat(2, 1fr); }
	.gl-library__filters { flex-direction: column; align-items: stretch; }
	.gl-library__count { margin-right: 0; text-align: center; }
}
@media (max-width: 480px) {
	.gl-library__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	[data-layout="list"] .gl-card { flex-direction: column; }
	[data-layout="list"] .gl-card__cover-link { flex: unset; height: auto; aspect-ratio: 16/9; }
}
@media (max-width: 340px) {
	.gl-library__grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   POST SHOWCASE — game boxes in blog posts
   ══════════════════════════════════════════════════════════ */

.gl-showcase {
	position: relative;
	margin: 36px 0;
	padding: 28px 24px;
	border-radius: 16px;
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.gl-showcase__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(15,23,42,.82) 0%, rgba(15,23,42,.55) 100%);
	z-index: 0;
}

.gl-showcase__inner {
	position: relative;
	z-index: 1;
}

.gl-showcase__title {
	margin: 0 0 20px;
	font-size: clamp(1.25rem, 2.5vw, 1.75rem);
	font-weight: 800;
	color: #fff;
	text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.gl-showcase__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, 140px);
	justify-content: center;
	gap: 14px;
	max-width: 100%;
}

.gl-showcase__grid--row {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 12px;
	padding-bottom: 6px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.gl-showcase__grid--row .gl-game-box {
	flex: 0 0 140px;
	width: 140px;
	scroll-snap-align: start;
}

.gl-showcase__grid--featured {
	grid-template-columns: repeat(auto-fill, 140px);
}

.gl-showcase__grid--featured .gl-game-box--featured {
	grid-column: span 2;
	grid-row: span 2;
	width: 100%;
	max-width: none;
}

.gl-showcase__grid--stack {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0;
	padding: 12px 0 8px;
	min-height: 150px;
}

.gl-showcase__grid--stack .gl-game-box {
	flex: 0 0 140px;
	width: 140px;
	margin-inline-start: -28px;
	transform: rotate(-2deg);
	transition: transform .2s ease, z-index .2s;
	position: relative;
}

.gl-showcase__grid--stack .gl-game-box:first-child {
	margin-inline-start: 0;
}

.gl-showcase__grid--stack .gl-game-box:nth-child(even) {
	transform: rotate(2deg);
}

.gl-showcase__grid--stack .gl-game-box:hover {
	transform: translateY(-6px) rotate(0deg);
	z-index: 5;
}

.gl-showcase__pyramid {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.gl-showcase__pyramid-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.gl-showcase__pyramid-row .gl-game-box {
	flex: 0 0 140px;
	width: 140px;
}

/* ── Game box — compact square ──────────────────────────────── */
.gl-showcase article.gl-game-box {
	position: relative;
	width: 140px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	box-sizing: border-box;
}

.gl-showcase .gl-game-box__link {
	display: block;
	position: absolute;
	inset: 0;
	border-radius: 10px;
	overflow: hidden;
	background: #0f172a;
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
	text-decoration: none !important;
	color: #fff !important;
	transition: transform .2s ease, box-shadow .2s ease;
}

.gl-showcase .gl-game-box:hover .gl-game-box__link {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(0,0,0,.32);
}

.gl-showcase .gl-game-box__img,
.gl-showcase .gl-game-box__link > img {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	display: block !important;
	border: none !important;
	border-radius: 0 !important;
}

.gl-showcase .gl-game-box__placeholder {
	position: absolute;
	inset: 0;
	display: block;
	background: linear-gradient(160deg, #1e293b, #334155);
}

.gl-showcase .gl-game-box__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.35) 42%, transparent 68%);
	pointer-events: none;
	z-index: 1;
}

.gl-showcase .gl-game-box__score {
	position: absolute;
	top: 8px;
	left: 8px;
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 0.72rem;
	line-height: 1;
	color: #fff !important;
	background: var(--gl-accent);
	box-shadow: 0 2px 6px rgba(0,0,0,.35);
	z-index: 3;
}

.gl-showcase .gl-game-box__info {
	position: absolute;
	right: 0;
	left: 0;
	bottom: 0;
	padding: 10px 8px 8px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: right;
}

.gl-showcase .gl-game-box__title {
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 0.78rem !important;
	font-weight: 800 !important;
	line-height: 1.25 !important;
	color: #fff !important;
	background: none !important;
	border: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

.gl-showcase .gl-game-box__date {
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 0.65rem !important;
	line-height: 1.2 !important;
	color: rgba(255,255,255,.88) !important;
	background: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gl-showcase .gl-game-box__review {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 4;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 0.62rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	color: #fff !important;
	background: rgba(0,0,0,.55) !important;
	text-decoration: none !important;
	backdrop-filter: blur(4px);
}

.gl-showcase .gl-game-box__review:hover {
	background: var(--gl-accent) !important;
	color: #fff !important;
}

.gl-showcase .gl-game-box--featured {
	width: 100%;
	max-width: none;
}

.gl-showcase .gl-game-box--featured .gl-game-box__title {
	font-size: 0.92rem !important;
	white-space: normal;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

@media (max-width: 600px) {
	.gl-showcase {
		padding: 18px 14px;
		margin: 28px -4px;
		border-radius: 12px;
	}
	.gl-showcase__grid {
		grid-template-columns: repeat(auto-fill, 120px);
		gap: 10px;
	}
	.gl-showcase article.gl-game-box {
		width: 120px;
	}
	.gl-showcase__grid--row .gl-game-box,
	.gl-showcase__grid--stack .gl-game-box {
		flex-basis: 120px;
		width: 120px;
	}
}
