@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  background: #faf7fa;
  background: linear-gradient(to right, rgba(239,68,68,0), rgba(236,72,153,0.1)), #faf7fa;
  min-height: 100vh;
  /*overflow-x: hidden;*/
  width: 100%;
  position: relative;
}

header {
  display: -webkit-flex;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 24px 0 rgba(255, 51, 102, 0.1), 0 1.5px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

h1 {
  color: #ff3366;
  font-weight: 900;
  margin: 0;
  letter-spacing: 2px;
  font-size: 1.7em;
  display: -webkit-flex;
  display: flex;
  align-items: center;
  gap: 0.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1::after {
  content: "";
}

button,
input[type="submit"] {
  background: -webkit-linear-gradient(left, #ef4444, #ec4899);
  background: linear-gradient(to right, #ef4444, #ec4899);
  color: #fff;
  border: none;
  border-radius: 32px;
  padding: 0.8em 2.2em;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px #ffb6c140;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  letter-spacing: 1px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button:hover,
input[type="submit"]:hover {
  background: -webkit-linear-gradient(left, #dc2626, #db2777);
  background: linear-gradient(to right, #dc2626, #db2777);
  box-shadow: 0 4px 16px #ffb6c180;
  transform: translateY(-2px) scale(1.03);
}

#map {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  margin: 0;
  box-shadow: none;
  border: none;
  background: #ededed;
  position: relative;
  z-index: 1;
}

.map-container {
  -webkit-flex: 1;
  flex: 1;
  position: relative;
  border: 2px solid #fecaca;
  border-radius: 0.5rem;
  overflow: hidden;
  min-height: 200px;
  height: 100%;
  max-height: 420px;
  width: 100%;
  max-width: 100%;
}

#map-mini {
  width: 100% !important;
  height: 100% !important;
  min-height: 200px;
  max-height: 420px;
}
 .lovelocks-chat-block {
            max-width: 400px;
            width: 100%; /* Чтобы занимал всю доступную ширину до max-width */
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(236, 72, 153, 0.1);
            border: 1px solid rgba(236, 72, 153, 0.1);
            overflow: hidden;
        }

        .locks-list-title {
            background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
            color: white;
            padding: 20px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            font-size: 18px;
            font-weight: 600;
        }

        .locks-list-title svg {
            width: 24px;
            height: 24px;
            min-width: 24px; /* Чтобы SVG не сжимался */
            min-height: 24px;
        }

        .locks-list-online {
            display: inline-flex;
            align-items: center;
            background: #10b981;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            margin-left: 10px;
            animation: pulse 2s infinite;
        }

        .locks-list-online::before {
            content: "●";
            margin-right: 5px;
        }

        .locks-list { /* Соответствует id="locks-list" */
            height: 400px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #ec4899 #fce7f3;
        }

        .locks-list::-webkit-scrollbar {
            width: 6px;
        }

        .locks-list::-webkit-scrollbar-track {
            background: #fce7f3;
        }

        .locks-list::-webkit-scrollbar-thumb {
            background: #ec4899;
            border-radius: 3px;
        }

        .activity-item {
            padding: 15px 20px;
            border-bottom: 1px solid rgba(236, 72, 153, 0.1);
            transition: all 0.3s ease;
            position: relative;
        }

        .activity-item:hover {
            background: rgba(236, 72, 153, 0.05);
        }

        .activity-item.new {
            background: linear-gradient(90deg, rgba(236, 72, 153, 0.1) 0%, rgba(244, 63, 94, 0.1) 100%);
            animation: newActivity 3s ease-out;
        }

        .activity-item.new::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: linear-gradient(135deg, #ec4899, #f43f5e);
            animation: pulse 2s infinite;
        }

        .activity-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .activity-users {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .heart-icon {
            color: #ec4899;
            font-size: 16px;
            position: relative;
        }

        .heart-icon.new {
            animation: heartBeat 1s ease-in-out infinite;
        }

        .user-names {
            font-weight: 600;
            color: #374151;
        }

        .user1 {
            color: #ec4899;
        }

        .user2 {
            color: #f43f5e;
        }

        .activity-details {
            display: flex;
            align-items: center;
            gap: 15px;
            font-size: 13px;
            color: #6b7280;
        }

        .location {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .location::before {
            content: "📍";
            font-size: 12px;
        }

        .distance {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .timestamp {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            color: #9ca3af;
        }

        .timestamp::before {
            content: "🕐";
            font-size: 10px;
        }

        .new-indicator {
            position: absolute;
            top: 10px;
            right: 15px;
            width: 8px;
            height: 8px;
            background: #10b981;
            border-radius: 50%;
            animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        @keyframes newActivity {
            0% {
                background: rgba(236, 72, 153, 0.3);
                transform: translateX(-10px);
            }
            100% {
                background: rgba(236, 72, 153, 0.1);
                transform: translateX(0);
            }
        }

        @keyframes heartBeat {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.2); }
        }

        @keyframes ping {
            75%, 100% {
                transform: scale(2);
                opacity: 0;
            }
        }

        @media (max-width: 600px) {
            /*body {*/
            /*    padding: 0 10px;*/
            /*}*/
            
            .lovelocks-chat-block {
                max-width: 100%;
            }
            
            .activity-details {
                flex-direction: column;
                align-items: flex-start;
                gap: 5px;
            }
        }

form {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 1.2em;
  max-width: 420px;
  width: 100%;
  max-height: 520px;
  height: auto;
  margin: 2.5rem auto;
  background: rgba(255, 255, 255, 0.98);
  padding: 1.5em 1.2em 1.2em 1.2em;
  border-radius: 32px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  justify-content: flex-start;
}

form::before {
  content: "💝";
  position: absolute;
  top: -1.7em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5em;
  opacity: 0.7;
}

input,
textarea,
select {
  border: 1.5px solid #ffd6e0;
  border-radius: 18px;
  padding: 1em;
  font-size: 1.08em;
  background: #fff8fb;
  transition: border 0.2s;
  outline: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

input:focus,
textarea:focus,
select:focus {
  border: 1.5px solid #ff3366;
  background: #fff0f6;
}

label {
  font-weight: 600;
  color: #ff3366;
  margin-bottom: 0.2em;
  display: flex;
  align-items: center;
  gap: 0.7em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#lock-modal {
  display: none;
}

#lock-modal[style*="display: block"],
#lock-modal[style=""] {
  display: block;
}

#lock-modal-content {
  max-width: 370px;
  min-width: 240px;
  word-break: break-word;
  border-radius: 24px;
  border: 2px solid #ffd6e0;
  background: #fff8fb;
  box-shadow: 0 4px 32px #ffb6c180;
  width: 100%;
  max-width: calc(100vw - 2rem);
  overflow-x: hidden;
}

#lock-modal button#lock-modal-close {
  font-size: 1.1em;
  color: #ff3366;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}








.locks-list-color {
   border: none;
  border-left: 2px dashed #fecaca;
  padding: 1em 0 1em 1em;
  display: flex;
  align-items: flex-start;
  gap: 1em;
  background: none;
  border-radius: 0;
  margin-bottom: 0.1em;
  opacity: 1;
  transform: translateY(0);
  transition: none;
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.locks-list-fromto {
  color: #222;
  font-weight: 800;
  margin-bottom: 0.1em;
  text-align: left;
  letter-spacing: 0.5px;
  font-size: 1.08em;
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
  .locks-list-message {
  margin-top: 0.2em;
  white-space: pre-line;
  text-align: left;
  font-style: italic;
  color: #222;
  font-size: 1em;
  margin-bottom: 0.2em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.locks-list-meta {
  color: #888;
  font-size: 0.97em;
  margin-bottom: 0.2em;
  text-align: left;
  margin-top: 0.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locks-list-place {
  color: #888;
  font-size: 0.97em;
  margin-left: 0.7em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locks-list-heartlock {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  margin-top: 0.1em;
  margin-right: 0.5em;
  animation: heartlock-close 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  flex-shrink: 0;
}

@keyframes heartlock-close {
  0% {
    transform: scale(1.2) rotate(-20deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.05) rotate(8deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Стили скроллбара для всех браузеров */
::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background: rgba(255, 224, 236, 0.3);
  border-radius: 10px;
  margin: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #fecaca, #ff3366);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 4px rgba(255, 51, 102, 0.2);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff3366, #ec4899);
  box-shadow: 0 4px 8px rgba(255, 51, 102, 0.4);
  transform: scaleX(1.2);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #dc2626, #db2777);
}

/* Firefox скроллбар */
* {
  scrollbar-width: thin;
  scrollbar-color: #fecaca rgba(255, 224, 236, 0.3);
}

/* Улучшенные стили для мобильных и планшетов */
@media screen and (max-width: 1024px) {
  ::-webkit-scrollbar {
    width: 12px;
    background: rgba(255, 224, 236, 0.2);
  }

  ::-webkit-scrollbar-track {
    background: rgba(255, 224, 236, 0.4);
    border-radius: 12px;
    margin: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff3366, #ec4899);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 3px 6px rgba(255, 51, 102, 0.3);
    min-height: 40px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #dc2626, #db2777);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.5);
    transform: scaleX(1.3);
  }

  /* Firefox для мобильных */
  * {
    scrollbar-width: auto;
    scrollbar-color: #ff3366 rgba(255, 224, 236, 0.4);
  }
}

/* Специальные стили для чата */

/* Индикатор скролла для чата */


/* Анимация появления скроллбара на мобильных */
@media screen and (max-width: 768px) {

}

@keyframes scrollHint {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
  }
}

/* Очень маленькие экраны */
@media screen and (max-width: 480px) {
}

.main-flex {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 2.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0 1.5rem;
  min-height: calc(95vh - 120px);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  overflow-x: hidden;
}

.lovelocks-map-block {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  min-width: 350px;
  max-width: 900px;
  width: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  align-items: stretch;
  padding: 0 !important;
  min-height: 684px;
  height: 684px;
  position: relative;
  z-index: 2;
}
.footer {
  overflow-x: hidden;
  margin-bottom: 1rem !important;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: transparent;
  margin-top: 1rem;
}

/* TABLET STYLES (768px - 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  header {
    padding: 1.5rem 2rem;
  }

  .main-flex {
    padding: 2rem 1rem 0 1rem;
    gap: 2rem;
  }

  .lovelocks-map-block {
    min-width: 300px;
  }


}

/* MOBILE STYLES (до 768px) */
@media screen and (max-width: 768px) {
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    box-shadow: 0 4px 24px 0 rgba(255, 51, 102, 0.13), 0 1.5px 8px rgba(0, 0, 0, 0.1);
  }

  h1 {
    font-size: 1.8em;
    text-align: center;
  }

  .main-flex {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
  }

  .lovelocks-map-block {
    min-width: unset;
    width: 100%;
    max-width: 100%;
    min-height: 400px;
    height: 400px;
  }



  .locks-list {
    width: 100%;
  background: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0 0.5em 1em 0.5em;
  overflow-y: auto !important;
  overflow-x: hidden;
  font-size: 1.08em;
  flex: 1 1 auto;
  height: 100%;
  max-width: 100%;
  }
}

/* VERY SMALL SCREENS (до 480px) */
@media screen and (max-width: 480px) {
  header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 24px 0 rgba(255, 51, 102, 0.10), 0 1.5px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    width: 100vw;
    max-width: 100vw;
    margin: 0 0 0.7rem 0;
    border-radius: 0;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: hidden;
  }

  .header-content {
    max-width: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    width: 100%;
    gap: 1rem;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1.5em;
    font-weight: 900;
    color: #ff3366;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #ff3366;
    letter-spacing: 1px;
    margin-left: 0.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  h1 {
    font-size: 1.7em;
    letter-spacing: 1px;
  }

  .main-flex {
    padding: 0.75rem 0.5rem;
    gap: 1rem;
  }

  .lovelocks-map-block,
  .lovelocks-chat-block {
    border-radius: 12px;
    min-height: 350px;
    height: 350px;
  }

  .locks-list {
    padding: 0 0.75rem 0.75rem 0.75rem;
    font-size: 1rem;
  }

 .locks-list-fromto {
    font-size: 1rem;
  }
 .locks-list-message {
    font-size: 0.9rem;
  }

  button,
  input[type="submit"] {
    padding: 0.7em 1.5em;
    font-size: 1em;
  }
}

/* LANDSCAPE MOBILE */
@media screen and (max-width: 768px) {
  .locks-list { padding: 0 0.5em 1em 0.5em; }
}

/* TOUCH IMPROVEMENTS */
@media (hover: none) and (pointer: coarse) {
  button,
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }

  input,
  textarea,
  select {
    padding: 1rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Специальные стили для очень маленьких экранов */
@media screen and (max-width: 390px) {
  * {
    max-width: 100vw !important;
  }

  header,
  .main-flex,
  .lovelocks-map-block,
  .lovelocks-chat-block,
  .locks-list {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  header {
    padding: 0.5rem 0.25rem !important;
    box-shadow: 0 4px 24px 0 rgba(255, 51, 102, 0.18), 0 1.5px 8px rgba(0, 0, 0, 0.14);
  }

  .main-flex {
    padding: 0.5rem 0.25rem !important;
  }

  h1 {
    font-size: 1.3em !important;
  }
}