/* ============================================================
   Arcade Pink — CrazyGames-style sidebar + topbar.
   Dark navy background, magenta/pink accents.
   ============================================================ */

:root {
	--bg-deep:   #07080f;
	--bg-app:    #0b0c15;
	--panel:     #14131e;
	--panel-2:   #1a1828;
	--panel-3:   #221f33;
	--border:    #1d1b2c;
	--border-2:  #2a2740;
	--text:      #f1eef8;
	--text-dim:  #9d92be;
	--text-mute: #6a6188;

	--accent:        #ff3d8b;
	--accent-2:      #d72270;
	--accent-soft:   #ff7eb1;

	--radius-lg: 16px;
	--radius-md: 12px;
	--radius-sm: 6px;

	--sidebar-w: 240px;
	--topbar-h:  64px;

	--shadow-soft: 0 8px 22px rgba(0,0,0,.55);
}

*, *::before, *::after { box-sizing: border-box; }

/* ---------- Base ---------- */
html { font-size: 15px; }
html, body {
	background: var(--bg-deep);
	color: var(--text);
	font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	min-height: 100vh;
	font-size: 14px;
	line-height: 1.45;
	margin: 0;
}
body { background: var(--bg-deep); overflow-x: hidden; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 700; }
hr.sb-divider { border: none; border-top: 1px solid var(--border); margin: 8px 6px; }

/* Hide stock CloudArcade footer / nav strips */
.footer, .copyright, .nav-categories { display: none !important; }
body > footer, body > .footer { display: none !important; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }

.app-sidebar {
	position: fixed; top: 0; left: 0; bottom: 0;
	width: var(--sidebar-w);
	background: #0a0a13;
	border-right: 1px solid var(--border);
	padding: 12px 8px 12px;
	overflow-y: auto;
	z-index: 1030;
	display: flex; flex-direction: column;
}
.app-sidebar::-webkit-scrollbar { width: 5px; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 4px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }

.app-main {
	margin-left: var(--sidebar-w);
	width: calc(100% - var(--sidebar-w));
	display: flex; flex-direction: column;
	background: var(--bg-deep);
	min-height: 100vh;
}
.app-content {
	flex: 1 0 auto;
	padding: 28px 36px 64px;
	max-width: 1600px;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}
.app-content > .container {
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* ---------- Sidebar brand ---------- */
.sb-brand {
	display: flex; align-items: center; gap: 12px;
	padding: 8px 8px 16px;
	margin: 0 0 6px;
	border-bottom: 1px solid var(--border);
	text-decoration: none;
}
.sb-brand:hover { text-decoration: none; }
.sb-brand .logo-mark {
	width: 64px; height: 64px;
	display: block;
	object-fit: contain;
	flex-shrink: 0;
	filter: drop-shadow(0 6px 16px rgba(255,61,139,.45));
	background: transparent;
	transition: transform .25s ease;
}
.sb-brand:hover .logo-mark {
	transform: rotate(-6deg) scale(1.05);
}
.sb-brand .logo-text {
	font-family: 'Inter', system-ui, sans-serif;
	color: #fff;
	font-weight: 800;
	letter-spacing: .2px;
	font-size: 22px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	text-transform: lowercase;
}

/* ---------- Sidebar menu ---------- */
.sb-nav { flex: 1 1 auto; }
.sb-menu { list-style: none; padding: 0; margin: 0; }
.sb-menu li a {
	display: flex; align-items: center; gap: 13px;
	padding: 10px 13px;
	color: var(--text-dim);
	border-radius: 10px;
	font-weight: 500;
	font-size: 14px;
	transition: background .12s, color .12s;
	min-height: 40px;
	white-space: nowrap;
	overflow: hidden;
}
.sb-menu li a > i {
	width: 20px; height: 20px;
	flex-shrink: 0; text-align: center;
	color: var(--text-dim); font-size: 15px;
	display: inline-flex; align-items: center; justify-content: center;
}
.sb-menu li a > span {
	flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.sb-menu li a:hover {
	background: var(--panel);
	color: #fff;
}
.sb-menu li a:hover > i { color: #fff; }
.sb-menu li.active > a,
.sb-menu li a.active {
	background: var(--accent);
	color: #fff;
	font-weight: 600;
}
.sb-menu li.active > a > i,
.sb-menu li a.active > i { color: #fff; }

/* ---------- Sidebar footer block ---------- */
.sb-footer {
	flex-shrink: 0;
	padding: 12px 8px 10px;
	margin-top: 12px;
	border-top: 1px solid var(--border);
	display: flex; flex-direction: column; gap: 8px;
}
.sb-cta {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff !important;
	border: none;
	padding: 9px 14px;
	border-radius: 999px;
	font-weight: 700; font-size: 13px;
	box-shadow: 0 4px 14px rgba(255,61,139,.30);
	text-decoration: none;
	transition: filter .15s, transform .12s;
}
.sb-cta:hover { filter: brightness(1.1); color: #fff !important; transform: translateY(-1px); }
.sb-lang {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--panel);
	border: 1px solid var(--border-2);
	color: var(--text);
	padding: 7px 14px;
	border-radius: 999px;
	font-weight: 600; font-size: 12.5px;
	cursor: pointer;
	transition: background .12s, border-color .12s;
}
.sb-lang i { color: var(--text-dim); font-size: 12px; }
.sb-lang:hover { background: var(--panel-2); border-color: var(--accent); }

.sb-links {
	list-style: none; padding: 0 6px; margin: 6px 0 0;
	display: flex; flex-direction: column; gap: 2px;
}
.sb-links li a {
	display: block; padding: 4px 0;
	color: var(--text-mute); font-size: 11.5px;
	transition: color .12s;
}
.sb-links li a:hover { color: var(--text); }

.sb-social {
	display: flex; gap: 6px; padding: 8px 4px 4px;
	border-top: 1px solid var(--border);
	margin-top: 6px;
}
.sb-social a {
	width: 28px; height: 28px;
	border-radius: 8px;
	background: var(--panel);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--text-dim); font-size: 12px;
	transition: background .12s, color .12s;
}
.sb-social a:hover { background: var(--accent); color: #fff; }

.sb-copy {
	color: var(--text-mute); font-size: 10.5px;
	padding: 6px 4px 0;
	letter-spacing: .3px;
}

/* ---------- Top bar ---------- */
.top-bar {
	display: flex; align-items: center; gap: 12px;
	padding: 12px 28px;
	height: var(--topbar-h);
	border-bottom: 1px solid var(--border);
	background: var(--bg-deep);
	position: sticky; top: 0; z-index: 1010;
}
.tb-burger {
	display: none;
	width: 36px; height: 36px;
	background: var(--panel); border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	align-items: center; justify-content: center;
	cursor: pointer; flex-shrink: 0;
}
.tb-burger:hover { background: var(--panel-2); }
.tb-logo-mob {
	display: none;
	flex-shrink: 0;
}
.tb-logo-mob .logo-mark {
	width: 48px; height: 48px;
	display: block;
	object-fit: contain;
	background: transparent;
	filter: drop-shadow(0 3px 12px rgba(255,61,139,.45));
}

.tb-search {
	position: relative;
	flex: 1; max-width: 640px;
	margin: 0 auto;
}
.tb-search-ico {
	position: absolute; left: 16px; top: 50%;
	transform: translateY(-50%);
	color: var(--text-mute); font-size: 14px;
	pointer-events: none;
}
.tb-search-input {
	width: 100%;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 11px 18px 11px 42px;
	color: var(--text);
	font-size: 14px;
	outline: none;
	transition: border-color .12s, background .12s;
}
.tb-search-input::placeholder { color: var(--text-mute); }
.tb-search-input:focus {
	border-color: var(--accent);
	background: var(--panel-2);
}

.tb-actions {
	display: flex; align-items: center; gap: 8px;
	flex-shrink: 0;
}
.tb-icon {
	width: 40px; height: 40px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 10px;
	color: var(--text-dim);
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; font-size: 16px;
	transition: background .12s, color .12s, border-color .12s;
}
.tb-icon:hover { background: var(--panel); color: #fff; border-color: var(--border-2); }
.tb-login {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff !important;
	font-weight: 700; font-size: 13.5px;
	padding: 9px 22px;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(255,61,139,.30);
	text-decoration: none;
	transition: filter .12s, transform .12s;
}
.tb-login:hover { filter: brightness(1.1); color: #fff !important; transform: translateY(-1px); }

/* User profile in top bar */
.top-bar .user-avatar {
	width: 34px; height: 34px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid var(--accent);
	cursor: pointer;
	flex-shrink: 0;
	margin: 0;
}
.top-bar .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-links {
	background: var(--panel) !important;
	border: 1px solid var(--border) !important;
	border-radius: 10px !important;
	padding: 8px !important;
	color: var(--text) !important;
	min-width: 180px !important;
}
.user-links li { color: var(--text-dim); padding: 6px 8px; border-radius: 6px; font-size: 12.5px; }
.user-links li:hover { background: var(--panel-2); color: #fff; }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	display: block;
	padding: 34px 38px;
	margin: 0 0 22px;
	border-radius: var(--radius-lg);
	background: var(--panel);
	border: 1px solid var(--border);
	overflow: hidden;
}
.hero-text { max-width: 760px; }
.hero-text h1 {
	font-size: clamp(28px, 2.8vw, 42px);
	line-height: 1.05;
	font-weight: 800;
	margin: 0 0 14px;
	color: #fff;
	letter-spacing: -0.5px;
}
.hero-text h1 .accent {
	background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
.hero-text p.lead {
	color: var(--text-dim);
	font-size: 14.5px;
	max-width: 600px;
	margin: 0 0 22px;
	line-height: 1.5;
}

.hero-features {
	display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
	gap: 14px 26px;
	margin-bottom: 24px;
	max-width: 700px;
}
.hero-feature { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hero-feature .icon {
	width: 38px; height: 38px; border-radius: 10px;
	display: grid; place-items: center;
	background: var(--panel-2);
	color: var(--accent);
	font-size: 15px;
	flex-shrink: 0;
	border: 1px solid var(--border-2);
}
.hero-feature .label { color: #fff; font-weight: 700; font-size: 13.5px; line-height: 1.15; }
.hero-feature .sub   { color: var(--text-mute); font-size: 12px; line-height: 1.25; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn-neon {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff !important;
	border: none;
	font-weight: 700; font-size: 14px;
	padding: 11px 24px;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(255,61,139,.30);
	transition: transform .12s, box-shadow .12s, filter .12s;
	display: inline-flex; align-items: center; gap: 7px;
	text-decoration: none;
}
.btn-neon:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(255,61,139,.45);
	color: #fff !important;
	filter: brightness(1.05);
}
.btn-ghost {
	background: var(--panel-2);
	color: var(--text) !important;
	border: 1px solid var(--border-2);
	padding: 11px 22px;
	border-radius: 999px;
	font-weight: 600; font-size: 14px;
	display: inline-flex; align-items: center; gap: 7px;
	text-decoration: none;
	transition: background .15s, border-color .15s;
}
.btn-ghost:hover {
	background: var(--panel-3);
	border-color: var(--accent);
	color: #fff !important;
}

/* ---------- Category strip (CrazyGames-style) ---------- */
.cat-strip {
	margin: 0 0 8px;
	position: relative;
}
.cat-strip-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(180px, 1fr);
	gap: 14px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 4px 2px 10px;
	-webkit-overflow-scrolling: touch;
}
.cat-strip-track::-webkit-scrollbar { display: none; }

.cat-tile {
	position: relative;
	display: block;
	padding: 0;
	height: 110px;
	border-radius: 16px;
	color: #fff;
	text-decoration: none;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0,0,0,.4);
	transition: transform .15s ease, box-shadow .15s ease;
	isolation: isolate;
}
/* Subtle gloss overlay (no dark vignette around icon) */
.cat-tile::before {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(0,0,0,.18) 100%);
	z-index: 1;
	pointer-events: none;
}
.cat-tile:hover {
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 14px 30px rgba(0,0,0,.55);
	color: #fff; text-decoration: none;
}
.cat-tile:hover .cat-icon {
	transform: translateY(-50%) scale(1.10) rotate(6deg);
}

/* Icon: decorative element on the RIGHT side, slightly overflowing */
.cat-icon {
	position: absolute;
	right: -8px;
	top: 50%;
	transform: translateY(-50%);
	height: 130%;
	width: auto;
	max-width: 55%;
	object-fit: contain;
	object-position: center;
	pointer-events: none;
	user-select: none;
	z-index: 2;
	filter: drop-shadow(0 6px 14px rgba(0,0,0,.55));
	transition: transform .3s ease, filter .3s ease;
	transform-origin: 50% 50%;
}

/* Fallback emoji on the right */
.cat-emoji {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 64px;
	line-height: 1;
	z-index: 2;
	filter: drop-shadow(0 4px 10px rgba(0,0,0,.5));
	pointer-events: none;
}

/* Title on the LEFT */
.cat-name {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	max-width: 55%;
	text-align: left;
	font-weight: 800;
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: .3px;
	text-shadow: 0 2px 6px rgba(0,0,0,.55);
	z-index: 3;
}

/* ---------- Promo cards (legacy, kept for fallback) ---------- */
.promo-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0,1fr));
	gap: 14px;
	margin: 0 0 22px;
}
.promo-card {
	overflow: hidden;
	border-radius: var(--radius-lg);
	padding: 20px 22px;
	min-height: 116px;
	display: flex; align-items: center; gap: 16px;
	border: 1px solid var(--border-2);
	background: var(--panel);
	transition: transform .15s, border-color .15s;
	color: #fff;
	text-decoration: none;
	min-width: 0;
}
.promo-card:hover {
	transform: translateY(-2px);
	border-color: var(--accent);
	color: #fff; text-decoration: none;
}
.promo-card .promo-emoji {
	font-size: 38px; line-height: 1; flex-shrink: 0;
	width: 60px; height: 60px;
	display: grid; place-items: center;
	border-radius: 14px;
	background: var(--panel-2);
	border: 1px solid var(--border-2);
}
.promo-card .promo-body { flex: 1; min-width: 0; }
.promo-card h3 {
	font-size: 15px; font-weight: 800; line-height: 1.25;
	color: #fff; margin: 0 0 10px;
	overflow: hidden; text-overflow: ellipsis;
}
.promo-card .promo-btn {
	display: inline-block;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	border-radius: 999px;
	padding: 6px 16px;
	font-weight: 700; font-size: 12.5px;
	box-shadow: 0 4px 12px rgba(255,61,139,.30);
}

/* ---------- Section headings + tab pills ---------- */
.section-head {
	display: flex; align-items: center; justify-content: space-between;
	margin: 18px 0 12px;
	gap: 10px;
}
/* Shared title styles */
.item-title,
h3.item-title,
.section-head h3 {
	font-size: 22px !important;
	font-weight: 800 !important;
	color: #fff !important;
	display: flex !important;
	align-items: center;
	gap: 12px;
	text-transform: uppercase;
	letter-spacing: .6px;
	border-bottom: none !important;
	padding-bottom: 0 !important;
	line-height: 1.2;
}
.item-title i,
.section-head h3 i { color: var(--accent); font-size: 18px; }

/* Standalone heading (POPULAR / YOU MAY LIKE) */
h3.item-title,
.item-title {
	margin: 52px 0 28px !important;
}

/* Heading inside section-head wrapper (NEW GAMES) */
.section-head { margin: 52px 0 28px; }
.section-head .item-title,
.section-head h3.item-title { margin: 0 !important; }

/* First section heading after category strip — slightly tighter top */
.cat-strip + .container .section-head:first-of-type { margin-top: 32px; }
.cat-strip + .container > .game-container > .item-title:first-of-type,
.cat-strip + .container > .game-container > .section-head:first-of-type { margin-top: 32px; }

.tab-pills {
	display: inline-flex; gap: 4px;
	background: var(--panel);
	border: 1px solid var(--border);
	padding: 4px;
	border-radius: 999px;
	flex-shrink: 0;
}
.tab-pills .tab-pill {
	padding: 8px 18px;
	border-radius: 999px;
	color: var(--text-dim);
	font-weight: 600; font-size: 14px;
	cursor: pointer;
	transition: background .12s, color .12s;
	background: transparent; border: none;
	white-space: nowrap;
}
.tab-pills .tab-pill:hover { color: #fff; }
.tab-pills .tab-pill.active {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	box-shadow: 0 4px 12px rgba(255,61,139,.35);
}

/* ---------- Game grid (CrazyGames-style) ---------- */
/* Override Bootstrap .row with CSS grid for the game listings */
.game-container .row,
#section-new-games,
#section-popular-games,
#section-recommended,
.row[id^="section-"] {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
	margin: 0 0 12px !important;
	padding: 0;
	width: 100%;
}
.item-grid {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	flex: unset !important;
	width: 100%;
	min-width: 0;
}

.game-tile {
	display: block;
	text-decoration: none;
	border-radius: 12px;
	overflow: hidden;
	background: #0d0c15;
	transition: transform .15s ease, box-shadow .15s ease;
}
.game-tile:hover {
	transform: translateY(-3px) scale(1.025);
	box-shadow: 0 12px 28px rgba(0,0,0,.55), 0 0 0 2px var(--accent);
	text-decoration: none;
}

.game-thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #0d0c15;
}
.game-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.game-tile:hover .game-thumb img { transform: scale(1.06); }

/* Title overlay on bottom (gradient), always visible */
.game-overlay {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 34px 14px 12px;
	background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.88) 100%);
	pointer-events: none;
}
.game-name {
	display: block;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0,0,0,.5);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.game-tile:hover .game-name { color: #fff; }

/* Play indicator on hover */
.game-thumb::after {
	content: "▶";
	position: absolute; inset: 0;
	display: grid; place-items: center;
	color: #fff; font-size: 30px;
	text-shadow: 0 0 14px rgba(255,61,139,.7);
	background: rgba(0,0,0,.35);
	opacity: 0; transition: opacity .15s;
	z-index: 1;
}
.game-tile:hover .game-thumb::after { opacity: 1; }

/* Tag badges (top-left) */
.game-badge {
	position: absolute; top: 9px; left: 9px;
	display: inline-flex; align-items: center;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 11.5px; font-weight: 800;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: #fff;
	z-index: 2;
	box-shadow: 0 2px 8px rgba(0,0,0,.5);
	line-height: 1.4;
}
.game-badge.badge-hot     { background: #ff3d00; }
.game-badge.badge-top     { background: var(--accent); }
.game-badge.badge-new     { background: #ff5b29; }
.game-badge.badge-updated { background: #00b894; }
.game-badge.badge-original{ background: #7c3aed; }

/* Empty grid: hide section if no children */
.row:empty,
.game-container .row:empty { display: none !important; }
.row:empty + .load-more-games-wrapper { display: none; }
.item-title:has(+ .row:empty) { display: none; }

/* Backwards compatibility (in case widgets still use old classes) */
.list-game { background: var(--panel); border-radius: 10px; overflow: hidden; }
.list-thumbnail { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.list-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.list-content { padding: 6px 8px; }
.list-title { color: #fff; font-size: 11.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Load more */
.btn-load-more-games {
	display: inline-flex !important; align-items: center; gap: 7px;
	background: var(--panel) !important;
	color: var(--text) !important;
	border: 1px solid var(--border) !important;
	border-radius: 999px !important;
	padding: 9px 20px !important;
	font-weight: 600; font-size: 12.5px !important;
}
.btn-load-more-games:hover {
	background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
	color: #fff !important; border-color: transparent !important;
}
.load-more-games-wrapper { text-align: center; margin: 14px 0; }

/* ---------- Inner page sidebar (game/post pages) ---------- */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.widget {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 14px;
}
.widget-title {
	font-size: 13px; font-weight: 800; color: #fff;
	text-transform: uppercase; letter-spacing: .6px;
	margin: 0 0 12px; display: flex; align-items: center; gap: 7px;
}
.widget-title i { color: var(--accent); }

/* ---------- Forms ---------- */
.form-control {
	background: #0d0c15 !important; border: 1px solid var(--border) !important;
	color: var(--text) !important; border-radius: var(--radius-sm) !important;
}
.form-control:focus {
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 3px rgba(255,61,139,.18) !important;
}
.btn-primary {
	background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
	border: none !important; color: #fff !important;
	font-weight: 700 !important; border-radius: 999px !important;
	padding: 9px 20px !important;
}
.btn-secondary {
	background: var(--panel) !important; border: 1px solid var(--border) !important;
	color: var(--text) !important;
}

.container { max-width: 100% !important; padding: 0 !important; }
.game-frame, #game-frame, .iframe-game {
	border-radius: var(--radius-md) !important;
	overflow: hidden; border: 1px solid var(--border);
}

/* ---------- Backdrop ---------- */
.sb-backdrop {
	display: none; position: fixed; inset: 0;
	background: rgba(0,0,0,.65); z-index: 1020;
}
.sb-backdrop.show { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
	.game-container .row,
	.row[id^="section-"] {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
	}
}

@media (max-width: 1100px) {
	.hero-features { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.promo-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.cat-strip-track { grid-auto-columns: minmax(170px, 1fr); }
	.game-container .row,
	.row[id^="section-"] {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
	}
}

@media (max-width: 992px) {
	:root { --sidebar-w: 0px; }
	.app-sidebar {
		transform: translateX(-100%);
		transition: transform .25s ease;
		width: 270px;
		max-width: 86vw;
	}
	.app-sidebar.open { transform: translateX(0); }
	.app-main { margin-left: 0; width: 100%; }
	.tb-burger, .tb-logo-mob { display: inline-flex; }
	.tb-search { max-width: none; margin: 0; }
	.app-content { padding: 22px 24px 50px; }
	.hero { padding: 26px 22px; }
	.hero-text h1 { font-size: 28px; }
	.item-title { font-size: 20px; margin: 44px 0 24px; }
	.section-head h3 { font-size: 20px; }
	.section-head { margin: 44px 0 24px; }
	.game-container .row,
	.row[id^="section-"] {
		grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
		gap: 16px;
	}
}

@media (max-width: 720px) {
	.promo-row { grid-template-columns: 1fr; }
	.cat-strip-track { grid-auto-columns: 170px; }
	.cat-tile { height: 96px; }
	.cat-name { font-size: 16px; max-width: 50%; left: 14px; right: auto; }
	.cat-emoji { font-size: 52px; right: 10px; left: auto; }
	.section-head { flex-direction: column; align-items: flex-start; gap: 10px; margin: 36px 0 20px; }
	.tab-pills { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.tab-pills::-webkit-scrollbar { display: none; }
	.app-content { padding: 18px 16px 40px; }
	.game-container .row,
	.row[id^="section-"] {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 14px;
	}
	.game-name { font-size: 14px; }
	.game-badge { font-size: 11px; padding: 3px 8px; }
	.item-title { font-size: 18px; margin: 36px 0 20px; }
	.section-head h3 { font-size: 18px; }
}

@media (max-width: 576px) {
	.top-bar { padding: 8px 12px; gap: 6px; }
	.cat-strip-track { grid-auto-columns: 155px; gap: 10px; }
	.cat-tile { height: 88px; border-radius: 14px; }
	.cat-name { font-size: 15px; max-width: 50%; left: 12px; right: auto; }
	.cat-emoji { font-size: 44px; right: 8px; left: auto; }
	.tb-search-input { font-size: 13px; padding: 9px 14px 9px 38px; }
	.tb-icon { width: 36px; height: 36px; font-size: 14px; }
	.tb-login { padding: 8px 16px; font-size: 13px; }
	.tb-actions .tb-icon[aria-label="Notifications"],
	.tb-actions .tb-icon[aria-label="Favorites"] { display: none; }
	.hero-features { grid-template-columns: 1fr; }
	.hero-text h1 { font-size: 24px; }
	.hero-text p.lead { font-size: 13.5px; }
	.app-content { padding: 14px 14px 32px; }
	.hero { padding: 20px 18px; border-radius: 14px; }
	.promo-card { padding: 16px; }
	.promo-card .promo-emoji { width: 50px; height: 50px; font-size: 30px; }
	.game-container .row,
	.row[id^="section-"] {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 10px;
	}
	.game-name { font-size: 13px; }
	.item-title { font-size: 17px; margin: 32px 0 18px; }
}

@media (max-width: 380px) {
	.game-container .row,
	.row[id^="section-"] {
		grid-template-columns: 1fr !important;
	}
}

/* ========== Game Player (desktop iframe + mobile hero + fullscreen overlay) ========== */

/* Desktop iframe wrapper */
.pz-player-desktop {
	position: relative;
	width: 100%;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: #000;
	overflow: hidden;
}
.pz-player-desktop iframe {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	border: none;
}

/* Mobile hero (hidden on desktop) */
.pz-player-mobile { display: none; }

.pz-mobile-hero {
	position: relative;
	width: 100%;
	min-height: 480px;
	border-radius: 14px;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-color: var(--panel);
	display: flex;
	align-items: center;
	justify-content: center;
}
.pz-mobile-hero-overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, rgba(7,8,15,.55) 0%, rgba(7,8,15,.92) 80%, var(--bg-deep) 100%),
		linear-gradient(180deg, rgba(7,8,15,.4) 0%, rgba(7,8,15,.7) 100%);
	backdrop-filter: blur(2px);
}
.pz-mobile-hero-content {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 32px 22px;
	width: 100%;
	max-width: 360px;
}
.pz-mobile-icon {
	width: 96px;
	height: 96px;
	margin: 0 auto 18px;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 12px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
	background: var(--panel);
}
.pz-mobile-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.pz-mobile-title {
	font-size: 24px !important;
	font-weight: 800 !important;
	color: #fff !important;
	margin: 0 0 12px !important;
	letter-spacing: -.3px;
	line-height: 1.2;
}
.pz-mobile-meta {
	display: flex;
	justify-content: center;
	gap: 14px;
	margin-bottom: 22px;
	flex-wrap: wrap;
}
.pz-mobile-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text-dim);
	font-size: 14px;
	font-weight: 600;
}
.pz-mobile-meta-item i { color: var(--accent); font-size: 13px; }
.pz-mobile-meta-link { text-decoration: none; }
.pz-mobile-meta-link:hover { color: #fff; text-decoration: none; }

.pz-mobile-play-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 300px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	border: none;
	font-weight: 700;
	font-size: 17px;
	padding: 16px 32px;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 10px 28px rgba(255,61,139,.40);
	transition: transform .12s, box-shadow .15s, filter .12s;
}
.pz-mobile-play-btn:hover,
.pz-mobile-play-btn:active {
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(255,61,139,.55);
	filter: brightness(1.05);
}
.pz-mobile-play-btn i { font-size: 22px; }

/* Fullscreen overlay */
.pz-fullscreen-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pz-fullscreen-iframe {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}
.pz-fullscreen-exit {
	position: absolute;
	top: env(safe-area-inset-top, 12px);
	left: env(safe-area-inset-left, 12px);
	margin-top: 12px;
	margin-left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(0,0,0,.7);
	border: 1px solid rgba(255,255,255,.18);
	color: #fff;
	padding: 8px 14px 8px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.pz-fullscreen-exit i { font-size: 14px; }
.pz-fullscreen-exit:hover { background: rgba(0,0,0,.85); }

/* ---- Game title + tags responsive visibility ---- */
.game-title-desktop {
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 800;
	color: #fff;
	margin: 18px 0 12px;
}
.game-tags-desktop {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.game-tag-primary {
	background: var(--accent);
	color: #fff !important;
	padding: 5px 14px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 13px;
	text-decoration: none;
}
.game-tag-primary:hover { color: #fff !important; text-decoration: none; filter: brightness(1.1); }
.game-tag-secondary {
	background: var(--panel-2);
	color: var(--text-dim);
	padding: 5px 14px;
	border-radius: 999px;
	font-size: 13px;
	border: 1px solid var(--border);
}

/* ---- Mobile breakpoint: switch to hero layout ---- */
@media (max-width: 720px) {
	.pz-player-desktop { display: none; }
	.pz-player-mobile { display: block; }
	/* Hide actions/title on mobile — hero already shows them */
	.game-page-main > .game-actions { display: none !important; }
	.game-page-main > .game-title-desktop { display: none; }
	.game-page-main > .game-tags-desktop { display: none; }
}

@media (max-width: 480px) {
	.pz-mobile-hero { min-height: 460px; border-radius: 12px; }
	.pz-mobile-icon { width: 84px; height: 84px; border-radius: 16px; margin-bottom: 14px; }
	.pz-mobile-title { font-size: 22px !important; }
	.pz-mobile-meta-item { font-size: 13px; }
	.pz-mobile-play-btn { font-size: 16px; padding: 14px 28px; }
	.pz-mobile-play-btn i { font-size: 20px; }
}

/* ========== Game Page 2-column layout ========== */

.game-page-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	grid-template-areas:
		"main aside"
		"bottom bottom";
	gap: 20px;
	width: 100%;
	max-width: 1500px;
	margin: 0 auto;
}

.game-page-main {
	grid-area: main;
	min-width: 0;
}

.game-page-aside {
	grid-area: aside;
	min-width: 0;
	max-width: 280px;
	align-self: start;
	position: sticky;
	top: calc(var(--topbar-h) + 12px);
	max-height: calc(100vh - var(--topbar-h) - 24px);
	overflow-y: auto;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: var(--border-2) transparent;
}
.game-page-aside::-webkit-scrollbar { width: 6px; }
.game-page-aside::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
.game-page-aside::-webkit-scrollbar-track { background: transparent; }

.game-page-aside-title {
	font-size: 14px !important;
	font-weight: 800 !important;
	color: #fff !important;
	display: flex !important;
	align-items: center;
	gap: 8px;
	text-transform: uppercase;
	letter-spacing: .5px;
	margin: 0 0 12px !important;
	padding: 0 4px;
}
.game-page-aside-title i { color: var(--accent); font-size: 13px; }

.game-page-aside-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.aside-card {
	position: relative;
	display: block;
	border-radius: 10px;
	overflow: hidden;
	background: #0d0c15;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
	aspect-ratio: 4 / 3;
}
.aside-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.aside-card:hover {
	transform: scale(1.04);
	box-shadow: 0 8px 20px rgba(0,0,0,.55), 0 0 0 2px var(--accent);
	text-decoration: none;
}
.aside-card:hover img { transform: scale(1.05); }
.aside-card-name {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 18px 8px 6px;
	background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.92) 100%);
	color: #fff;
	font-weight: 600;
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

.game-page-bottom {
	grid-area: bottom;
	min-width: 0;
	margin-top: 12px;
}

/* On mobile related are shown in bottom row instead of sidebar */
.game-page-mobile-related { display: none; }

@media (max-width: 1100px) {
	.game-page-layout {
		grid-template-columns: minmax(0, 1fr) 240px;
		gap: 16px;
	}
	.game-page-aside { max-width: 240px; }
}

@media (max-width: 900px) {
	.game-page-layout {
		grid-template-columns: 1fr;
		grid-template-areas:
			"main"
			"bottom"
			"aside";
		gap: 16px;
	}
	.game-page-aside { display: none; }
	.game-page-mobile-related { display: block; margin-bottom: 16px; }
}

/* ========== Game Actions (YouTube-style minimal) ========== */

.game-actions {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 14px 0 8px;
}

/* Vote group: like + dislike joined together like YouTube */
.ga-vote-group {
	display: inline-flex;
	align-items: stretch;
	background: #1f1d2c;
	border-radius: 999px;
	overflow: hidden;
	height: 42px;
}

.ga-vote-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: none;
	color: #fff;
	padding: 0 18px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background .15s, color .15s;
	user-select: none;
	position: relative;
}
.ga-vote-btn i { font-size: 16px; line-height: 1; }
.ga-vote-btn:hover { background: rgba(255,255,255,.08); }
.ga-vote-btn:disabled { opacity: .6; cursor: wait; }
.ga-vote-btn .ga-count {
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	font-size: 14px;
	line-height: 1;
}

.ga-vote-btn.ga-like { border-radius: 999px 0 0 999px; padding-right: 16px; }
.ga-vote-btn.ga-dislike {
	border-radius: 0 999px 999px 0;
	padding-left: 16px;
	padding-right: 18px;
	position: relative;
}
.ga-vote-btn.ga-dislike::before {
	content: "";
	position: absolute;
	left: 0; top: 10px; bottom: 10px;
	width: 1px;
	background: rgba(255,255,255,.15);
}

.ga-vote-btn.ga-like.active i { color: #fff; }
.ga-vote-btn.ga-like.active { background: rgba(34,197,94,.18); color: #4ade80; }
.ga-vote-btn.ga-like.active i { color: #4ade80; }

.ga-vote-btn.ga-dislike.active { background: rgba(239,68,68,.18); color: #f87171; }
.ga-vote-btn.ga-dislike.active i { color: #f87171; }

/* Favorite circle button */
.ga-fav-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	background: #1f1d2c;
	border: none;
	color: #fff;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s, transform .12s;
	user-select: none;
	padding: 0;
}
.ga-fav-btn i { font-size: 17px; line-height: 1; transition: color .15s, transform .15s; }
.ga-fav-btn:hover { background: rgba(255,255,255,.12); }
.ga-fav-btn:hover i { transform: scale(1.15); color: var(--accent); }
.ga-fav-btn.active { background: rgba(255,61,139,.18); }
.ga-fav-btn.active i { color: var(--accent); }

@media (max-width: 480px) {
	.game-actions { gap: 8px; }
	.ga-vote-group { height: 38px; }
	.ga-vote-btn { padding: 0 14px; font-size: 13px; gap: 6px; }
	.ga-vote-btn.ga-like { padding-right: 12px; }
	.ga-vote-btn.ga-dislike { padding-left: 12px; padding-right: 14px; }
	.ga-vote-btn i { font-size: 14px; }
	.ga-fav-btn { width: 38px; height: 38px; }
	.ga-fav-btn i { font-size: 15px; }
}

/* ========== Category Feed (infinite scroll feel) ========== */

.feed-container {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.feed-section {
	padding: 0;
}

.feed-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
	padding: 0 2px;
}

.feed-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 19px;
	font-weight: 800;
	color: #fff;
	margin: 0;
	letter-spacing: .2px;
}

.feed-emoji {
	font-size: 22px;
	line-height: 1;
}

.feed-more {
	color: var(--text-mute);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	transition: color .12s;
	flex-shrink: 0;
}
.feed-more:hover {
	color: var(--accent);
	text-decoration: none;
}

/* Horizontal scroll row */
.feed-row {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 14px;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 4px 0 12px;
	scroll-snap-type: x proximity;
	scroll-padding-left: 2px;
}
.feed-row::-webkit-scrollbar {
	display: none;
}

/* Game card inside feed */
.feed-card {
	flex: 0 0 195px !important;
	width: 195px !important;
	min-width: 195px !important;
	max-width: 195px !important;
	display: block !important;
	border-radius: 14px;
	overflow: hidden;
	position: relative;
	background: #0d0c15;
	text-decoration: none !important;
	scroll-snap-align: start;
	transition: transform .15s ease, box-shadow .15s ease;
}
.feed-card:hover {
	transform: translateY(-3px) scale(1.03);
	box-shadow: 0 12px 28px rgba(0,0,0,.55), 0 0 0 2px var(--accent);
	text-decoration: none !important;
	color: #fff;
}

.feed-card img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block !important;
	transition: transform .3s ease;
}
.feed-card:hover img {
	transform: scale(1.06);
}

/* Play indicator on hover (desktop only) */
.feed-card::after {
	content: "\25B6";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 30px;
	text-shadow: 0 0 18px rgba(255,61,139,.7);
	background: rgba(0,0,0,.35);
	opacity: 0;
	transition: opacity .15s;
	z-index: 1;
	pointer-events: none;
	border-radius: 14px;
}
.feed-card:hover::after {
	opacity: 1;
}

/* Game name overlay (always visible) */
.feed-card-name {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 30px 12px 10px;
	background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.92) 100%);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	z-index: 2;
	pointer-events: none;
}

/* ---- Feed responsive ---- */

@media (max-width: 992px) {
	.feed-card { flex: 0 0 175px !important; width: 175px !important; min-width: 175px !important; max-width: 175px !important; }
	.feed-title { font-size: 17px; }
	.feed-row { gap: 12px; }
}

@media (max-width: 720px) {
	.feed-card { flex: 0 0 155px !important; width: 155px !important; min-width: 155px !important; max-width: 155px !important; border-radius: 12px; }
	.feed-card img { aspect-ratio: 4 / 3; }
	.feed-title { font-size: 16px; }
	.feed-emoji { font-size: 20px; }
	.feed-row { gap: 10px; }
	.feed-card-name { font-size: 13px; padding: 26px 10px 8px; }
	.feed-container { gap: 2px; }
	.feed-card::after { display: none; }
}

@media (max-width: 480px) {
	.feed-card { flex: 0 0 140px !important; width: 140px !important; min-width: 140px !important; max-width: 140px !important; border-radius: 11px; }
	.feed-title { font-size: 15px; }
	.feed-emoji { font-size: 18px; }
	.feed-row { gap: 8px; }
	.feed-card-name { font-size: 12px; padding: 22px 8px 7px; }
	.feed-header { margin-bottom: 10px; }
	.feed-more { font-size: 12px; }
	.feed-container { gap: 0; }
}

@media (max-width: 380px) {
	.feed-card { flex: 0 0 130px !important; width: 130px !important; min-width: 130px !important; max-width: 130px !important; border-radius: 10px; }
	.feed-card-name { font-size: 11.5px; }
}
