* {
  box-sizing: border-box;
}

html {
  background: #0f0f13;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 26, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 122, 26, 0.08), transparent 28%),
    #0f0f13;
  color: #ffffff;
  font-family: Arial, sans-serif;
}

button {
  font-family: inherit;
}

.app {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 14px 32px;
  overflow: hidden;
}

/* MAIN MENU */

.hero {
  border: 1px solid rgba(255, 122, 26, 0.55);
  border-radius: 28px;
  padding: 28px 18px;
  margin-bottom: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.16), rgba(255, 122, 26, 0.03)),
    #17171d;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.hero-title {
  margin: 0 0 8px;
  color: #ff7a1a;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}

.hero-subtitle {
  margin: 0;
  color: #c6c6c6;
  font-size: 15px;
  line-height: 1.4;
}

.section {
  margin-top: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #a9a9b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: #ff7a1a;
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 16px;
  background: rgba(27, 27, 34, 0.96);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.card:active {
  transform: scale(0.985);
  border-color: rgba(255, 122, 26, 0.65);
  background: #202027;
}

.card-icon {
  min-width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.22), rgba(255, 122, 26, 0.05)),
    #2a2a32;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff9a4c;
  font-size: 17px;
  font-weight: 900;
}

.card-content {
  min-width: 0;
  flex: 1;
}

.card-title {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

.card-description {
  margin: 0;
  color: #a9a9b2;
  font-size: 14px;
  line-height: 1.35;
}

.card-arrow {
  color: #ff7a1a;
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
}

.benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.benefit {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(27, 27, 34, 0.9);
  color: #d0d0d5;
  font-size: 13px;
  font-weight: 700;
}

/* REGION PAGE */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.back-button {
  min-width: 88px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  background: #1b1b22;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.back-button:active {
  transform: scale(0.98);
}

.page-title {
  margin: 0;
  color: #ffffff;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
}

.page-subtitle {
  margin: 4px 0 0;
  color: #a9a9b2;
  font-size: 14px;
  line-height: 1.35;
}

/* HERO CAROUSEL */

.region-hero {
  margin: 8px -14px 24px;
}

.hero-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 14px 12px;
  scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  position: relative;
  min-width: 86%;
  height: 260px;
  scroll-snap-align: center;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 26, 0.5);
  border-radius: 26px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(135deg, rgba(255, 122, 26, 0.35), rgba(18, 18, 24, 0.95)),
    #1b1b22;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.68)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 14px
    );
}

.hero-slide-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  margin-bottom: 10px;
  background: #ff7a1a;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.region-hero-title {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
}

.region-hero-subtitle {
  margin: 0;
  color: #e7e7eb;
  font-size: 14px;
  line-height: 1.35;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: -4px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-dot.is-active {
  width: 20px;
  background: #ff7a1a;
}

/* HORIZONTAL SHELVES */

.shelf {
  margin: 26px -14px 0;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  margin-bottom: 12px;
}

.shelf-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
}

.shelf-title::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: #ff7a1a;
}

.shelf-more {
  border: 0;
  background: transparent;
  color: #ff9a4c;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.shelf-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 14px 4px;
  scrollbar-width: none;
}

.shelf-row::-webkit-scrollbar {
  display: none;
}

.game-card {
  min-width: 148px;
  width: 148px;
  scroll-snap-align: start;
  cursor: pointer;
}

.game-card:active {
  transform: scale(0.985);
}

.game-cover {
  position: relative;
  height: 214px;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 26, 0.32);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(145deg, #363642, #121218 62%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

.game-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.34)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 16px
    );
}

.game-cover-text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  color: #ffffff;
  text-align: center;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.game-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  border-radius: 8px;
  padding: 5px 7px;
  background: #2f71ff;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.game-price {
  margin: 10px 0 4px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 900;
}

.game-name {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.22;
  font-weight: 800;
}

.game-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 5px 8px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e1e1e6;
  font-size: 11px;
  font-weight: 800;
}

.game-meta {
  margin: 8px 0 0;
  color: #9f9fa8;
  font-size: 12px;
  line-height: 1.35;
}

/* SUBSCRIPTIONS */

.subscriptions {
  margin-top: 28px;
}

.sub-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(27, 27, 34, 0.95);
  margin-bottom: 12px;
}

.sub-tab {
  border: 0;
  padding: 14px 8px;
  background: transparent;
  color: #a9a9b2;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.sub-tab.is-active {
  border-radius: 14px;
  background: linear-gradient(135deg, #ff6824, #ff9a4c);
  color: #ffffff;
}

.sub-list {
  display: grid;
  gap: 10px;
}

.sub-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(27, 27, 34, 0.92);
}

.sub-title {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.sub-meta {
  margin-top: 4px;
  color: #9f9fa8;
  font-size: 13px;
}

.sub-price {
  color: #ff9a4c;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

/* SIMPLE PRODUCT ROWS / FALLBACK */

.offer-card {
  border: 1px solid rgba(255, 122, 26, 0.35);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(255, 122, 26, 0.18), rgba(255, 122, 26, 0.03)),
    #1b1b22;
}

.offer-title {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 900;
}

.offer-description {
  margin: 0;
  color: #b8b8c0;
  font-size: 14px;
  line-height: 1.35;
}

.product-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(27, 27, 34, 0.92);
}

.product-title {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
}

.product-meta {
  margin-top: 4px;
  color: #9f9fa8;
  font-size: 13px;
  line-height: 1.25;
}

.product-price {
  color: #ff9a4c;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

/* STATES */

.loading,
.error {
  padding: 20px;
  color: #cfcfcf;
  text-align: center;
}

.error {
  color: #ff8c8c;
}

@media (max-width: 380px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-title {
    font-size: 27px;
  }

  .page-title {
    font-size: 23px;
  }

  .hero-slide {
    height: 236px;
  }

  .game-card {
    min-width: 136px;
    width: 136px;
  }

  .game-cover {
    height: 198px;
  }
}