:root {
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.12);
  --surface: rgba(8, 10, 14, 0.66);
  --surface-strong: rgba(8, 10, 14, 0.82);
  --red: #e24b52;
  --blue: #4a83ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: #08090d url("../../assets/backgrounds/games-page-background.png") center top / cover fixed no-repeat;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
}

.game-page {
  min-height: 100vh;
  background: rgba(5, 7, 11, 0.2);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 5.5rem clamp(1.25rem, 4vw, 4rem) 5rem;
}

.topbar {
  position: absolute;
  top: 1.8rem;
  left: 50%;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1160px, calc(100% - 2.5rem));
  transform: translateX(-50%);
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  text-decoration: none;
  background: rgba(8, 10, 14, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.game-tabs {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, auto);
  overflow: hidden;
  background: rgba(8, 10, 14, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
}

.game-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.25rem 1rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.game-tabs a:first-child {
  border-left: 0;
}

.game-tabs a.active {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(74, 131, 255, 0.22);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(44rem, 100%);
  text-align: center;
}

.game-logo {
  width: min(35rem, 92vw);
  height: auto;
}

.intro {
  max-width: 34rem;
  margin: -5.6rem 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.58;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.25rem;
}

.store-badge img {
  display: block;
  width: auto;
  height: 100%;
}

.store-badge-google img {
  height: 4.84rem;
}

.features,
.screenshots {
  width: min(1160px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.features {
  padding: 4.5rem 0 3rem;
}

.section-heading {
  margin-bottom: 1.4rem;
}

.section-heading p {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 8rem;
  padding: 1.45rem;
  background: var(--surface);
  border: 1px solid var(--faint);
  border-radius: 8px;
}

.feature-card h3 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
}

.feature-card p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.screenshots {
  padding: 3rem 0 5rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

figure {
  margin: 0;
  padding: 0.55rem;
  background: var(--surface-strong);
  border: 1px solid var(--faint);
  border-radius: 8px;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.back-to-top-wrap {
  display: flex;
  justify-content: center;
  padding: 0 1.25rem 1.25rem;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  color: rgba(235, 247, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  background: rgba(5, 20, 40, 0.58);
  border: 1px solid rgba(80, 152, 230, 0.5);
  border-radius: 4px;
  cursor: pointer;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 2.4rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  background: rgba(5, 7, 11, 0.72);
}

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

@media (max-width: 980px) {
  .hero {
    min-height: 46rem;
    padding-top: 5rem;
  }

  .screenshot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .hero {
    min-height: 44rem;
    padding: 8rem 1.25rem 4rem;
  }

  .topbar {
    top: 1.15rem;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: calc(100% - 2rem);
  }

  .game-tabs {
    grid-column: 1;
    width: 100%;
  }

  .game-tabs a {
    min-width: 0;
    padding: 0.25rem 0.35rem;
    font-size: clamp(0.58rem, 2.65vw, 0.7rem);
  }

  .hero-content {
    justify-content: flex-start;
  }

  .game-logo {
    width: min(27rem, 100%);
  }

  .intro {
    max-width: 31rem;
    margin-top: -4.4rem;
    font-size: 0.98rem;
  }

  .store-links {
    margin-top: 1.55rem;
  }

  .features,
  .screenshots {
    width: min(100% - 2rem, 38rem);
  }

  .features {
    padding-top: 3rem;
  }

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

  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 440px) {
  .intro {
    margin-top: -3.7rem;
  }

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