.modal {
  display: none;
  position: fixed;
  z-index: 1500;
  inset: 0;
  justify-content: center;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  padding: 20px;
  animation: fadeInBackdrop 0.4s ease forwards;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.modal-content.glass {
  position: relative;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(200, 200, 255, 0.3);
  z-index: 2;
  animation: slideFadeIn 0.4s ease;
  color: #1f2937;
}

.modal-content.glass h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #111827;
  text-align: center;
}

.modal-content.glass p {
  font-size: 16px;
  color: #374151;
  text-align: center;
  margin-bottom: 24px;
}

.modal-content input,
.modal-content button {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 16px;
  outline: none;
}

.modal-content input {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.5);
  color: #111827;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.modal-content input::placeholder {
  color: #6b7280;
}

.modal-content input:focus {
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.75);
}

.modal-content button {
  background: linear-gradient(135deg, #3b82f6, #9333ea);
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

.modal-content button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #2563eb, #7e22ce);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 26px;
  color: #4b5563;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: #000;
  transform: rotate(90deg);
}

#popup-message {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.3);
  color: #1f2937;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  display: none;
  transition: 0.3s ease;
}

#popup-message.success {
  color: #15803d;
  background: rgba(220, 252, 231, 0.4);
}

#popup-message.error {
  color: #b91c1c;
  background: rgba(254, 202, 202, 0.4);
}

/* Анимации */
@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInBackdrop {
  from {
    backdrop-filter: blur(0);
  }
  to {
    backdrop-filter: blur(10px);
  }
}

/* Адаптивность */
@media (max-width: 600px) {
  .modal-content.glass {
    padding: 30px 20px;
    max-width: 90%;
  }

  .modal-content.glass h3 {
    font-size: 20px;
  }
}
