*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #f5f5f5;
  background: #0b0f14;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(10, 14, 20, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.brand {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.toolbar__actions {
  display: flex;
  gap: 12px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
}

.btn--primary {
  background: linear-gradient(120deg, #5a78ff, #6d4dff);
  color: #fff;
  box-shadow: 0 12px 30px rgba(90, 120, 255, 0.25);
}

.btn--danger {
  background: rgba(255, 90, 90, 0.2);
  color: #ff6d6d;
}

.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 200, 120, 0.2);
  color: #caffea;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 30;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.map {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.map__container {
  position: absolute;
  inset: 0;
}

.point {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffcc4d;
  border: 2px solid #fff5d6;
  box-shadow: 0 0 0 6px rgba(255, 204, 77, 0.2);
  cursor: pointer;
}

.point--edit {
  background: #66e0ff;
  border-color: #d4f4ff;
  box-shadow: 0 0 0 8px rgba(102, 224, 255, 0.2);
}

.modal__overlay,
.editor__overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 10, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.modal__overlay.is-visible,
.editor__overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #10151f;
  border-radius: 18px;
  padding: 24px;
  width: min(520px, 90vw);
  max-height: 80vh;
  overflow: auto;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.modal__close,
.editor__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.modal__image {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 16px;
  display: none;
}

.modal__image.is-visible {
  display: block;
}

.modal__title {
  margin: 0 0 12px;
}

.modal__body {
  line-height: 1.6;
  color: rgba(245, 245, 245, 0.85);
}

.modal__body h1,
.modal__body h2,
.modal__body h3 {
  margin-top: 16px;
  margin-bottom: 8px;
}

.editor {
  width: min(540px, 92vw);
  background: #0f141d;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.editor__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.editor__form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.field input,
.field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.editor__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .toolbar__actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
