.auth-modal-overlay {
  position: fixed;
  inset: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.18), transparent 35%), rgba(15, 23, 42, 0.65);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.auth-modal-overlay.visible {
  opacity: 1;
}

.auth-modal-card {
  width: min(520px, 100%);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  border: 1px solid #e5edff;
}

.auth-modal-card h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

.auth-modal-text {
  margin-top: 0;
  margin-bottom: 18px;
  color: #475569;
  font-size: 0.95rem;
  text-align: center;
}

.auth-link-row {
  display: flex;
  flex-direction: column;
  gap: 10px; /* 多个跳转按钮竖向排列 */
  margin-bottom: 16px;
}

.auth-link-btn {
  width: 100%;
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eef4ff, #e0ecff);
  color: #1d4ed8;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.auth-link-btn:hover {
  background: linear-gradient(180deg, #dbeafe, #cfe1ff);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.auth-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-direction: column; /* 输入与验证按钮改为竖向堆叠 */
  align-items: stretch;
}

.auth-input-row input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d7e3ff;
  font-size: 1rem;
  background: #f9fbff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-row input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.auth-error {
  color: #ef4444;
  font-size: 0.85rem;
  min-height: 1em;
  margin-top: 4px;
}

.auth-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #f1f5ff;
  color: #1d4ed8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.auth-close-btn:hover {
  background: #e0ecff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

@media (max-width: 480px) {
  .auth-modal-card {
    padding: 20px;
  }
  .auth-btn {
    width: 100%;
  }
}
