:root {
  --bg: #080a10;
  --surface: #10131d;
  --surface-2: #171b28;
  --surface-3: #202536;
  --text: #f7f8ff;
  --muted: #9ca4b8;
  --line: rgba(255, 255, 255, 0.09);
  --primary: #8cff00;
  --primary-soft: rgba(140, 255, 0, 0.12);
  --cyan: #00eaff;
  --danger: #ff325f;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(84, 0, 255, 0.10), transparent 30%),
    radial-gradient(circle at 90% 30%, rgba(0, 234, 255, 0.07), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a,
input,
label {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  transition: 180ms ease;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(200px, 0.6fr) minmax(280px, 1.6fr) minmax(160px, 0.6fr);
  align-items: center;
  gap: 28px;
  padding: 12px clamp(20px, 4vw, 64px);
  background: rgba(8, 10, 16, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--text);
  font-family: "Arial Black", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-decoration: none;
}

.brand > span:last-child > span {
  color: var(--primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #080a10;
  background: linear-gradient(135deg, var(--primary), #4cff9d);
  border-radius: 11px 4px 11px 4px;
  box-shadow: 0 0 28px rgba(140, 255, 0, 0.25);
}

.search-box {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.search-box:focus-within {
  border-color: rgba(140, 255, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(140, 255, 0, 0.08);
}

.search-box svg,
.cart-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.search-box svg {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
}

.search-box input::placeholder {
  color: #737b8e;
}

.cart-button {
  position: relative;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.cart-button:hover {
  color: var(--primary);
  border-color: rgba(140, 255, 0, 0.5);
  background: var(--primary-soft);
}

.cart-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-badge {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  color: #080a10;
  background: var(--primary);
  border: 2px solid #080a10;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.cart-badge.bump {
  animation: badgeBump 300ms ease;
}

@keyframes badgeBump {
  50% { transform: scale(1.35) rotate(8deg); }
}

.page-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 34px auto 72px;
}

.hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  background:
    linear-gradient(110deg, rgba(12, 15, 24, 0.98), rgba(12, 15, 24, 0.72)),
    linear-gradient(135deg, #12182a, #171228);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero > div:first-child {
  position: relative;
  z-index: 3;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.hero h1 {
  max-width: 720px;
  font-family: "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(2.15rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -1.7px;
}

.hero h1 span {
  color: var(--primary);
  text-shadow: 0 0 25px rgba(140, 255, 0, 0.35);
}

.hero p {
  max-width: 600px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-cta {
  display: inline-flex;
  margin-top: 28px;
  padding: 13px 20px;
  color: #090b11;
  background: var(--primary);
  border-radius: 11px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(140, 255, 0, 0.18);
}

.hero-cta:hover {
  transform: translateY(-2px);
  background: #a5ff39;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to left, black, transparent 70%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.hero-orb-one {
  width: 260px;
  height: 260px;
  top: 36px;
  right: 7%;
  background: radial-gradient(circle at 30% 30%, #b9ff61, #50cb00 35%, rgba(80, 203, 0, 0.06) 70%);
  box-shadow: 0 0 80px rgba(140, 255, 0, 0.25);
}

.hero-orb-two {
  width: 170px;
  height: 170px;
  right: 24%;
  bottom: -70px;
  background: radial-gradient(circle at 30% 30%, #62f5ff, #0557ff 45%, rgba(5, 87, 255, 0) 70%);
  opacity: 0.55;
}

.store-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 34px;
}

.sidebar {
  position: sticky;
  top: 104px;
  padding: 24px;
  background: rgba(16, 19, 29, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 40px rgba(0,0,0,.2);
}

.sidebar-heading,
.catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.sidebar-heading h2,
.catalog-header h2 {
  font-family: "Arial Black", "Segoe UI", sans-serif;
  font-size: 1.35rem;
}

.clear-filters {
  color: var(--muted);
  background: none;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
}

.clear-filters:hover {
  color: var(--primary);
}

.filter-group {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.filter-group h3 {
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.filter-option {
  display: grid;
  grid-template-columns: 19px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: #c7ccda;
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #454d61;
  border-radius: 5px;
  transition: 160ms ease;
}

.filter-option input:checked + .custom-check {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-option input:checked + .custom-check::after {
  content: "✓";
  color: #080a10;
  font-size: 0.75rem;
  font-weight: 900;
}

.filter-option:has(input:checked) {
  color: var(--text);
}

.filter-option small {
  color: #727a8d;
}

.secure-box {
  display: flex;
  gap: 11px;
  margin-top: 26px;
  padding: 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(140, 255, 0, 0.17);
  border-radius: 13px;
}

.secure-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #080a10;
  background: var(--primary);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}

.secure-box strong {
  font-size: 0.8rem;
}

.secure-box p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.catalog {
  min-width: 0;
}

.catalog-header {
  margin-bottom: 20px;
}

.catalog-header p {
  color: var(--muted);
  font-size: 0.84rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-card {
  overflow: hidden;
  background: linear-gradient(180deg, #151927, #10131d);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(140, 255, 0, 0.28);
  box-shadow: 0 18px 44px rgba(0,0,0,.35), 0 0 0 1px rgba(140,255,0,.04);
}

.game-card.is-hidden {
  display: none;
}

.cover {
  position: relative;
  min-height: 215px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.cover::before,
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.cover::before {
  background:
    linear-gradient(120deg, transparent 20%, rgba(255,255,255,.12) 21%, transparent 23%),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,.04) 29px 30px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,.04) 29px 30px);
  transform: perspective(240px) rotateX(52deg) scale(1.4) translateY(20px);
  transform-origin: bottom;
}

.cover::after {
  background: linear-gradient(to top, rgba(5,7,12,.75), transparent 65%);
}

.cover-neon { background: radial-gradient(circle at 70% 20%, #ec00ff, transparent 24%), linear-gradient(135deg, #11145c, #5a0078 55%, #ff006a); }
.cover-eclipse { background: radial-gradient(circle at 72% 30%, #ffba6a 0 6%, #d13e2c 7% 14%, transparent 15%), linear-gradient(135deg, #051529, #102e60 55%, #007a9f); }
.cover-kingdom { background: radial-gradient(circle at 50% 30%, #ffd07a, transparent 16%), linear-gradient(145deg, #1b1812, #8b4518 58%, #d3841f); }
.cover-velocity { background: linear-gradient(125deg, #111525 10%, #151edc 45%, #00dcff 56%, #ff294d 58%, #3c0c19 90%); }
.cover-shadow { background: radial-gradient(circle at 50% 22%, #754cff, transparent 18%), linear-gradient(145deg, #07070c, #201248 55%, #5f1693); }
.cover-titan { background: radial-gradient(circle at 65% 34%, #ff8e38, transparent 20%), linear-gradient(140deg, #18200e, #495719 50%, #9c4a13); }
.cover-crimson { background: radial-gradient(circle at 66% 25%, #ff6878, transparent 16%), linear-gradient(145deg, #1a070b, #79051e 55%, #d10b34); }

.cover-content {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  font-family: "Arial Black", "Segoe UI", sans-serif;
  text-shadow: 0 4px 15px rgba(0,0,0,.65);
}

.cover-content span {
  color: rgba(255,255,255,.72);
  font-size: 0.75rem;
  letter-spacing: 3px;
}

.cover-content strong {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1;
}

.discount-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 7px 10px;
  color: #071007;
  background: var(--primary);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(140,255,0,.28);
}

.discount-badge.hot {
  color: white;
  background: var(--danger);
  box-shadow: 0 6px 18px rgba(255,50,95,.28);
}

.card-body {
  padding: 18px;
}

.platform-tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 800;
}

.platform-tag.steam { color: #b7e9ff; background: rgba(40, 158, 255, 0.12); }
.platform-tag.psn { color: #aab6ff; background: rgba(74, 94, 255, 0.13); }
.platform-tag.xbox { color: #b7ff9e; background: rgba(83, 211, 42, 0.12); }

.card-body h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.genre {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

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

.price-stack {
  min-height: 45px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.old-price {
  color: #747c90;
  font-size: 0.72rem;
  text-decoration: line-through;
}

.price-stack strong {
  font-size: 1.12rem;
}

.add-to-cart {
  min-width: 126px;
  min-height: 40px;
  padding: 8px 12px;
  color: #080a10;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  font-size: 0.73rem;
  font-weight: 900;
  cursor: pointer;
}

.add-to-cart:hover {
  transform: translateY(-2px);
  background: #a5ff39;
  box-shadow: 0 8px 20px rgba(140,255,0,.18);
}

.add-to-cart.added {
  color: white;
  background: #2c8f5e;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #343b4e;
  border-radius: var(--radius-md);
}

.empty-state span {
  display: inline-block;
  color: var(--primary);
  font-size: 2.8rem;
}

.empty-state h3 {
  margin-top: 10px;
  font-size: 1.25rem;
}

.empty-state p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  max-width: calc(100% - 48px);
  padding: 13px 18px;
  color: #080a10;
  background: var(--primary);
  border-radius: 11px;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(20px, 4vw, 64px);
  color: var(--muted);
  background: #07090e;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.footer-brand {
  transform: scale(.88);
  transform-origin: left;
}

@media (max-width: 1150px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .navbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .store-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .filter-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 12px;
  }

  .filter-group h3 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 24px, 1440px);
    margin-top: 20px;
  }

  .navbar {
    padding-inline: 14px;
  }

  .cart-label {
    display: none;
  }

  .hero {
    min-height: 360px;
    padding: 30px 24px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero-orb-one {
    width: 170px;
    height: 170px;
    top: auto;
    right: -25px;
    bottom: -40px;
    opacity: .55;
  }

  .hero-orb-two {
    display: none;
  }

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

  .filter-group {
    grid-template-columns: 1fr;
  }

  .filter-group h3 {
    grid-column: auto;
  }

  .catalog-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
