:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #181b20;
  --panel-strong: #20242b;
  --line: #303741;
  --text: #f7f3ea;
  --muted: #b7b0a4;
  --gold: #e7c46b;
  --green: #39d98a;
  --green-bg: #102d22;
  --red: #ff6f61;
  --red-bg: #331918;
  --link: #8cc8ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(231, 196, 107, 0.14), transparent 34rem),
    linear-gradient(135deg, #101113 0%, #17181b 46%, #111317 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header,
.site-footer,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.site-footer,
.eyebrow,
.meta-row,
.platforms,
.card-footer,
.verdict-panel span,
.verdict-panel small,
.results-meta {
  color: var(--muted);
}

nav {
  display: flex;
  gap: 10px;
}

nav a,
.back-link,
.card-footer a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 28px;
  padding: 70px 0 42px;
}

.hero h1,
.page-heading h1,
.game-hero h1 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p,
.page-heading p,
.game-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: rgba(24, 27, 32, 0.78);
}

.hero-stats div {
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats strong {
  display: block;
  font-size: 2rem;
  color: var(--gold);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.database-shell,
.reason-body,
.verdict-panel {
  border: 1px solid var(--line);
  background: rgba(24, 27, 32, 0.9);
}

.database-shell {
  padding: 24px;
  margin-bottom: 46px;
}

.database-toolbar,
.card-topline,
.card-footer,
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.database-toolbar h2 {
  margin: 0;
  font-size: 1.65rem;
}

.segmented {
  display: inline-flex;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  background: #121417;
}

.segmented button {
  min-width: 58px;
  border: 0;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.segmented button.is-active {
  background: var(--gold);
  color: #17130a;
}

.search-box {
  display: grid;
  gap: 8px;
  margin: 24px 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 1px solid #46505d;
  border-radius: 0;
  padding: 17px 18px;
  background: #0f1114;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(231, 196, 107, 0.16);
}

.results-meta {
  min-height: 22px;
  margin-bottom: 18px;
  font-size: 0.94rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.game-grid-wide {
  margin-bottom: 48px;
}

.game-card {
  display: flex;
  min-height: 255px;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.card-cover {
  display: block;
  aspect-ratio: 264 / 374;
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  border: 1px solid #3a424d;
  background: #0b0d10;
}

.card-cover img,
.game-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card[hidden] {
  display: none;
}

.game-card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.25;
}

.game-card h3 a {
  text-decoration: none;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 7px 10px;
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.status-pill.yes {
  background: var(--green-bg);
  color: var(--green);
}

.status-pill.no {
  background: var(--red-bg);
  color: var(--red);
}

.card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.page-heading,
.game-page {
  padding: 44px 0;
}

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-top: 28px;
}

.game-hero.has-cover {
  grid-template-columns: 210px minmax(0, 1fr) 320px;
}

.game-cover {
  margin: 0;
}

.game-cover img {
  aspect-ratio: 264 / 374;
  border: 1px solid #3a424d;
  background: #0b0d10;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.game-cover figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.meta-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.meta-row span {
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: #121417;
}

.verdict-panel {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 260px;
  padding: 26px;
}

.verdict-panel.yes {
  border-color: rgba(57, 217, 138, 0.55);
  background: linear-gradient(180deg, rgba(57, 217, 138, 0.18), rgba(16, 45, 34, 0.88));
}

.verdict-panel.no {
  border-color: rgba(255, 111, 97, 0.6);
  background: linear-gradient(180deg, rgba(255, 111, 97, 0.18), rgba(51, 25, 24, 0.88));
}

.verdict-panel strong {
  color: var(--green);
  font-size: 5rem;
  line-height: 1;
}

.verdict-panel.no strong {
  color: var(--red);
}

.reason-body {
  margin-top: 24px;
  padding: 28px;
  max-width: 860px;
}

.reason-body h2 {
  margin-top: 0;
}

.reason-body p,
.reason-body li {
  color: #ddd8cf;
  line-height: 1.75;
}

.reason-body li {
  margin-bottom: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .site-header,
  .database-toolbar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .game-hero {
    grid-template-columns: 1fr;
  }

  .game-hero.has-cover {
    grid-template-columns: 1fr;
  }

  .game-cover {
    max-width: 260px;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-stats div:last-child {
    border-bottom: 0;
  }

  .database-shell,
  .reason-body {
    padding: 18px;
  }
}
