:root {
  --gp-bg-0: #020617;
  --gp-bg-1: #0b1222;
  --gp-bg-2: #111b32;
  --gp-surface: #0f172a;
  --gp-surface-2: #131e36;
  --gp-border: rgba(99, 116, 151, 0.25);
  --gp-border-strong: rgba(129, 149, 193, 0.45);
  --gp-glow: rgba(99, 102, 241, 0.35);
  --gp-text-soft: #9fb0d1;
}

body {
  background: linear-gradient(180deg, var(--gp-bg-1), var(--gp-bg-0) 65%);
}

#page > nav.sticky {
  background: linear-gradient(180deg, rgba(10, 15, 30, 0.92), rgba(7, 11, 22, 0.96));
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.3);
}

#sidebar-menu > div {
  background: linear-gradient(180deg, rgba(8, 13, 27, 0.9), rgba(6, 10, 20, 0.95));
}

#sidebar-menu a {
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

#sidebar-menu .sidebar-nav-link {
  position: relative;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

#sidebar-menu .sidebar-nav-link::before {
  content: "";
  position: absolute;
  inset: 0.35rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.32) 0%, rgba(56, 189, 248, 0.16) 34%, rgba(7, 11, 22, 0) 74%);
  opacity: 0;
  transform: scale(0.78);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

#sidebar-menu .sidebar-nav-link:hover::before,
#sidebar-menu .sidebar-nav-link:focus-visible::before,
#sidebar-menu .sidebar-nav-link.is-active::before {
  opacity: 1;
  transform: scale(1);
}

#primary > .space-y-10 {
  gap: 3.5rem;
}

#primary > .space-y-10 > section {
  position: relative;
}

#primary .home-section {
  padding: 0.35rem 0;
}

#primary .home-section-featured {
  margin-top: 0.25rem;
}

#primary .home-io-page {
  gap: 2.4rem;
}

#primary .home-io-grid-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 1.75rem;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(59, 130, 246, 0.18), transparent 42%),
    radial-gradient(100% 120% at 100% 0%, rgba(99, 102, 241, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(13, 20, 37, 0.98), rgba(6, 11, 23, 0.98));
  box-shadow:
    0 24px 46px rgba(2, 6, 23, 0.36),
    inset 0 0 0 1px rgba(148, 163, 184, 0.05);
}

#primary .home-io-grid-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 10%, black 22%, transparent 82%);
}

#primary .home-io-grid-shell > * {
  position: relative;
  z-index: 1;
}

#primary .home-io-kicker,
#primary .home-io-grid-label {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  background: rgba(8, 47, 73, 0.2);
  color: #67e8f9;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#primary .home-io-grid-shell {
  padding: clamp(1rem, 2.2vw, 1.5rem);
}

#primary .home-io-grid-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

#primary .home-io-grid-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

#primary .home-io-grid-title {
  margin-top: 0.7rem;
  color: #f8fbff;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

#primary .home-io-grid-meta {
  margin-top: 0.65rem;
  color: #c9d5ea;
  font-size: 0.98rem;
  line-height: 1.7;
}

#primary .home-io-grid-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.82rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(17, 24, 39, 0.76);
  color: #dbeafe;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

#primary .home-io-grid-link:hover,
#primary .home-io-grid-link:focus-visible {
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.52);
  transform: translateY(-1px);
}

#primary .home-io-grid-link-random {
  border-color: rgba(103, 232, 249, 0.28);
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.72), rgba(14, 116, 144, 0.28));
  color: #ecfeff;
  box-shadow:
    inset 0 0 0 1px rgba(103, 232, 249, 0.08),
    0 14px 28px rgba(8, 47, 73, 0.26);
}

#primary .home-io-grid-link-random:hover,
#primary .home-io-grid-link-random:focus-visible {
  border-color: rgba(103, 232, 249, 0.52);
}

#primary .home-io-grid.home-games-grid {
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)) !important;
  gap: 0.82rem !important;
}

#primary .home-section-editorial .home-editorial-card {
  padding: clamp(1.4rem, 2.4vw, 2rem);
  border: 1px solid var(--gp-border);
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(9, 15, 28, 0.96));
  box-shadow:
    0 16px 38px rgba(2, 6, 23, 0.34),
    inset 0 0 0 1px rgba(148, 163, 184, 0.06);
}

#primary .home-section-editorial .home-editorial-header {
  margin-bottom: 1.15rem;
}

#primary .home-section-editorial .home-editorial-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(8, 47, 73, 0.18);
  color: #67e8f9;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#primary .home-section-editorial .home-editorial-title,
body.home #primary .home-section-editorial .prose.prose-invert h1 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.18);
}

body.home #primary .home-section-editorial .prose.prose-invert {
  color: #c9d5ea;
  max-width: 100%;
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 1.88;
}

body.home #primary .home-section-editorial .prose.prose-invert > * + * {
  margin-top: 1.15rem;
}

body.home #primary .home-section-editorial .prose.prose-invert h2,
body.home #primary .home-section-editorial .prose.prose-invert h3,
body.home #primary .home-section-editorial .prose.prose-invert h4 {
  color: #f8fbff;
}

body.home #primary .home-section-editorial .prose.prose-invert ul,
body.home #primary .home-section-editorial .prose.prose-invert ol {
  padding-left: 1.4rem;
}

body.home #primary .home-section-editorial .prose.prose-invert ul {
  list-style: disc;
}

body.home #primary .home-section-editorial .prose.prose-invert ol {
  list-style: decimal;
}

body.home #primary .home-section-editorial .prose.prose-invert blockquote {
  padding-left: 1rem;
  border-left: 3px solid rgba(56, 189, 248, 0.72);
  color: #deecff;
}

#primary > .space-y-10 > section > .flex.items-center.justify-between,
#primary > .space-y-10 > section > .flex.items-center.gap-3 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

#primary h1,
#primary h2,
#primary h3 {
  letter-spacing: -0.02em;
  text-wrap: balance;
}

#primary .grid {
  row-gap: 1.5rem;
}

.game-card {
  background:
    linear-gradient(170deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--gp-border);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.35);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.14), transparent 45%, rgba(56, 189, 248, 0.08));
  opacity: 0;
  transition: opacity 220ms ease;
}

.game-card:hover {
  border-color: var(--gp-border-strong);
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.42),
    0 0 0 1px rgba(99, 102, 241, 0.2);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card h3 {
  transition: color 180ms ease, text-shadow 180ms ease;
}

.game-card:hover h3 {
  text-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
}

.ad-container {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.95));
  border: 1px dashed rgba(99, 102, 241, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.35),
    0 4px 14px rgba(2, 6, 23, 0.28);
}

.ad-container:hover {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(30, 41, 59, 0.45),
    0 8px 18px rgba(2, 6, 23, 0.34);
}

#game-player-container {
  border: 1px solid rgba(129, 140, 248, 0.24);
  box-shadow:
    0 12px 30px rgba(2, 6, 23, 0.44),
    0 0 0 1px rgba(79, 70, 229, 0.2);
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

#game-player-container:hover {
  border-color: rgba(165, 180, 252, 0.5);
  box-shadow:
    0 16px 34px rgba(2, 6, 23, 0.5),
    0 0 0 1px rgba(99, 102, 241, 0.24);
}

.home-section-featured .relative.w-full.h-\[60vh\] {
  border: 1px solid rgba(129, 140, 248, 0.28);
  box-shadow:
    0 12px 32px rgba(2, 6, 23, 0.46),
    0 0 0 1px rgba(99, 102, 241, 0.2);
}

.home-section-featured a.inline-flex {
  box-shadow:
    0 14px 28px rgba(79, 70, 229, 0.35),
    0 0 0 1px rgba(165, 180, 252, 0.2);
}

.home-section-featured a.inline-flex:hover {
  box-shadow: 0 16px 28px rgba(79, 70, 229, 0.4);
}

#game-player-aspect {
  background: linear-gradient(180deg, #0b1222, #020617);
}

#game-player-container #btn-play-game > div {
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.28);
}

#game-player-container #btn-play-game:hover > div {
  box-shadow: 0 10px 18px rgba(99, 102, 241, 0.34);
}

#game-player-container .bg-slate-900.border-t {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(8, 13, 27, 0.98));
}

#game-frame-status {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.96));
  color: #e2e8f0;
  font-weight: 600;
}

#game-frame-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

#game-player-container:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: #000;
}

#game-player-container:fullscreen #game-player-aspect {
  flex: 1;
  width: 100%;
  height: calc(100vh - 62px);
  aspect-ratio: auto !important;
}

#game-player-container:fullscreen #game-frame-container,
#game-player-container:fullscreen #game-frame-container iframe {
  width: 100%;
  height: 100%;
}

#game-theater-wrap.is-theater {
  position: relative;
  z-index: 60;
}

#game-theater-wrap.is-theater #game-player-container {
  max-width: min(1400px, 94vw);
  width: 100%;
  margin-inline: auto;
}

#game-theater-overlay {
  pointer-events: none;
}

body.game-theater-active #game-theater-overlay {
  display: block;
  pointer-events: auto;
}

body.game-theater-active #page > nav.sticky,
body.game-theater-active #sidebar-menu,
body.game-theater-active footer {
  opacity: 0.14;
  pointer-events: none;
}

body.game-theater-active #mobile-bottom-nav,
body.gp-fullscreen-active #mobile-bottom-nav {
  display: none !important;
}

#game-theater-wrap.is-theater #game-player-side-ad {
  display: none !important;
}

.plugin-game-wrapper iframe,
#game-frame-container iframe {
  background: #020617;
}

.plugin-game-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.prose.prose-invert {
  color: var(--gp-text-soft);
}

.prose.prose-invert h2,
.prose.prose-invert h3,
.prose.prose-invert h4 {
  color: #eff6ff;
}

.prose.prose-invert a {
  color: #a5b4fc;
}

.prose.prose-invert a:hover {
  color: #c7d2fe;
}

.decorative-layer,
.decorative-layer::before,
.decorative-layer::after {
  pointer-events: none;
}

#live-search-results a:last-child {
  border-bottom: 0;
}

body {
  padding-bottom: 0;
}

.btn-favorite.is-active i,
.btn-favorite.text-rose-400 i {
  fill: currentColor;
}

.genre-chip.is-active {
  border-color: rgba(99, 102, 241, 0.8);
  color: #fff;
  background: rgba(79, 70, 229, 0.2);
}

.game-card-preview {
  transition: opacity 220ms ease;
}

#mobile-bottom-nav {
  display: none !important;
}

@media (max-width: 1023px) {
  body {
    padding-bottom: 0;
  }

  #primary .home-io-grid-header {
    align-items: start;
    flex-direction: column;
  }

  #primary .home-io-grid-actions {
    justify-content: flex-start;
  }

  #primary > .space-y-10 {
    gap: 2.5rem;
  }

  #primary > .space-y-10 > section > .flex.items-center.justify-between,
  #primary > .space-y-10 > section > .flex.items-center.gap-3 {
    margin-bottom: 1rem;
  }
}

#game-sidebar-ad {
  display: none;
}

#ad-right-rail {
  width: 300px;
  height: 600px;
}

@media (min-width: 1400px) {
  #game-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  #game-sidebar-ad {
    display: block;
    position: sticky;
    top: 7.5rem;
  }
}

/* ---------------------------------------------------------
   Editorial article layout (single posts + pages)
   Inspired by modern browser-gaming portal aesthetics.
   Scoped to avoid affecting game/player templates.
---------------------------------------------------------- */
body.single-post #primary > .space-y-10 > article,
body.page #primary > .space-y-10 > article {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 2.4vw, 2.25rem);
  border-radius: 1.5rem;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(14, 165, 233, 0.16), transparent 50%),
    radial-gradient(100% 120% at 100% 0%, rgba(99, 102, 241, 0.14), transparent 54%),
    linear-gradient(175deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.94));
  box-shadow:
    0 22px 50px rgba(2, 6, 23, 0.48),
    inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

body.single-post #primary > .space-y-10 > article::before,
body.page #primary > .space-y-10 > article::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(59, 130, 246, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(59, 130, 246, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 85%);
  opacity: 0.28;
}

body.single-post #primary > .space-y-10 > article > *,
body.page #primary > .space-y-10 > article > * {
  position: relative;
  z-index: 1;
}

body.single-post #primary h1,
body.page #primary h1 {
  text-wrap: balance;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.2);
}

body.single-post #primary .flex.items-center.gap-4.text-sm,
body.single-post #primary .text-sm.text-slate-400 {
  color: #94a3b8;
}

body.single-post #primary .w-full.rounded-3xl.overflow-hidden,
body.page #primary .w-full.rounded-3xl.overflow-hidden {
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.55);
}

body.single-post #primary .grid.grid-cols-1.lg\:grid-cols-3,
body.page #primary .grid.grid-cols-1.lg\:grid-cols-3 {
  gap: clamp(1.25rem, 2.4vw, 2rem);
  align-items: start;
}

body.single-post #primary .grid.grid-cols-1.lg\:grid-cols-3 > .space-y-6,
body.page #primary .grid.grid-cols-1.lg\:grid-cols-3 > .space-y-6 {
  position: sticky;
  top: 5.5rem;
}

body.single-post #primary .prose.prose-invert,
body.page #primary .prose.prose-invert {
  color: #c9d5ea;
  max-width: 100%;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.88;
}

body.single-post #primary .prose.prose-invert > p,
body.page #primary .prose.prose-invert > p {
  margin-top: 1.1rem;
  margin-bottom: 1.1rem;
}

body.single-post #primary .prose.prose-invert > p:first-of-type,
body.page #primary .prose.prose-invert > p:first-of-type {
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  color: #deecff;
}

body.single-post #primary .prose.prose-invert > p:first-of-type::first-letter,
body.page #primary .prose.prose-invert > p:first-of-type::first-letter {
  float: left;
  margin-right: 0.5rem;
  margin-top: 0.2rem;
  font-size: 2.8em;
  line-height: 0.9;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.45);
}

body.home #primary .home-section-editorial .prose.prose-invert > p:first-of-type::first-letter {
  float: none;
  margin-right: 0;
  margin-top: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
  text-shadow: none;
}

body.single-post #primary .prose.prose-invert h2,
body.single-post #primary .prose.prose-invert h3,
body.single-post #primary .prose.prose-invert h4,
body.page #primary .prose.prose-invert h2,
body.page #primary .prose.prose-invert h3,
body.page #primary .prose.prose-invert h4 {
  position: relative;
  margin-top: 2.1em;
  margin-bottom: 0.8em;
  color: #f8fbff;
  text-wrap: balance;
}

body.single-post #primary .prose.prose-invert h2,
body.page #primary .prose.prose-invert h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.88rem;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

body.single-post #primary .prose.prose-invert h2::before,
body.page #primary .prose.prose-invert h2::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #67e8f9, #0284c7 70%);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

body.single-post #primary .prose.prose-invert a,
body.page #primary .prose.prose-invert a {
  color: #67e8f9;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  text-decoration-thickness: 2px;
  transition: color 180ms ease, text-shadow 180ms ease;
}

body.single-post #primary .prose.prose-invert a:hover,
body.page #primary .prose.prose-invert a:hover {
  color: #a5f3fc;
  text-shadow: 0 0 16px rgba(103, 232, 249, 0.44);
}

body.single-post #primary .prose.prose-invert ul,
body.single-post #primary .prose.prose-invert ol,
body.page #primary .prose.prose-invert ul,
body.page #primary .prose.prose-invert ol {
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.35));
}

body.single-post #primary .prose.prose-invert li + li,
body.page #primary .prose.prose-invert li + li {
  margin-top: 0.45rem;
}

body.single-post #primary .prose.prose-invert blockquote,
body.page #primary .prose.prose-invert blockquote {
  margin: 1.6rem 0;
  border-left: 4px solid #22d3ee;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  color: #d8ebff;
  background: linear-gradient(92deg, rgba(8, 47, 73, 0.35), rgba(30, 41, 59, 0.15));
}

body.single-post #primary .prose.prose-invert hr,
body.page #primary .prose.prose-invert hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.62), transparent);
}

body.single-post #primary .prose.prose-invert table,
body.page #primary .prose.prose-invert table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 0.95rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.65);
}

body.single-post #primary .prose.prose-invert table th,
body.page #primary .prose.prose-invert table th {
  background: rgba(30, 41, 59, 0.8);
  color: #f8fafc;
}

body.single-post #primary .prose.prose-invert table th,
body.single-post #primary .prose.prose-invert table td,
body.page #primary .prose.prose-invert table th,
body.page #primary .prose.prose-invert table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.4);
}

body.single-post #primary .prose.prose-invert img,
body.page #primary .prose.prose-invert img {
  border-radius: 1rem;
  border: 1px solid rgba(125, 211, 252, 0.26);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.5);
}

body.single-post #primary .prose.prose-invert code,
body.page #primary .prose.prose-invert code {
  color: #93c5fd;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 0.4rem;
  padding: 0.1rem 0.35rem;
}

body.single-post #primary .prose.prose-invert pre,
body.page #primary .prose.prose-invert pre {
  border-radius: 0.9rem;
  border: 1px solid rgba(56, 189, 248, 0.26);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

@media (max-width: 1023px) {
  body.single-post #primary .grid.grid-cols-1.lg\:grid-cols-3 > .space-y-6,
  body.page #primary .grid.grid-cols-1.lg\:grid-cols-3 > .space-y-6 {
    position: static;
  }

  body.single-post #primary > .space-y-10 > article,
  body.page #primary > .space-y-10 > article {
    border-radius: 1.15rem;
    padding: 1rem;
  }

  body.single-post #primary .prose.prose-invert,
  body.page #primary .prose.prose-invert {
    line-height: 1.76;
  }
}

/* ---------------------------------------------------------
   Single game right rail (related games + ad slots)
---------------------------------------------------------- */
body.single-game #game-sidebar-ad {
  display: block;
}

body.single-game .game-right-rail-inner {
  display: grid;
  gap: 0.85rem;
}

body.single-game .game-right-rail-slot .ad-slot {
  width: 100%;
  max-width: 100%;
  border-radius: 0.7rem;
}

body.single-game .game-related-side {
  border-radius: 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: linear-gradient(180deg, rgba(12, 18, 33, 0.96), rgba(5, 9, 20, 0.98));
  overflow: hidden;
}

body.single-game .game-related-side-title {
  margin: 0;
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f8fafc;
  border-bottom: 1px solid rgba(51, 65, 85, 0.75);
}

body.single-game .game-related-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.5rem;
}

body.single-game .game-related-side-card {
  position: relative;
  display: block;
  border-radius: 0.5rem;
  border: 1px solid rgba(51, 65, 85, 0.85);
  overflow: hidden;
  background: #020617;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

body.single-game .game-related-side-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.45);
}

body.single-game .game-related-side-thumb {
  display: block;
  aspect-ratio: 1 / 1;
}

body.single-game .game-related-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.single-game .game-related-side-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.28rem 0.36rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92) 52%);
}

body.single-game .game-related-side-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  font-size: 0.72rem;
  color: #9aa7bf;
  padding: 0.35rem;
}

@media (min-width: 1280px) {
  body.single-game #game-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
  }

  body.single-game #game-sidebar-ad {
    position: sticky;
    top: 5.1rem;
  }
}

@media (max-width: 1279px) {
  body.single-game #game-sidebar-ad {
    margin-top: 0.5rem;
  }

  body.single-game .game-related-side-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.single-game .game-related-side-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.single-game .game-related-side-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------------
   UX refinements: menu hover, home ad slots, compact grids
---------------------------------------------------------- */
#page > nav.sticky {
  border-bottom-color: transparent !important;
}

#notification-panel {
  width: min(24rem, 92vw);
  border-radius: 14px;
  border-color: rgba(71, 85, 105, 0.9);
  background: linear-gradient(180deg, rgba(10, 17, 33, 0.98), rgba(4, 9, 20, 0.98));
  box-shadow: 0 22px 42px rgba(2, 6, 23, 0.58);
}

#notification-list a {
  margin-bottom: 0.35rem;
  border: 1px solid rgba(51, 65, 85, 0.7);
  background: rgba(15, 23, 42, 0.55);
}

#notification-list a:last-child {
  margin-bottom: 0;
}

.gp-social-proof-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(9, 15, 28, 0.95));
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.05),
    0 12px 26px rgba(2, 6, 23, 0.3);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.gp-social-proof-btn:hover,
.gp-social-proof-btn:focus-visible {
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.55);
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(2, 6, 23, 0.38),
    0 0 0 1px rgba(99, 102, 241, 0.18);
}

.gp-social-proof-btn svg {
  color: #a5b4fc;
}

.home-ad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.home-ad-grid .ad-slot,
.home-ad-grid .gp-ad-slot {
  min-height: 96px;
}

.home-section-ad-inline .ad-slot,
.home-section-ad-inline .gp-ad-slot {
  min-height: 96px;
}

.home-games-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 0.72rem !important;
}

.home-games-grid .game-card .p-3 h3,
.home-games-grid .game-card h3 {
  font-size: 0.82rem;
}

.archive-games-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
  gap: 0.68rem !important;
}

.archive-games-grid .game-card .p-3,
.archive-games-grid .game-card .absolute.bottom-0.left-0.right-0 {
  padding: 0.55rem;
}

.archive-games-grid .game-card .p-3 h3,
.archive-games-grid .game-card h3 {
  font-size: 0.76rem;
}

.gp-ad-slot {
  position: relative;
  width: 100%;
  border-radius: 14px;
  border: 1px dashed rgba(99, 102, 241, 0.48);
  background: linear-gradient(180deg, rgba(18, 25, 48, 0.88), rgba(8, 13, 27, 0.96));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gp-ad-slot-label {
  color: rgba(219, 234, 254, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.gp-ad-mpu {
  min-height: 250px;
}

.gp-ad-leaderboard {
  min-height: 96px;
}

@media (min-width: 1200px) {
  .home-ad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #primary .home-io-grid.home-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.6rem !important;
  }

  .archive-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.6rem !important;
  }

  .home-ad-grid .ad-slot,
  .home-ad-grid .gp-ad-slot,
  .home-section-ad-inline .ad-slot,
  .home-section-ad-inline .gp-ad-slot {
    min-height: 72px;
  }
}

/* ---------------------------------------------------------
   Forced desktop icon rail: collapsed by default, expand on hover
---------------------------------------------------------- */
@media (min-width: 1024px) {
  #sidebar-menu {
    position: sticky !important;
    top: 4rem;
    align-self: flex-start;
    height: calc(100vh - 4rem);
    z-index: 30;
    transform: none !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    overflow: visible !important;
  }

  #sidebar-menu:hover {
    width: 270px !important;
    max-width: 270px !important;
  }

  #sidebar-menu > div {
    width: 100% !important;
    min-width: 100% !important;
    overflow-x: hidden !important;
    padding-inline: 0.45rem !important;
    transition: width 220ms ease !important;
  }

  #sidebar-menu:hover > div {
    width: 270px !important;
    overflow-x: hidden !important;
    box-shadow: 24px 0 28px rgba(2, 6, 23, 0.45);
  }

  #sidebar-menu .sidebar-link-text,
  #sidebar-menu .sidebar-section-title {
    display: inline-block !important;
    max-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    transform: translateX(-8px) !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    transition: max-width 180ms ease, opacity 160ms ease, transform 160ms ease !important;
  }

  #sidebar-menu:hover .sidebar-link-text,
  #sidebar-menu:hover .sidebar-section-title {
    max-width: 200px !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }

  #sidebar-menu .sidebar-taxonomy-group {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top-color: rgba(51, 65, 85, 0.22);
  }

  #sidebar-menu:hover .sidebar-taxonomy-group {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top-color: rgba(51, 65, 85, 0.82);
  }

  #sidebar-menu a {
    justify-content: center !important;
    min-height: 3.2rem;
    padding: 0.6rem !important;
  }

  #sidebar-menu:hover a {
    justify-content: flex-start !important;
  }

  #sidebar-menu svg.lucide {
    width: 1.7rem !important;
    height: 1.7rem !important;
    color: #e2e8f0 !important;
    stroke-width: 2.2 !important;
    filter:
      drop-shadow(0 0 6px rgba(99, 102, 241, 0.42))
      drop-shadow(0 0 12px rgba(56, 189, 248, 0.22));
    transition: color 180ms ease, filter 180ms ease;
  }

  #sidebar-menu a.is-active svg.lucide,
  #sidebar-menu a:hover svg.lucide,
  #sidebar-menu a:focus-visible svg.lucide {
    color: #c7d2fe !important;
    filter:
      drop-shadow(0 0 10px rgba(129, 140, 248, 0.62))
      drop-shadow(0 0 18px rgba(56, 189, 248, 0.3));
  }

  #sidebar-menu a.is-active,
  #sidebar-menu a:hover,
  #sidebar-menu a:focus-visible {
    background: transparent !important;
    box-shadow: none !important;
  }

}
