/* 统一的弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  position: relative;
}

.modal-title {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0;
  padding-right: 24px;
}

.modal-subtitle {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

.modal-close {
  position: static;
  width: auto;
  height: auto;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  transition: all 0.2s;
}

.modal-close:hover {
  color: #666;
}

.modal-body {
  margin-bottom: 16px;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

/* 按钮样式 */
.modal-btn {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.modal-btn-primary {
  background-color: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.modal-btn-primary:hover {
  background-color: #357abd;
  border-color: #357abd;
}

.modal-btn-secondary {
  background-color: #fff;
  color: #666;
  border-color: #ddd;
}

.modal-btn-secondary:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}



/* 动画效果 */
.modal.show .modal-content {
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式调整 */
@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    margin: 10px;
    padding: 16px;
  }
  
  .modal-title {
    font-size: 15px;
  }
  
  .modal-body {
    font-size: 13px;
  }
  
  .modal-btn {
    padding: 5px 12px;
    font-size: 13px;
  }
} 