:root {
  --bg: #07090f;
  --bg-2: #0d111d;
  --panel: rgba(17, 23, 38, 0.86);
  --panel-strong: #121827;
  --text: #f7fbff;
  --muted: #9ca8bd;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #22d3ee;
  --green: #a3e635;
  --red: #fb425f;
  --yellow: #facc15;
  --blue: #60a5fa;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Saira, Arial, Helvetica, sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(135deg, #07090f 0%, #111827 48%, #09111a 100%);
  background-size: 42px 42px, 42px 42px, auto;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(120deg, rgba(34, 211, 238, 0.12), transparent 28%),
    linear-gradient(300deg, rgba(251, 66, 95, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(163, 230, 53, 0.07), transparent 58%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 6px);
  mix-blend-mode: overlay;
  opacity: 0.22;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.hero-icon,
.mini-thumb,
.detail-poster img,
.download-icon,
.recommended-card,
.similar-game-card img,
.guide-card img {
  background-color: var(--panel-strong);
  background-image: url("assets/neonplay-logo-gray.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 42%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 12px clamp(16px, 4vw, 36px);
  background: rgba(7, 9, 15, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 14px;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.3));
}

.brand-copy {
  display: grid;
  gap: 0;
  line-height: 1;
}

.brand-copy strong {
  font-family: Rajdhani, Saira, sans-serif;
  font-size: 1.35rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
}

.menu-toggle {
  position: absolute;
  top: 11px;
  right: 12px;
  z-index: 90;
  display: inline-grid !important;
  gap: 5px;
  width: 46px;
  min-height: 46px;
  padding: 10px;
  visibility: visible !important;
  opacity: 1 !important;
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(17, 23, 38, 0.94);
}

.menu-toggle span {
  display: none;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle::before {
  content: "☰";
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

body.menu-open .menu-toggle::before {
  content: "×";
}

@media (min-width: 1181px) {
  .menu-toggle {
    display: none;
  }
}

.icon-button {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  gap: 4px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

body[data-page="topgames"] main {
  width: 100%;
  max-width: none;
}

body[data-page="topgames"] .site-header,
body[data-page="topgames"] .toolbar {
  display: none;
}

body[data-page="topgames"] .topgames-wall {
  padding: 0;
}

.hero {
  height: 552px;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  align-items: center;
  gap: clamp(22px, 4vw, 48px);
  padding: 30px 0 28px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 310px;
  padding: 58px 0 28px;
}

.page-hero.compact {
  min-height: 260px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Rajdhani, Saira, sans-serif;
  letter-spacing: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.86;
}

.hero h1 {
  max-width: 700px;
  margin-bottom: 12px;
  font-size: clamp(2.95rem, 4.2vw, 4.65rem);
  line-height: 0.92;
}

.hero-highlight {
  color: var(--green);
  text-shadow: 0 0 28px rgba(163, 230, 53, 0.34);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 0.95;
}

h3 {
  font-size: 1.35rem;
}

.lead {
  max-width: 720px;
  color: #c7d2e6;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}

.hero-lead {
  max-width: 640px;
  font-size: clamp(0.94rem, 1.15vw, 1rem);
  line-height: 1.38;
}

.hero-lead p {
  margin-bottom: 6px;
}

.hero-lead p:last-child {
  margin-bottom: 0;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.hero .button {
  min-height: 44px;
  padding: 10px 16px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #081018;
  background: var(--cyan);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.18);
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover,
.game-tile:hover {
  transform: translateY(-3px);
}

.button.primary {
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  box-shadow: none;
}

.button.compact {
  min-height: 40px;
  padding: 9px 13px;
  font-size: 0.9rem;
}

.text-link {
  color: var(--cyan);
  font-weight: 900;
}

.featured-cta {
  border-color: rgba(163, 230, 53, 0.7);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.22), 0 0 24px rgba(163, 230, 53, 0.18);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.hero-metrics span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 800;
}

.hero-metrics strong {
  color: var(--text);
  font-family: Rajdhani, Saira, sans-serif;
  font-size: 1.35rem;
}

.hero-stage {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 42px 22px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius);
  transform: skewY(-4deg);
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(34, 211, 238, 0.16) 48% 52%, transparent 52%),
    rgba(255, 255, 255, 0.035);
}

.hero-picks-card {
  position: relative;
  z-index: 1;
  width: min(305px, 100%);
  display: grid;
  gap: 9px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(251, 66, 95, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(11, 18, 31, 0.96), rgba(16, 20, 36, 0.92));
  box-shadow: var(--shadow);
  animation: floatCard 5s ease-in-out infinite;
}

.hero-picks-head,
.hero-picks-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-picks-head strong {
  font-family: Rajdhani, Saira, sans-serif;
  font-size: 1.35rem;
}

.hero-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero-icon {
  position: relative;
  min-height: 78px;
  overflow: hidden;
  display: grid;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.hero-icon:hover,
.hero-icon.active {
  transform: translateY(-3px);
  border-color: rgba(163, 230, 53, 0.7);
}

.hero-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-icon span {
  position: relative;
  z-index: 1;
  padding: 26px 8px 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.hero-picks-footer {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-picks-footer .button {
  min-height: 38px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

.quick-panel,
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.quest-card,
.mini-board,
.arena-panel,
.watchlist-panel,
.tips-panel,
.challenge-list,
.toolbar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.quest-card,
.mini-board,
.arena-panel,
.watchlist-panel,
.tips-panel,
.challenge-list {
  padding: 20px;
}

.quest-progress {
  height: 12px;
  overflow: hidden;
  margin: 18px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.quest-progress span {
  display: block;
  width: 32%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
  transition: width 0.35s ease;
}

.mini-board [data-hot-zones],
.challenge-list,
.tips-panel {
  display: grid;
  gap: 10px;
}

.hot-zone,
.tip-row,
.challenge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.hot-zone strong,
.tip-row strong,
.challenge-row strong {
  font-family: Rajdhani, Saira, sans-serif;
  font-size: 1.25rem;
}

.section {
  padding: 58px 0;
}

body[data-page="download"] .screenshot-section {
  padding-top: 14px;
  padding-bottom: 8px;
}

body[data-page="download"] .recommended-section {
  padding-top: 8px;
}

body[data-page="game"] .split-section {
  padding-bottom: 12px;
}

body[data-page="game"] .split-section + .section {
  padding-top: 10px;
}

.no-top-padding {
  padding-top: 20px;
}

.legal-page {
  display: grid;
  gap: 22px;
  padding-bottom: 24px;
}

.legal-header {
  position: sticky;
}

.legal-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.legal-meta span {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #c7d2e6;
}

.legal-meta strong,
.contact-card .eyebrow {
  color: var(--green);
}

.legal-content {
  display: grid;
  gap: 12px;
}

.legal-content h2 {
  margin-top: 12px;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li,
.contact-card p {
  color: #c7d2e6;
  line-height: 1.65;
}

.legal-content ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.legal-content li::marker {
  color: var(--green);
}

.legal-content a,
.legal-meta a,
.contact-card a {
  color: var(--cyan);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  display: grid;
  gap: 10px;
}

.contact-link {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 900;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.mini-game-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.mini-game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.6);
}

.mini-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.mini-game-card:hover .mini-thumb img {
  transform: scale(1.04);
}

.mini-game-copy {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 10px 10px 12px;
}

.mini-meta {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.mini-game-card h3 {
  font-size: 1.05rem;
  line-height: 1.05;
  display: -webkit-box;
  min-height: 2.1em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-page="game"] .similar-games-list {
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 8px;
}

.similar-game-card {
  min-height: 68px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(163, 230, 53, 0.05)),
    rgba(255, 255, 255, 0.045);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.similar-game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.62);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(163, 230, 53, 0.1)),
    rgba(255, 255, 255, 0.07);
}

.similar-game-card img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  object-fit: cover;
}

.similar-game-card span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.similar-game-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.similar-game-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.split-section .arena-panel p,
.split-section .watchlist-panel p {
  color: #c7d2e6;
  line-height: 1.65;
}

.split-section .watchlist-panel h2 {
  font-size: clamp(1.8rem, 3.1vw, 2.8rem);
}

.split-section .watchlist-panel h3 {
  margin: 18px 0 10px;
  font-size: 1.35rem;
}

.split-section .loop-grid span {
  border-color: rgba(34, 211, 238, 0.34);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(163, 230, 53, 0.14)),
    rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(34, 211, 238, 0.08);
}

.split-section .loop-grid span:nth-child(even) {
  border-color: rgba(163, 230, 53, 0.34);
  background:
    linear-gradient(135deg, rgba(163, 230, 53, 0.18), rgba(34, 211, 238, 0.13)),
    rgba(255, 255, 255, 0.08);
}

.loop-grid span,
.tag,
.game-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: #c7d2e6;
  font-size: 0.86rem;
  font-weight: 800;
}

.watchlist-panel [data-watchlist] {
  display: grid;
  gap: 10px;
}

.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.watch-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.watch-row img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  object-fit: cover;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guide-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-card {
  min-height: 300px;
  display: grid;
  grid-template-rows: 190px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.guide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-card div {
  padding: 16px;
}

.guide-card p {
  color: var(--muted);
  line-height: 1.55;
}

.rank-pulse {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(34, 211, 238, 0.38);
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(34, 211, 238, 0.18) 0 12deg, rgba(255, 255, 255, 0.04) 12deg 24deg);
}

.rank-pulse strong {
  font-family: Rajdhani, Saira, sans-serif;
  font-size: 4rem;
  line-height: 0.9;
}

.rank-pulse span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.toolbar {
  position: sticky;
  top: 76px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr minmax(170px, auto);
  align-items: end;
  gap: 12px;
  padding: 14px;
  backdrop-filter: blur(18px);
}

body[data-page="topgames"] .toolbar {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

body[data-page="topgames"] .section {
  padding: 0;
}

body[data-page="topgames"] .grid-status {
  padding: 0 12px;
}

.search-field {
  display: grid;
  gap: 6px;
}

.search-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-row button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-weight: 900;
}

.filter-row button.active {
  color: #081018;
  background: var(--green);
  border-color: transparent;
}

.grid-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.top-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  --top-cell: 104px;
  grid-auto-rows: var(--top-cell);
  grid-auto-flow: dense;
  gap: 6px;
}

.game-tile {
  position: relative;
  min-height: 0;
  display: grid;
  align-content: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  isolation: isolate;
  background-color: var(--panel-strong);
  background-image:
    url("assets/neonplay-logo-gray.svg"),
    linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(163, 230, 53, 0.06));
  background-position: center;
  background-repeat: no-repeat;
  background-size: 46%, cover;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.26);
  transform: translateY(10px);
  opacity: 0;
  animation: tileIn 0.55s ease forwards;
  transition: transform 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.game-tile.tile-large {
  grid-column: span 2;
  grid-row: span 2;
}

.game-tile:hover {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 20px 55px rgba(34, 211, 238, 0.14);
}

@keyframes tileIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.game-tile.image-loaded img {
  opacity: 1;
}

.game-tile:hover img {
  transform: scale(1.08);
  filter: saturate(1.16) contrast(1.05);
}

.game-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 18%, rgba(0, 0, 0, 0.1) 48%, rgba(0, 0, 0, 0.9) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 46%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.game-tile:hover::before,
.game-tile:focus-within::before {
  opacity: 1;
}

.game-tile::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: skewX(-16deg);
  transition: left 0.45s ease;
}

.game-tile:hover::after {
  left: 112%;
}

.tile-content {
  display: grid;
  gap: 3px;
  padding: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.game-tile:hover .tile-content,
.game-tile:focus-within .tile-content {
  opacity: 1;
  transform: translateY(0);
}

.tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tile-content h3 {
  margin: 0;
  font-size: 0.82rem;
  line-height: 0.95;
}

.tile-content > span {
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-tile.tile-large .tile-content {
  gap: 5px;
  padding: 14px;
}

.game-tile.tile-large .tile-content h3 {
  font-size: 1.35rem;
}

.game-tile.tile-large .tile-content > span {
  font-size: 0.78rem;
}

.tile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.save-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-weight: 900;
}

.save-button.active {
  color: #081018;
  background: var(--yellow);
  border-color: transparent;
}

.game-detail {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  justify-content: stretch;
  align-items: stretch;
  gap: 16px;
  padding: 34px 0 16px;
}

.detail-poster,
.detail-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-poster {
  display: grid;
  grid-template-rows: 202px 1fr;
  gap: 8px;
  overflow: visible;
  align-self: stretch;
  height: 335px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.detail-poster img {
  display: block;
  width: 202px;
  height: 202px;
  justify-self: center;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-poster .actions {
  display: grid;
  grid-template-columns: 1fr;
  padding: 16px;
  margin: 0;
}

.detail-copy {
  padding: clamp(18px, 2.5vw, 26px);
  min-height: 335px;
}

.detail-copy h1 {
  max-width: 760px;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.poster-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  min-height: 0;
}

.poster-stats .stat-card strong {
  font-size: clamp(0.95rem, 1.2vw, 1.12rem);
  line-height: 0.98;
}

.mobile-stat-grid {
  display: none;
}

.stat-card {
  display: grid;
  gap: 3px;
  min-height: 0;
  align-content: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  font-family: Rajdhani, Saira, sans-serif;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1;
}

.download-cta {
  width: 100%;
  min-height: 56px;
  margin: 2px 0 0;
  gap: 10px;
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.22), 0 0 28px rgba(163, 230, 53, 0.2);
}

.download-cta svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-detail {
  display: grid;
  gap: 14px;
  padding: 34px 0 16px;
}

.download-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(132px, 168px) minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon meta";
  align-items: center;
  gap: 14px 20px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.download-icon {
  grid-area: icon;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.download-poster {
  display: grid;
  grid-template-rows: 202px 1fr;
  gap: 8px;
  height: 335px;
}

.download-poster > img {
  display: block;
  width: 202px;
  height: 202px;
  justify-self: center;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.download-meta-grid {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  min-height: 0;
}

.download-meta-grid .stat-card strong {
  font-size: clamp(0.82rem, 1vw, 1rem);
  line-height: 1;
}

.download-title {
  grid-area: title;
  display: grid;
  gap: 8px;
}

.download-title h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.3rem, 4.5vw, 4.2rem);
  line-height: 0.9;
}

.download-rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.download-rating-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(163, 230, 53, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #dce7f7;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.store-section {
  width: 100%;
  display: block;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.07), rgba(163, 230, 53, 0.05)), var(--panel);
  box-shadow: var(--shadow);
}

.store-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.store-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.store-button {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(163, 230, 53, 0.12)),
    rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 42px rgba(34, 211, 238, 0.12);
}

.store-button:hover {
  transform: translateY(-2px);
  border-color: rgba(163, 230, 53, 0.58);
}

.store-button svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-button span {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.store-button small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.store-button strong {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.store-note,
.section-count {
  color: var(--muted);
}

.screenshot-heading-line {
  max-width: 100%;
  color: #f8fbff;
  font-size: clamp(1.55rem, 3.2vw, 2.7rem);
  line-height: 1.05;
}

.store-note {
  margin: 14px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.recommended-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.recommended-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommended-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 22px 8px 8px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.88);
}

.game-description {
  display: grid;
  gap: 10px;
}

.game-description h2 {
  margin-bottom: 2px;
}

.game-review-block {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.game-review-block:first-of-type {
  border-top: 0;
  padding-top: 2px;
}

.game-review-block h3 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.05;
}

.game-description p {
  max-width: 980px;
  color: #c7d2e6;
  line-height: 1.65;
}

.game-description ul {
  display: grid;
  gap: 7px;
  max-width: 920px;
  margin: 0;
  padding-left: 20px;
  color: #c7d2e6;
  line-height: 1.55;
}

.game-description li::marker {
  color: var(--green);
}

.game-disclaimer {
  margin-top: 6px;
  padding: 14px;
  border: 1px solid rgba(163, 230, 53, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(163, 230, 53, 0.11), rgba(34, 211, 238, 0.08));
}

.game-disclaimer strong {
  color: var(--green);
}

.legal-disclaimer {
  display: grid;
  gap: 10px;
}

.legal-disclaimer h2 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
}

.legal-disclaimer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #c7d2e6;
  line-height: 1.55;
}

.legal-disclaimer li::marker {
  color: var(--green);
}

.footer-disclaimer {
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.07), rgba(163, 230, 53, 0.05)),
    rgba(255, 255, 255, 0.035);
}

.screenshot-frame {
  position: relative;
}

.screenshot-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  min-height: 44px;
  padding: 0;
  transform: translateY(-50%);
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--text);
  background: rgba(7, 9, 15, 0.82);
  box-shadow: var(--shadow);
  font-family: Rajdhani, Saira, sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}

.screenshot-prev {
  left: 10px;
}

.screenshot-next {
  right: 10px;
}

.screenshot-nav:hover {
  border-color: rgba(163, 230, 53, 0.72);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.88), rgba(163, 230, 53, 0.88));
  color: #081018;
}

.accordion {
  display: grid;
  gap: 8px;
}

.accordion button {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  text-align: left;
  font-weight: 900;
}

.accordion div {
  display: none;
  padding: 0 14px 12px;
  color: var(--muted);
  line-height: 1.6;
}

.accordion button.active + div {
  display: block;
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  align-items: start;
  gap: 18px;
  margin: 28px auto 0;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer div {
  display: grid;
  gap: 4px;
}

.site-footer strong {
  color: var(--text);
}

.site-footer nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 4px;
}

.site-footer a {
  color: #c7d2e6;
  font-weight: 800;
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .top-games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .featured-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .legal-meta,
  .contact-grid,
  .download-detail {
    grid-template-columns: 1fr;
  }

  .download-poster {
    grid-template-rows: auto auto;
    height: auto;
  }

  .download-poster > img {
    width: min(220px, 60vw);
    height: min(220px, 60vw);
  }

  .download-card {
    grid-template-columns: 118px minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "meta meta";
    min-height: 0;
    align-items: start;
  }

  .download-title h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .store-section {
    grid-template-columns: 1fr;
  }

  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-header {
    align-items: flex-start;
  }

  .hero,
  .quick-panel,
  .split-section,
  .game-detail,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero {
    height: auto;
    min-height: 0;
  }

  .hero-stage {
    min-height: 380px;
  }

  .page-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .guide-grid,
  .guide-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    position: static;
  }
}

@media (max-width: 620px) {
  main,
  .site-footer {
    width: min(100% - 24px, var(--max));
  }

  .store-buttons {
    grid-template-columns: 1fr;
  }

  .download-card {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "meta meta";
    gap: 10px;
    padding: 10px;
  }

  .download-title {
    gap: 6px;
    align-self: center;
  }

  .download-title h1 {
    font-size: clamp(1.4rem, 7vw, 1.85rem);
    line-height: 0.9;
  }

  .store-section {
    padding: 12px;
  }

  .download-meta-grid,
  .recommended-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommended-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .download-meta-grid {
    gap: 6px;
  }

  .download-meta-grid .stat-card {
    padding: 6px;
  }

  .download-meta-grid .stat-card span {
    font-size: 0.54rem;
  }

  .download-meta-grid .stat-card strong {
    font-size: 0.78rem;
    line-height: 1;
  }

  .store-button {
    min-height: 52px;
    justify-content: flex-start;
    padding: 9px 10px;
  }

  .store-button svg {
    width: 24px;
    height: 24px;
  }

  body[data-page="topgames"] main {
    width: 100%;
  }

  .site-header {
    min-height: 68px;
    padding: 10px 12px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .brand-copy strong {
    font-size: 1.1rem;
  }

  h1 {
    font-size: 3rem;
    line-height: 0.92;
  }

  h2 {
    font-size: 2.15rem;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-stage {
    min-height: 330px;
  }

  .hero-picks-card {
    width: min(320px, 100%);
    padding: 12px;
  }

  .hero-icon-grid {
    gap: 7px;
  }

  .hero-icon {
    min-height: 82px;
  }

  .section-head,
  .site-footer {
    align-items: flex-start;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .featured-strip,
  .guide-grid,
  .guide-grid.wide,
  .top-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-games-grid {
    gap: 4px;
  }

  .game-tile,
  .game-tile:nth-child(7n + 1),
  .game-tile:nth-child(11n + 4),
  .game-tile:nth-child(9n + 3) {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 210px;
  }

  .tile-content {
    padding: 7px;
  }

  .tile-content h3 {
    font-size: 0.76rem;
  }

  .tile-meta {
    font-size: 0.68rem;
  }

  .loop-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .guide-card {
    grid-template-rows: 130px 1fr;
    min-height: 260px;
  }

  body[data-page="game"] .site-header {
    display: none;
  }

  body[data-page="game"] main {
    width: min(100% - 16px, var(--max));
  }

  body[data-page="game"] .game-detail {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  body[data-page="game"] .detail-poster,
  body[data-page="game"] .detail-copy {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="game"] .detail-poster {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    display: block;
    height: auto;
    overflow: visible;
  }

  body[data-page="game"] .detail-poster img {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  body[data-page="game"] .poster-stats {
    display: none;
  }

  body[data-page="game"] .detail-poster .actions {
    display: none;
  }

  body[data-page="game"] .detail-copy {
    display: contents;
    padding: 0;
  }

  body[data-page="game"] .detail-copy > .eyebrow,
  body[data-page="game"] .detail-copy > h1,
  body[data-page="game"] .detail-copy > .lead {
    grid-column: 2;
    margin: 0;
  }

  body[data-page="game"] .detail-copy > .eyebrow {
    align-self: end;
    font-size: 0.64rem;
  }

  body[data-page="game"] .detail-copy h1 {
    max-width: none;
    font-size: clamp(1.45rem, 8vw, 2.05rem);
    line-height: 0.98;
  }

  body[data-page="game"] .detail-copy > .lead {
    display: -webkit-box;
    overflow: hidden;
    color: #c7d2e6;
    font-size: 0.78rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  body[data-page="game"] .detail-copy > .stat-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 0;
  }

  body[data-page="game"] .detail-copy > .download-cta {
    grid-column: 1 / -1;
    min-height: 46px;
    margin: 8px 0 0;
    padding: 10px 14px;
  }

  body[data-page="game"] .stat-card {
    gap: 2px;
    padding: 7px 5px;
    text-align: center;
  }

  body[data-page="game"] .stat-card span {
    font-size: 0.56rem;
  }

  body[data-page="game"] .stat-card strong {
    font-size: 0.95rem;
  }

  body[data-page="game"] .detail-copy > .loop-grid {
    display: none;
  }

  body[data-page="game"] .game-detail + .section {
    padding: 12px 0 26px;
  }

  body[data-page="game"] .game-detail + .section .section-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  body[data-page="game"] .game-detail + .section h2 {
    font-size: 1.65rem;
  }

  body[data-page="game"] .game-description-section {
    padding: 0 0 24px;
  }

  body[data-page="game"] .game-description {
    padding: 14px;
  }

  body[data-page="game"] .game-description h2 {
    font-size: 1.8rem;
  }

  body[data-page="game"] .game-description p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  body[data-page="game"] .game-disclaimer {
    padding: 12px;
  }

  body[data-page="game"] .similar-games-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body[data-page="game"] .similar-game-card {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 58px;
    gap: 7px;
    padding: 7px;
  }

  body[data-page="game"] .similar-game-card img {
    width: 44px;
    height: 44px;
  }

  body[data-page="game"] .similar-game-card strong {
    font-size: 0.78rem;
  }

  body[data-page="game"] .similar-game-card small {
    font-size: 0.62rem;
  }

  body[data-page="game"] .footer-disclaimer {
    padding: 14px;
  }

  body[data-page="game"] .legal-disclaimer h2 {
    font-size: 1.75rem;
  }

  body[data-page="game"] .legal-disclaimer ul {
    gap: 7px;
    padding-left: 18px;
    font-size: 0.88rem;
  }

  body[data-page="game"] .screenshot-nav {
    width: 38px;
    min-height: 38px;
    font-size: 1.25rem;
  }

  body[data-page="game"] .screenshot-prev {
    left: 6px;
  }

  body[data-page="game"] .screenshot-next {
    right: 6px;
  }
}

body[data-page="topgames"] .top-games-grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  --top-cell: clamp(82px, 8vw, 112px);
  grid-auto-rows: var(--top-cell);
  grid-auto-flow: dense;
  gap: 6px;
  padding: 6px;
}

body[data-page="topgames"] .game-tile,
body[data-page="topgames"] .game-tile:nth-child(7n + 1),
body[data-page="topgames"] .game-tile:nth-child(11n + 4),
body[data-page="topgames"] .game-tile:nth-child(9n + 3) {
  grid-column: span 1;
  grid-row: span 1;
  min-height: 0;
  aspect-ratio: auto;
}

body[data-page="topgames"] .game-tile.tile-large {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 620px) {
  body[data-page="topgames"] .top-games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    --top-cell: calc((100vw - 23px) / 4);
    grid-auto-rows: var(--top-cell);
    gap: 4px;
    padding: 4px;
  }

  body[data-page="topgames"] .game-tile.tile-large {
    grid-column: span 2;
    grid-row: span 2;
  }

}

/* Reference-style screenshot rail: portrait stays narrow, landscape stays wide, no crop. */
body[data-page="game"] .screenshot-rail,
body[data-page="download"] .screenshot-rail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-page="game"] .screenshot-rail::-webkit-scrollbar,
body[data-page="download"] .screenshot-rail::-webkit-scrollbar {
  display: none;
}

body[data-page="game"] .screenshot,
body[data-page="download"] .screenshot,
body[data-page="game"] .screenshot.shot-portrait,
body[data-page="game"] .screenshot.shot-landscape,
body[data-page="download"] .screenshot.shot-portrait,
body[data-page="download"] .screenshot.shot-landscape {
  flex: 0 0 auto !important;
  width: auto;
  max-width: none;
  border: 0;
  background: transparent;
}

body[data-page="game"] .screenshot img,
body[data-page="download"] .screenshot img,
body[data-page="game"] .screenshot.shot-portrait img,
body[data-page="game"] .screenshot.shot-landscape img,
body[data-page="download"] .screenshot.shot-portrait img,
body[data-page="download"] .screenshot.shot-landscape img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-height: 250px;
  max-width: none;
  object-fit: contain !important;
  object-position: center;
  border-radius: 8px;
}

@media (max-width: 767px) {
  body[data-page="game"] .screenshot-rail,
  body[data-page="download"] .screenshot-rail {
    gap: 10px;
  }

  body[data-page="game"] .screenshot img,
  body[data-page="download"] .screenshot img,
  body[data-page="game"] .screenshot.shot-portrait img,
  body[data-page="game"] .screenshot.shot-landscape img,
  body[data-page="download"] .screenshot.shot-portrait img,
  body[data-page="download"] .screenshot.shot-landscape img {
    max-height: 250px;
    max-width: calc(100vw - 48px);
  }
}

@media (max-width: 1180px) {
  body.menu-open {
    overflow: hidden;
  }

  .site-header {
    align-items: center;
  }

  .menu-toggle {
    position: absolute;
    top: 11px;
    right: 12px;
    z-index: 90;
    display: inline-grid !important;
    gap: 5px;
    width: 46px;
    min-height: 46px;
    padding: 10px;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 80;
    width: min(82vw, 320px);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    padding: 88px 16px 20px;
    border-left: 1px solid rgba(34, 211, 238, 0.24);
    background:
      linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(163, 230, 53, 0.05)),
      rgba(7, 9, 15, 0.97);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.42);
    clip-path: inset(0 0 0 100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: clip-path 0.22s ease, opacity 0.18s ease, visibility 0.18s ease;
  }

  body.menu-open .nav {
    clip-path: inset(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .nav a {
    width: 100%;
    min-height: 46px;
    justify-content: flex-start;
    padding: 11px 12px;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.045);
  }

  body.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 620px) {
  body[data-page="home"] .featured-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 6px;
  }

  body[data-page="home"] .mini-game-card {
    align-self: start;
  }

  body[data-page="home"] .mini-game-copy {
    gap: 3px;
    min-height: 0;
    padding: 7px 7px 8px;
  }

  body[data-page="home"] .mini-meta {
    font-size: 0.58rem;
    line-height: 1.1;
  }

  body[data-page="home"] .mini-game-card h3 {
    min-height: 0;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.05;
  }

  body[data-page="home"] .featured-head {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    min-height: 52px;
    padding-right: 0;
    width: 100%;
  }

  body[data-page="home"] .featured-head > div {
    min-width: 0;
  }

  body[data-page="home"] .featured-head h2 {
    max-width: none;
    overflow: hidden;
    font-size: clamp(0.86rem, 4.4vw, 1.28rem);
    line-height: 1;
    text-overflow: clip;
    white-space: nowrap;
  }

  body[data-page="home"] .featured-cta {
    position: absolute;
    top: 0;
    right: 0;
    width: 105px;
    min-height: 44px;
    padding: 7px 6px;
    font-size: 1rem;
    justify-content: center;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }
}
