:root {
  --bg: #0e1116;
  --bg-soft: #161b22;
  --card: #1b2230;
  --line: #2a3344;
  --text: #e8edf4;
  --muted: #8b97a9;
  --accent: #4f8cff;
  --xbox: #107c10;
  --ps: #0070d1;
  --new: #35d07f;
  --both: #b07cff;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.muted { color: var(--muted); }

.topbar {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 28px 0 22px;
}
.topbar h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); }
.topbar .sub { margin: 6px 0 0; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 12px; line-height: 1; flex-wrap: wrap; }
.brand-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; cursor: pointer; }
.brand-link:hover { opacity: 0.85; }
.brand-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.brand-mark { flex: 0 0 auto; }
.brand-word { font-weight: 800; letter-spacing: -0.5px; }
.brand-word .b-the { color: var(--muted); }
.brand-word .b-sub { color: var(--text); }
.brand-word .b-guide { color: var(--accent); }
.brand .region-suffix { font-size: 0.6em; font-weight: 400; }
.topbar-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.region-picker { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.region-picker select { font-size: 14px; padding: 9px 12px; min-width: 180px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-btn {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 16px; border-radius: 999px; cursor: pointer; font-weight: 600;
}
.seg-btn.active { background: var(--accent); color: #fff; }

select, input[type="search"] {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
}
input[type="search"] { flex: 1 1 200px; min-width: 160px; }
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Screenshots on/off switch */
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line);
  position: relative; transition: background .15s ease, border-color .15s ease;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--muted); transition: transform .15s ease, background .15s ease;
}
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(16px); background: #fff; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-label { font-size: 13px; color: var(--muted); }

/* Subscription plan prices */
.plans { margin: 18px auto 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px; }
.plans summary { cursor: pointer; font-weight: 700; padding: 8px 0; list-style: none; }
.plans summary::-webkit-details-marker { display: none; }
.plans summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .15s ease; color: var(--muted); }
.plans[open] summary::before { transform: rotate(90deg); }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 6px 0 14px; }
.plan-col h3 { margin: 4px 0 8px; font-size: 14px; }
.plan-col h3 .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.plan-col h3 .dot.xbox { background: var(--xbox); }
.plan-col h3 .dot.ps { background: var(--ps); }
.plan-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.plan-row .tier { font-weight: 600; }
.plan-row .amt { color: var(--text); text-align: right; }
.plan-row .amt .sub { color: var(--muted); font-size: 11px; }
.plan-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
@media (max-width: 620px) { .plans-grid { grid-template-columns: 1fr; } }

.meta-row { display: flex; justify-content: space-between; align-items: baseline; margin: 16px auto 4px; gap: 12px; flex-wrap: wrap; }
.count { font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 14px 0 60px;
}

/* Text-only mode: denser cards, no artwork, platform-coloured accent. */
.grid.no-images { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.grid.no-images .card { flex-direction: row; align-items: stretch; }
.grid.no-images .card .body { padding: 11px 13px; }
.grid.no-images .card { border-left: 3px solid var(--line); }
.grid.no-images .card.xbox { border-left-color: var(--xbox); }
.grid.no-images .card.playstation { border-left-color: var(--ps); }
.plat-pill { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: #fff; padding: 2px 6px; border-radius: 5px; }
.plat-pill.xbox { background: var(--xbox); }
.plat-pill.playstation { background: var(--ps); }

/* NEW highlight */
.card.is-new { border-color: var(--new); box-shadow: 0 0 0 1px var(--new); }
.new-ribbon {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: #08130a; background: var(--new); padding: 3px 7px; border-radius: 6px;
}
.new-pill {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
  color: #08130a; background: var(--new); padding: 2px 6px; border-radius: 5px;
}
.count .new-count { color: var(--new); font-weight: 700; }

/* "On both services" highlight */
.both-pill {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
  color: #1a0d2e; background: var(--both); padding: 2px 6px; border-radius: 5px;
}
.count .both-count { color: var(--both); font-weight: 700; }
.count .new-count, .count .both-count { cursor: pointer; }
.count .new-count:hover, .count .both-count:hover { text-decoration: underline; }
.count [role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }

.thumb {
  aspect-ratio: 3 / 4;
  background: #0b0e13 center/cover no-repeat;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.thumb .ph { color: var(--muted); font-size: 12px; padding: 8px; text-align: center; }

.badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .3px;
  padding: 3px 7px; border-radius: 6px; color: #fff; text-transform: uppercase;
}
.badge.xbox { background: var(--xbox); }
.badge.playstation { background: var(--ps); }

.body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; }
.body .name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted);
}
.price { font-size: 11px; color: var(--muted); margin-top: 2px; }

.state { text-align: center; padding: 60px 0; color: var(--muted); }
.foot { padding: 24px 0 50px; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
}
