* {
  box-sizing: border-box;
}

:root {
  --bg: #080d17;
  --surface: #101827;
  --surface-2: #151f31;
  --border: #22304a;
  --text: #edf3fb;
  --muted: #91a0b8;
  --accent: #6d8cff;
  --green: #2bd576;
  --max: 1180px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 13, 23, .88);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #7b94ff, #405fd8);
  font-weight: 900;
  font-size: 21px;
}

.brand strong {
  display: block;
  letter-spacing: .08em;
  font-size: 15px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .12em;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 28px;
  color: #aebbd0;
  font-size: 14px;
}

.nav a:hover {
  color: white;
}

.hero {
  padding: 96px 0 52px;
  background:
    radial-gradient(circle at 50% 0%, rgba(88, 116, 255, .17), transparent 38%),
    var(--bg);
  text-align: center;
}

.hero-inner {
  max-width: 850px;
}

.eyebrow {
  color: #8299ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 {
  margin: 15px 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.hero p {
  max-width: 670px;
  margin: 0 auto 34px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 16px;
}

.search-box {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}

.search-box span {
  color: #8091ad;
  font-size: 27px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 16px;
}

.quick-filters {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #aebbd0;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: #6077e9;
  color: white;
  background: #17213a;
}

.content {
  padding: 45px 0 80px;
}

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

h2 {
  margin: 7px 0 0;
  font-size: 28px;
  letter-spacing: -.025em;
}

.sort-label {
  color: var(--muted);
  font-size: 13px;
}

.sort-label select {
  margin-left: 8px;
  padding: 9px 12px;
  background: var(--surface);
  color: white;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform .2s ease, border-color .2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #4b62b5;
}

.game-image {
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  display: block;
  background: #182236;
}

.game-info {
  padding: 15px;
}

.game-title {
  margin: 0 0 7px;
  font-size: 16px;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.price-row {
  margin-top: 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-size: 21px;
  font-weight: 800;
}

.old-price {
  color: #6d7b91;
  text-decoration: line-through;
  font-size: 12px;
  margin-left: 5px;
}

.discount {
  color: #08150e;
  background: var(--green);
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.rating {
  margin-top: 10px;
  color: #80dca8;
  font-size: 12px;
}

.merchant {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #aab8cc;
  font-size: 12px;
}

.deal-button {
  display: block;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.deal-button:hover {
  background: #5977eb;
}

.deal-button:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

.releases { padding: 24px 0 46px; scroll-margin-top: 100px; }
.releases .section-head { margin-bottom: 12px; }
.section-description { color: var(--muted); line-height: 1.65; max-width: 800px; }
.section-link { color: #a6b8ff; font-size: 14px; }
.hero p.data-status { margin: 22px auto 0; font-size: 12px; }
.browse-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0; }
.category-chip, .highlight-tab, .pagination button { border: 1px solid var(--border); background: var(--surface); color: #aebbd0; padding: 10px 15px; border-radius: 9px; cursor: pointer; font: inherit; }
.category-chip.active, .highlight-tab.active { background: #243457; color: white; border-color: var(--accent); }
.highlight-tab { border-radius: 999px; }
.discount-filters { margin-top: 0; }
.release-grid .game-card { border-color: #364467; background: linear-gradient(160deg, #17233a, var(--surface)); }
.game-info { display: flex; flex-direction: column; height: auto; }
.game-card { display: flex; flex-direction: column; }
.game-card .game-info { flex: 1; }
.game-card .deal-button { margin-top: auto; }
.game-card .merchant { margin-bottom: 14px; }
.release-badge { align-self: flex-start; color: #a9efc4; background: #16352a; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.release-badge.upcoming { color: #dbd2ff; background: #30254c; }
.regular-price { color: var(--muted); font-size: 10px; text-align: right; }
.price-row .price { font-size: 19px; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.pagination button:disabled { opacity: .4; cursor: default; }
.browse-filters button:focus-visible, .pagination button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
#deals { scroll-margin-top: 100px; }

.empty-state {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}

.how {
  padding: 35px 0 90px;
  max-width: 760px;
}

.how p {
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  border-top: 1px solid rgba(255,255,255,.06);
  color: #718096;
  font-size: 12px;
}

.footer-inner {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 950px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, var(--max));
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 68px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
}

@media (max-width: 470px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  .sort-label select {
    margin-left: 0;
    margin-top: 7px;
    display: block;
  }
}
