body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.modal-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 210;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.modal.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  width: min(520px, 100%);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-header {
  padding-right: 32px;
}

.modal-header h2 {
  margin: 0 0 12px;
  font-size: 1.875rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.modal-header p {
  margin: 0;
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

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

.modal-close:focus {
  outline: none;
  background: #e2e8f0;
  color: #334155;
}

.modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.modal-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f172a;
  margin-bottom: 8px;
  display: block;
  letter-spacing: 0.01em;
}

.modal-content input[type="email"],
.modal-content textarea {
  width: 100%;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  padding: 14px 16px;
  font-size: 1rem;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-content input[type="email"]:hover,
.modal-content textarea:hover {
  border-color: #cbd5e0;
}

.modal-content input[type="email"]:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: #6366f1;
  background: #fefefe;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-content textarea {
  resize: vertical;
  min-height: 120px;
}

.modal-note {
  font-size: 0.875rem;
  color: #64748b;
  margin: -4px 0 4px;
  font-style: italic;
}

.modal-feedback {
  display: none;
  font-size: 0.9375rem;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
}

.modal-feedback.visible {
  display: block;
}

.modal-feedback.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.modal-feedback.success {
  background: #f0fdf4;
  color: #047857;
  border: 1px solid #bbf7d0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.modal-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.modal-btn.secondary {
  background: #e2e8f0;
  color: #1f2937;
}

.modal-btn.secondary:hover {
  background: #cbd5e0;
}

.modal-btn.primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.25);
}

.modal-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(99, 102, 241, 0.35);
}

.modal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
