:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f1e9;
  background: #0b0b0d;
  font-synthesis: none;
  --page-padding: clamp(20px, 4vw, 64px);
  --line: rgba(255, 255, 255, 0.16);
  --muted: #a6a39d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.07), transparent 28%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    #0b0b0d;
  background-size: auto, 48px 48px, 48px 48px, auto;
}

a {
  color: inherit;
}

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

.page-shell {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand,
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 11px;
  height: 11px;
  background: #e54b36;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(229, 75, 54, 0.14);
}

.header-link {
  color: var(--muted);
  transition: color 180ms ease;
}

.header-link:hover {
  color: #fff;
}

.games {
  padding: clamp(28px, 4vw, 56px) 0 clamp(72px, 9vw, 130px);
  scroll-margin-top: 24px;
}

.section-heading {
  margin-bottom: 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2,
.section-heading span {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.section-heading span {
  color: var(--muted);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 46px);
}

.game-card {
  --accent: #fff;
  position: relative;
  min-width: 0;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(17, 17, 20, 0.88);
  text-decoration: none;
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.game-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.game-card--baobaoxi {
  --accent: #e12f2f;
}

.game-card--disc {
  --accent: #7bcf6c;
}

.game-card--ninja {
  --accent: #02d8dd;
}

.game-card--anchor {
  --accent: #ffd400;
}

.cover-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #161619;
}

.cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 57%, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card-index,
.cover-action {
  position: absolute;
  z-index: 1;
  bottom: 18px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.card-index {
  left: 20px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #09090b;
  background: var(--accent);
  border-radius: 50%;
}

.cover-action {
  right: 20px;
  color: #fff;
  transform: translateY(8px);
  opacity: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.card-body {
  padding: clamp(22px, 3vw, 38px);
  border-top: 4px solid var(--accent);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.card-title-row h3 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(32px, 4.3vw, 66px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.018em;
}

.status-dot {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}

.card-body > p {
  min-height: 3.2em;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.game-card--has-itch .card-body {
  padding-bottom: clamp(82px, 7vw, 98px);
}

.itch-link {
  position: absolute;
  z-index: 2;
  right: clamp(22px, 3vw, 38px);
  bottom: clamp(22px, 3vw, 32px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  color: #f4f1e9;
  background: rgba(11, 11, 13, 0.92);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.itch-link:hover {
  color: #09090b;
  background: var(--accent);
}

.card-meta {
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  border-top: 1px solid var(--line);
  color: #d8d5ce;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-link:focus-visible,
.itch-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

@media (hover: hover) {
  .game-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  }

  .game-card:hover .cover-wrap img {
    transform: scale(1.035);
  }

  .game-card:hover .cover-action {
    transform: translateY(0);
    opacity: 1;
  }
}

.site-footer {
  min-height: 112px;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: #77746f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

@media (max-width: 720px) {
  .site-header {
    min-height: 72px;
  }

  .header-link {
    font-size: 0;
  }

  .header-link span {
    font-size: 18px;
  }

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

  .cover-action {
    transform: none;
    opacity: 1;
  }

  .card-title-row h3 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 460px) {
  .card-title-row {
    align-items: flex-end;
  }

  .card-title-row h3 {
    max-width: 76%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
