:root {
  --bg: #0b0e14;
  --bg-raised: #12161f;
  --bg-sunken: #070911;
  --cyan: #5ee6d9;
  --magenta: #ff3e9a;
  --violet: #9d6bff;
  --amber: #ffb627;
  --text: #d7e0e8;
  --text-dim: #7c8896;
  --border: #232a36;
}

html[data-theme="light"] {
  --bg: #f2f0e9;
  --bg-raised: #ffffff;
  --bg-sunken: #e6e2d6;
  --cyan: #0e8f83;
  --magenta: #c81a70;
  --violet: #6a3fd1;
  --amber: #a86400;
  --text: #211f1a;
  --text-dim: #5c584e;
  --border: #d8d3c4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  min-height: 100%;
  transition: background-color 0.2s, color 0.2s;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 500;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 18vw rgba(0,0,0,0.65), inset 0 0 3vw rgba(0,0,0,0.5);
  z-index: 499;
}

html[data-theme="light"] body::before {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.018) 0px,
    rgba(0,0,0,0.018) 1px,
    transparent 1px,
    transparent 3px
  );
}

html[data-theme="light"] body::after {
  box-shadow: inset 0 0 18vw rgba(0,0,0,0.12), inset 0 0 3vw rgba(0,0,0,0.08);
}

.theme-toggle {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover { border-color: var(--amber); color: var(--amber); }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.site-header {
  position: sticky;
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background:
    linear-gradient(to bottom, rgba(157,107,255,0.08), transparent 60%),
    var(--bg-sunken);
  position: sticky;
  top: 0;
  z-index: 400;
  box-shadow: 0 2px 24px -4px rgba(0,0,0,0.6);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(to right, var(--violet), var(--magenta), var(--amber), var(--cyan));
}

.site-header::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eee, #666 70%);
  box-shadow: inset 0 0 2px rgba(0,0,0,0.6);
}

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  color: var(--amber);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo a { display: flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; }

.logo .coin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d8, var(--amber) 60%, #b97a00);
  box-shadow: 0 0 10px var(--amber), 0 0 22px rgba(255,182,39,0.5);
  animation: pulse 1.6s infinite ease-in-out;
}

.logo {
  text-shadow: 0 0 10px rgba(255,182,39,0.55);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.insert-coin {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.insert-coin .blink {
  animation: blink 1s steps(1) infinite;
  color: var(--magenta);
}

@keyframes blink {
  50% { opacity: 0; }
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  position: relative;
  border-radius: 10px;
  padding: 2.25rem 2rem;
  margin-bottom: 1.75rem;
  border: 10px solid transparent;
  border-image: linear-gradient(155deg, #3a4152, #12141b 35%, #12141b 65%, #4a5266) 1;
  background:
    radial-gradient(ellipse at top left, rgba(157,107,255,0.16), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(94,230,217,0.12), transparent 55%),
    var(--bg-raised);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6), inset 0 2px 30px rgba(0,0,0,0.55), 0 10px 30px -12px rgba(0,0,0,0.7);
}

.hero::before, .hero::after,
.hero .screw {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ccc, #555 70%);
  box-shadow: inset 0 0 2px rgba(0,0,0,0.7);
}

.hero::before { top: -19px; left: -19px; }
.hero::after { top: -19px; right: -19px; }

.hero h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 0.75rem;
  text-shadow: 0 0 14px rgba(157,107,255,0.35), 0 0 2px rgba(255,255,255,0.4);
}

.hero h1 .hl { color: var(--violet); }

.hero-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-text { flex: 1 1 320px; }

.featured-game {
  flex: 0 1 320px;
  width: 100%;
  max-width: 320px;
}

.featured-game .fg-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--amber);
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 8px rgba(255,182,39,0.5);
}

.featured-game .fg-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 6px solid transparent;
  border-image: linear-gradient(155deg, #454d60, #14161d 35%, #14161d 65%, #565f76) 1;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6), 0 12px 28px -12px rgba(0,0,0,0.75);
}

.featured-game .fg-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: repeating-linear-gradient(135deg, #171c27 0 10px, #1a1f2b 10px 20px);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 24px 6px rgba(0,0,0,0.6);
}

.featured-game .fg-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.7rem 0.8rem 0.6rem;
  background: linear-gradient(to top, rgba(7,9,17,0.92), transparent);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.featured-game .fg-title {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0;
}

.featured-game .fg-play {
  align-self: flex-start;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

.tagline {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 60ch;
  margin: 0;
  border-left: 2px solid var(--cyan);
  padding-left: 0.75rem;
}

.section-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin: 0 0 0.9rem;
}

.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.grid-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-input {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  width: 200px;
  max-width: 100%;
}

.search-input::placeholder { color: var(--text-dim); }
.search-input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

.sort-select {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
}

.sort-select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

.filter-bar button {
  background: linear-gradient(to bottom, #1c212d, var(--bg-raised));
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.45rem 0.9rem;
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.filter-bar button.active,
.filter-bar button:hover {
  color: var(--bg);
  background: linear-gradient(to bottom, #86ede1, var(--cyan));
  border-color: var(--cyan);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px -8px rgba(0,0,0,0.6);
  position: relative;
}

.quick-view {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  font-size: 0.6rem;
  color: var(--text);
  background: rgba(7,9,17,0.75);
  border: 1px solid var(--border);
  padding: 0.3rem 0.5rem;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  cursor: pointer;
}

.game-card:hover .quick-view,
.quick-view:focus-visible { opacity: 1; }

.quick-view:hover { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }

.game-card:hover {
  border-color: var(--magenta);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px -8px rgba(255,62,154,0.4);
}

.game-card .thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: repeating-linear-gradient(135deg, #171c27 0 10px, #1a1f2b 10px 20px);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.65rem;
  position: relative;
  box-shadow: inset 0 0 18px 4px rgba(0,0,0,0.55);
}

.game-card .info {
  padding: 0.8rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.game-card .title {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.game-card .badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.game-card .genre,
.genre {
  font-size: 0.6rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(94,230,217,0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

.game-card .license-badge,
.license-badge {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--bg);
  background: linear-gradient(to bottom, #7fe9de, var(--cyan) 55%, #38a89c);
  border: 1px solid #2c8f85;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -3px 4px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.4);
}

.btn:hover { background: linear-gradient(to bottom, #b79bff, var(--violet) 55%, #6c46c9); border-color: #6c46c9; }

/* Game play page */
.player-shell {
  position: relative;
  border-radius: 10px;
  background: #000;
  padding: 0.9rem;
  border: 12px solid transparent;
  border-image: linear-gradient(155deg, #454d60, #14161d 35%, #14161d 65%, #565f76) 1;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(0,0,0,0.6), 0 12px 32px -14px rgba(0,0,0,0.75);
}

.player-shell::before, .player-shell::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ccc, #555 70%);
  box-shadow: inset 0 0 2px rgba(0,0,0,0.7);
  top: -21px;
}

.player-shell::before { left: -21px; }
.player-shell::after { right: -21px; }

.player-frame {
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  border: none;
  display: block;
  box-shadow: inset 0 0 60px 10px rgba(0,0,0,0.7);
}

.player-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.player-meta a { color: var(--text-dim); }

.game-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.back-link {
  font-size: 0.7rem;
  color: var(--cyan);
  border: 1px solid rgba(94,230,217,0.35);
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  white-space: nowrap;
}

.back-link:hover { text-decoration: none; background: rgba(94,230,217,0.1); }

.game-title {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text);
}

.meta-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rating-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.rating-stars { display: flex; gap: 0.15rem; }

.rating-stars button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--border);
  padding: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rating-stars button.filled { color: var(--amber); }

.rating-status { font-size: 0.7rem; color: var(--cyan); }

.tag-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.tag-pill {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.game-description {
  margin-top: 0.9rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 68ch;
}

.how-to-play {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-raised);
}

.how-to-play p:last-child {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.6;
}

.creator-bio {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-raised);
}

.creator-bio p:last-child {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.6;
}

.fav-btn {
  margin-left: auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.fav-btn:hover { border-color: var(--magenta); color: var(--magenta); }
.fav-btn.active { color: var(--magenta); border-color: var(--magenta); background: rgba(255,62,154,0.08); }

.fav-toggle {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(7,9,17,0.75);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-toggle.active { color: var(--magenta); border-color: var(--magenta); }
.fav-toggle:hover { border-color: var(--magenta); }

.comments-section { margin-top: 2rem; }

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  max-width: 480px;
}

.comment-input {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
  resize: vertical;
}

.comment-input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.7rem 0.9rem;
}

.comment-item .c-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.comment-item .c-name { color: var(--cyan); }

.comment-item .c-body {
  font-size: 0.82rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.comment-empty { font-size: 0.8rem; color: var(--text-dim); }

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.post-card:hover { border-color: var(--cyan); transform: translateY(-2px); }

.post-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}

.post-info { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }

.post-date { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 0.5px; }

.post-title { font-size: 0.95rem; color: var(--text); margin: 0; }

.post-excerpt { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; margin: 0; }

.genre-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.genre-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: border-color 0.15s, color 0.15s;
}

.genre-chip:hover, .genre-chip.active {
  border-color: var(--accent, var(--cyan));
  color: var(--text);
}

.genre-icon { width: 14px; height: 14px; flex: none; background: var(--accent, var(--cyan)); }
.genre-icon.shape-circle { border-radius: 50%; }
.genre-icon.shape-diamond { transform: rotate(45deg); border-radius: 2px; }
.genre-icon.shape-square { border-radius: 3px; }

.leaderboard { margin-bottom: 1.75rem; }

.empty-note {
  color: var(--text-dim);
  font-size: 0.8rem;
  border: 1px dashed var(--border);
  padding: 1.5rem;
  text-align: center;
  border-radius: 4px;
}

.leaderboard-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.leaderboard-tabs a {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 4px;
  text-decoration: none;
}

.leaderboard-tabs a:hover { color: var(--cyan); border-color: var(--cyan); }

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.leaderboard-item .rank {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--amber);
  width: 1.6rem;
  flex: none;
}

.leaderboard-item .lb-thumb {
  width: 40px;
  height: 30px;
  flex: none;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  background-color: #1a1f2b;
}

.leaderboard-item .lb-title {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-item .lb-count { color: var(--text-dim); font-size: 0.7rem; flex: none; }

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
}

footer a { color: var(--text-dim); }

.newsletter {
  max-width: 420px;
  margin: 0 auto 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  background: var(--bg-raised);
}

.newsletter-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.newsletter-input {
  flex: 1 1 180px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
}

.newsletter-input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

.newsletter-msg {
  color: var(--cyan);
  font-size: 0.75rem;
  margin: 0.75rem 0 0;
}

.submit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row .form-field { flex: 1 1 200px; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
  resize: vertical;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-raised) 25%, var(--border) 50%, var(--bg-raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 3px;
}

.skeleton-card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.skeleton-card .thumb { animation: shimmer 1.4s ease-in-out infinite; background: linear-gradient(90deg, var(--bg-raised) 25%, var(--border) 50%, var(--bg-raised) 75%); background-size: 200% 100%; }
.skeleton-card .info { padding: 0.8rem 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
.skeleton-line { height: 0.85rem; width: 70%; }
.skeleton-pill { height: 1.3rem; width: 3.5rem; border-radius: 3px; display: inline-block; }
.skeleton-badges { display: flex; gap: 0.4rem; }

.ad-slot {
  margin: 1.5rem 0;
  min-height: 90px;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.7rem;
}

.ad-unit {
  margin: 1.5rem 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.high-score-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.high-score-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: var(--amber);
  text-shadow: 0 0 8px rgba(255,182,39,0.5);
}

.more-games {
  margin-top: 2rem;
}

.more-games .game-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,5,9,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 600;
}

.modal-overlay[hidden] { display: none; }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  border: 10px solid transparent;
  border-image: linear-gradient(155deg, #454d60, #14161d 35%, #14161d 65%, #565f76) 1;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6), 0 20px 50px -16px rgba(0,0,0,0.8);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(7,9,17,0.75);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { background: var(--magenta); border-color: var(--magenta); color: var(--bg); }

.modal-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: repeating-linear-gradient(135deg, #171c27 0 10px, #1a1f2b 10px 20px);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 24px 6px rgba(0,0,0,0.6);
}

/* Thumbnails render as real <img loading="lazy"> now instead of CSS
   background-images, so below-the-fold cards don't download until scrolled
   into view. These containers keep their sizing/box-shadow; the img just
   fills them the way background-size:cover used to. */
.thumb img,
.fg-thumb img,
.modal-thumb img,
.lb-thumb img,
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-info {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modal-info .title {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0;
}

.modal-info .badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.modal-info .credit {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.modal-info .credit a { color: var(--text-dim); }

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  box-shadow: 0 12px 32px -12px rgba(0,0,0,0.7);
  z-index: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.cookie-banner p { margin: 0; flex: 1 1 260px; line-height: 1.5; }
.cookie-banner p a { color: var(--cyan); }

.cookie-banner-actions { display: flex; gap: 0.6rem; flex: none; }

.cookie-btn {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  background: var(--cyan);
  color: var(--bg);
  border: 1px solid var(--cyan);
}

.cookie-btn:hover { background: var(--amber); border-color: var(--amber); }

.cookie-btn-ghost { background: none; color: var(--text-dim); border: 1px solid var(--border); }
.cookie-btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }

/* Touch controls: virtual D-pad + action buttons for keyboard-only games.
   Built for every game with a control config regardless of device, and
   shown responsively so touchscreen laptops/tablets in a narrow window
   still get them, not just phones. */
.touch-controls {
  display: none;
  margin-top: 0.9rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  -webkit-user-select: none;
  user-select: none;
}

.touch-controls[hidden] { display: none; }

@media (max-width: 900px) {
  .touch-controls:not([hidden]) { display: flex; }
}

.tc-dpad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 4px;
  flex: none;
}

.tc-btn {
  background: linear-gradient(to bottom, #1c212d, var(--bg-raised));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 2px 6px -2px rgba(0,0,0,0.6);
}

.tc-btn:active,
.tc-btn.tc-active {
  background: linear-gradient(to bottom, #86ede1, var(--cyan));
  border-color: var(--cyan);
  color: var(--bg);
}

.tc-dpad .tc-up { grid-column: 2; grid-row: 1; }
.tc-dpad .tc-left { grid-column: 1; grid-row: 2; }
.tc-dpad .tc-right { grid-column: 3; grid-row: 2; }
.tc-dpad .tc-down { grid-column: 2; grid-row: 3; }

.tc-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tc-actions .tc-btn {
  width: auto;
  min-width: 56px;
  height: 48px;
  padding: 0 0.9rem;
  border-radius: 50%;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

@media (max-width: 640px) {
  .cookie-banner { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; padding: 0.9rem; gap: 0.75rem; }
  .site-header { padding: 0.9rem 1rem; }
  .site-header::before, .site-header::after { display: none; }
  main { padding: 1.25rem 1rem 3rem; }
  .hero { padding: 1.5rem 1.25rem; border-width: 6px; }
  .hero::before, .hero::after { display: none; }
  .hero-content { gap: 1.25rem; }
  .featured-game { max-width: 100%; }
  .hero h1 { font-size: clamp(0.95rem, 5vw, 1.2rem); line-height: 1.5; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.85rem; }
  .filter-bar { gap: 0.4rem; }
  .filter-bar button { padding: 0.4rem 0.7rem; font-size: 0.7rem; }
  .player-shell { border-width: 6px; padding: 0.5rem; }
  .player-shell::before, .player-shell::after { display: none; }
  .player-meta { flex-direction: column; align-items: flex-start; }
  .fav-toggle { width: 36px; height: 36px; }
  .quick-view { opacity: 1; padding: 0.4rem 0.6rem; }
  .tc-dpad { grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 52px); }
  .tc-actions .tc-btn { height: 52px; min-width: 60px; }
}
