* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #000;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100vh;
}

.leaflet-control-attribution {
  display: none !important;
}

/* === Модальное окно === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  display: none;
}

.modal-content {
  background: #111;
  padding: 24px;
  border-radius: 14px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
}

.modal-content h3 {
  margin-bottom: 16px;
  color: #ff5252;
  font-size: 18px;
  font-weight: 600;
}

#marker-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #222;
  color: white;
  font-size: 15px;
  outline: none;
}

#marker-input:focus {
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-buttons button {
  flex: 1;
  padding: 11px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}

#modal-cancel {
  background: #333;
  color: #ccc;
}

#modal-cancel:hover {
  background: #444;
}

#modal-add {
  background: #4285f4;
  color: white;
}

#modal-add:hover {
  background: #3367d6;
}

#modal-add:disabled {
  background: #555;
  cursor: not-allowed;
}

/* === Анимация меток: появление с масштаба 0 → 1 === */
.leaflet-marker-icon {
  animation: scale-in 0.4s ease-out;
  transform-origin: center;
}

@keyframes scale-in {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(10deg); opacity: 0.8; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
}

.leaflet-marker-icon.removing {
  animation: fade-out 0.5s ease-in forwards;
}

@keyframes fade-out {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.8); }
}