:root {
  color-scheme: dark;
  --background: #101716;
  --surface: #18201f;
  --surface-strong: #202a28;
  --text: #f3f6f4;
  --muted: #9eaaa6;
  --border: #33403d;
  --signal: #71e2b8;
  --warm: #ffbc6e;
  --content-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content-width), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.back-link,
.section-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 750;
}

.back-link {
  min-height: 40px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
}

.section-name__mark {
  width: 10px;
  height: 10px;
  border: 2px solid var(--signal);
  transform: rotate(45deg);
}

.intro,
.library,
footer {
  width: min(var(--content-width), calc(100% - 40px));
  margin-inline: auto;
}

.intro {
  padding: 64px 0 48px;
}

.eyebrow,
.game-card__type {
  margin: 0;
  color: var(--signal);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.intro h1 {
  margin: 5px 0 8px;
  font-size: clamp(46px, 8vw, 78px);
  line-height: 1;
  letter-spacing: 0;
}

.intro > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.library {
  padding-bottom: 80px;
}

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

.library__header h2 {
  margin: 0;
  font-size: 22px;
}

.library__header span {
  color: var(--muted);
  font-size: 13px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 22px;
}

.game-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.game-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #08100f;
}

.game-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.game-card__image:hover img,
.game-card__image:focus-visible img {
  transform: scale(1.025);
}

.play-mark {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--signal);
  color: #09110f;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  font-size: 15px;
  padding-left: 2px;
}

.game-card__body {
  padding: 20px;
}

.game-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.game-card h3 {
  margin: 3px 0 10px;
  font-size: 26px;
  line-height: 1.15;
}

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

.game-card h3 a:hover,
.game-card h3 a:focus-visible {
  color: var(--signal);
}

.game-card__body > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.status {
  flex: none;
  border: 1px solid #536d65;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--signal);
  font-size: 11px;
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
}

footer a {
  color: var(--muted);
  font-size: 13px;
}

:focus-visible {
  outline: 3px solid rgba(113, 226, 184, 0.8);
  outline-offset: 3px;
}

@media (min-width: 760px) {
  .game-card {
    max-width: 520px;
  }
}

@media (max-width: 520px) {
  .site-header,
  .intro,
  .library,
  footer {
    width: min(100% - 32px, var(--content-width));
  }

  .intro {
    padding: 48px 0 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-card__image img {
    transition: none;
  }
}
