.appImage {
	opacity: 0;
	animation: fade-in-bottom 1s;
}

.appsContainer {
	top: 65px;
	position: absolute;
	max-width: 1070px;
	display: inline-flex;
	flex-wrap: wrap;
	flex-direction: row;
	gap: 20px;
	justify-content: flex-start;
}

.appsContainer img {
	width: 198px;
	height: 128px;
	object-fit: cover;
	border-radius: 14px;
	cursor: pointer;
	transition: 0.2s ease-in-out !important;
}

.appsContainer img:hover {
	transform: scale(1.05);
	transition: 0.2s ease-in-out !important;
}

.appsContainer img:active {
	transition: 0s;
	outline: 2px solid var(--image-outline-color);
}

.gameImage {
	opacity: 0;
	animation: fade-in-bottom 1s;
}

.appsContainer {
	opacity: 1;
}

/* ── Poki-style games grid (edge-to-edge, square tiles, 2x2 featured) ─── */
.gameContain {
	top: 7.5em;
	position: absolute;
	left: 85px !important;
	right: 0 !important;
	translate: 0 !important;
	transform: none !important;
	width: auto !important;
	max-width: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
	grid-auto-flow: dense;
	gap: 8px;
	margin: 0;
	padding: 0 8px 4em 0;
	box-sizing: border-box;
}

/* Each tile is a pure rounded square; the title overlays the bottom. */
.gameAnchor {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 18px;
	overflow: hidden;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Random featured tiles span 2x2 (set via data-big in json-loader.js) */
.gameAnchor[data-big] {
	grid-column: span 2;
	grid-row: span 2;
}

.gameThumb {
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.gameContain img,
.gameImage {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gameTitle {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 22px 10px 8px;
	font-family: 'DM Sans';
	font-size: 12.5px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

.gameAnchor[data-big] .gameTitle {
	font-size: 15px;
	padding: 30px 14px 12px;
}

/* Hover: pop the whole tile + deepen shadow (Poki feel) */
.gameAnchor:hover {
	transform: scale(1.05);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
	z-index: 2;
}

.gameAnchor:active {
	outline: 2px solid var(--image-outline-color);
	outline-offset: -2px;
}

/* ── Game view: ~half-height player (85px from left) with a banner ad to its
   right and below it; full-width games grid with infinite scroll. ── */
#gameStage {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	background: transparent; /* let body's canvas background (#000) + particles show through */
	overflow-y: auto;
	display: block;
	padding: 20px 16px 5em 85px; /* iframe sits 85px from the left */
	box-sizing: border-box;
}

/* Whole top block (player + side ad + bottom banner) floats left so the
   games grid wraps around it — to the right of the ad and below. */
#gameLeft {
	float: left;
	width: calc(min(58vw, 900px) + 275px); /* player + gap + 300 side ad */
	margin: 0 14px 14px 0;
}

/* Top row: player (left) + side banner (right). */
#gameTop {
	display: flex;
	gap: 14px;
	align-items: stretch;
}

#gameMain {
	width: min(58vw, 900px);
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
}

#gamePlayer {
	position: relative;
	width: 100%;
	height: 57.5vh; /* about half the screen height */
	background: #000;
	border-radius: 14px 14px 0 0;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

#gamePlayer iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

#gameBar {
	width: 100%;
	height: 50px;
	background: #1b1b1b;
	border-radius: 0 0 14px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 14px;
	box-sizing: border-box;
}

#gameBarTitle {
	color: #fff;
	font-family: 'DM Sans';
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-right: 12px;
}

#gameBarActions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

#gameBarActions button {
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

#gameBarActions button:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* Ad banner placeholders. Drop real ad units inside #gameSideAd / #gameBottomAd. */
.game-ad {
	background: rgba(255, 255, 255, 0.03);
	border: 1px dashed rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.game-ad span {
	font-family: 'DM Sans';
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.3);
}

#gameSideAd {
	width: 261px;
	flex-shrink: 0; /* height stretches to match the player via #gameTop */
}

#gameBottomAd {
	width: 100%;
	height: 180px;
	margin: 14px 0 0;
}

#gameRecsTitle {
	display: none;
}

/* ── Game bar stats (views + like button) ── */
#gameBarStats {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 10px;
	flex-shrink: 0;
}

#gameStatViews {
	display: flex;
	align-items: center;
	gap: 4px;
	color: rgba(255, 255, 255, 0.45);
	font-family: 'DM Sans';
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
}

#gameStatViews .material-symbols-outlined {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.35);
}

#gameLikeBtn {
	display: flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	font-family: 'DM Sans';
	font-size: 13px;
	font-weight: 500;
	padding: 5px 9px;
	border-radius: 8px;
	transition: background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

#gameLikeBtn .material-symbols-outlined {
	font-size: 15px;
	transition: color 0.15s ease;
}

#gameLikeBtn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

#gameLikeBtn.stats-liked {
	color: #ff4d6d;
}

#gameLikeBtn.stats-liked .material-symbols-outlined {
	color: #ff4d6d;
}

@media (max-width: 500px) {
	#gameBarStats { display: none; }
}

/* Games grid: inline-block tiles so they wrap around the floated player+ad
   block (to the right of the ad, then below). Infinite scroll appends here. */
#gameRecs {
	display: block;
	font-size: 0; /* removes inline-block whitespace gaps */
}

/* Ad tiles (gameAnchor) injected into the recs rail by appendRecBatch().
   Always rendered small (data-big is stripped before appending) so they sit
   flush in the inline-block flow without leaving gaps. */
#gameRecs .gameAnchor {
	display: inline-block;
	vertical-align: top;
	width: 124px;
	height: 124px;
	margin: 0 8px 8px 0;
	border-radius: 14px;
	aspect-ratio: unset; /* override the 1/1 from .gameAnchor */
	grid-column: unset;  /* safety — not in a grid here */
	grid-row: unset;
}

.gameRec {
	display: inline-block;
	vertical-align: top;
	width: 124px;
	height: 124px;
	margin: 0 8px 8px 0;
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gameRec img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gameRec:hover {
	transform: translateY(-4px) scale(1.04);
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
	z-index: 1;
}

#recSentinel {
	height: 1px;
	width: 100%;
}

/* Fullscreen: player fills the screen, chrome hidden */
#gamePlayer:fullscreen {
	width: 100vw;
	height: 100vh;
	border-radius: 0;
}

@media (max-width: 900px) {
	#gameStage {
		padding: 12px 10px 4em 70px;
	}
	#gameLeft {
		float: none;
		width: 100%;
		margin: 0 0 12px 0;
	}
	#gameTop {
		flex-direction: column;
	}
	#gameMain {
		width: 100%;
	}
	#gamePlayer {
		height: 52vh;
	}
	#gameSideAd {
		width: 100%;
		height: 120px;
	}
	#gameRecs {
		text-align: center;
	}
}

.scrolltop {
	background-color: var(--scrolltop-background-color);
	backdrop-filter: var(--scrolltop-backdrop-filter);
	width: 49px;
	height: 49px;
	border-radius: 50%;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	transition: 0.3s ease-in-out all;
	opacity: 0;
}

.scrolltop:hover {
	transform: scale(1.1);
}

.scrolltop span.material-symbols-outlined {
	justify-content: center;
	transform: translateY(-10px);
	font-size: 30px;
}

.randomBtn {
	height: 35px;
	padding: 0 20px;
	text-wrap: nowrap;
	background-color: var(--random-btn-background-color);
	border-radius: 10px;
	border: 0;
	text-align: center;
	outline: #ffffff17 1px solid;
	user-select: none;
	cursor: pointer;
	margin-left: auto;
	margin-right: auto;
	position: absolute;
	width: 140px;
	margin-left: -13em;
	font-weight: 200;
	color: #868686;
	font-family: 'DM Sans';
	transition: 0.3s all ease-in-out;
	animation: fade-in-left 1s, searchNeon 8s ease-in-out infinite;
	display: flex;
	align-items: center;
}

.randomBtn:hover {
	background-color: var(--random-btn-hover-background-color);
	outline: var(--border-color) 1px solid;
}

.randomBtn:active {
	background-color: var(--random-btn-active-background-color);
}

.gameSearchInput,
.appsSearchInput,
#gointospace {
	padding-left: 40px;
}


/* NEW!!!!!!!!!!!!!!! */
			/* Floating, vertically-centered, glassmorphic sidebar (index page only) */
			.navbar {
				position: fixed !important;
				top: 50% !important;
				right: auto !important;
				left: 18px !important;
				transform: translateY(-50%);
				height: auto !important;
				width: auto !important;
				padding: 10px 8px !important;
				background: rgba(22, 22, 22, 0.55) !important;
				backdrop-filter: blur(14px) saturate(140%);
				-webkit-backdrop-filter: blur(14px) saturate(140%);
				border: 1px solid rgba(255, 255, 255, 0.08);
				border-radius: 22px !important;
				box-shadow:
					0 10px 30px rgba(0, 0, 0, 0.35),
					0 1px 0 rgba(255, 255, 255, 0.04) inset;
				display: flex;
				flex-direction: column;
				align-items: center;
				gap: 4px;
				transition: transform 0.3s ease, opacity 0.3s ease;
			}
			.navbar:hover {
				background: rgba(22, 22, 22, 0.68) !important;
			}
			.navbar li {
				width: 40px;
				height: 40px;
				display: flex;
				align-items: center;
				justify-content: center;
				margin: 0 !important;
				border-radius: 12px;
				transition: background 0.18s ease, transform 0.18s ease;
				position: relative;
			}
			.navbar li:hover {
				background: rgba(255, 255, 255, 0.08);
				transform: translateY(-1px);
			}
			.navbar li a {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 100%;
				height: 100%;
				color: rgba(255, 255, 255, 0.72);
				text-decoration: none;
				transition: color 0.18s ease;
			}
			.navbar li:hover a,
			.navbar li:hover .material-symbols-outlined,
			.navbar li:hover .fa-brands {
				color: #fff;
			}
			.navbar .material-symbols-outlined,
			.navbar .fa-brands {
				font-size: 22px !important;
				margin: 0 !important;
				transform: none !important;
				color: rgba(255, 255, 255, 0.72);
				transition: color 0.18s ease;
			}
			.navbar li:has(#navactive) {
				background: rgba(255, 255, 255, 0.12);
			}
			.navbar li:has(#navactive)::before {
				content: '';
				position: absolute;
				left: -10px;
				top: 50%;
				transform: translateY(-50%);
				width: 3px;
				height: 18px;
				background: #bdf730;
				border-radius: 2px;
				box-shadow: 0 0 8px rgba(189, 247, 48, 0.6);
			}
			.navbar li:has(#navactive) .material-symbols-outlined {
				color: #fff;
			}
			.navbar .logo {
				width: 42px;
				height: 42px;
				border-radius: 8px;
				animation: logoNeon 8s ease-in-out infinite;
			}
			@keyframes logoNeon {
				0%   { filter: drop-shadow(0 0 4px #bdf730) drop-shadow(0 0 10px #bdf730); }
				20%  { filter: drop-shadow(0 0 4px #00f0ff) drop-shadow(0 0 10px #00f0ff); }
				40%  { filter: drop-shadow(0 0 4px #ff00d4) drop-shadow(0 0 10px #ff00d4); }
				60%  { filter: drop-shadow(0 0 4px #ffaa00) drop-shadow(0 0 10px #ffaa00); }
				80%  { filter: drop-shadow(0 0 4px #b300ff) drop-shadow(0 0 10px #b300ff); }
				100% { filter: drop-shadow(0 0 4px #bdf730) drop-shadow(0 0 10px #bdf730); }
			}
			#particles-js canvas,
			.particles-js-canvas-el {
				animation: particlesNeon 8s ease-in-out infinite;
			}
			@keyframes particlesNeon {
				0%   { filter: drop-shadow(0 0 3px #bdf730) drop-shadow(0 0 7px #bdf730); }
				20%  { filter: drop-shadow(0 0 3px #00f0ff) drop-shadow(0 0 7px #00f0ff); }
				40%  { filter: drop-shadow(0 0 3px #ff00d4) drop-shadow(0 0 7px #ff00d4); }
				60%  { filter: drop-shadow(0 0 3px #ffaa00) drop-shadow(0 0 7px #ffaa00); }
				80%  { filter: drop-shadow(0 0 3px #b300ff) drop-shadow(0 0 7px #b300ff); }
				100% { filter: drop-shadow(0 0 3px #bdf730) drop-shadow(0 0 7px #bdf730); }
			}
			.navbar hr {
				width: 24px !important;
				height: 1px;
				background: rgba(255, 255, 255, 0.1) !important;
				border: none;
				margin: 6px 0 !important;
			}
			/* Override the inline transforms on the Discord icon wrapper */
			.navbar li > a > div {
				height: auto !important;
				width: auto !important;
				margin: 0 !important;
				display: flex;
				align-items: center;
				justify-content: center;
			}
			.navbar li > a > div .fa-brands {
				transform: none !important;
			}
			html, body { overflow-x: visible !important; }
			.navbar {
				border: none;
				animation: navbarNeon 8s ease-in-out infinite;
			}
			@keyframes navbarNeon {
				0%   { border-color: #bdf730; box-shadow: 0 0 15px 2px rgba(189, 247, 48, 0.95), 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
				20%  { border-color: #00f0ff; box-shadow: 0 0 15px 2px rgba(0, 240, 255, 0.95),   0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
				40%  { border-color: #ff00d4; box-shadow: 0 0 15px 2px rgba(255, 0, 212, 0.95),   0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
				60%  { border-color: #ffaa00; box-shadow: 0 0 15px 2px rgba(255, 170, 0, 0.95),   0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
				80%  { border-color: #b300ff; box-shadow: 0 0 15px 2px rgba(179, 0, 255, 0.95),   0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
				100% { border-color: #bdf730; box-shadow: 0 0 15px 2px rgba(189, 247, 48, 0.95), 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
			}
			.navbar .fa-discord  { color: #5865F2 !important; } /* discord brand */
			.navbar a[href*="classroom15x"] .material-symbols-outlined {
				color: #ffd60a !important;                       /* bookmark -> yellow */
			}
.gameContain {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-auto-rows: 120px;
  grid-auto-flow: dense; /* Keeps the grid tightly interlocking */
  gap: 12px;
}

/* Base state: targets elements marked with data-big */
.gameAnchor[data-big="1"] {
  grid-column: span 2;
  grid-row: span 2;
}
			.gameContain[data-iframe-active="true"] .gameAnchor:URI-selector-or-nth-child {
  /* You can dynamically blow up specific icons here if desired */
}