.arcade {
	display: grid;
	gap: 2rem;
	padding: 2rem;
	align-items: center;
	grid-template-columns: minmax(260px, 320px) 1fr;
}

.arcade-sidebar {
	display: grid;
	gap: 2rem;
}

.arcade-brand h1 {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3rem);
}

.arcade-brand p {
	color: #94a3b8;
}

.game-list {
	display: grid;
	gap: 0.75rem;
}

.game-btn {
	padding: 0.85rem 1rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(148, 163, 184, 0.2);
	background: rgba(15, 23, 42, 0.6);
	color: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.game-btn:hover,
.game-btn:focus {
	background: rgba(99, 102, 241, 0.35);
	transform: translateY(-1px);
}

.game-btn.active {
	background: linear-gradient(135deg, #22d3ee, #6366f1);
	color: #0f172a;
	border: none;
}

.game-icon {
	font-size: 1.35rem;
	line-height: 1;
}

.game-label {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.mobile-game-tabs {
	display: none;
	width: 100%;
	gap: 0.75rem;
	justify-content: center;
	align-items: center;
	margin-bottom: 0.5rem;
}

.game-tab {
	width: 3.1rem;
	height: 3.1rem;
	border-radius: 1rem;
	border: 1px solid rgba(148, 163, 184, 0.25);
	background: rgba(15, 23, 42, 0.65);
	color: #f1f5f9;
	font-size: 1.35rem;
	display: grid;
	place-items: center;
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.game-tab.active,
.game-tab:focus {
	background: linear-gradient(135deg, rgba(34, 211, 238, 0.8), rgba(99, 102, 241, 0.85));
	border-color: rgba(34, 211, 238, 0.8);
	transform: translateY(-2px);
}

.game-instructions {
	background: rgba(15, 23, 42, 0.85);
	border-radius: 1rem;
	border: 1px solid rgba(148, 163, 184, 0.15);
	padding: 1.5rem;
	display: grid;
	gap: 0.75rem;
}

.game-instructions h2 {
	margin: 0;
}

.arcade-stage {
	background: rgba(15, 23, 42, 0.65);
	border-radius: 1.5rem;
	border: 1px solid rgba(148, 163, 184, 0.15);
	padding: 1.5rem;
	display: grid;
	gap: 1rem;
	justify-items: center;
}

.game-scoreboard {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	font-size: 1rem;
	color: #e2e8f0;
}

.score-item strong {
	font-weight: 700;
	color: #facc15;
}

#game-canvas {
	width: min(100%, 960px);
	height: auto;
	aspect-ratio: 16 / 9;
	max-height: 540px;
	background: #020617;
	border-radius: 1rem;
	border: 1px solid rgba(148, 163, 184, 0.2);
	touch-action: none;
}

.control-hints {
	color: #64748b;
	font-size: 0.9rem;
	text-align: center;
}

@media (max-width: 900px) {
	.arcade {
		grid-template-columns: 1fr;
	}

	.arcade-sidebar {
		display: none;
	}

	.arcade-stage {
		order: -1;
	}

	.mobile-game-tabs {
		display: flex;
	}
}

@media (max-width: 720px) {
	.arcade {
		padding: 0;
	}

	.arcade-stage {
		padding: 0.75rem;
		gap: 0.75rem;
		border-radius: 0;
		border-width: 0;
		min-height: 100vh;
		width: 100%;
		box-sizing: border-box;
		grid-template-rows: auto auto 1fr auto;
		justify-items: stretch;
	}

	.game-scoreboard {
		justify-content: space-around;
		gap: 0.75rem;
		font-size: 0.95rem;
	}

	#game-canvas {
		width: 100%;
		max-height: none;
		aspect-ratio: auto;
		height: max(320px, calc(100vh - 14rem));
		justify-self: center;
	}

	.control-hints {
		font-size: 0.85rem;
	}
}

@media (max-width: 540px) {
	.arcade-stage {
		padding: 0.5rem;
	}

	.mobile-game-tabs {
		gap: 0.6rem;
	}

	.game-tab {
		width: 2.6rem;
		height: 2.6rem;
		font-size: 1.1rem;
	}

	.game-scoreboard {
		flex-direction: row;
		align-items: flex-start;
	}

	#game-canvas {
		height: max(280px, calc(100vh - 12rem));
	}
}