/* Стопка карточек */
.card-stack {
  position: relative;
  flex: 1;
  width: 100%;
  margin-bottom: 14px;
  isolation: isolate;
}

.loader-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: var(--bg-card);
  border-radius: 22px;
  border: 1px solid var(--border-line);
  padding: 24px;
}

/* Сама карточка */
.dating-card {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  background-color: #16161d;
  background-size: cover;
  background-position: center;
  user-select: none;
  cursor: grab;
  transform-origin: center bottom;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

.dating-card:not(:last-child):not(:nth-last-child(2)) {
  display: none;
}

.dating-card:nth-last-child(2) {
  transform: scale(0.95) translateY(10px);
  opacity: 0.7;
  pointer-events: none;
  box-shadow: none;
}

.dating-card:nth-last-child(2) .card-details,
.dating-card:nth-last-child(2) .photo-indicators {
  opacity: 0;
}

.dating-card:last-child {
  opacity: 1;
  pointer-events: auto;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 16px 36px rgba(0, 0, 0, 0.65);
}

.dating-card:active {
  cursor: grabbing;
}

/* Нижний градиент под текстом */
.dating-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background: linear-gradient(
    to top,
    rgba(9, 9, 11, 0.94) 0%,
    rgba(9, 9, 11, 0.52) 60%,
    rgba(9, 9, 11, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Блок с текстом в нижней части карточки */
.card-details {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px;
  z-index: 2;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  transition: opacity 0.2s ease;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.card-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Бейдж «В сети» рядом с именем */
.card-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #86efac;
  background: rgba(22, 101, 52, 0.55);
  border: 1px solid rgba(74, 222, 128, 0.45);
  padding: 2px 8px;
  border-radius: 999px;
  text-shadow: none;
}

.card-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.card-distance {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 8px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Аккуратная плашка закрытого раздела «О себе» до взаимного мэтча */
.card-bio-lock {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 4px 10px;
  border-radius: 10px;
  text-shadow: none;
}

.swipe-badge {
  position: absolute;
  top: 26px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 3px solid;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}

.swipe-badge.like {
  left: 22px;
  color: var(--accent-like);
  border-color: var(--accent-like);
  transform: rotate(-14deg);
}

.swipe-badge.nope {
  right: 22px;
  color: var(--accent-nope);
  border-color: var(--accent-nope);
  transform: rotate(14deg);
}

.action-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 4px 0 8px;
}

.action-btn {
  border-radius: 50%;
  border: 1px solid var(--border-line);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.action-btn:hover {
  transform: scale(1.07);
}

.action-btn:active {
  transform: scale(0.94);
}

.btn-nope {
  width: 56px;
  height: 56px;
  stroke: var(--accent-nope);
}

.btn-super {
  width: 46px;
  height: 46px;
  stroke: var(--accent-super);
}

.btn-like {
  width: 56px;
  height: 56px;
  stroke: var(--accent-like);
}

.photo-indicators {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 5px;
  z-index: 6;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.photo-indicator-bar {
  flex: 1;
  height: 3.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: background-color 0.2s ease;
}

.photo-indicator-bar.active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Шторка полной анкеты (открывается из чата после взаимного Match) */
.full-profile-modal {
  display: none !important;
  position: absolute;
  inset: 0;
  z-index: 160;
  background: rgba(9, 9, 12, 0.82);
  backdrop-filter: blur(8px);
  align-items: flex-end;
}

.full-profile-modal.open {
  display: flex !important;
}

.fp-sheet {
  position: relative;
  width: 100%;
  height: 92%;
  background: #14141b;
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fpSlideUp 0.24s ease-out;
}

@keyframes fpSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fp-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 15, 22, 0.8);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fp-photos {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  height: 55%;
  flex-shrink: 0;
  background: #1c1c24;
}

.fp-photo-item {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  background-size: cover;
  background-position: center;
}

.fp-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 26px;
}

.fp-name {
  margin: 0 0 4px;
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
}

.fp-city {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.fp-section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 700;
}

.fp-bio {
  font-size: 0.94rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 18px;
  white-space: pre-line;
}

.fp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.fp-tag {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 68, 88, 0.14);
  border: 1px solid rgba(255, 68, 88, 0.35);
  color: #ffffff;
}