.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.visible {
  opacity: 1;
  visibility: visible;
}

.hidden {
  opacity: 0;
  visibility: hidden;
}

.dialog {
  background-color: white;
  border-radius: 14px;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  animation: dialogAppear 0.3s forwards;
}

@keyframes dialogAppear {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.content {
  text-align: center;
  margin-bottom: 20px;
}

.title {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 10px;
  line-height: 1.3;
}

.message {
  font-size: 14px;
  color: #86868b;
  margin: 0;
  line-height: 1.5;
}

.actions {
  display: flex;
  border-top: 1px solid #d2d2d7;
  margin-top: 20px;
  padding-top: 16px;
}

.cancelButton, .confirmButton {
  flex: 1;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cancelButton {
  background-color: #f5f5f7;
  color: #1d1d1f;
  margin-right: 8px;
}

.cancelButton:hover {
  background-color: #e5e5ea;
}

.confirmButton {
  background-color: #0071e3;
  color: white;
  margin-left: 8px;
}

.confirmButton:hover {
  background-color: #0077ED;
}

/* 适配深色模式 */
@media (prefers-color-scheme: dark) {
  .dialog {
    background-color: #1c1c1e;
  }

  .title {
    color: #f5f5f7;
  }

  .message {
    color: #a1a1a6;
  }

  .actions {
    border-top-color: #38383a;
  }

  .cancelButton {
    background-color: #2c2c2e;
    color: #f5f5f7;
  }

  .cancelButton:hover {
    background-color: #3a3a3c;
  }
}