/* ---------- Экраны ВХОД и РЕГИСТРАЦИЯ: стиль как у панели сердечек ---------- */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.auth-panel {
  width: min(380px, 92vw);
  padding: 26px 24px 22px;
  border: 2px solid #ff2d6f;
  border-radius: 18px;
  background: linear-gradient(180deg, #3a0f24 0%, #1d0714 100%);
  box-shadow: 0 0 26px rgba(255, 45, 111, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-title {
  text-align: center;
  font-size: 26px;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 45, 111, 0.9), 0 2px 0 #000000;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  color: #ffb3c9;
}

.auth-input {
  padding: 10px 12px;
  border: 2px solid rgba(255, 45, 111, 0.55);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 15px;
  outline: none;
}

.auth-input:focus {
  border-color: #ff2d6f;
  box-shadow: 0 0 10px rgba(255, 45, 111, 0.45);
}

.auth-btn {
  margin-top: 4px;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff2d6f 0%, #b0124a 100%);
  color: #ffffff;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 45, 111, 0.4);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.auth-btn:hover { filter: brightness(1.12); }
.auth-btn:active { transform: scale(0.97); }
.auth-btn:disabled { filter: grayscale(0.7); opacity: 0.6; cursor: not-allowed; }

.auth-link {
  align-self: center;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  color: #ff8fb0;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.auth-link:hover { color: #ffffff; }

.auth-error {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 60, 60, 0.16);
  border: 1px solid rgba(255, 60, 60, 0.6);
  color: #ffd0d0;
  font-size: 13px;
  text-align: center;
}
/* ==========================================================
   Стили гардероба: кнопка открытия, фон, боковая панель,
   вкладки, вертикальный список карточек, футер со статами.
   ========================================================== */

/* ---------- Кнопка «Гардероб» (справа сверху, зеркально панели сердечек) ---------- */
.wardrobe-button {
  position: fixed;
  top: calc(15px + env(safe-area-inset-top, 0px));
  right: calc(15px + env(safe-area-inset-right, 0px));
  z-index: 20;

  min-width: 200px;
  height: 70px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;

  background-color: rgba(24, 20, 32, 0.85);
  background-image: url('/assets/UI/ButtonPanel.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;

  color: #ffffff;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: filter 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.wardrobe-button:hover { filter: brightness(1.12); }
.wardrobe-button:active { transform: scale(0.95); }

/* ---------- Затемняющий фон (клик по нему закрывает панель) ---------- */
.wardrobe-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(6, 4, 10, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.wardrobe-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Панель: ПК - сайдбар на всю высоту справа, без отступов ---------- */
.wardrobe-panel {
  position: fixed;
  z-index: 31;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  /* Ширина - процент экрана, но не уже 320 и не шире 560 px */
  width: clamp(320px, 30vw, 560px);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  background: linear-gradient(180deg, rgba(32, 25, 45, 0.97), rgba(17, 13, 25, 0.97));
  border-left: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.6);

  /* Закрыта: уехала за правый край и не ловит клики */
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.35s;
}
.wardrobe-panel--open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0s;
}

/* ---------- Панель: телефон - на весь экран, выезд снизу ---------- */
@media (max-width: 820px), (pointer: coarse) {
  .wardrobe-panel {
    width: 100vw;
    border-left: 0;
    transform: translateY(105%);
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.32s;
  }
  .wardrobe-panel--open {
    transform: translateY(0);
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0s;
  }
  .wardrobe-backdrop { display: none; }
  .wardrobe-footer__hint { display: block; }
}

/* ---------- Шапка панели ---------- */
.wardrobe-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.wardrobe-header__title {
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 20px;
  color: #ffffff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.wardrobe-header__hearts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 16px;
  color: #ffd6e0;
}
.wardrobe-header__hearts img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.wardrobe-header__close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.wardrobe-header__close:hover { filter: brightness(1.25); }
.wardrobe-header__close:active { transform: scale(0.9); }
.wardrobe-header__close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---------- Вкладки ---------- */
.wardrobe-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.wardrobe-tabs::-webkit-scrollbar { display: none; }

.wardrobe-tab {
  flex: 1 0 auto;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #cfc7dd;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.wardrobe-tab--active {
  background: rgba(255, 209, 102, 0.16);
  border-color: rgba(255, 209, 102, 0.55);
  color: #ffffff;
}
.wardrobe-tab__count {
  display: block;
  font-size: 11px;
  opacity: 0.7;
}

/* ---------- Вертикальный список предметов со скроллом вниз ---------- */
.wardrobe-items {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.wardrobe-items::-webkit-scrollbar { width: 8px; }
.wardrobe-items::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }
.wardrobe-items::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 4px; }

/* ---------- Карточка-строка: иконка | название+бонусы | цена/статус ---------- */
.wardrobe-card {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-family: 'UraBumBum', Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.wardrobe-card:hover:not(:disabled) { transform: translateX(-3px); }
.wardrobe-card:active:not(:disabled) { transform: translateX(0) scale(0.98); }

.wardrobe-card__icon-wrap {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
}
.wardrobe-card__icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.wardrobe-card__info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wardrobe-card__name {
  font-size: 14px;
  line-height: 1.2;
}
.wardrobe-card__bonus {
  font-size: 11px;
  line-height: 1.3;
  color: #bdb4cc;
}

.wardrobe-card__right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.wardrobe-card__price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #ffd6e0;
}
.wardrobe-card__price img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.wardrobe-card__state {
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Состояние: не куплен */
.wardrobe-card--locked .wardrobe-card__icon {
  filter: saturate(0.5) brightness(0.85);
}
/* Состояние: куплен, но не надет */
.wardrobe-card--owned {
  border-color: rgba(124, 224, 138, 0.55);
}
.wardrobe-card--owned .wardrobe-card__state { color: #7ce08a; }
/* Состояние: надет сейчас */
.wardrobe-card--equipped {
  border-color: #ffd166;
  background: rgba(255, 209, 102, 0.1);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.28), 0 8px 20px rgba(0, 0, 0, 0.45);
}
.wardrobe-card--equipped .wardrobe-card__state { color: #ffd166; }
/* Состояние: не хватает сердец */
.wardrobe-card:disabled {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Футер: живые статы бонусов + подсказка про свайп ---------- */
.wardrobe-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.wardrobe-footer__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 13px;
  color: #bdb4cc;
}
.wardrobe-footer__hint {
  display: none;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* ---------- Узкие экраны: компактная кнопка Гардероб с safe-отступами ---------- */
@media (max-width: 600px) {
  .wardrobe-button {
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    min-width: 112px;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 10px;
  }
}

/* ---------- Свайп вниз на телефоне: гасим браузерный pull-to-refresh ---------- */
.wardrobe-panel,
.wardrobe-items {
  overscroll-behavior: contain;
}

/* ---------- Свайп вниз на телефоне: гасим браузерный pull-to-refresh ---------- */
.wardrobe-panel,
.wardrobe-items {
  overscroll-behavior: contain;
}

/* ---------- Экран загрузки ---------- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #000000;
  color: #ffffff;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.loading-screen__ring {
  --loading-progress: 0deg;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(#ff3050 var(--loading-progress), rgba(255, 48, 80, 0.18) 0deg),
    radial-gradient(circle, #161018 0 58%, transparent 59%);
  box-shadow:
    0 0 24px rgba(255, 48, 80, 0.35),
    inset 0 0 18px rgba(0, 0, 0, 0.7);
  transition: background 0.12s linear;
}

.loading-screen__monster {
  width: 76px;
  height: 76px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}

.loading-screen__text {
  font-size: 18px;
  text-shadow: 0 2px 0 #000000;
  opacity: 0.9;
}

@media (max-width: 600px) {
  .loading-screen__ring {
    width: 112px;
    height: 112px;
  }

  .loading-screen__monster {
    width: 66px;
    height: 66px;
  }

  .loading-screen__text {
    font-size: 16px;
  }
}

/* Когда пользователь начал тянуть панель вниз, список вещей больше не скроллится */
.wardrobe-panel--dragging .wardrobe-items {
  overflow-y: hidden !important;
  touch-action: none;
}

/* ---------- Главные вкладки панели: Гардероб / Статистика ---------- */
.wardrobe-main-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
}
.wardrobe-main-tab {
  flex: 1 1 auto;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #cfc7dd;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.wardrobe-main-tab--active {
  background: rgba(255, 45, 111, 0.18);
  border-color: rgba(255, 45, 111, 0.6);
  color: #ffffff;
}

/* ---------- Кнопка Выйти в шапке панели ---------- */
.wardrobe-header__logout {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid rgba(255, 90, 90, 0.6);
  border-radius: 10px;
  background: rgba(255, 60, 60, 0.14);
  color: #ffb0b0;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.wardrobe-header__logout:hover {
  background: rgba(255, 60, 60, 0.3);
  color: #ffffff;
}
.wardrobe-header__hearts {
  margin-left: 0;
}

/* ---------- Статистика ---------- */
.stats-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.stats-mine {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 15px;
  color: #e8e2f2;
}
.stats-row b {
  color: #ffd6e0;
}
.stats-hint {
  padding: 18px 16px;
  text-align: center;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Рекорды: топ-50 (место - ник - сердца) ---------- */
.leader-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 14px;
  color: #e8e2f2;
}
.leader-row:nth-child(1) {
  background: rgba(255, 209, 102, 0.16);
  border: 1px solid rgba(255, 209, 102, 0.5);
}
.leader-row:nth-child(2) {
  background: rgba(200, 200, 220, 0.12);
  border: 1px solid rgba(200, 200, 220, 0.4);
}
.leader-row:nth-child(3) {
  background: rgba(205, 127, 50, 0.14);
  border: 1px solid rgba(205, 127, 50, 0.45);
}
.leader-place {
  flex: 0 0 34px;
  text-align: center;
  color: #ffb3c9;
}
.leader-nick {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leader-hearts {
  flex: 0 0 auto;
  color: #ffd6e0;
}

/* ============================================================
   Персональная подсветка игрока в таблице рекордов.
   Используется в frontend/src/components/LeaderboardList.jsx
   ============================================================ */

/* Своя строка: лаймовая обводка поверх любого фона (включая медальный топ-3) */
.leader-row-me {
  outline: 2px solid #4ade80;
  outline-offset: -2px;
}

/* Свой ник — лаймовым и жирным */
.leader-row-me .leader-nick {
  color: #4ade80;
  font-weight: 700;
}

/* Звезда после ника: маркер "это ты" */
.leader-me-star {
  color: #4ade80;
  margin-left: 6px;
  font-size: 0.9em;
}

/* Закреплённая строка НАД списком (игрок вне топ-50).
   Специфика (0,3,0) выше чем у .leader-row:nth-child(1) (0,2,0),
   поэтому медальный фон первого места её не перекрашивает. */
.leader-wrap > .leader-row.leader-row-outside {
  background: rgba(74, 222, 128, 0.10);
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(74, 222, 128, 0.45);
  padding-bottom: 10px;
}

/* ============================================================
   Вкладка настроек звука (SettingsPanel.jsx)
   Стиль игры: розовый градиент заполнения, сердечко-бегунок
   ============================================================ */
.settings-panel {
  padding: 24px 20px;
  max-width: 460px;
  margin: 0 auto;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.settings-title {
  margin: 0 0 26px;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 12px rgba(239, 71, 111, 0.45);
}

.settings-row {
  margin-bottom: 24px;
}

.settings-label {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
  color: #ffd7e0;
}

/* Линия ползунка: заполнение задаётся inline-градиентом из JSX */
.settings-slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 71, 111, 0.35);
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Бегунок: чёрное сердечко с красной обводкой (SVG data-URI) */
.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 4.19 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z' fill='%230d0d12' stroke='%23ef476f' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 0 6px rgba(239, 71, 111, 0.75));
  cursor: pointer;
}

.settings-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 4.19 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z' fill='%230d0d12' stroke='%23ef476f' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 0 6px rgba(239, 71, 111, 0.75));
  cursor: pointer;
}

/* Кнопка сброса в стиле игры */
.settings-reset {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 32px;
  background: rgba(239, 71, 111, 0.10);
  color: #ffd7e0;
  border: 2px solid #ef476f;
  border-radius: 14px;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(239, 71, 111, 0.45);
}

.settings-reset:active {
  transform: scale(0.97);
}

/* Кнопка старта "ГАЗ ГАЗ" на загрузочном экране (LoadingScreen.jsx) */
.loading-screen__start-btn {
  margin-top: 18px;
  padding: 14px 44px;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 24px;
  letter-spacing: 1px;
  color: #ffd7e0;
  background: rgba(239, 71, 111, 0.12);
  border: 2px solid #ef476f;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(239, 71, 111, 0.55);
  animation: gaz-pulse 1.2s ease-in-out infinite;
}

.loading-screen__start-btn:active {
  transform: scale(0.95);
}

@keyframes gaz-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(239, 71, 111, 0.45); }
  50% { box-shadow: 0 0 26px rgba(239, 71, 111, 0.85); }
}


/* ============================================================
   Вкладка-заглушка "В разработке" (PlaceholderView.jsx)
   Используется для Предметиков / Питомцев / Фонов
   ============================================================ */
.placeholder-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 20px;
  text-align: center;
  min-height: 320px;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.placeholder-view__icon {
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(239, 71, 111, 0.45));
  transition: transform 0.6s ease-in-out, filter 0.6s ease-in-out;
}

.placeholder-view__icon--pulse {
  transform: scale(1.08) rotate(-4deg);
  filter: drop-shadow(0 0 22px rgba(239, 71, 111, 0.85));
}

.placeholder-view__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 14px rgba(239, 71, 111, 0.5);
}

.placeholder-view__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: #ffd7e0;
  max-width: 320px;
}


/* ============================================================
   Шестерёнка настроек в шапке панели (WardrobePanel.jsx).
   Стоит слева рядом с сердцем, далеко от кнопки "Выйти",
   чтобы её нельзя было нажать случайно.
   ============================================================ */
.wardrobe-header__settings {
  width: 34px;
  height: 34px;
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(239, 71, 111, 0.45);
  border-radius: 10px;
  background: rgba(239, 71, 111, 0.08);
  color: #ffd7e0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.wardrobe-header__settings--active {
  border-color: #ef476f;
  background: rgba(239, 71, 111, 0.22);
  box-shadow: 0 0 10px rgba(239, 71, 111, 0.6);
}

/* ============================================================
   Листаемые вкладки гардероба: горизонтальный скролл без скроллбара.
   На телефоне свайп пальцем, на ПК - колесо с Shift или тачпад.
   ============================================================ */
.wardrobe-main-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.wardrobe-main-tabs::-webkit-scrollbar {
  display: none;
}

.wardrobe-main-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
}


/* ============================================================
   Компактный ряд вкладок: 5 кнопок влезают на телефон без скролла.
   Порядок: Шмотки, Сеты, Предметики, Энергетики, Прогресс.
   ============================================================ */
.wardrobe-main-tabs {
  gap: 6px;
  padding: 8px 10px;
}

.wardrobe-main-tab {
  padding: 8px 12px;
  font-size: 13px;
}

@media (max-width: 430px) {
  .wardrobe-main-tabs {
    gap: 4px;
    padding: 8px 6px;
  }
  .wardrobe-main-tab {
    padding: 7px 8px;
    font-size: 11px;
    letter-spacing: 0;
  }
}


/* ============================================================
   Под-вкладки вкладки "Прогресс" (ProgressView.jsx):
   сегмент-переключатель Цифры / Достижения
   ============================================================ */
.progress-view__tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 12px 12px 0;
}

.progress-view__tab {
  padding: 7px 18px;
  border: 1.5px solid rgba(239, 71, 111, 0.35);
  border-radius: 12px;
  background: rgba(239, 71, 111, 0.06);
  color: #ffd7e0;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.progress-view__tab--active {
  border-color: #ef476f;
  background: rgba(239, 71, 111, 0.2);
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 71, 111, 0.5);
}


/* ============================================================
   Вкладка Сеты (SetsView.jsx): карточки сетов списком частей.
   Цвета статусов как в гардеробе: жёлтый НАДЕТО, зелёный получено,
   серый замок для гачи.
   ============================================================ */
.sets-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.sets-view__empty {
  padding: 40px 0;
  text-align: center;
  color: #9ca3af;
}

.set-card {
  padding: 12px;
  border: 1.5px solid rgba(239, 71, 111, 0.35);
  border-radius: 16px;
  background: rgba(20, 16, 24, 0.6);
}

.set-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.set-card__title {
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 0 10px rgba(239, 71, 111, 0.4);
}

.set-card__progress {
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 13px;
  color: #ffd7e0;
}

.set-card__parts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-card__part {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.set-card__part--owned {
  border-color: rgba(74, 222, 128, 0.45);
}

.set-card__part--equipped {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.08);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}

.set-card__part--locked {
  opacity: 0.55;
  cursor: default;
}

.set-card__icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: transparent;
}

.set-card__icon--emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.set-card__name {
  flex: 1;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 15px;
  color: #f4f4f5;
}

.set-card__status {
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #9ca3af;
}

.set-card__part--owned .set-card__status {
  color: #4ade80;
}

.set-card__part--equipped .set-card__status {
  color: #facc15;
}


/* Временная покупка питомца до появления гачи */
.set-card__part--buyable {
  border-color: rgba(239, 71, 111, 0.65);
  background: rgba(239, 71, 111, 0.08);
  box-shadow: 0 0 10px rgba(239, 71, 111, 0.25);
  opacity: 1;
  cursor: pointer;
}

.set-card__part--buyable .set-card__status {
  color: #ff8fab;
}


/* ============================================================
   Вкладка Предметики (UpgradesView.jsx): текстовые карточки
   апгрейдов без иконок (арт придёт позже).
   ============================================================ */
.upgrades-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.upgrade-card {
  padding: 10px 12px;
  border: 1.5px solid rgba(239, 71, 111, 0.35);
  border-radius: 14px;
  background: rgba(20, 16, 24, 0.6);
}

.upgrade-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.upgrade-card__row--sub {
  justify-content: flex-start;
  margin: 4px 0;
}

.upgrade-card__name {
  font-size: 16px;
  color: #f4f4f5;
}

.upgrade-card__level {
  padding: 2px 10px;
  border: 1px solid rgba(250, 204, 21, 0.5);
  border-radius: 10px;
  color: #facc15;
  font-size: 13px;
  white-space: nowrap;
}

.upgrade-card__bonus {
  font-size: 13px;
  color: #9ca3af;
}

.upgrade-card__cost {
  font-size: 14px;
  color: #ffd7e0;
}

.upgrade-card__buy {
  padding: 6px 18px;
  border: 1.5px solid #ef476f;
  border-radius: 12px;
  background: rgba(239, 71, 111, 0.12);
  color: #ffd7e0;
  font-family: 'UraBumBum', Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.upgrade-card__buy:disabled {
  opacity: 0.4;
  cursor: default;
  border-color: rgba(239, 71, 111, 0.3);
  box-shadow: none;
}

.upgrade-card__buy:not(:disabled):active {
  transform: scale(0.96);
}

/* ============================================================
   Вкладка Прогресс -> Достижения (AchievementsView.jsx).
   Показываются только ОТКРЫТЫЕ ачивки.
   ============================================================ */
.achievements-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.achievements-view__empty {
  padding: 40px 12px;
  text-align: center;
  color: #9ca3af;
  font-family: 'UraBumBum', Arial, sans-serif;
}

.achievement-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  border-radius: 14px;
  background: rgba(250, 204, 21, 0.06);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}

.achievement-card__name {
  font-size: 17px;
  color: #facc15;
}

.achievement-card__desc {
  font-size: 13px;
  color: #ffd7e0;
}


/* ============================================================
   Уведомляшка достижения (AchievementToast.jsx):
   выезжает справа, висит 6 сек, уезжает обратно.
   ============================================================ */
.achievement-toast-wrap {
  position: fixed;
  top: 70px;
  right: 12px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.achievement-toast {
  min-width: 240px;
  max-width: 320px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1.5px solid rgba(250, 204, 21, 0.6);
  border-radius: 14px;
  background: rgba(20, 16, 24, 0.92);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
  font-family: 'UraBumBum', Arial, sans-serif;
  animation: toast-in 0.45s ease-out;
}

.achievement-toast--exit {
  animation: toast-out 0.5s ease-in forwards;
}

.achievement-toast__title {
  color: #facc15;
  font-size: 15px;
}

.achievement-toast__desc {
  color: #ffd7e0;
  font-size: 13px;
}

@keyframes toast-in {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}
@font-face {
  font-family: 'UraBumBum';
  src: url('/assets/font/UraBumBumSP.ttf') format('truetype');
  font-display: block;
}

html, body, #root {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

#game-container {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

#game-container canvas {
  display: block;
}
