/* --- Типографика --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* --- Карточки --- */
.card { border-radius: 12px; transition: box-shadow 0.2s; }
.hover-shadow:hover { box-shadow: 0 4px 20px rgba(0,0,0,.12) !important; }

/* --- Кнопки --- */
.btn { border-radius: 8px; }
.btn-warning { color: #000; }

/* --- Navbar --- */
.navbar-brand {
  letter-spacing: -0.5px;
  font-size: 1.25rem;   /* чуть крупнее — визуально "тянет" влево */
}

/* --- Блок баланса --- */
.balance-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  padding: 4px 6px 4px 12px;
  transition: background 0.2s, border-color 0.2s;
}
.balance-widget:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 193, 7, 0.5);
}

.balance-amount {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.balance-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #ffc107;
  border-radius: 50%;
  color: #000;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.balance-widget:hover .balance-plus {
  background: #ffca2c;
  transform: scale(1.12);
}

/* Мобайл: компактнее */
@media (max-width: 991.98px) {
  .balance-widget {
    padding: 4px 8px 4px 10px;
    border-radius: 16px;
  }
  .balance-amount {
    font-size: 0.82rem;
  }
}

/* --- Таймер обратного отсчёта --- */
.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 1px;
}
.countdown.urgent { color: #dc3545; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --- Mystery Box: блюр превью --- */
.box-preview-blur {
  filter: blur(12px);
  transform: scale(1.05);
  transition: filter 0.4s;
  pointer-events: none;
  user-select: none;
}
.box-preview-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.box-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  border-radius: 8px;
}

/* --- Ставки: анимация новой ставки --- */
@keyframes bidFlash {
  0% { background: #fff3cd; }
  100% { background: transparent; }
}
.bid-new { animation: bidFlash 1.5s ease; }

/* --- Toast --- */
.toast-container { z-index: 1090; }

/* --- Форма ставки на мобайле --- */
@media (max-width: 576px) {
  .bid-form input[type="number"] {
    font-size: 1.1rem;
    height: 48px;
  }
  .bid-form .btn {
    height: 48px;
    font-size: 1rem;
  }
  /* Таблицы ставок: упрощённый вид */
  .bids-table th:nth-child(3),
  .bids-table td:nth-child(3) { display: none; }
}

/* --- Слайдер фото (scroll-snap) --- */
.img-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
  scrollbar-width: none;
}
.img-slider::-webkit-scrollbar { display: none; }
.img-slider-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.img-slider-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
}
@media (max-width: 576px) {
  .img-slider-item img { height: 220px; }
}

/* --- Индикаторы слайдера --- */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #dee2e6;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.slider-dot.active { background: #ffc107; }

/* --- Touch-friendly минимум --- */

@media (max-width: 576px) {
  .nav-link, .btn { min-height: 44px; line-height: 44px; padding-top: 0; padding-bottom: 0; }
  .dropdown-item { min-height: 44px; line-height: 44px; }
}

/* --- Аватары --- */
.avatar-sm { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; }
.avatar-md { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.avatar-lg { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; }


/* --- Переключатель языка --- */
.lang-switcher {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.875rem;
  transition: background 0.2s, border-color 0.2s;
}

.lang-switcher:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 193, 7, 0.5);
}

.dropdown-item.active {
  background-color: rgba(255, 193, 7, 0.15);
  color: #000;
}

