/* Попап профиля — по макету Figma «Profile popup» (1:4180, 1066×655) */

.ProfileModal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ProfileModal[hidden] { display: none !important; }

.ProfileModal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.ProfileModal__box {
  position: relative;
  width: 1066px;
  max-width: 100%;
  padding: 22px;
  border-radius: 16px;
  background: #0f0c1f;
  border: 1px solid #241d3f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.ProfileModal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 20px;
}
.ProfileModal__icon { font-size: 15px; }
.ProfileModal__title { color: #a855ff; font-size: 16px; font-weight: 600; }
.ProfileModal__back {
  margin-left: auto;
  border: none;
  background: none;
  color: #a095de;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s;
}
.ProfileModal__back:hover { color: #fff; }

/* ── Карточка пользователя ────────────────────────────────── */
.ProfileCard {
  position: relative;
  padding: 58px 30px 26px;
  border-radius: 14px;
  border: 1px solid #3a2b66;
  background:
    radial-gradient(120% 120% at 50% 110%, rgba(134, 58, 255, 0.35) 0%, rgba(134, 58, 255, 0) 60%),
    linear-gradient(180deg, #1b1533 0%, #191430 100%);
  text-align: center;
}
.ProfileCard__avatar {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #5c349e 0%, #34205e 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.ProfileCard__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Аватар на полной странице профиля — кликабельный, с кнопкой загрузки поверх */
.ProfileCard__avatar_editable { overflow: visible; cursor: pointer; }
.ProfileCard__avatar_editable img { border-radius: inherit; }

.ProfileCard__id { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ProfileCard__name { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 0.6px; }
.ProfileCard__badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(134, 58, 255, 0.25);
  color: #a855ff;
  font-size: 11px;
  font-weight: 600;
}
.ProfileCard__since { margin-top: 6px; color: #7d76a8; font-size: 12px; }

.ProfileCard__btn {
  position: absolute;
  top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid #4a3a7d;
  background: rgba(90, 60, 160, 0.35);
  color: #a095de;
  font-size: 13px;
  font-weight: 500;
  transition: 0.15s;
}
.ProfileCard__btn:hover { color: #fff; border-color: #7c5ccb; }
.ProfileCard__btn_left { left: 30px; }
.ProfileCard__btn_right { right: 30px; }

.ProfileCard__divider {
  margin: 24px 0 20px;
  height: 1px;
  background: repeating-linear-gradient(90deg, #3a2b66 0 6px, transparent 6px 12px);
}

/* ── Метрики ──────────────────────────────────────────────── */
.ProfileStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ProfileStat__label {
  color: #a855ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}
.ProfileStat__value { margin-top: 10px; color: #fff; font-size: 16px; font-weight: 500; }
.ProfileStat__value.is-negative { color: #ff5a5a; }

/* ── Баланс и действия ────────────────────────────────────── */
.ProfileBalance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding: 26px 30px;
  border-radius: 14px;
  border: 1px solid #241d3f;
  background: linear-gradient(180deg, #141026 0%, #171232 100%);
}
.ProfileBalance__label { color: #7d76a8; font-size: 12px; letter-spacing: 0.6px; }
.ProfileBalance__value {
  margin-top: 6px;
  color: #a855ff;
  font-size: 30px;
  font-weight: 700;
  text-shadow: 0 0 34px rgba(168, 85, 255, 0.35);
}
.ProfileBalance__hint { margin-top: 6px; color: #4a4574; font-size: 12px; }
.ProfileBalance__actions { display: flex; gap: 12px; }
.ProfileBalance__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, #a448ff 0%, #873aff 100%);
  box-shadow: 0 0 24px rgba(134, 58, 255, 0.25);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: 0.15s;
}
.ProfileBalance__btn:hover { filter: brightness(1.08); }
.ProfileBalance__btn_ghost {
  background: #1e1a39;
  border: 1px solid #322e58;
  box-shadow: none;
  color: #a095de;
}

@media screen and (max-width: 900px) {
  .ProfileCard { padding: 58px 18px 22px; }
  .ProfileCard__btn { position: static; margin: 14px 6px 0; display: inline-flex; }
  .ProfileBalance { flex-direction: column; align-items: stretch; text-align: center; }
  .ProfileBalance__actions { justify-content: center; }
}
