/* 修改密码弹窗（auth.js 注入，供未加载主站 styles.css 的页面使用） */
.auth-modal-overlay {
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --transition: 0.2s ease;
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  font-family: "PingFang SC", "Microsoft YaHei", "SF Pro Display", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

body.auth-modal-open {
  overflow: hidden;
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(22, 27, 34, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.auth-modal h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.auth-modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.auth-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.auth-modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.auth-modal-msg {
  padding: 0.65rem 0.875rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.auth-modal-msg-error {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
  color: #ff7b72;
}

.auth-modal-msg-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.auth-modal .form-group {
  margin-bottom: 1.25rem;
}

.auth-modal .form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-modal .form-group input,
.auth-modal .form-group select,
.auth-modal .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  box-sizing: border-box;
}

.auth-modal .form-group input:focus,
.auth-modal .form-group select:focus,
.auth-modal .form-group textarea:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.auth-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.auth-modal-cancel,
.auth-modal-submit {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.auth-modal-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.auth-modal-cancel:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-modal-submit {
  border: none;
  background: #14b8a6;
  color: #fff;
}

.auth-modal-submit:hover:not(:disabled) {
  background: #0d9488;
}

.auth-modal-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
