/*!
Theme Name: 	GamesIron
Theme URI:		https://gamesiron.com
Author: 		GamesIron
Author URI: 	https://gamesiron.com
Description: 	GamesIron Pro — advanced HTML5 games theme with registration/login, category bar, modern player, auto importer, favorites, history, legal pages, SEO schema, and super-fast loading.
Version: 		2024.10.10.pro
License:		GNU General Public License v3 or later
License URI:	https://www.gnu.org/licenses/gpl-3.0.html
Tags: 			custom-colors, custom-menu, custom-logo, custom-background, translation-ready, theme-options, entertainment
Text Domain:	arcade
Requires PHP:	7.4
Tested up to:	6.6
*/

/* ============================================================
   CSS VARIABLES – Modern Arcade Dark Theme
   ============================================================ */
:root {
	--bg: #0b0f1a;
	--bg-alt: #121826;
	--surface: #1a2234;
	--surface-hover: #243049;
	--border: #2a3548;
	--text: #e8eef7;
	--text-muted: #9aa8bc;
	--primary: #00e5ff;
	--primary-dark: #00b8d4;
	--accent: #ff2d95;
	--accent-2: #7c4dff;
	--success: #00e676;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 8px 24px rgba(0,0,0,.35);
	--shadow-lg: 0 16px 48px rgba(0,0,0,.5);
	--transition: .25s cubic-bezier(.4,0,.2,1);
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--max-w: 1280px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	padding: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4 { margin: 0 0 .6em; font-weight: 700; line-height: 1.25; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap, .w, #page { width: 100%; max-width: var(--max-w); margin: 0 auto; }
#content { padding: 1rem; min-height: 60vh; }
.center { text-align: center; }
.abs { position: absolute; }
.f { display: flex; flex-wrap: wrap; align-items: center; }
.fi { flex: 1 1 auto; }

/* ============================================================
   HEADER
   ============================================================ */
#header {
	background: var(--bg-alt);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(12px);
}
#header .wrap { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; gap: 1rem; }
.site-logo img { max-height: 42px; width: auto; }
#header a { color: var(--text); }
#header a:hover { color: var(--primary); }

/* Nav */
.main-nav, #mn { display: flex; flex-wrap: wrap; gap: .25rem; }
.main-nav a, #mn a {
	display: block;
	padding: .45rem .85rem;
	border-radius: var(--radius-sm);
	font-weight: 500;
	font-size: .95rem;
}
.main-nav a:hover, #mn a:hover, .main-nav .current-menu-item > a {
	background: var(--surface);
	color: var(--primary);
}

/* ============================================================
   PAGE TITLES
   ============================================================ */
.page-title, .game-title, .section-title {
	font-size: clamp(1.35rem, 3vw, 1.85rem);
	margin: 1rem 0 1.25rem;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.page-title.home, .page-title.archive { justify-content: center; text-align: center; }
.icon-gamepad { color: var(--primary); font-size: .9em; }

/* ============================================================
   GAME GRID (Cards)
   ============================================================ */
.gtc {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem;
	width: 100%;
}
@media (min-width: 600px) {
	.gtc { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.15rem; }
}
@media (min-width: 900px) {
	.gtc { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

.gt {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface);
	box-shadow: var(--shadow);
	aspect-ratio: 4/3;
	transition: transform var(--transition), box-shadow var(--transition);
}
.gt:hover {
	transform: translateY(-6px) scale(1.02);
	box-shadow: var(--shadow-lg), 0 0 0 2px var(--primary);
}
.gt a { display: block; width: 100%; height: 100%; position: relative; color: #fff; }
.gt img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease, filter .3s;
}
.gt:hover img { transform: scale(1.08); filter: brightness(.7); }
.gt .bg {
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 55%);
	opacity: .9;
	transition: opacity var(--transition);
}
.gt .t {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	padding: .75rem;
	text-align: center;
	font-size: .85rem;
	z-index: 2;
}
.gt .t .play-icon {
	display: block;
	font-size: 1.6rem;
	margin-bottom: .2rem;
	color: var(--primary);
	text-shadow: 0 0 12px var(--primary);
}
.gt .t strong { display: block; font-size: .8rem; letter-spacing: .03em; margin-bottom: .15rem; }
.gt .game-name, .gt .t { line-height: 1.3; }
.gt .t { overflow: hidden; text-overflow: ellipsis; }

/* Related smaller cards */
.related-grid .gt { aspect-ratio: 16/11; }
.related-games { margin: 2.5rem 0 1.5rem; }
.related-games .section-title { margin-bottom: 1.25rem; }

/* ============================================================
   SINGLE GAME PLAYER
   ============================================================ */
.game-page { padding-bottom: 2rem; }
.game-player-wrap {
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow);
}
.game-player-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .85rem 1.1rem;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}
.game-player-header .game-title {
	margin: 0;
	font-size: 1.2rem;
}
.player-actions { display: flex; gap: .5rem; }

.game-frame-container {
	position: relative;
	width: 100%;
	background: #000;
	aspect-ratio: 16 / 9;
	max-height: 75vh;
}
.game-iframe {
	opacity: 1;
	visibility: visible;
	display: none;
	width: 100%;
	height: 100%;
	border: 0;
	position: absolute;
	inset: 0;
}
.game-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	cursor: pointer;
}
.game-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(.45);
}
.btn-play {
	position: relative;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	padding: .9rem 1.8rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--primary), var(--accent-2));
	border-radius: 50px;
	box-shadow: 0 6px 24px rgba(0,229,255,.35);
	transition: transform var(--transition), box-shadow var(--transition);
}
.btn-play:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 32px rgba(0,229,255,.5);
}
.btn-play .play-icon { font-size: 1.3rem; }

.game-unsupported {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--text-muted);
	padding: 2rem;
}

/* Fullscreen adjustments */
.game-frame-container:fullscreen,
.game-frame-container:-webkit-full-screen {
	aspect-ratio: auto;
	max-height: none;
	height: 100%;
}
.game-frame-container:fullscreen .game-iframe,
.game-frame-container:-webkit-full-screen .game-iframe {
	display: block;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .45rem .95rem;
	border-radius: var(--radius-sm);
	font-size: .9rem;
	font-weight: 600;
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border);
	transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover {
	background: var(--surface-hover);
	border-color: var(--primary);
	color: var(--primary);
}
.btn-icon { font-size: .85rem; }

/* ============================================================
   GAME INFO / DESCRIPTION
   ============================================================ */
.game-info { margin: 1.5rem 0; }
.game-desc h2, .game-desc h3 {
	font-size: 1.2rem;
	margin: 1.25rem 0 .6rem;
	color: var(--primary);
}
.game-desc .content { color: var(--text-muted); line-height: 1.65; }
.game-tags {
	margin: 1.25rem 0;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	align-items: center;
}
.game-tags .tags-label { color: var(--text-muted); margin-right: .3rem; }
.game-tags a {
	display: inline-block;
	padding: .25rem .65rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 20px;
	font-size: .8rem;
	color: var(--text);
}
.game-tags a:hover {
	background: var(--primary);
	color: var(--bg);
	border-color: var(--primary);
}
.more-tags { cursor: pointer; color: var(--primary); font-size: .85rem; }
.more-tags .hidden { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
	background: var(--bg-alt);
	border-top: 1px solid var(--border);
	padding: 1.75rem 1rem;
	margin-top: 2rem;
	text-align: center;
	font-size: .9rem;
	color: var(--text-muted);
}
.footer-menu { margin-bottom: 1rem; }
.footer-menu ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; }
.footer-menu a { color: var(--text-muted); }
.footer-menu a:hover { color: var(--primary); }
.site-info a { color: var(--text-muted); }
.site-info a:hover { color: var(--primary); }

/* ============================================================
   ADS & MISC
   ============================================================ */
.ad-slot { margin: 1.25rem 0; min-height: 1px; }
.ad-slot img { margin: 0 auto; }

/* Pagination */
.pagination, .nav-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: .4rem;
	margin: 2rem 0 1rem;
}
.pagination a, .pagination span, .nav-links a, .nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	padding: 0 .6rem;
	border-radius: var(--radius-sm);
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	font-weight: 600;
	font-size: .9rem;
}
.pagination a:hover, .nav-links a:hover {
	border-color: var(--primary);
	color: var(--primary);
}
.pagination .current, .nav-links .current {
	background: var(--primary);
	color: var(--bg);
	border-color: var(--primary);
}

/* ============================================================
   RESPONSIVE – Mobile first enhancements
   ============================================================ */
@media (max-width: 640px) {
	#content { padding: .75rem; }
	.game-player-header {
		flex-direction: column;
		align-items: flex-start;
		padding: .7rem .9rem;
	}
	.game-player-header .game-title { font-size: 1.05rem; }
	.player-actions { width: 100%; }
	.player-actions .btn { flex: 1; justify-content: center; }
	.gtc { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }
	.btn-play { padding: .75rem 1.4rem; font-size: 1rem; }
}

/* Landscape mobile / small tablets – taller player */
@media (max-width: 900px) and (orientation: landscape) {
	.game-frame-container { aspect-ratio: 16/9; max-height: 85vh; }
}

/* Desktop polish */
@media (min-width: 1024px) {
	.game-frame-container { max-height: 70vh; }
}

/* ============================================================
   PERFORMANCE & REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
	.gt:hover { transform: none; }
	.gt:hover img { transform: none; }
}

/* Print */
@media print {
	#header, #colophon, .ad-slot, .player-actions { display: none !important; }
}


/* Game loader – fast play */
.game-loader {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	color: #e8f0ff;
	font-weight: 600;
	pointer-events: none;
}
.game-spinner {
	width: 42px;
	height: 42px;
	border: 3px solid rgba(255,255,255,0.2);
	border-top-color: var(--neon-cyan, #00f3ff);
	border-radius: 50%;
	animation: arcade-spin 0.7s linear infinite;
}
@keyframes arcade-spin {
	to { transform: rotate(360deg); }
}
.game-iframe {
	transition: opacity 0.25s ease;
	background: #000;
}


/* Prevent blank screen: overlay must not block when hidden */
.game-overlay[style*="display: none"],
.game-overlay.is-hidden {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	z-index: -1 !important;
}
.game-iframe {
	position: relative;
	z-index: 1;
	min-height: 360px;
	background: #000;
}


/* Categories panel with images */
#tc {
	padding: 1rem 0 1.5rem;
	list-style: none;
	margin: 0;
}
#tc .cat-card {
	aspect-ratio: 16/10;
}
#tc .cat-card .t {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: .5rem;
	background: linear-gradient(transparent, rgba(0,0,0,.85));
	z-index: 2;
}
#tc .cat-no-img {
	background: linear-gradient(135deg, #1a2234, #2a3550);
}
#tc .cat-all {
	background: linear-gradient(135deg, #0d3d4d, #1a5a6e);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Favorites / History toggle panel */
#toggle {
	padding: 1rem 0;
	background: rgba(10, 14, 22, 0.95);
}
#toggle .ec {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: .75rem;
}
#toggle .ec-item {
	position: relative;
	aspect-ratio: 16/11;
	border-radius: 10px;
	overflow: hidden;
	background: #1a2234;
}
#toggle .ec-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
#toggle .ec-item .title {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	padding: .35rem .5rem;
	background: linear-gradient(transparent, rgba(0,0,0,.9));
	font-size: .75rem;
	color: #fff;
}
#toggle .ec-item .x {
	position: absolute;
	top: 4px; right: 6px;
	z-index: 3;
	color: #fff;
	font-size: 1.1rem;
	text-decoration: none;
	background: rgba(0,0,0,.5);
	border-radius: 50%;
	width: 22px; height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* Favorite button state */
#fav.liked {
	color: #ff4d6d !important;
	border-color: #ff4d6d !important;
}


/* Pro attribution + legal footer */
.game-attribution {
	font-size: .75rem;
	color: var(--text-muted, #9aa8bc);
	text-align: center;
	margin: .5rem 0 1rem;
	padding: 0 .5rem;
}
.footer-legal-links a {
	color: var(--text-muted, #9aa8bc);
	text-decoration: none;
}
.footer-legal-links a:hover {
	color: var(--primary, #00e5ff);
}
/* Page content polish */
.page .entry-content,
.page-content {
	max-width: 800px;
	margin: 0 auto;
	line-height: 1.7;
	padding: 1.5rem 1rem 3rem;
}
.page .entry-content h2 {
	margin-top: 1.75rem;
	color: var(--primary, #00e5ff);
}


/* Header + footer legal links (no duplicate clutter) */
#header-legal,
.header-legal {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .75rem;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0 .5rem;
	font-size: .8rem;
}
#header-legal a,
.header-legal a {
	color: var(--text-muted, #9aa8bc);
	text-decoration: none;
	white-space: nowrap;
}
#header-legal a:hover,
.header-legal a:hover {
	color: var(--primary, #00e5ff);
}
.footer-legal-nav ul,
#mf {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem 1rem;
	list-style: none;
	margin: 0;
	padding: .75rem 0;
}
.footer-legal-nav a,
#mf a {
	color: var(--text-muted, #9aa8bc);
	text-decoration: none;
	font-size: .85rem;
}
.footer-legal-nav a:hover,
#mf a:hover {
	color: var(--primary, #00e5ff);
}
@media (max-width: 700px) {
	#top-nav {
		flex-wrap: wrap;
	}
	#header-legal {
		width: 100%;
		justify-content: center;
		padding: .4rem 0 .6rem;
	}
}


/* ===== Professional game category bar ===== */
.cat-bar-wrap {
	background: linear-gradient(180deg, rgba(18,24,38,.98), rgba(11,15,26,.95));
	border-bottom: 1px solid var(--border, #2a3548);
	position: sticky;
	top: 0;
	z-index: 50;
}
.cat-bar {
	display: flex;
	flex-wrap: nowrap;
	gap: .45rem;
	overflow-x: auto;
	padding: .55rem 1rem;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.cat-bar::-webkit-scrollbar { height: 4px; }
.cat-bar::-webkit-scrollbar-thumb { background: #2a3548; border-radius: 4px; }
.cat-chip {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	flex: 0 0 auto;
	padding: .4rem .75rem;
	border-radius: 999px;
	background: var(--surface, #1a2234);
	border: 1px solid var(--border, #2a3548);
	color: var(--text, #e8eef7);
	text-decoration: none;
	font-size: .8rem;
	font-weight: 600;
	line-height: 1.2;
	transition: border-color .15s, background .15s, transform .15s;
	cursor: pointer;
	font-family: inherit;
}
.cat-chip:hover,
.cat-chip.active {
	border-color: var(--primary, #00e5ff);
	background: var(--surface-hover, #243049);
	color: #fff;
	transform: translateY(-1px);
}
.cat-chip .cat-icon { font-size: .95rem; line-height: 1; }
.cat-chip .cat-count {
	font-size: .65rem;
	font-weight: 500;
	color: var(--text-muted, #9aa8bc);
	background: rgba(0,0,0,.25);
	padding: .1rem .35rem;
	border-radius: 999px;
}
.cat-chip-more {
	border-style: dashed;
	color: var(--primary, #00e5ff);
}
#tc.cat-panel {
	display: grid;
	padding: 1rem;
	margin: 0;
	list-style: none;
	background: var(--bg-alt, #121826);
	border-bottom: 1px solid var(--border, #2a3548);
}
#tc.cat-panel[hidden] {
	display: none !important;
}
#tc.cat-panel .cat-card .t em {
	display: block;
	font-style: normal;
	font-size: .7rem;
	opacity: .75;
	font-weight: 400;
}
#tc.cat-panel .cat-card .t .cat-icon {
	margin-right: .25rem;
}
@media (max-width: 600px) {
	.cat-chip .cat-count { display: none; }
	.cat-chip { padding: .35rem .6rem; font-size: .75rem; }
}


/* Super-fast game player — isolate layout, GPU layer */
.game-frame-container {
	contain: layout style;
	isolation: isolate;
	background: #000;
	transform: translateZ(0);
}
.game-iframe {
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	border: 0;
	display: block;
	background: #000;
	/* Avoid opacity transitions that stutter WebGL games */
	opacity: 1 !important;
	visibility: visible !important;
}
.game-overlay {
	pointer-events: none;
}
.game-overlay .btn-play {
	pointer-events: auto;
}


/* ===== Auth / Register / Login (Pro) ===== */
#header-auth,
.header-auth {
	display: flex;
	gap: .5rem .75rem;
	list-style: none;
	margin: 0;
	padding: 0 .4rem;
	align-items: center;
	font-size: .85rem;
	font-weight: 600;
}
#header-auth a { color: var(--text, #e8eef7); text-decoration: none; }
#header-auth a:hover { color: var(--primary, #00e5ff); }
#header-auth .gi-register-link {
	background: linear-gradient(135deg, var(--primary, #00e5ff), var(--accent-2, #7c4dff));
	color: #0b0f1a !important;
	padding: .35rem .75rem;
	border-radius: 999px;
}
.gi-auth-box {
	max-width: 420px;
	margin: 2rem auto 3rem;
	padding: 1.75rem 1.5rem;
	background: var(--surface, #1a2234);
	border: 1px solid var(--border, #2a3548);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.gi-auth-title {
	margin: 0 0 1.25rem;
	font-size: 1.4rem;
	text-align: center;
	color: var(--primary, #00e5ff);
}
.gi-auth-form label {
	display: block;
	margin-bottom: .9rem;
}
.gi-auth-form label span {
	display: block;
	font-size: .8rem;
	color: var(--text-muted, #9aa8bc);
	margin-bottom: .3rem;
}
.gi-auth-form input[type="text"],
.gi-auth-form input[type="email"],
.gi-auth-form input[type="password"] {
	width: 100%;
	padding: .65rem .8rem;
	border-radius: 10px;
	border: 1px solid var(--border, #2a3548);
	background: var(--bg, #0b0f1a);
	color: var(--text, #e8eef7);
	font-size: 1rem;
	box-sizing: border-box;
}
.gi-auth-form input:focus {
	outline: none;
	border-color: var(--primary, #00e5ff);
}
.gi-check {
	display: flex !important;
	align-items: center;
	gap: .5rem;
	font-size: .85rem;
	color: var(--text-muted, #9aa8bc);
}
.gi-auth-submit {
	width: 100%;
	margin-top: .5rem;
	cursor: pointer;
	border: 0;
}
.gi-auth-switch {
	text-align: center;
	margin: 1rem 0 0;
	font-size: .9rem;
	color: var(--text-muted, #9aa8bc);
}
.gi-auth-switch a { color: var(--primary, #00e5ff); }
.gi-auth-msg {
	padding: .65rem .8rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	font-size: .9rem;
}
.gi-auth-msg.error {
	background: rgba(255,45,149,.15);
	color: #ff8fb7;
	border: 1px solid rgba(255,45,149,.3);
}
.gi-auth-msg.ok {
	background: rgba(0,229,255,.1);
	color: var(--primary, #00e5ff);
	border: 1px solid rgba(0,229,255,.25);
}
.gi-account-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
}
.gi-account-list li {
	padding: .5rem 0;
	border-bottom: 1px solid var(--border, #2a3548);
	font-size: .95rem;
}
.gi-auth-actions {
	display: flex;
	gap: .75rem;
	flex-wrap: wrap;
	justify-content: center;
}


/* ===== Single-line header menu (all items one row) ===== */
#top-nav {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
	flex-wrap: nowrap;
}
#top-nav .logo {
	flex: 0 0 auto;
	max-width: 140px;
}
#top-nav .logo img {
	max-height: 40px;
	width: auto;
}
#mt.header-main-line,
ul.header-main-line {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	gap: 0.15rem 0.55rem;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	flex: 1 1 auto;
	min-width: 0;
}
#mt.header-main-line li {
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
}
#mt.header-main-line a {
	display: inline-block;
	padding: 0.3rem 0.45rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text, #e8eef7);
	text-decoration: none;
	border-radius: 6px;
	line-height: 1.2;
}
#mt.header-main-line a:hover {
	color: var(--primary, #00e5ff);
	background: rgba(0, 229, 255, 0.08);
}
#mt.header-main-line .gi-register-link {
	background: linear-gradient(135deg, var(--primary, #00e5ff), var(--accent-2, #7c4dff));
	color: #0b0f1a !important;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
}
/* Hide old split menus if any leftover */
#header-auth,
#header-legal {
	display: none !important;
}
@media (max-width: 900px) {
	#mt.header-main-line a {
		font-size: 0.72rem;
		padding: 0.25rem 0.35rem;
	}
}


/* Inline search bar in header line */
.header-search-item {
	display: flex !important;
	align-items: center;
}
.header-search-form {
	display: flex;
	align-items: center;
	gap: 0;
	background: var(--bg, #0b0f1a);
	border: 1px solid var(--border, #2a3548);
	border-radius: 999px;
	overflow: hidden;
	height: 30px;
}
.header-search-input {
	border: 0;
	background: transparent;
	color: var(--text, #e8eef7);
	font-size: 0.78rem;
	padding: 0 0.6rem;
	width: 110px;
	min-width: 80px;
	outline: none;
}
.header-search-input::placeholder {
	color: var(--text-muted, #9aa8bc);
}
.header-search-btn {
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0 0.5rem;
	font-size: 0.85rem;
	line-height: 1;
	color: var(--primary, #00e5ff);
}
.header-search-form:focus-within {
	border-color: var(--primary, #00e5ff);
}
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	border: 0;
}
@media (min-width: 1100px) {
	.header-search-input { width: 150px; }
}
@media (max-width: 700px) {
	.header-search-input { width: 90px; }
}


/* ============================================================
   GAMESIRON MOBILE PRO – touch friendly
   ============================================================ */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
body {
	overflow-x: hidden;
}
img, video, iframe {
	max-width: 100%;
}

/* Header: logo + scrollable one-line menu */
@media (max-width: 900px) {
	#top-nav {
		flex-wrap: nowrap;
		padding: 0.4rem 0.5rem;
		gap: 0.4rem;
		position: sticky;
		top: 0;
		z-index: 100;
		background: rgba(11, 15, 26, 0.96);
		backdrop-filter: blur(8px);
		border-bottom: 1px solid var(--border, #2a3548);
	}
	#top-nav .logo {
		max-width: 100px;
		flex-shrink: 0;
	}
	#top-nav .logo img {
		max-height: 32px;
	}
	#mt.header-main-line {
		gap: 0.1rem 0.35rem;
		padding-bottom: 2px;
	}
	#mt.header-main-line a {
		font-size: 0.7rem;
		padding: 0.4rem 0.4rem;
		min-height: 36px;
		display: inline-flex;
		align-items: center;
	}
	.header-search-form {
		height: 32px;
	}
	.header-search-input {
		width: 72px;
		font-size: 0.72rem;
		padding: 0 0.4rem;
	}
	.gi-register-link {
		font-size: 0.7rem !important;
	}
}

@media (max-width: 480px) {
	/* Extra-compact phones */
	#mt.header-main-line a {
		font-size: 0.65rem;
		padding: 0.35rem 0.3rem;
	}
	.header-search-input {
		width: 64px;
	}
	/* Hide Terms on very small to save space (still in footer) */
	#mt.header-main-line li:last-child {
		/* keep Terms – user asked all items; rely on scroll */
	}
}

/* Category bar mobile */
@media (max-width: 900px) {
	.cat-bar-wrap {
		position: sticky;
		top: 48px;
		z-index: 90;
	}
	.cat-bar {
		padding: 0.4rem 0.6rem;
		gap: 0.35rem;
	}
	.cat-chip {
		padding: 0.4rem 0.65rem;
		font-size: 0.72rem;
		min-height: 34px;
	}
	.cat-chip .cat-count {
		display: none;
	}
	#tc.cat-panel {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.6rem;
		padding: 0.75rem;
	}
}

/* Game grid */
@media (max-width: 600px) {
	#content {
		padding: 0.5rem !important;
	}
	.gtc {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 0.55rem !important;
	}
	.gt {
		border-radius: 10px;
	}
	.gt .t strong {
		font-size: 0.7rem;
	}
	.gt .game-name {
		font-size: 0.65rem;
	}
}

/* Game player mobile full-bleed feel */
@media (max-width: 768px) {
	.game-page.w {
		padding: 0;
		max-width: 100%;
	}
	.game-player-wrap {
		border-radius: 0;
		margin: 0;
	}
	.game-player-header {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		padding: 0.6rem 0.75rem;
	}
	.game-player-header .game-title {
		font-size: 1rem;
		line-height: 1.3;
	}
	.player-actions {
		display: flex;
		width: 100%;
		gap: 0.4rem;
	}
	.player-actions .btn {
		flex: 1;
		min-height: 40px;
		font-size: 0.8rem;
		justify-content: center;
	}
	.game-frame-container {
		aspect-ratio: 9 / 16;
		max-height: min(70vh, 560px);
		width: 100%;
		border-radius: 0;
	}
	/* Prefer landscape-friendly height when wide enough */
	@supports (aspect-ratio: 16 / 9) {
		.game-frame-container {
			aspect-ratio: 16 / 9;
			max-height: 55vh;
		}
	}
	.game-iframe {
		width: 100% !important;
		height: 100% !important;
	}
	.game-info,
	.related-games {
		padding: 0.75rem;
	}
	.game-attribution {
		font-size: 0.7rem;
		padding: 0 0.75rem;
	}
}

/* Landscape phone – bigger game area */
@media (max-width: 900px) and (orientation: landscape) {
	.game-frame-container {
		aspect-ratio: 16 / 9;
		max-height: 80vh;
	}
	.cat-bar-wrap {
		top: 42px;
	}
}

/* Footer mobile */
@media (max-width: 600px) {
	.site-footer {
		padding: 1rem 0.75rem 1.5rem;
		text-align: center;
	}
	.footer-legal-nav ul,
	#mf {
		justify-content: center;
		gap: 0.4rem 0.75rem;
	}
	.footer-legal-nav a,
	#mf a {
		font-size: 0.75rem;
		padding: 0.35rem 0.2rem;
		display: inline-block;
	}
	.footer-copy {
		font-size: 0.75rem;
		line-height: 1.4;
	}
}

/* Auth forms mobile */
@media (max-width: 480px) {
	.gi-auth-box {
		margin: 1rem 0.75rem 2rem;
		padding: 1.25rem 1rem;
		border-radius: 12px;
	}
	.gi-auth-title {
		font-size: 1.2rem;
	}
}

/* Toggle panels (fav/history) full width */
@media (max-width: 600px) {
	#toggle {
		padding: 0.75rem 0.5rem;
	}
	#toggle .ec {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 0.5rem;
	}
}

/* Touch: remove hover-only reliance */
@media (hover: none) {
	.gt:hover {
		transform: none;
	}
	.cat-chip:active,
	#mt.header-main-line a:active {
		opacity: 0.85;
	}
}

/* Safe area (notch phones) */
@supports (padding: max(0px)) {
	#top-nav {
		padding-left: max(0.5rem, env(safe-area-inset-left));
		padding-right: max(0.5rem, env(safe-area-inset-right));
	}
	.site-footer {
		padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
	}
}
