/* ==========================================================================
   Custom Modals - 커스텀 모달 스타일
   ========================================================================== */

/* Modal Base */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 90%;
  width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10001;
}

/* Success Modal */
.success-modal {
  text-align: center;
}

.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

.modal-icon.success {
  background: linear-gradient(135deg, #00c73c, #4ade80);
  color: white;
}

.modal-icon.error {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
}

.modal-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 3;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.modal-message {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 32px;
}

.modal-button {
  display: inline-block;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.modal-button.primary {
  background: linear-gradient(135deg, #3182f6, #2563eb);
  color: white;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.3);
}

.modal-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(49, 130, 246, 0.4);
}

.modal-button.secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.modal-button.secondary:hover {
  background: var(--gray-200);
}

/* Privacy Modal */
.privacy-modal {
  max-width: 600px;
  width: 90%;
  padding: 0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--gray-200);
}

.modal-header .modal-title {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

.privacy-section {
  margin-bottom: 24px;
}

.privacy-section:last-child {
  margin-bottom: 0;
}

.privacy-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.privacy-section p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .modal-content {
    padding: 32px 24px;
    width: 95%;
    max-width: 95%;
  }

  .modal-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .modal-icon svg {
    width: 32px;
    height: 32px;
  }

  .modal-title {
    font-size: 22px;
  }

  .modal-message {
    font-size: 15px;
  }

  .modal-header {
    padding: 20px 24px;
  }

  .modal-body {
    padding: 24px;
  }

  .modal-footer {
    padding: 16px 24px;
  }
}
