/* ============================================================================
   RENTMAN24 — Favourites (design fully matches the main page)
   ============================================================================ */

:root {
  --bg: #f9f9f9;
  --card: #ffffff;
  --gold: #f7eb01;
  --line: #e5e5e5;
  --black: #000;
  --text: #0f0f0f;
  --muted: #606060;
  --red: #E11A2B;
  --tg: #0088cc;
  --wa: #25D366;
  --header-bg: #000000;
  --hero-text: #333;
  --modal-bg: #ffffff;
  --modal-text: #0f0f0f;
  --input-border: #ddd;
  --menu-bg: #121212;
  --menu-text: #ffffff;
  --dropdown-bg: #1a1a1a;
  --no-data-bg: #ffffff;
  --no-data-text: #666;
  --no-data-border: #e5e5e5;
}

.dark-theme {
  --bg: #0f0f0f;
  --card: #272727;
  --line: #303030;
  --text: #f1f1f1;
  --muted: #aaaaaa;
  --header-bg: #0f0f0f;
  --hero-text: #b0b0b0;
  --modal-bg: #1e1e1e;
  --modal-text: #e0e0e0;
  --input-border: #3a3a3a;
  --menu-bg: #121212;
  --menu-text: #e0e0e0;
  --dropdown-bg: #1a1a1a;
  --no-data-bg: #1e1e1e;
  --no-data-text: #a0a0a0;
  --no-data-border: #2a2a2a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-bottom: 70px;
}

body, header, h1, h2, h3, p, span, a {
  transition: background-color 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, box-shadow 0.3s ease;
}

button { font: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================================
   HEADER
   ============================================================================ */
.header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1400px;
  height: 56px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header-logo {
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .4px;
  white-space: nowrap;
  text-decoration: none;
}
.header-logo span { color: var(--red); }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* ===== COUNTRY ===== */
.country-selector { position: relative; display: inline-block; cursor: pointer; }
.country-selector .country-btn {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  white-space: nowrap;
}
.country-flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.country-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--dropdown-bg);
  border-radius: 16px;
  min-width: 160px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  padding: 6px;
}
.country-dropdown-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.country-option {
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
}
.country-option:hover { background: rgba(255, 255, 255, 0.1); }
.country-option img { width: 20px; height: 20px; border-radius: 50%; }

/* ===== CITY ===== */
.city-dropdown { position: relative; display: inline-block; cursor: pointer; }
.city-dropdown .city {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}
.city-dropdown .city.active-city {
  color: #fff;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
  min-height: 34px;
  white-space: nowrap;
  font-size: 14px;
}
.city-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--dropdown-bg);
  border-radius: 16px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  padding: 6px;
  max-height: 400px;
  overflow-y: auto;
}
.city-dropdown-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.city-option {
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  border-radius: 10px;
  text-decoration: none;
}
.city-option:hover { background: rgba(255, 255, 255, 0.1); }

/* ===== LANG ===== */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  min-height: 34px;
  position: relative;
}
.lang-selector img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
}
.lang-selector .lang {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}
.lang-selector svg {
  width: 10px;
  height: 10px;
  color: #fff;
  flex-shrink: 0;
}
.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--dropdown-bg);
  border-radius: 16px;
  min-width: 150px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  padding: 6px;
}
.lang-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  padding: 10px 14px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  text-decoration: none;
}
.lang-option:hover { background: rgba(255, 255, 255, 0.1); }
.lang-option img { width: 20px; height: 20px; border-radius: 50%; }

/* ============================================================================
   PAGE
   ============================================================================ */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 34px;
}

.fav-page { min-height: calc(100vh - 56px); }

.fav-head {
  text-align: center;
  margin: 6px 0 18px;
}
.fav-head h1 {
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}
.fav-head p {
  margin-top: 8px;
  color: var(--hero-text);
  font-size: 18px;
}

/* ============================================================================
   GRID — полностью как на главной (YouTube Shorts style)
   ============================================================================ */
.grid-wrap {
  margin: 0 auto;
  padding: 0;
}
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.anket-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  aspect-ratio: 9/16;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  border-radius: 0;
}
.anket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.anket-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #b9b9b9;
  -webkit-tap-highlight-color: transparent;
  border-radius: 0;
}
.anket-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none !important;
  -webkit-user-drag: none !important;
}

.no-data {
  grid-column: 1/-1;
  background: var(--no-data-bg);
  border: 1px solid var(--no-data-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  color: var(--no-data-text);
  font-size: 16px;
  width: 100%;
}

/* ============================================================================
   GALLERY (свайп-галерея)
   ============================================================================ */
.gallery-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #b9b9b9;
  border-radius: 0;
}
.gallery-wrapper {
  width: 100%;
  height: 100% !important;
  position: relative;
}
.gallery-track {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  will-change: transform;
  cursor: grab;
}
.gallery-track:active { cursor: grabbing; }
.gallery-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  position: relative;
  background: #b9b9b9;
  overflow: hidden;
}
.gallery-slide .media-frame {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #b9b9b9;
  overflow: hidden;
  position: relative;
}
.gallery-slide .media-frame img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  background: #b9b9b9;
}
.photo-counter-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 20;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  pointer-events: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  height: 28px;
}

/* ===== CARD OVERLAY ===== */
.anket-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 14px 14px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
  z-index: 11;
  pointer-events: none;
  gap: 2px;
  border-radius: 0;
}
.anket-overlay > div > div:first-child > span:first-child { font-size: 14px !important; line-height: 1.15 !important; }
.anket-overlay > div > div:first-child > span:last-child  { font-size: 14px !important; line-height: 1.15 !important; }
.anket-overlay > div > div:last-child > span:last-child   { font-size: 13px !important; line-height: 1.15 !important; }

/* ===== HEART BUTTON ===== */
.heart-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
}
.heart-btn:hover { transform: scale(1.08); }
.heart-btn:active { transform: scale(0.92); }
.heart-btn svg {
  width: 28px;
  height: 28px;
  stroke: white;
  fill: rgba(0, 0, 0, 0.5);
  transition: fill 0.2s ease;
}
.heart-btn.active svg { fill: #E11A2B; stroke: none; }

/* ===== DOTS BUTTON ===== */
.dots-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  background: transparent;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.dots-btn:hover { transform: scale(1.08); background: rgba(0, 0, 0, 0.28); }
.dots-btn:active { transform: scale(0.92); }
.dots-btn.open { background: rgba(0, 0, 0, 0.45); }
.dots-btn svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  display: block;
}

/* ===== DOTS DROPDOWN ===== */
.dots-dropdown {
  position: fixed;
  display: none;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 6px;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1500;
  white-space: nowrap;
}
.dots-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.dots-dropdown-item:hover { background: rgba(255, 255, 255, 0.1); }
.dots-dropdown-item:active { background: rgba(255, 255, 255, 0.16); }

/* ===== COPY NOTIFICATION ===== */
.copy-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.copy-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== WATERMARK ===== */
.media-watermark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none !important;
  z-index: 5;
  overflow: hidden;
}
.media-watermark-text {
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.10);
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
  font-size: min(5vw, 28px);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   BOTTOM NAV
   ============================================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 20px;      /* запас снизу под браузерный UI / жест-бар */
  z-index: 999;
  min-height: 60px;
  height: auto;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 10px;
  gap: 2px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
  flex: 1;
  max-width: 80px;
  text-decoration: none;
}
.bottom-nav-item svg { width: 24px; height: 24px; stroke: currentColor; transition: stroke 0.2s; }
.bottom-nav-item span { font-size: 9px; font-weight: 500; color: currentColor; transition: color 0.2s; }
.bottom-nav-item:hover,
.bottom-nav-item.active { color: var(--red); }
.bottom-nav-item .favorites-badge {
  position: absolute;
  top: -2px;
  right: 4px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ============================================================================
   SIDEBAR
   ============================================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 2000;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

.menu-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  max-width: 85%;
  height: 100vh;       /* fallback */
  height: 100dvh;      /* актуальная высота вьюпорта */
  background: #121212;
  color: #ffffff;
  z-index: 2001;
  transition: left .3s ease;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}
.menu-sidebar.active { left: 0; }
.menu-sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px 16px 10px;
  gap: 16px;
}
.menu-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
}
.menu-header-logo {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.4px;
  pointer-events: none;
  line-height: 1;
}
.menu-header-logo span { color: var(--red); }
.menu-nav { display: flex; flex-direction: column; flex-grow: 1; }
.menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #1c1c1e;
  cursor: pointer;
  transition: background 0.2s;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.menu-item-row:hover:not(.no-hover) { background: #1c1c1e; }
.menu-item-left { display: flex; align-items: center; gap: 14px; }
.menu-icon { width: 20px; height: 20px; color: #ffffff; stroke-width: 1.8; }
.menu-item-arrow {
  font-size: 20px;
  color: #8e8e93;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
}
.tg-logo { width: 25px; height: 25px; }

/* Текущий язык в пункте меню (флаг + код справа) */
.lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-current img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  flex-shrink: 0;
}
.lang-current .lang {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}

.menu-footer {
  padding: 24px 16px;
  font-size: 12px;
  color: #8e8e93;
  text-align: left;
  border-top: 1px solid #1c1c1e;
  margin-top: auto;
}

/* ============================================================================
   SUBMENU / NESTED MENU (sidebar)
   ============================================================================ */
.menu-dropdown {
  display: block;
}

.submenu {
  display: none;
  position: relative;
  background: transparent;
  margin-top: 2px;
}
.menu-dropdown.open > .submenu { display: block; }

.submenu-line {
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #2c2c2e;
  z-index: 1;
}

.submenu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.submenu-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 40px;
  border-bottom: none;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.submenu-item:hover { background: rgba(255, 255, 255, 0.06); }

.red-dot {
  position: absolute;
  left: 22px;
  width: 7px;
  height: 7px;
  background-color: var(--red);
  border-radius: 50%;
  z-index: 2;
}

.nested-toggle {
  padding-left: 40px !important;
  border-bottom: none !important;
}
.nested-submenu { background: transparent !important; }
.nested-line { left: 45px !important; }
.nested-submenu .submenu-item { padding-left: 60px !important; }
.nested-submenu .red-dot { left: 42px !important; }

.toggle-arrow {
  transition: transform 0.2s, color 0.2s;
}
.toggle-arrow.open {
  transform: rotate(90deg);
  color: var(--red);
}

/* ============================================================================
   THEME SWITCH (sidebar)
   ============================================================================ */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #3a3a3c;
  transition: .3s;
  border-radius: 24px;
}
.theme-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.theme-switch input:checked + .theme-slider { background-color: #30d158; }
.theme-switch input:checked + .theme-slider:before { transform: translateX(20px); }

/* ============================================================================
   CONTACT FLOAT MODAL
   ============================================================================ */
.contact-modal-overlay { display: none; position: fixed; inset: 0; z-index: 2100; }
.contact-modal-overlay.active { display: flex; align-items: flex-start; justify-content: flex-start; }
.contact-card {
  position: absolute;
  top: 72px;
  left: 12px;
  background: var(--dropdown-bg);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  padding: 10px;
  width: 235px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  padding: 8px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s;
}
.contact-row:hover { background: rgba(255, 255, 255, 0.1); }
.cm-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-icon img { width: 34px; height: 34px; }
.cm-text b { display: block; font-size: 16px; }
.cm-text small { display: block; color: #bdbdbd; font-size: 12px; }

/* ============================================================================
   LOGIN MODAL
   ============================================================================ */
.login-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2300;
  align-items: center;
  justify-content: center;
}
.login-modal-overlay.active { display: flex; }
.login-modal {
  background: var(--modal-bg);
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  position: relative;
}
.login-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
}
.login-close:hover { color: var(--text); }
.login-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.login-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  color: var(--muted);
}
.login-tab.active { color: var(--text); border-bottom: 2px solid var(--red); }
.login-form input,
.register-form input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}
.login-form input:focus,
.register-form input:focus { outline: none; border-color: var(--red); }
.login-form input::placeholder,
.register-form input::placeholder { color: var(--muted); }
.login-form button,
.register-form button {
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
}
.login-form button:hover,
.register-form button:hover { opacity: 0.85; }

/* ============================================================================
   FOOTERS — как на странице «О сервисе»
   ============================================================================ */
.site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 14px 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.site-footer-first {
  max-width: 980px;
  margin: 12px auto 0;
  padding: 14px 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-content-first {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.footer-text-first {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}
.dot { margin: 0 8px; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.2px;
}
.footer-logo .footer-brand span { color: var(--red); }
.footer-copy { font-size: 12px; color: var(--muted); }
.footer-year { font-size: 12px; font-weight: 700; color: var(--muted); }
.footer-brand { font-size: 16px; font-weight: 900; color: var(--text); }
.footer-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 400px;
  margin: 0 auto;
}

/* Отступ под фиксированную нижнюю навигацию — ТОЛЬКО у последнего футера.
   У .site-footer-first отступа нет, чтобы расстояние между текстом
   и следующей полоской было симметричным (14px / 14px). */
.site-footer { margin-bottom: 70px; }

/* ============================================================================
   ANIMATIONS
   ============================================================================ */
@keyframes shimmer {
  0% { background-position: -400% 0; }
  100% { background-position: 400% 0; }
}

/* ============================================================================
   RESPONSIVE — 1200px
   ============================================================================ */
@media (max-width: 1200px) {
  .profiles-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
}

/* ============================================================================
   RESPONSIVE — 768px
   ============================================================================ */
@media (max-width: 768px) {
  .header-inner { height: 52px; padding: 0 10px; }
  .header-logo { font-size: 22px; }
  .header-right { gap: 6px; }
  .country-selector .country-btn { font-size: 13px; min-height: 28px; padding: 2px 10px; border-width: 1.5px; }
  .country-flag { width: 18px !important; height: 18px !important; }
  .country-option { font-size: 13px; padding: 8px 12px; }
  .country-option img { width: 18px; height: 18px; }
  .city-dropdown .city.active-city { font-size: 12px; min-height: 28px; padding: 2px 8px; border-width: 1.5px; }
  .lang-selector { padding: 2px 6px; min-height: 28px; border-width: 1.5px; gap: 3px; }
  .lang-selector img { width: 16px; height: 16px; }
  .lang-selector .lang { font-size: 12px; }
  .lang-selector svg { width: 9px; height: 9px; }

  .grid-wrap { padding: 0; }
  .profiles-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .anket-overlay { border-radius: 0; padding: 12px 10px 10px 7px !important; gap: 2px !important; }
  .anket-overlay > div > div:first-child > span:first-child { font-size: 13px !important; }
  .anket-overlay > div > div:first-child > span:last-child  { font-size: 13px !important; }
  .anket-overlay > div > div:last-child > span:last-child   { font-size: 12px !important; }

  .photo-counter-badge {
    font-size: 12px !important;
    padding: 2px 8px !important;
    bottom: 10px !important;
    right: 10px !important;
    height: 22px !important;
  }
  .heart-btn { width: 28px; height: 28px; top: 8px; right: 8px; }
  .heart-btn svg { width: 22px; height: 22px; }
  .dots-btn { width: 28px; height: 28px; top: 8px; left: 8px; }
  .dots-btn svg { width: 18px; height: 18px; }
  .media-watermark-text { font-size: min(4vw, 18px) !important; }

  .fav-head h1 { font-size: 28px; }
  .fav-head p { font-size: 16px; }

  .menu-sidebar { width: 280px; }
  .menu-item-row { font-size: 15px; padding: 12px 14px; }
  .submenu-item { font-size: 14px; padding: 10px 10px 10px 36px; }
  .contact-card { top: 60px; left: 12px; width: 220px; }

  .login-modal { padding: 20px; width: 95%; }

  /* === Футер (768px) — как на странице «О сервисе» === */
  .footer-logo { font-size: 13px; }
  .footer-brand { font-size: 13px; }
  .footer-copy, .footer-year { font-size: 10px; }
  .footer-text { font-size: 8px; max-width: 300px; }
  .dot { margin: 0 6px; }

  /* Нижняя навигация — не сжимается, с запасом снизу */
  .bottom-nav {
    min-height: 56px;
    height: auto;
    padding-bottom: 20px;
  }

  /* Отступ под фиксированную нижнюю навигацию — ТОЛЬКО у последнего футера. */
  .site-footer { margin-bottom: 80px; }
}

/* ============================================================================
   RESPONSIVE — 480px
   ============================================================================ */
@media (max-width: 480px) {
  .header-logo { font-size: 20px; }
  .country-selector .country-btn { font-size: 12px; min-height: 26px; padding: 2px 8px; }
  .country-flag { width: 14px !important; height: 14px !important; }
  .country-option { font-size: 12px; padding: 6px 10px; }
  .country-option img { width: 16px; height: 16px; }
  .city-dropdown .city.active-city { font-size: 11px; min-height: 26px; padding: 2px 6px; }
  .lang-selector { min-height: 26px; padding: 2px 6px; gap: 3px; }
  .lang-selector img { width: 14px; height: 14px; }
  .lang-selector .lang { font-size: 11px; }
  .lang-selector svg { width: 8px; height: 8px; }

  .grid-wrap { padding: 0; }
  .profiles-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .anket-overlay { border-radius: 0; padding: 10px 8px 8px 6px !important; }
  .anket-overlay > div > div:first-child > span:first-child { font-size: 12px !important; }
  .anket-overlay > div > div:first-child > span:last-child  { font-size: 12px !important; }
  .anket-overlay > div > div:last-child > span:last-child   { font-size: 11px !important; }

  .photo-counter-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    bottom: 8px !important;
    right: 8px !important;
    height: 20px !important;
  }
  .heart-btn { width: 24px; height: 24px; top: 6px; right: 6px; }
  .heart-btn svg { width: 20px; height: 20px; }
  .dots-btn { width: 24px; height: 24px; top: 6px; left: 6px; }
  .dots-btn svg { width: 15px; height: 15px; }
  .media-watermark-text { font-size: min(3.5vw, 14px) !important; }

  .fav-head h1 { font-size: 24px; }
  .fav-head p { font-size: 14px; }

  /* === Футер (480px) === */
  .footer-text-first { font-size: 11px; max-width: 380px; }
  .dot { margin: 0 4px; }
}

@media (max-width: 400px) {
  .profiles-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .photo-counter-badge {
    font-size: 9px !important;
    padding: 2px 5px !important;
    bottom: 6px !important;
    right: 6px !important;
  }
  .heart-btn { width: 22px; height: 22px; }
  .dots-btn { width: 22px; height: 22px; }
  .dots-btn svg { width: 14px; height: 14px; }
}