/* ────────────────────────────────────────────────────────────────
   BOOST SHOP & INVENTORY STYLES
   Отдельный файл чтобы избежать конфликтов с основными стилями.
   ──────────────────────────────────────────────────────────────── */

/* ====== МАГАЗИН: список бустов ====== */
.shop-boosts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 5px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shop-boosts-list::-webkit-scrollbar {
  display: none;
}

/* ====== Карточка буста в магазине ====== */
.shop-boost-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(40, 40, 60, 0.95));
  border: 2px solid rgba(139, 69, 19, 0.6);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.shop-boost-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Левая сторона — картинка */
.shop-boost-image {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-boost-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Правая сторона — информация */
.shop-boost-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-boost-name {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-boost-description {
  font-family: 'Cinzel', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  color: #c0c0c0;
  line-height: 1.35;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Редкость буста */
.shop-boost-rarity {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid;
  width: fit-content;
}

.shop-boost-rarity.common {
  color: #b0b0b0;
  border-color: rgba(176, 176, 176, 0.5);
}

.shop-boost-rarity.rare {
  color: #4facfe;
  border-color: rgba(79, 172, 254, 0.5);
}

.shop-boost-rarity.epic {
  color: #b968ff;
  border-color: rgba(185, 104, 255, 0.5);
}

.shop-boost-rarity.legendary {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.1);
}

/* Цена и кнопка покупки */
.shop-boost-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.shop-boost-price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.shop-boost-price img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.shop-boost-buy-btn {
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.4), rgba(218, 165, 32, 0.4));
  border: 1px solid rgba(255, 215, 0, 0.6);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.shop-boost-buy-btn:hover {
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.6), rgba(218, 165, 32, 0.6));
  border-color: rgba(255, 215, 0, 0.9);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
  transform: scale(1.05);
}

.shop-boost-buy-btn:active {
  transform: scale(0.95);
}

.shop-boost-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ====== Сообщение "Недостаточно золота" ====== */
.shop-boost-insufficient {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #ff6b6b;
  font-weight: 600;
}

/* ====== Загрузка и ошибки ====== */
.shop-loading,
.shop-error,
.shop-empty {
  text-align: center;
  padding: 40px 20px;
  color: #c0c0c0;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
}

.shop-error {
  color: #ff6b6b;
}

/* ====== ИНВЕНТАРЬ: карточки бустов ====== */
#boosts-tab .inventory-grid:not(.empty) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.inventory-boost-card {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(40, 40, 60, 0.95));
  border: 2px solid rgba(0, 191, 255, 0.5);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px;
  gap: 8px;
}

.inventory-boost-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(0, 191, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 191, 255, 0.3);
}

.inventory-boost-card .boost-card-image {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-boost-card .boost-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.inventory-boost-card .boost-card-name {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffd700;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.inventory-boost-card .boost-card-quantity {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffd700;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  min-width: 22px;
  text-align: center;
}

/* ====== Адаптивность ====== */
@media (max-width: 768px) {
  .shop-boost-card {
    gap: 10px;
    padding: 10px 12px;
  }

  .shop-boost-image {
    width: 60px;
    height: 60px;
  }

  .shop-boost-name {
    font-size: 0.95rem;
  }

  .shop-boost-description {
    font-size: 0.75rem;
  }

  .shop-boost-buy-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  #boosts-tab .inventory-grid:not(.empty) {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .inventory-boost-card .boost-card-image {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 480px) {
  .shop-boost-card {
    gap: 8px;
    padding: 8px 10px;
  }

  .shop-boost-image {
    width: 52px;
    height: 52px;
  }

  .shop-boost-name {
    font-size: 0.9rem;
  }

  .shop-boost-description {
    -webkit-line-clamp: 2;
    font-size: 0.72rem;
  }

  .shop-boost-price {
    font-size: 0.9rem;
  }

  .shop-boost-price img {
    width: 16px;
    height: 16px;
  }

  .shop-boost-buy-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  #boosts-tab .inventory-grid:not(.empty) {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .inventory-boost-card {
    padding: 10px 8px;
  }

  .inventory-boost-card .boost-card-image {
    width: 48px;
    height: 48px;
  }

  .inventory-boost-card .boost-card-name {
    font-size: 0.8rem;
  }
}
