/* ============================================================
   INDEX.CSS — стили только главной страницы (магазин)
   ============================================================ */

/* ===== АНИМАЦИЯ ИКОНКИ ТОВАРА ПРИ НАВЕДЕНИИ ===== */
.products-page .products-box .product .img img {
  transition: transform .3s cubic-bezier(.22, 1, .36, 1),
              filter .3s ease;
  will-change: transform;
}

.products-page .products-box .product:hover .img img {
  transform: scale(1.07) translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(80, 171, 255, .35));
}

.products-page .products-box .product .name {
  transition: color .25s ease;
}

.products-page .products-box .product:hover .name {
  color: #cfe6ff;
}

/* выбранный товар — иконка чуть подсвечена */
.products-page .products-box .product.active .img img {
  transform: scale(1.04);
  filter: drop-shadow(0 3px 7px rgba(80, 171, 255, .3));
}

.products-page .products-box .product:active .img img {
  transform: scale(1.02);
  transition-duration: .1s;
}

@media (prefers-reduced-motion: reduce) {
  .products-page .products-box .product:hover .img img {
    transform: none;
  }
}

/* ===== ОПИСАНИЕ ТОВАРА ===== */
.donate-desc { letter-spacing: .2px; }
.donate-desc strong { font-weight: 700; }
.donate-desc .divider { height: 10px; }

@keyframes descFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#productDescriptionArea.desc-animate {
  animation: descFadeIn .5s cubic-bezier(.22, 1, .36, 1) both;
}

/* ===== БЛОК "СРОК / КОЛИЧЕСТВО" ===== */
@keyframes typesFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes typeBtnIn {
  from { opacity: 0; transform: translateY(8px) scale(.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#productTypesParent.types-animate > .title {
  animation: typesFadeIn .35s cubic-bezier(.22, 1, .36, 1) both;
}

#productTypesArea.types-animate {
  animation: typesFadeIn .4s cubic-bezier(.22, 1, .36, 1) both;
}

#productTypesArea.types-animate button {
  animation: typeBtnIn .38s cubic-bezier(.22, 1, .36, 1) both;
}

#productTypesArea.types-animate button:nth-child(1) { animation-delay: .03s; }
#productTypesArea.types-animate button:nth-child(2) { animation-delay: .09s; }
#productTypesArea.types-animate button:nth-child(3) { animation-delay: .15s; }
#productTypesArea.types-animate button:nth-child(4) { animation-delay: .21s; }
#productTypesArea.types-animate button:nth-child(5) { animation-delay: .27s; }

@media (prefers-reduced-motion: reduce) {
  #productDescriptionArea.desc-animate,
  #productTypesParent.types-animate > .title,
  #productTypesArea.types-animate,
  #productTypesArea.types-animate button {
    animation: none;
  }
}

/* ===== СПИСОК ТОВАРОВ НА ТЕЛЕФОНЕ ===== */
@media (max-width: 575.98px) {
  .products-list {
    display: flex !important;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .products-list::-webkit-scrollbar { height: 0; }

  .products-list .product {
    min-width: 230px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .product-details .title { margin-bottom: 8px; }
  #productDescriptionArea { font-size: 15px; }
}

/* ===== ВЫБОР СПОСОБА ОПЛАТЫ ===== */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 0;
}

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

.payment-card {
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 16px;
  padding: 26px 16px;
  text-align: center;
  font-weight: 700;
  color: #dbe3ff;
  cursor: pointer;
  transition: .2s;
}

.payment-card img { width: 42px; margin-bottom: 10px; }
.payment-card:hover { transform: translateY(-3px); }

.payment-card.active {
  border-color: #3aa0ff;
  box-shadow: 0 0 14px rgba(58, 160, 255, .6);
  color: #fff;
}

.payment-card.disabled {
  opacity: .35;
  pointer-events: none;
  filter: grayscale(100%);
}

.buy-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== ПЕРЕКЛЮЧАТЕЛЬ РЕЖИМОВ (скрыт, оставлен на будущее) ===== */
.mode-btn {
  width: 100%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 3;
  color: rgba(255, 255, 255, .85);
  transition: color .2s ease;
}

.mode-btn:hover { color: #fff; }

.mode-indicator {
  position: absolute;
  width: 42px;
  height: 42px;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  background: linear-gradient(145deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .15));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25),
              inset 0 1px 2px rgba(255, 255, 255, .7);
  transition: top .35s cubic-bezier(.4, 0, .2, 1);
}

.mode-switch.vanilla .mode-indicator { top: 70px; }

/* ===== РАЗДЕЛИТЕЛИ КАТЕГОРИЙ ===== */
#section-anarchy,
#section-vanilla {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 12px 20px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 200;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #f5f5f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35),
              inset 0 1px 1px rgba(255, 255, 255, .1);
}

#section-anarchy {
  text-shadow: 0 0 4px rgba(255, 110, 110, .45),
               0 0 10px rgba(255, 80, 80, .25);
}

#section-vanilla {
  text-shadow: 0 0 4px rgba(190, 220, 255, .5),
               0 0 10px rgba(150, 200, 255, .3);
}

/* ===== БЕЙДЖИ ТОВАРОВ ===== */
.update-btn,
.new-btn,
.working-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  margin-left: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  line-height: 1.5;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03));
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  border: 1px solid var(--badge-glow, rgba(255, 60, 60, .55));
  box-shadow: 0 0 10px var(--badge-glow-soft, rgba(255, 40, 40, .3)),
              inset 0 1px 1px rgba(255, 255, 255, .35);
  text-shadow: 0 0 6px var(--badge-glow-soft, rgba(255, 80, 80, .55));
}

.update-btn  { --badge-glow: rgba(80, 171, 255, .6); --badge-glow-soft: rgba(80, 171, 255, .35); }
.new-btn     { --badge-glow: rgba(255, 60, 60, .6);  --badge-glow-soft: rgba(255, 60, 60, .35); }
.working-btn { --badge-glow: rgba(255, 150, 0, .6);  --badge-glow-soft: rgba(255, 150, 0, .35); }

/* ===== КНОПКА «СКАЧАТЬ ИГРУ» (вместо карточки с IP) ===== */
.download-cta-wrap {
  display: flex;
  justify-content: center;
  margin: 40px auto;
  padding: 0 16px;
}

.download-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  min-height: 58px;
  padding: 0 36px;
  border-radius: 12px;
  background: #50abff;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(80, 171, 255, .28);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.download-cta:hover {
  background: #3f98ec;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(80, 171, 255, .4);
}

@media (max-width: 600px) {
  .download-cta-wrap { margin: 24px auto; }
  .download-cta { width: 100%; min-width: 0; min-height: 54px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .download-cta { transition: background .2s ease; }
  .download-cta:hover { transform: none; }
}

/* Цена: для доллара символ стоит перед числом ($3.20), для ₽ и ₴ — после */
.money { display: inline-flex; gap: .25em; }
.money.cur-prefix { flex-direction: row-reverse; gap: 0; }

/* ===== ПРОМОКОД ===== */
.promo-status {
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  margin-top: 5px;
  padding: 0 2px;
}

.promo-status.promo-ok    { color: #00e676; }
.promo-status.promo-error { color: #ff4d4d; }

#originalPrice {
  display: none;
  text-decoration: line-through;
  color: #777;
  font-size: 13px;
  margin-left: 8px;
}

/* ===== УВЕДОМЛЕНИЯ (toast) ===== */
#toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  background: rgba(12, 18, 40, .96);
  color: #fff;
  padding: 14px 16px 18px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  font-size: 14px;
  position: relative;
  overflow: hidden;
  animation: toastIn .35s ease;
}

.toast-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #3aa0ff;
}

.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #3aa0ff, #00d4ff);
  animation: toastProgress 5s linear forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(20px); }
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}
