* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Arial, sans-serif;
  background: #0b1220;
  color: #edf2ff;
  line-height: 1.5;
}
a { color: #8ab4ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 18, 32, 0.92);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.logo {
  color: #fff;
  font-weight: 800;
  font-size: 24px;
}

.nav {
  display: flex;
  gap: 18px;
}

.hero {
  padding: 48px 0 24px;
}
.hero--small {
  padding: 32px 0 16px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.1;
}
.hero p {
  margin: 0;
  max-width: 800px;
  color: #b7c4e0;
}

.section {
  padding: 24px 0 32px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

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

.game-card {
  background: #111a2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  overflow: hidden;
}

.game-card__image-wrap {
  display: block;
  aspect-ratio: 3 / 4;
  background: #162239;
}

.game-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-card__noimage {
  display: grid;
  place-items: center;
  height: 100%;
  color: #9fb0d4;
}

.game-card__body {
  padding: 14px;
}

.game-card__title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.game-card__title a {
  color: #fff;
}

.game-card__meta {
  color: #a7b4cf;
  font-size: 14px;
  margin-bottom: 10px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.price-row--big .price-current {
  font-size: 34px;
}
.price-current {
  font-weight: 800;
  color: #fff;
}
.price-old {
  color: #9aa8c5;
  text-decoration: line-through;
}

.game-page__top {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  padding: 36px 0 20px;
}
.game-page__cover img {
  width: 100%;
  display: block;
  border-radius: 18px;
}
.game-page__info h1 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 38px;
}
.meta-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.meta-list li {
  margin-bottom: 8px;
  color: #d8e2f7;
}

.buy-box {
  margin-top: 24px;
  background: #111a2b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
}
.buy-box__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.buy-box__text {
  color: #b7c4e0;
  margin-bottom: 14px;
}
.btn {
  display: inline-block;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.gallery-grid img {
  width: 100%;
  display: block;
  border-radius: 14px;
}

.faq-list {
  display: grid;
  gap: 12px;
}
.faq-item {
  background: #111a2b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px 16px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}
.faq-answer {
  margin-top: 12px;
}

.prose {
  color: #dbe6ff;
}
.prose p {
  margin: 0 0 14px;
}

.site-footer {
  padding: 28px 0 40px;
  color: #91a2c6;
}

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

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

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

@media (max-width: 640px) {
  .header-row {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 {
    font-size: 30px;
  }

  .section h2 {
    font-size: 24px;
  }

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

.auth-wrap {
  display: flex;
  justify-content: center;
}

.auth-card,
.profile-card {
  background: #111a2b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 20px;
}

.auth-card {
  width: min(520px, 100%);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #d8e2f7;
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: #0d1526;
  color: #fff;
  outline: none;
}

.field input:focus {
  border-color: #3b82f6;
}

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.alert--error {
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #ffd3d3;
}

.alert--success {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #d4ffe0;
}

.auth-help {
  margin-top: 14px;
  color: #b7c4e0;
}

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

.profile-value {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
}

.muted {
  color: #b7c4e0;
}

.nav-user {
  color: #b7c4e0;
  font-size: 14px;
  white-space: nowrap;
}

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

.cashback-badge {
  margin-top: 10px;
  font-size: 13px;
  color: #b8f7c7;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
}

.cashback-box {
  margin: 12px 0 16px;
  color: #d4ffe0;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
}

.cashback-history {
  display: grid;
  gap: 12px;
}

.cashback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cashback-row:last-child {
  border-bottom: 0;
}

.cashback-row__title {
  font-weight: 700;
  color: #fff;
}

.cashback-row__meta {
  font-size: 13px;
  color: #a7b4cf;
  margin-top: 4px;
}

.cashback-row__amount {
  font-weight: 800;
  white-space: nowrap;
}

.cashback-row__amount.is-positive {
  color: #8df0aa;
}

.cashback-row__amount.is-negative {
  color: #ffb0b0;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn--small {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 10px;
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
}

.buy-page-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.buy-product {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
}

.buy-product__image img {
  width: 100%;
  display: block;
  border-radius: 14px;
}

.buy-product__title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}

.buy-product__meta {
  color: #b7c4e0;
  margin-bottom: 14px;
}

.buy-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .buy-page-grid {
    grid-template-columns: 1fr;
  }

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

  .buy-product__image {
    max-width: 240px;
  }
}