.firefly-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 50px;
  box-sizing: border-box;
  overflow: auto;
}

.firefly-modal.show {
  display: flex !important; /* 激活时用 flex 居中 */
}

.firefly-modal-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-family: "Segoe UI", sans-serif;
}

.firefly-modal-content h2 {
  margin-top: 0;
  font-size: 20px;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.firefly-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
}

.firefly-close:hover {
  color: #d00;
}

.firefly-form label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.firefly-form input,
.firefly-form select,
.firefly-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.firefly-form button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.firefly-form button:hover {
  background-color: #005c90;
}

#add-modal {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s ease, visibility 1.5s ease;
  display: flex; /* 这句很重要，确保弹窗可见且居中 */
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.4);
  z-index: 9999;
}

#add-modal.show {
  opacity: 1;
  visibility: visible;
}

