/* ============================================================
   AndroidEmulator — Game / App Detail Page Design System
   BlueStacks-class graphical IA on the macOS precision-instrument
   token base (uses --ae-* tokens from tokens.css).

   Layout model: every column is a centered "wrap" with a shared
   max-width and safe gutters — never combined with viewport-sized
   paddings (which shrink content on wide screens).
   ============================================================ */

.ae-game-page {
	--ae-game-w: 1560px;
	--ae-gutter: clamp(16px, 3.5vw, 40px);
	--ae-game-hero-h: clamp(360px, 52vw, 520px);
	--ae-game-radius: var(--ae-radius-lg, 14px);
}

.ae-game-page,
.ae-game-page *,
.ae-game-page *::before,
.ae-game-page *::after {
	box-sizing: border-box;
}

/* Centered column helper. */
.ae-game-wrap {
	width: 100%;
	max-width: var(--ae-game-w);
	margin-inline: auto;
	padding-inline: var(--ae-gutter);
}

/* ---------- Hero ---------- */
.ae-game-hero {
	position: relative;
	min-height: var(--ae-game-hero-h);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	isolation: isolate;
	background: var(--ae-bg-0, #07090f);
}
.ae-game-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(110% 90% at 18% 0%, var(--ae-accent, #0f62fe) 0%, transparent 55%),
		radial-gradient(90% 70% at 82% 100%, var(--ae-cyan, #22d3ee) 0%, transparent 50%),
		linear-gradient(180deg, var(--ae-surface-1, #0d121c), var(--ae-bg-0, #07090f));
}
.ae-game-hero__art {
	position: absolute;
	inset: 0;
	z-index: -1;
}
.ae-game-hero__art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	opacity: 0.42;
	transform: scale(1.05);
}
.ae-game-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, transparent 28%, var(--ae-bg-0, #07090f) 97%);
}
.ae-game-hero__content {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: clamp(20px, 4vw, 48px);
	align-items: end;
	padding-block: clamp(28px, 5vw, 64px);
}
.ae-game-hero__identity {
	max-width: 680px;
}
.ae-game-hero__logo {
	width: 88px;
	height: 88px;
	border-radius: 18px;
	overflow: hidden;
	background: var(--ae-surface-2, #161d2b);
	border: 1px solid var(--ae-border, #223049);
	box-shadow: 0 18px 46px -18px rgba(0, 0, 0, 0.8);
}
.ae-game-hero__logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ae-game-hero h1 {
	margin: 18px 0 6px;
	font-size: clamp(2rem, 4.5vw, 3.4rem);
	line-height: 1.04;
	letter-spacing: -0.02em;
	color: var(--ae-text-1, #f4f6fb);
	text-wrap: balance;
}
.ae-game-hero__lede {
	margin: 0;
	max-width: 56ch;
	color: var(--ae-text-2, #b6c0d0);
	font-size: 1.03rem;
	line-height: 1.6;
}
.ae-game-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}
.ae-game-hero__meta .ae-badge {
	font-size: 0.8rem;
}
.ae-game-hero__verified {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	font-size: 0.85rem;
	color: var(--ae-text-2, #b6c0d0);
}
.ae-game-hero__verified strong {
	color: var(--ae-text-1, #f4f6fb);
}
.ae-game-hero__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 210px;
}
.ae-game-hero__actions .ae-btn {
	width: 100%;
	justify-content: center;
	min-height: 44px;
}

/* ---------- Sticky in-page nav ---------- */
.ae-game-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(14px) saturate(1.3);
	-webkit-backdrop-filter: blur(14px) saturate(1.3);
	background: color-mix(in srgb, var(--ae-surface-1, #0d121c) 82%, transparent);
	border-bottom: 1px solid var(--ae-border-subtle, #1b2436);
}
.ae-game-nav ul {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding-block: 10px;
	scrollbar-width: thin;
}
.ae-game-nav li {
	flex: 0 0 auto;
}
.ae-game-nav a {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	padding: 9px 15px;
	border-radius: 999px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--ae-text-2, #b6c0d0);
	text-decoration: none;
	transition: background 0.16s ease, color 0.16s ease;
}
.ae-game-nav a:hover {
	background: var(--ae-surface-2, #161d2b);
	color: var(--ae-text-1, #f4f6fb);
}
.ae-game-nav a.is-active {
	background: var(--ae-accent, #0f62fe);
	color: #fff;
}

/* ---------- Body / sections ---------- */
.ae-game-body {
	padding-block: clamp(32px, 5vw, 56px) 80px;
}
.ae-game-section {
	margin-bottom: clamp(44px, 6vw, 72px);
	scroll-margin-top: 80px;
}
.ae-game-section__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	font-size: clamp(1.4rem, 2.4vw, 1.7rem);
	letter-spacing: -0.01em;
	color: var(--ae-text-1, #f4f6fb);
}
.ae-game-section__title::before {
	content: "";
	width: 5px;
	height: 24px;
	border-radius: 4px;
	background: linear-gradient(180deg, var(--ae-accent, #0f62fe), var(--ae-cyan, #22d3ee));
}

.ae-game-media {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
	gap: 24px;
	margin-bottom: 28px;
}
.ae-game-media__trailer {
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--ae-game-radius);
	overflow: hidden;
	border: 1px solid var(--ae-border, #223049);
}
.ae-game-media__trailer iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.ae-game-media__gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
}
.ae-game-media__shot {
	aspect-ratio: 16 / 10;
	border-radius: 12px;
	overflow: hidden;
	cursor: zoom-in;
	border: 1px solid var(--ae-border-subtle, #1b2436);
	background: var(--ae-surface-2, #161d2b);
}
.ae-game-media__shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}
.ae-game-media__shot:hover img {
	transform: scale(1.06);
}

/* Cards / panels */
.ae-game-panel {
	padding: clamp(20px, 3vw, 32px);
	border-radius: calc(var(--ae-game-radius) + 4px);
	border: 1px solid var(--ae-border, #223049);
	background: var(--ae-surface-1, #0d121c);
	box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}

/* ---------- Compatibility showcase ---------- */
.ae-game-showcase__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}
.ae-game-showcase__devicechips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ae-game-showcase__devicechip {
	all: unset;
	cursor: pointer;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	background: var(--ae-surface-2, #161d2b);
	color: var(--ae-text-2, #b6c0d0);
	border: 1px solid var(--ae-border-subtle, #1b2436);
	transition: all 0.16s ease;
}
.ae-game-showcase__devicechip.is-active {
	background: var(--ae-accent, #0f62fe);
	color: #fff;
	border-color: transparent;
}
.ae-game-showcase__verdict {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 18px;
	align-items: center;
	padding: 18px 20px;
	border-radius: var(--ae-game-radius);
	background: var(--ae-surface-2, #161d2b);
	border: 1px solid var(--ae-border-subtle, #1b2436);
	margin-bottom: 20px;
}
.ae-game-showcase__verdict .ae-badge {
	font-size: 0.9rem;
	padding: 7px 14px;
}
.ae-game-showcase__verdict p {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ae-text-2, #b6c0d0);
}
.ae-game-showcase__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}
.ae-game-showcase__card {
	padding: 18px;
	border-radius: var(--ae-game-radius);
	background: var(--ae-surface-2, #161d2b);
	border: 1px solid var(--ae-border-subtle, #1b2436);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ae-game-showcase__card strong {
	color: var(--ae-text-1, #f4f6fb);
	font-size: 1rem;
}
.ae-game-showcase__card .ae-mono {
	font-size: 0.8rem;
	color: var(--ae-text-3, #7d8ea5);
}
.ae-game-showcase__card p {
	margin: 0;
	font-size: 0.82rem;
	color: var(--ae-text-3, #7d8ea5);
	line-height: 1.5;
}

/* ---------- Requirement spec grid ---------- */
.ae-game-reqs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 14px;
}
.ae-game-req {
	padding: 16px 18px;
	border-radius: var(--ae-game-radius);
	background: var(--ae-surface-2, #161d2b);
	border: 1px solid var(--ae-border-subtle, #1b2436);
}
.ae-game-req span {
	display: block;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ae-text-3, #7d8ea5);
	margin-bottom: 6px;
}
.ae-game-req strong {
	color: var(--ae-text-1, #f4f6fb);
	font-size: 1.05rem;
}
.ae-game-req p {
	margin: 8px 0 0;
	color: var(--ae-text-3, #7d8ea5);
	font-weight: 400;
	font-size: 0.85rem;
	line-height: 1.5;
}

/* ---------- Editorial ---------- */
.ae-game-section .entry-content {
	color: var(--ae-text-2, #b6c0d0);
	line-height: 1.75;
	font-size: 1.02rem;
}
.ae-game-section .entry-content h2,
.ae-game-section .entry-content h3 {
	color: var(--ae-text-1, #f4f6fb);
	margin-top: 28px;
}
.ae-game-section .entry-content img {
	border-radius: var(--ae-game-radius);
}

/* ---------- Archive / directory container alignment ---------- */
.ae-repo-archive-screen .ae-container,
.ae-repo-archive-screen .ae-canvas > .ae-container {
	max-width: 1560px;
	width: 100%;
	margin-inline: auto;
	padding-inline: clamp(16px, 3.5vw, 40px);
}

/* ---------- Footer nav ---------- */
.ae-game-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 28px;
	border-top: 1px solid var(--ae-border-subtle);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.ae-game-hero__content {
		grid-template-columns: 1fr;
		align-items: start;
	}
	.ae-game-hero__actions {
		min-width: 0;
		flex-direction: row;
		flex-wrap: wrap;
	}
	.ae-game-media {
		grid-template-columns: 1fr;
	}
	.ae-game-hero {
		min-height: auto;
	}
}
@media (max-width: 560px) {
	.ae-game-hero {
		min-height: 0;
	}
	.ae-game-hero__content {
		padding-block: 24px 32px;
		gap: 20px;
	}
	.ae-game-hero__logo {
		width: 64px;
		height: 64px;
		border-radius: 14px;
	}
	.ae-game-hero h1 {
		font-size: clamp(1.6rem, 8vw, 2.2rem);
		margin-top: 14px;
	}
	.ae-game-hero__lede {
		font-size: 0.95rem;
	}
	.ae-game-hero__actions {
		gap: 10px;
	}
	.ae-game-hero__actions .ae-btn {
		min-height: 42px;
		font-size: 0.9rem;
	}
	.ae-game-hero__meta .ae-badge {
		font-size: 0.72rem;
	}
	.ae-game-nav a {
		padding: 9px 13px;
		font-size: 0.84rem;
	}
	.ae-game-body {
		padding-block: 28px 56px;
	}
	.ae-game-section {
		margin-bottom: 48px;
		scroll-margin-top: 72px;
	}
	.ae-game-section__title {
		font-size: 1.3rem;
	}
	.ae-game-section__title::before {
		height: 20px;
	}
	.ae-game-media {
		gap: 16px;
		margin-bottom: 20px;
	}
	.ae-game-media__gallery {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
	.ae-game-panel {
		padding: 18px;
	}
	.ae-game-req {
		padding: 14px 16px;
	}
	.ae-game-showcase__verdict {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.ae-game-showcase__grid {
		grid-template-columns: 1fr;
	}
}
