/* ============================================================= */
/*  Карточка автора на форуме — Glassmorphism Redesign          */
/* ============================================================= */

.topic-answers div[id^="answer"] .left-side {
  padding: 0;
  text-align: initial;
  height: 100%; /* Чтобы родительский контейнер давал одинаковую высоту */
}

/* Главный контейнер карточки */
.fac-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 230px;
  max-width: 260px; /* Фиксированная максимальная ширина */
  height: 100%;     /* Выравнивание по высоте блока ответа */
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(18, 20, 29, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fac-card:hover {
  border-color: rgba(79, 234, 159, 0.3);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(79, 234, 159, 0.15);
}

/* ---- Баннер: фон профиля ---- */
.fac-card__banner {
  position: relative;
  height: 95px;
  min-height: 95px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(135deg, rgba(79, 234, 159, 0.2), rgba(34, 184, 119, 0.1));
  flex: 0 0 auto;
}

.fac-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

video.fac-card__bg {
  display: block;
}

.fac-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.1) 0%, rgba(18, 20, 29, 0.85) 100%);
}

/* Кнопка лайка */
.fac-card__like {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(18, 20, 29, 0.6);
  backdrop-filter: blur(8px);
  color: #aeb6d2;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fac-card__like:hover {
  background: #ff6b60;
  border-color: #ff6b60;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(255, 107, 96, 0.5);
}

/* Аватарка */
.fac-card__avatar {
  position: relative;
  z-index: 2;
  display: block;
  transform: translateY(38%);
  line-height: 0;
}

.fac-card__avatar-img {
  width: 68px;
  height: 68px;
  border-radius: 50%; /* Современная круглая аватарка */
  object-fit: cover;
  box-shadow: 0 0 0 4px rgba(18, 20, 29, 0.95), 0 8px 20px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fac-card__avatar:hover .fac-card__avatar-img {
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(18, 20, 29, 0.95), 0 0 0 6px rgba(79, 234, 159, 0.5), 0 10px 22px rgba(0, 0, 0, 0.7);
}

/* ---- Основная контентная часть ---- */
.fac-card__plate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 32px 14px 14px;
  flex: 1 1 auto; /* Растягивает блок, выравнивая нижнюю кнопку */
}

/* Имя пользователя */
.fac-card__name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  width: 100%;
}

.fac-card__name a {
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  transition: color 0.18s ease;
}

.fac-card__name a:hover {
  color: #4fea9f;
}

/* Группа / Должность */
.fac-card__group {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Фиксация подписи (чтобы карточки не плясали по высоте) */
.fac-card__signature {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: #aeb6d2;
  line-height: 1.35;
  width: 100%;
  height: 30px; /* Фиксированная высота в 2 строки */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

/* Статистика пользователя */
.fac-card__stats.pbg_top_stats {
  margin-top: 6px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  width: 100%;
  gap: 0;
}

.fac-card__stats.pbg_top_stats .pbg_top_stat {
  flex: 1 1 0;
  position: relative;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
}

.fac-card__stats.pbg_top_stats .pbg_top_stat:not(:last-child):after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.fac-card__stats.pbg_top_stats .pbg_top_stat .bx {
  font-size: 14px;
  color: #4fea9f;
  margin-right: 3px;
}

/* Социальные сети (Фиксированная высота блока) */
.fac-card__socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto; /* Прижимает соцсети и кнопку вниз */
  padding-top: 6px;
  width: 100%;
  min-height: 40px; /* Фиксирует место под соцсети, если их нет */
}

.fac-card__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 6px;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  white-space: nowrap;
}

.fac-card__social img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex: 0 0 auto;
}

.fac-card__social:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

.fac-card__social span {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 700;
}

.fac-card__social--tg {
  background: rgba(42, 171, 238, 0.12);
  border-color: rgba(42, 171, 238, 0.25);
  color: #2aabee;
}
.fac-card__social--tg:hover {
  background: #229ed9;
  border-color: #229ed9;
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.4);
}

.fac-card__social--steam {
  background: rgba(102, 192, 244, 0.12);
  border-color: rgba(102, 192, 244, 0.25);
  color: #66c0f4;
}
.fac-card__social--steam:hover {
  background: #1b2838;
  border-color: rgba(102, 192, 244, 0.5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* ---- Кнопка «Ответить» ---- */
.fac-card__answer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 36px;
  min-height: 36px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(79, 234, 159, 0.08);
  color: #4fea9f;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all 0.2s ease;
}

.fac-card__answer i {
  font-size: 15px;
}

.fac-card__answer:hover {
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  color: #08150f;
  box-shadow: 0 -2px 12px rgba(79, 234, 159, 0.3);
}

.fac-card__answer:active {
  transform: scale(0.98);
}

@media (max-width: 991.98px) {
  .fac-card {
    max-width: 100%;
  }
  .fac-card__banner {
    height: 85px;
    min-height: 85px;
  }
  .fac-card__avatar-img {
    width: 60px;
    height: 60px;
  }
  .fac-card__plate {
    padding: 28px 10px 12px;
  }
}

/* ---- Упоминание в редакторе ---- */
.fac-mention {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(79, 234, 159, 0.14);
  border: 1px solid rgba(79, 234, 159, 0.25);
  color: #4fea9f !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.18s ease;
}

.fac-mention:hover {
  background: #4fea9f;
  color: #08150f !important;
  box-shadow: 0 0 10px rgba(79, 234, 159, 0.4);
}