diff --git a/src/components/gametile.astro b/src/components/gametile.astro
index 98d3938..91373c9 100644
--- a/src/components/gametile.astro
+++ b/src/components/gametile.astro
@@ -8,7 +8,7 @@ const { Game, Path, Image } = Astro.props;
const altText = `${Game} unblocked - play online free`;
---
-
+
{Game}
diff --git a/src/layout/layout.astro b/src/layout/layout.astro
index 8b42b86..81e83c9 100644
--- a/src/layout/layout.astro
+++ b/src/layout/layout.astro
@@ -30,7 +30,9 @@ const homeDescription = "Play free unblocked games on your school Chromebook - H
const gameDescription = isHome
? homeDescription
: seo?.description ||
- `Play ${Game} unblocked on your school Chromebook. No Flash plugin or download needed - runs directly in your browser. Fully working 2026 version of this classic game.`;
+ (Game
+ ? `Play ${Game} unblocked on your school Chromebook. No Flash plugin or download needed - runs directly in your browser. Fully working 2026 version of this classic game.`
+ : pageTitle || homeDescription);
// Image & other SEO fields — ponytail: webp covers beat SVG for og:image validators
const gameImage = isHome
@@ -43,8 +45,16 @@ const gameYear = seo?.year || "";
// URL
const pageUrl = slug ? `${siteUrl}/games/${slug}` : siteUrl;
-// More Games cross-linking — curated list of popular games
-const moreGames = defaultGames.slice(0, MORE_GAMES_COUNT).filter((s) => s !== slug); // exclude current game
+// More Games cross-linking — same genre first, then fill from popular
+// ponytail: two passes over defaultGames, no new data structures
+const moreGames = (() => {
+ if (!slug || !seo) return defaultGames.slice(0, MORE_GAMES_COUNT);
+ const rest = defaultGames.filter((s) => s !== slug);
+ return [
+ ...rest.filter((s) => gamesMap[s].genre === seo.genre),
+ ...rest.filter((s) => gamesMap[s].genre !== seo.genre),
+ ].slice(0, MORE_GAMES_COUNT);
+})();
---
diff --git a/src/pages/404.astro b/src/pages/404.astro
new file mode 100644
index 0000000..a6e52e8
--- /dev/null
+++ b/src/pages/404.astro
@@ -0,0 +1,14 @@
+---
+import Layout from "../layout/layout.astro";
+const pageTitle = "Page Not Found - Superfun Games";
+---
+
+
+
+
Game not found
+
+ That page doesn't exist. Head back to the homepage to pick a game.
+
+
Back to all games
+
+
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 8f886a5..045c1d0 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -40,7 +40,7 @@ const popularGames = defaultGames.slice(0, POPULAR_COUNT);
All unblocked games
-
+
{
defaultGames.map((slug) => {
const seo = gamesMap[slug];