/* Бейдж непрочитанных сообщений и входящих лайков на нижней панели */
.nav-btn {
  position: relative;
}

.nav-badge {
  display: none;
  position: absolute;
  top: 4px;
  right: calc(50% - 20px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4458, #ff7854);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 68, 88, 0.55);
  pointer-events: none;
}

.nav-badge.vip-gold {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111116;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.55);
}

.nav-badge.show {
  display: inline-block;
}

/* Баннер и сетка экрана «Кто лайкнул меня» */
.vip-banner-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(255, 68, 88, 0.22));
  border: 1px solid rgba(251, 191, 36, 0.45);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.vip-unlock-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111116;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.vip-banner-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 0.8rem;
  color: #fde68a;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.vip-toggle-mini {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
}

.likes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 14px;
}

.like-grid-card {
  position: relative;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.like-grid-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: filter 0.25s ease;
}

.like-grid-card.is-blurred .like-grid-photo {
  filter: blur(16px) brightness(0.8);
  transform: scale(1.12);
}

.like-super-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  background: rgba(14, 165, 233, 0.88);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}

.like-grid-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 10px;
  background: linear-gradient(to top, rgba(9, 9, 12, 0.94), rgba(9, 9, 12, 0));
}

.like-grid-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.like-grid-city {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 2px;
}

.like-reply-btn {
  margin-top: 7px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ff4458, #ff7854);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

/* Заголовки секций на экране чатов */
.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 12px 0 8px;
}

/* Карусель новых пар — строго круглые аватарки */
.matches-carousel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  flex-shrink: 0;
  min-height: 98px;
}

.matches-carousel::-webkit-scrollbar {
  display: none;
}

.match-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 68px;
  flex: 0 0 68px;
  cursor: pointer;
}

.match-avatar-ring {
  width: 64px;
  height: 64px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #ff4458, #ff7854);
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #252530;
  border: 2px solid #121218;
}

.match-item-name {
  font-size: 0.78rem;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Список активных диалогов */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 12px;
}

.chat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chat-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-card.has-unread {
  background: rgba(255, 68, 88, 0.09);
  border-color: rgba(255, 68, 88, 0.38);
}

.chat-card.has-unread .chat-last-message {
  color: #ffffff;
  font-weight: 600;
}

.chat-user-pic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #252530;
  flex-shrink: 0;
}

.chat-card-body {
  flex: 1;
  min-width: 0;
}

.chat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.chat-card.has-unread .chat-time {
  color: #ff7854;
  font-weight: 600;
}

.chat-last-message {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-unread-pill {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4458, #ff7854);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

/* Полноэкранное модальное окно диалога */
.conversation-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 120;
  background: #0d0d12;
  display: none !important;
  flex-direction: column;
}

.conversation-modal.open {
  display: flex !important;
}

.conv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  min-height: 58px;
  background: #13131a;
}

.conv-header .icon-btn {
  flex-shrink: 0;
}

.conv-title {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meet-place-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 118, 136, 0.8);
  background: linear-gradient(135deg, #ff4458, #ff7854);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 68, 88, 0.35);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.meet-place-btn:hover {
  opacity: 0.92;
}

.meet-place-btn:active {
  transform: scale(0.95);
}

.places-drawer {
  display: none;
  flex-shrink: 0;
  background: #181822;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 12px 14px;
  max-height: 54%;
  overflow-y: auto;
  z-index: 15;
}

.places-drawer.open {
  display: block;
}

.places-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.places-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.place-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
}

.place-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.place-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.place-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.place-rating {
  font-size: 0.76rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.place-distances {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 6px;
}

.place-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.place-map-link {
  font-size: 0.78rem;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.place-invite-btn {
  padding: 6px 13px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ff4458, #ff7854);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.conv-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.bubble.incoming {
  align-self: flex-start;
  background: #1c1c24;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

.bubble.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #ff4458, #ff7854);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.bubble-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 9px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.bubble-map-btn:hover {
  background: rgba(0, 0, 0, 0.42);
}

.bubble-map-btn:active {
  transform: scale(0.97);
}

.conv-input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #13131a;
  flex-shrink: 0;
}

.msg-input {
  flex: 1;
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  font-size: 0.92rem;
  outline: none;
}

.msg-input:focus {
  border-color: #ff4458;
}

.send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff4458, #ff7854);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.send-btn:active {
  transform: scale(0.94);
}

/* Защита от копирования и скриншотов (пункты 6 и 7) */
.protected-secret-zone {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  position: relative;
}

/* Затемнение экрана при попытке переключения вкладок / захвата экрана */
.protected-secret-zone.blur-guard {
  filter: blur(22px) brightness(0.3);
  transition: filter 0.1s ease;
}

/* Водяной знак поверх секретного чата и разовых фото */
.anti-screenshot-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -30deg,
    rgba(255, 68, 88, 0.04) 0px,
    rgba(255, 68, 88, 0.04) 40px,
    transparent 40px,
    transparent 80px
  );
  z-index: 5;
}

/* Блокировка печати экрана */
@media print {
  .protected-secret-zone,
  #view-once-photo-modal,
  #secret-chat-modal {
    display: none !important;
  }
}