/*
Theme Name: Bytesphere Game
Theme URI: https://bytesphere.local
Author: Bytesphere
Author URI: https://bytesphere.local
Description: A sleek, game-focused theme with an animated hero and a custom game-ready homepage.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: bytesphere-game
Tags: game, landing-page, blog, custom-logo, custom-menu
*/

/* Root variables and base styles */
:root {
  --bg: #0b0f1a;
  --bg-soft: #0f1524;
  --card: #121a2c;
  --text: #d6e1ff;
  --muted: #9bb0d1;
  --primary: #6ea8fe;
  --accent: #7bffb6;
  --warn: #ffc86e;
  --danger: #ff7b9a;
  --ring: rgba(110, 168, 254, 0.35);
}

html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, Noto Sans, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% 10%, #101734 0%, var(--bg) 60%);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(10, 14, 26, 0.6); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(110,168,254,0.15); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand .site-title { color: var(--text); font-size: 18px; margin: 0; }
.primary-nav { display: flex; align-items: center; gap: 14px; }
.primary-nav ul { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; }
.primary-nav li { list-style: none; }
.primary-nav a { color: var(--text); opacity: .9; padding: 8px 10px; border-radius: 8px; }
.primary-nav a:hover { background: rgba(110,168,254,0.08); opacity: 1; }

/* Hero */
.hero { position: relative; min-height: 84vh; display: grid; place-items: center; overflow: clip; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-gradient { position: absolute; inset: -20% -10%; background: conic-gradient(from 210deg at 60% 40%, rgba(110,168,254,.25), rgba(123,255,182,.12), rgba(110,168,254,.25)); filter: blur(80px); opacity: .6; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 80px 0; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); background: rgba(110,168,254,0.08); border: 1px solid rgba(110,168,254,0.18); border-radius: 999px; padding: 6px 10px; font-size: 12px; letter-spacing: .3px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 18px 0 10px; }
.hero p { font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); margin: 0 auto 26px; max-width: 720px; }
.cta-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(180deg, #6ea8fe, #5e90e0); color: #0b0f1a; border: 0; padding: 12px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 24px rgba(110,168,254,.25), inset 0 1px 0 #b7d3ff; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(110,168,254,.3), inset 0 1px 0 #cfe2ff; }
.btn.secondary { background: rgba(110,168,254,0.08); color: var(--text); border: 1px solid rgba(110,168,254,0.2); box-shadow: none; }

/* Feature cards */
.features { padding: 48px 0 24px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)); border: 1px solid rgba(110,168,254,0.15); border-radius: 16px; padding: 18px; position: relative; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: -1px; background: radial-gradient(260px 180px at 15% -10%, rgba(110,168,254,0.18), transparent 55%); pointer-events: none; }
.card h3 { margin: 6px 0 4px; font-size: 18px; }
.card p { margin: 0 0 6px; color: var(--muted); }

/* Play placeholder */
.play { padding: 28px 0 64px; }
.play-wrap { background: radial-gradient(240px 180px at 80% 20%, rgba(123,255,182,0.10), transparent 60%), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)); border: 1px solid rgba(123,255,182,0.25); border-radius: 16px; overflow: clip; position: relative; }
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(123,255,182,0.25); }
.play-stage { position: relative; height: clamp(320px, 60vh, 560px); background: linear-gradient(180deg, #0c1222, #0a0f1b); }
.play-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.status-badge { font-size: 12px; color: #062015; background: #7bffb6; padding: 4px 8px; border-radius: 999px; font-weight: 700; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; padding: 2px 6px; border-radius: 6px; border: 1px solid rgba(110,168,254,0.25); color: var(--muted); }

/* Posts preview */
.posts { padding: 48px 0 72px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr; } }
.post { border: 1px solid rgba(110,168,254,0.15); border-radius: 14px; overflow: hidden; background: #0e1426; }
/* Single posts should not inherit card styling */
.single-post.post { border: 0; background: transparent; border-radius: 0; overflow: visible; }
.post .thumb { height: 160px; background: #11182b; display: block; overflow: hidden; }
@media (max-width: 900px) { .post .thumb { height: 200px; } }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 280ms ease; transform-origin: center; will-change: transform; }
.post .thumb:hover img { transform: scale(0.96); }
.post .meta { padding: 14px; }
.post h4 { margin: 0 0 8px; font-size: 16px; }
.post .meta p { color: var(--muted); margin: 0; font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid rgba(110,168,254,0.15); background: rgba(10,14,26,0.6); }
.site-footer .inner { padding: 22px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Archive list (blog + archive pages) */
.archive-list { display: grid; gap: 18px; }
.archive-item { display: flex; gap: 16px; align-items: flex-start; border: 1px solid rgba(110,168,254,0.15); border-radius: 14px; padding: 12px; background: #0e1426; }
@media (max-width: 900px) { .archive-item { flex-direction: column; } }
.media-thumb { flex: 0 0 240px; width: 240px; height: 160px; background: #11182b; border-radius: 10px; overflow: hidden; display: block; }
@media (max-width: 900px) { .media-thumb { width: 100%; } }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-body { min-width: 0; flex: 1; }

/* Single post */
.full-bleed { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); transform: none; display: block; }
.single-hero { position: relative; overflow: hidden; background: #0a0f1b; margin: 0 0 18px; }
.single-hero-img { width: 100%; height: clamp(320px, 58vh, 720px); object-fit: contain; object-position: center center; display: block; }
@media (max-width: 900px) { .single-hero-img { height: 42vh; } }
.single-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,15,27,0) 50%, rgba(10,15,27,0.65) 100%); pointer-events:none; }
.hero-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; padding-bottom: 24px; }
.hero-overlay .container { width: 100%; }
.single-title { margin: 0 0 6px; font-size: clamp(28px, 5vw, 48px); line-height: 1.08; }
.single-meta { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.single-header-block { padding: 18px 0 0; }
.entry-content { font-size: 18px; line-height: 1.75; }
.entry-content > * + * { margin-top: 0.85em; }
.entry-content p { margin: 0 0 1em; }
.entry-content img { max-width: 100%; height: auto; border-radius: 10px; }
.post-nav { margin-top: 24px; border-top: 1px solid rgba(110,168,254,0.15); padding-top: 14px; }

/* Comments */
.comments-area { margin-top: 26px; }
.comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.comment-list .comment { border: 1px solid rgba(110,168,254,0.15); border-radius: 12px; background: #0e1426; padding: 12px; }
.comment-body { display: grid; gap: 8px; }
.comment-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.comment-author .avatar { border-radius: 50%; }
.comment-content p { margin: 0; }
.reply .comment-reply-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(110,168,254,0.25); color: var(--text); background: rgba(110,168,254,0.06); text-decoration: none; }
.reply .comment-reply-link:hover { background: rgba(110,168,254,0.12); }

.comment-respond { border-top: 1px solid rgba(110,168,254,0.15); margin-top: 18px; padding-top: 14px; }
#commentform p { margin: 0 0 10px; }
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea { width: 100%; background: #0b1122; color: var(--text); border: 1px solid rgba(110,168,254,0.25); border-radius: 10px; padding: 10px 12px; }
#commentform textarea { min-height: 120px; }
#commentform input[type="submit"],
.post-password-form input[type="submit"] { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(180deg, #6ea8fe, #5e90e0); color: #0b0f1a; border: 0; padding: 10px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 24px rgba(110,168,254,.25), inset 0 1px 0 #b7d3ff; cursor: pointer; }
#commentform input[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(110,168,254,.3), inset 0 1px 0 #cfe2ff; }

/* Game shell */
.game-shell { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)); border: 1px solid rgba(110,168,254,0.15); border-radius: 16px; }
.game-shell .game-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid rgba(110,168,254,0.15); }
.game-shell .game-stage { position: relative; background:#0a0f1b; height: auto; }
.game-shell canvas { display:block; width:100%; height:auto; }

/* Chess */
.game-shell.chess .controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.game-shell.chess .controls label { color: var(--muted); font-size: 13px; display:flex; align-items:center; gap:6px; }
.game-shell.chess select {
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  color-scheme: dark;
  background: #0b1122; color: var(--text);
  border: 1px solid rgba(110,168,254,0.35);
  border-radius: 10px; padding: 8px 28px 8px 10px; line-height: 1; position: relative;
}
.game-shell.chess select:hover { background: #0e1426; border-color: rgba(110,168,254,0.55); }
.game-shell.chess select:focus { outline: 0; box-shadow: 0 0 0 2px var(--ring); }
.game-shell.chess select option { background: #0b1122; color: #d6e1ff; }
.game-shell.chess select option:checked { background: #1a2548; color: #ffffff; }
.game-shell.chess .controls .btn { margin-left: 8px; }
.chess-status { margin: 10px 0; color: var(--muted); }
.chess-status.error { color: #ff7b9a; }
.chess-board { --size: min(80vh, 560px); width: var(--size); max-width: 100%; aspect-ratio: 1/1; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border-radius: 12px; overflow: clip; border: 1px solid rgba(110,168,254,0.25); margin: 0 auto 12px; font-size: calc(var(--size) / 10.5); position: relative; }
.chess-board.shake { animation: chess-shake 160ms ease-in-out 0s 3; }
@keyframes chess-shake { 0%{ transform: translateX(0);} 25%{ transform: translateX(-4px);} 50%{ transform: translateX(4px);} 75%{ transform: translateX(-3px);} 100%{ transform: translateX(0);} }
.sq { position: relative; display: grid; place-items: center; font-size: 1em; line-height: 1; cursor: pointer; border: 0; padding: 0; background: transparent; color: inherit; min-width: 0; min-height: 0; user-select: none; }
.sq.light { background: var(--sq-light, #f3f5f8); }
.sq.dark { background: var(--sq-dark, #c6ced8); }
.sq.last { outline: 2px solid rgba(123,255,182,0.35); outline-offset: -2px; }
.sq.selected { outline: 3px solid rgba(110,168,254,0.75); outline-offset: -3px; }
.sq.hint.quiet::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32%; height: 32%; border-radius: 50%; background: rgba(123,255,182,0.65); box-shadow: 0 0 0 2px rgba(123,255,182,0.35); }
.sq.hint.capture { outline: 3px solid rgba(255,123,154,0.9); outline-offset: -3px; box-shadow: inset 0 0 0 2px rgba(255,123,154,0.35); }
.piece { pointer-events: none; -webkit-font-smoothing: antialiased; font-weight: 700; position: relative; z-index: 2; font-family: "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols 2", "Arial Unicode MS", sans-serif !important; }
.piece.white { color: #ffffff; text-shadow: 0 1px 0 #0a0f1b, 1px 0 0 #0a0f1b, -1px 0 0 #0a0f1b, 0 -1px 0 #0a0f1b, 1px 1px 0 #0a0f1b, -1px 1px 0 #0a0f1b, 1px -1px 0 #0a0f1b, -1px -1px 0 #0a0f1b; }
.piece.black { color: #1f2737; text-shadow: 0 1px 0 rgba(255,255,255,0.8), 1px 0 0 rgba(255,255,255,0.6), -1px 0 0 rgba(255,255,255,0.6), 0 -1px 0 rgba(255,255,255,0.5); }

/* Side move counters inside board */
.side-counter { position: absolute; top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 12px; background: rgba(10,15,27,0.8); color: #ffffff; font-weight: 800; letter-spacing: 0.5px; line-height: 1; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,0.35); font-size: clamp(20px, calc(var(--size) / 12), 40px); }
.side-counter.left { left: 8px; }
.side-counter.right { right: 8px; }

/* Theme presets */
.chess-app { --sq-light: #f0d9b5; --sq-dark: #b58863; display:flex; flex-direction:column; align-items:center; }
.chess-app.theme-gray { --sq-light: #ffffff; --sq-dark: #98a1ae; }
.chess-app.theme-green { --sq-light: #e9edc9; --sq-dark: #779556; }
.chess-app.theme-wood { --sq-light: #f0d9b5; --sq-dark: #b58863; }
.chess-app.theme-blue { --sq-light: #dee9ff; --sq-dark: #6b8fd6; }

/* Captured pieces bars */
.chess-captured { position: relative; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; margin: 6px 0; line-height: 1; min-height: 1.6em; }
.chess-captured.top { margin-bottom: 8px; }
.chess-captured.bottom { margin-top: 8px; }
.chess-captured .piece { font-size: 1.6rem; }
/* Force captured black pieces to be solid black regardless of parent color */
.chess-captured .piece.black { color: #1f2737 !important; background: transparent !important; border: 0 !important; padding: 0; border-radius: 0; text-shadow: 0 1px 0 rgba(255,255,255,0.8), 1px 0 0 rgba(255,255,255,0.6), -1px 0 0 rgba(255,255,255,0.6), 0 -1px 0 rgba(255,255,255,0.5); }
@media (min-width: 560px) { .chess-captured .piece { font-size: 1.8rem; } }
@media (min-width: 840px) { .chess-captured .piece { font-size: 2rem; } }

/* Overlay for endgame message */
.chess-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; }
.chess-overlay.show { display: flex; }
.chess-overlay .panel { position: relative; z-index: 2; background: rgba(10,15,27,0.85); color: var(--text); border: 1px solid rgba(110,168,254,0.35); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.chess-overlay .confetti { position: absolute; inset: 0; display: block; pointer-events: none; }

/* Fullscreen tweaks */
.game-shell.chess:fullscreen { background: #0a0f1b; height: 100vh; overflow: hidden; display:flex; flex-direction:column; }
.game-shell.chess:fullscreen .game-head { padding: 8px 12px; }
.game-shell.chess:fullscreen .game-stage { flex: 1 1 auto; padding: 6px 8px 16px; overflow:auto; display:flex; align-items:center; justify-content:center; }
/* Keep full board visible with room for top/bottom bars */
.game-shell.chess:fullscreen .chess-board { --size: min(78vh, 90vw, 92vmin); }

/* Floating fullscreen button */
.chess-fs-fab { position: absolute; right: 12px; bottom: 12px; z-index: 5; border: 0; background: rgba(10,15,27,0.75); color: #d6e1ff; border: 1px solid rgba(110,168,254,0.35); width: 40px; height: 40px; border-radius: 10px; font-size: 16px; line-height: 1; cursor: pointer; display:flex; align-items:center; justify-content:center; }
.chess-fs-fab:hover { background: rgba(10,15,27,0.9); }


/* Flappy fullscreen and button */
.game-shell .game-stage { position: relative; }
.game-shell.flappy:fullscreen { background: #0a0f1b; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.game-shell.flappy:fullscreen .game-head { padding: 8px 12px; }
.game-shell.flappy:fullscreen .game-stage { flex: 1 1 auto; padding: 0; display: flex; align-items: center; justify-content: center; height: auto; }
.game-shell.flappy .game-stage { height: 600px; }
.flappy-fs-fab { position: absolute; right: 12px; bottom: 12px; z-index: 5; border: 0; background: rgba(10,15,27,0.75); color: #d6e1ff; border: 1px solid rgba(110,168,254,0.35); width: 40px; height: 40px; border-radius: 10px; font-size: 16px; line-height: 1; cursor: pointer; display:flex; align-items:center; justify-content:center; }
.flappy-fs-fab:hover { background: rgba(10,15,27,0.9); }

/* Invaders fullscreen and button */
.game-shell.invaders:fullscreen { background: #0a0f1b; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.game-shell.invaders:fullscreen .game-head { padding: 8px 12px; }
.game-shell.invaders:fullscreen .game-stage { flex: 1 1 auto; padding: 0; display: flex; align-items: center; justify-content: center; height: auto; }
.game-shell.invaders .game-stage { height: 600px; }
.invaders-fs-fab { position: absolute; right: 12px; bottom: 12px; z-index: 5; border: 0; background: rgba(10,15,27,0.75); color: #d6e1ff; border: 1px solid rgba(110,168,254,0.35); width: 40px; height: 40px; border-radius: 10px; font-size: 16px; line-height: 1; cursor: pointer; display:flex; align-items:center; justify-content:center; }
.invaders-fs-fab:hover { background: rgba(10,15,27,0.9); }

/* Games archive grid */
.game-cards.grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 900px) { .game-cards.grid { grid-template-columns: 1fr; } }
.game-card { display: block; text-decoration: none; }
.game-card:hover { transform: translateY(-1px); transition: transform 120ms ease; text-decoration: none; }
/* Ensure title/description never underline on hover */
.game-card:hover h3,
.game-card:hover p { text-decoration: none; }
.game-card .cover { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)); border: 1px solid rgba(110,168,254,0.15); }
.game-card .cover.fallback { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(220px 160px at 20% 10%, rgba(110,168,254,0.14), transparent 55%), radial-gradient(220px 160px at 80% 80%, rgba(123,255,182,0.12), transparent 55%), linear-gradient(180deg, #0c1222, #0a0f1b); }
.game-card .cover .emoji { font-size: clamp(40px, 6vw, 64px); line-height: 1; }

/* Subtle particle overlay on game covers */
.game-card .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* a handful of soft particles placed around the cover */
  background:
    radial-gradient(3px 3px at 18% 28%, rgba(110,168,254,0.70), transparent 60%),
    radial-gradient(2.5px 2.5px at 72% 24%, rgba(123,255,182,0.65), transparent 55%),
    radial-gradient(2.5px 2.5px at 38% 76%, rgba(110,168,254,0.55), transparent 55%),
    radial-gradient(3px 3px at 84% 72%, rgba(110,168,254,0.60), transparent 60%),
    radial-gradient(2px 2px at 60% 48%, rgba(110,168,254,0.45), transparent 50%),
    radial-gradient(2px 2px at 28% 62%, rgba(123,255,182,0.50), transparent 50%);
  opacity: 0.55;
  mix-blend-mode: screen;
  z-index: 2;
  animation: particleFloat 20s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

/* Ensure the image sits beneath the overlay but above the cover background */
.game-card .cover > img { position: relative; z-index: 1; display: block; }

/* Slightly brighten particles on hover for a bit of pop */
.game-card:hover .cover::after { opacity: 0.7; }

/* Optional density controls */
.game-cards.sparse .cover::after,
.game-card .cover.sparse::after { opacity: 0.35; }
.game-cards.dense .cover::after,
.game-card .cover.dense::after { opacity: 0.85; }

/* Extra particle layer for dense mode */
.game-cards.dense .cover::before,
.game-card .cover.dense::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
  background:
    radial-gradient(1.8px 1.8px at 12% 18%, rgba(110,168,254,0.55), transparent 55%),
    radial-gradient(2px 2px at 26% 42%, rgba(123,255,182,0.45), transparent 55%),
    radial-gradient(1.8px 1.8px at 46% 22%, rgba(110,168,254,0.50), transparent 55%),
    radial-gradient(2px 2px at 66% 68%, rgba(110,168,254,0.50), transparent 55%),
    radial-gradient(2px 2px at 78% 36%, rgba(123,255,182,0.50), transparent 55%),
    radial-gradient(1.6px 1.6px at 34% 58%, rgba(110,168,254,0.45), transparent 55%),
    radial-gradient(1.6px 1.6px at 88% 82%, rgba(110,168,254,0.50), transparent 55%),
    radial-gradient(1.6px 1.6px at 8% 86%, rgba(123,255,182,0.50), transparent 55%);
  opacity: 0.5;
  animation: particleFloat2 28s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

/* Motion: gentle drift to bring the particles alive */
@keyframes particleFloat {
  from { transform: translate3d(-1.5%, -1.5%, 0) scale(1.01) rotate(0.001turn); }
  to   { transform: translate3d( 1.5%,  1.5%, 0) scale(1.01) rotate(-0.001turn); }
}
@keyframes particleFloat2 {
  from { transform: translate3d( 1.2%, -1.2%, 0) scale(1.015) rotate(-0.001turn); }
  to   { transform: translate3d(-1.2%,  1.2%, 0) scale(1.015) rotate(0.001turn); }
}

/* Respect reduced‑motion preferences */
@media (prefers-reduced-motion: reduce) {
  .game-card .cover::after,
  .game-cards.dense .cover::before,
  .game-card .cover.dense::before { animation: none; }
}
