/* Game detail page prototype
   Focus: large hero art, title/edition, price block, subscription notice,
   info and edition contents. Optimized with CSS visuals instead of heavy images. */

.app.game-detail-page {
  max-width: 640px;
  /* Include Telegram fullscreen safe-area inset (0 when not fullscreen). */
  padding-top: calc(14px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}

.game-detail {
  width: 100%;
  display: grid;
  gap: 16px;
  color: #fffdf8;
}

.game-detail-back {
  width: fit-content;
  border: 1px solid rgba(93, 231, 255, 0.22);
  border-radius: 16px;
  padding: 10px 14px;
  background: rgba(13, 23, 40, 0.88);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.game-detail-art {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 47, 0.58);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(93, 231, 255, 0.28), transparent 32%),
    radial-gradient(circle at 84% 18%, rgba(255, 122, 47, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(23, 47, 82, 0.95), rgba(12, 17, 29, 0.96)),
    #0e1625;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.game-detail-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.56));
  opacity: 0.72;
}

.game-detail-art::after {
  content: "";
  position: absolute;
  inset: auto -40px -90px -40px;
  height: 210px;
  background: radial-gradient(ellipse at center, rgba(255, 122, 47, 0.34), transparent 62%);
  filter: blur(6px);
}

.game-detail-art-inner {
  position: absolute;
  inset: 22px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.game-detail-art-logo {
  max-width: 78%;
  font-size: clamp(42px, 10vw, 76px);
  line-height: 0.92;
  font-weight: 1000;
  letter-spacing: -2px;
  text-transform: uppercase;
  text-shadow:
    0 4px 24px rgba(0, 0, 0, 0.7),
    0 0 42px rgba(93, 231, 255, 0.16);
}

.game-detail-art-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px 7px;
  background: linear-gradient(100deg, #5de7ff, #4e80ff 48%, #ff7a2f);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(255, 122, 47, 0.2);
}

.game-detail-head {
  display: grid;
  gap: 4px;
}

.game-detail-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 5px 10px 4px;
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.07);
}

.game-detail-rating-plain {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  margin-top: 6px;
}

.game-detail-rating-star {
  color: #ffd166;
  font-size: 14px;
  line-height: 1;
}

.game-detail-rating-value {
  color: #fffdf8;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.2px;
  line-height: 1;
}

.game-detail-rating-label {
  color: rgba(237, 243, 255, 0.5);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.game-detail-title {
  margin: 0;
  color: #fffdf8;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.02;
  font-weight: 1000;
  letter-spacing: -1.1px;
}

.game-detail-edition {
  margin: 0;
  color: rgba(237, 243, 255, 0.68);
  font-size: 15px;
  font-weight: 800;
}

.game-detail-price-card {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(93, 231, 255, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(20, 30, 52, 0.96), rgba(15, 15, 22, 0.96));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.32);
}

.game-detail-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.game-detail-price-main {
  color: #fffdf8;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -1.8px;
  text-shadow: 0 6px 26px rgba(255, 209, 102, 0.22);
}

.game-detail-old-price {
  color: rgba(201, 211, 230, 0.46);
  font-size: 18px;
  font-weight: 900;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.game-detail-discount {
  border-radius: 999px;
  padding: 7px 10px 6px;
  background: linear-gradient(100deg, #4e80ff, #6e5bff);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  font-weight: 1000;
}

.game-detail-cart {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(100deg, #ff6a2f, #ff9b4d);
  color: #ffffff;
  font-size: 17px;
  font-weight: 1000;
  box-shadow: 0 14px 34px rgba(255, 122, 47, 0.24);
}

.game-detail-sub-notice {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 65, 78, 0.36);
  border-radius: 22px;
  padding: 14px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 65, 78, 0.16), transparent 36%),
    rgba(18, 13, 21, 0.92);
}

.game-detail-sub-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ff4a52;
  color: #101322;
  font-size: 16px;
  font-weight: 1000;
}

.game-detail-sub-title {
  color: #fffdf8;
  font-size: 15px;
  font-weight: 1000;
}

.game-detail-sub-text {
  margin-top: 3px;
  color: rgba(237, 243, 255, 0.62);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.game-detail-sub-arrow {
  color: #ff7a2f;
  font-size: 24px;
  font-weight: 1000;
}

.game-detail-section {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.game-detail-section-title {
  margin: 0;
  color: #fffdf8;
  font-size: 22px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.5px;
}

.game-detail-info-grid,
.game-detail-contents {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(20, 24, 38, 0.82);
}

.game-detail-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.game-detail-info-row:last-child {
  border-bottom: 0;
}

.game-detail-info-row span {
  color: rgba(237, 243, 255, 0.56);
  font-size: 14px;
  font-weight: 800;
}

.game-detail-info-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-detail-info-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.game-detail-info-row strong {
  color: #fffdf8;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.game-detail-content-item {
  position: relative;
  padding: 8px 16px 8px 34px;
  color: #edf3ff;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.game-detail-content-item::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4e80ff;
  box-shadow: 0 0 16px rgba(78, 128, 255, 0.6);
}

.game-detail-screenshots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.game-detail-screenshots.is-dragging {
  cursor: grabbing;
}

.game-detail-screenshots::-webkit-scrollbar {
  display: none;
}

.game-detail-shot-img {
  flex: 0 0 220px;
  width: 220px;
  min-height: 110px;
  height: auto;
  border: 1px solid rgba(93, 231, 255, 0.16);
  border-radius: 18px;
  object-fit: cover;
  display: block;
  /* pointer-events должны работать — иначе клик по скриншоту не открывает лайтбокс
     (увеличение). Нативное перетаскивание картинки отключаем, чтобы drag-scroll карусели
     не «хватал» саму картинку (сам скролл работает через всплытие mousedown к контейнеру). */
  -webkit-user-drag: none;
  user-select: none;
}

.game-detail-shot {
  flex: 0 0 220px;
  width: 220px;
  min-height: 124px;
  border: 1px solid rgba(93, 231, 255, 0.16);
  border-radius: 18px;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 30% 18%, rgba(93, 231, 255, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(39, 70, 117, 0.72), rgba(12, 16, 27, 0.96));
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.game-detail-theme-ufc .game-detail-art {
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(circle at 80% 22%, rgba(255, 112, 61, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(70, 28, 25, 0.92), rgba(13, 16, 25, 0.98));
}

.game-detail-theme-fc26 .game-detail-art,
.game-detail-theme-fc25 .game-detail-art {
  background:
    radial-gradient(circle at 26% 12%, rgba(89, 255, 153, 0.28), transparent 32%),
    radial-gradient(circle at 84% 18%, rgba(78, 128, 255, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(23, 66, 42, 0.92), rgba(13, 19, 35, 0.98));
}

.game-detail-theme-black-flag .game-detail-art {
  background:
    radial-gradient(circle at 20% 12%, rgba(245, 221, 165, 0.25), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(255, 122, 47, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(55, 36, 24, 0.95), rgba(11, 15, 24, 0.98));
}

@media (max-width: 560px) {
  .game-detail-art {
    min-height: 330px;
    border-radius: 26px;
  }

  .game-detail-art-inner {
    inset: 18px;
  }

  .game-detail-price-card {
    padding: 16px;
  }

}

@media (max-width: 380px) {
  .game-detail-art {
    min-height: 300px;
  }

  .game-detail-price-main {
    font-size: 31px;
  }

  .game-detail-old-price {
    font-size: 15px;
  }

  .game-detail-info-row {
    padding: 0 14px;
  }
}
