/* ============================================================
   专利生成系统 — 注册/登录弹窗样式（优化版）
   与 style.css 设计语言保持一致
   ============================================================ */

/* ===== 注册/登录/重置弹窗容器 ===== */
.modal-content.register-modal,
.modal-content.login-modal,
.modal-content.reset-modal {
  width: 440px;
  max-width: calc(100vw - 32px);
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(10,20,40,0.22);
  background: #ffffff;
  overflow: hidden;
}

/* ===== 弹窗头部 ===== */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px 16px;
  border-bottom: 1px solid #eaecf0;
  background: #f7f8fa;
  position: relative;
}

/* 头部左侧金色装饰线 */
.modal-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #c9a84c 0%, #f0d080 100%);
  border-radius: 3px 0 0 0;
}

.modal-header h2 {
  margin: 0;
  font-family: 'Noto Serif SC', 'Songti SC', serif;
  font-size: 18px;
  font-weight: 700;
  color: #1a3a5c;
  letter-spacing: 0.02em;
  padding: 0;  /* 覆盖 style.css 中通用 h2 的 padding */
}

/* ===== 关闭按钮 ===== */
.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: #8899aa;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
  padding: 0;
}

.close-btn:hover {
  color: #1a3a5c;
  background: #eaecf0;
}

/* ===== 弹窗正文 ===== */
.modal-body {
  padding: 24px 28px 28px;
}

/* ===== 表单组 ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #1a2437;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d8dde6;
  border-radius: 6px;
  font-size: 13.5px;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  color: #1a2437;
  background: #fafbfc;
  transition: border-color 0.20s, box-shadow 0.20s, background 0.20s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="tel"]:focus {
  outline: none;
  border-color: #2563a8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,168,0.12);
}

.form-group input::placeholder {
  color: #a0aab8;
  font-size: 13px;
}

/* ===== 必填标记 ===== */
.required {
  color: #c0392b;
  margin-left: 2px;
  font-weight: 700;
}

/* ===== 密码输入组 ===== */
.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-group input {
  flex: 1;
  padding-right: 42px;
}

.toggle-password {
  position: absolute;
  right: 13px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  opacity: 0.5;
  transition: opacity 0.18s;
  line-height: 1;
}

.toggle-password:hover {
  opacity: 0.85;
}

/* ===== 密码强度条 ===== */
.password-strength {
  height: 3px;
  background: #eaecf0;
  border-radius: 2px;
  margin-top: 7px;
  overflow: hidden;
}

.password-strength::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.35s ease, background-color 0.35s ease;
}

.password-strength.weak::after {
  width: 33%;
  background: #c0392b;
}

.password-strength.medium::after {
  width: 66%;
  background: #d4a017;
}

.password-strength.strong::after {
  width: 100%;
  background: #1a7a4a;
}

/* ===== 验证码组 ===== */
.verify-code-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.verify-code-group input { flex: 1; }

.btn-code {
  flex-shrink: 0;
  padding: 0 14px;
  height: 40px;
  background: #f0f3f7;
  border: 1.5px solid #d8dde6;
  border-radius: 6px;
  color: #1a3a5c;
  font-size: 12.5px;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.btn-code:hover:not(:disabled) {
  background: #e2e7ef;
  border-color: #2563a8;
  color: #2563a8;
}

.btn-code:disabled {
  background: #f5f6f8;
  border-color: #e0e4ea;
  color: #a0aab8;
  cursor: not-allowed;
}

.btn-code.countdown {
  color: #2563a8;
  border-color: #c3d5ef;
  background: #eef3fb;
}

/* ===== 复选框组 ===== */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #1a3a5c;
  border-radius: 3px;
}

.checkbox-group label {
  margin: 0;
  font-size: 13px;
  color: #4a5568;
  flex: 1;
  line-height: 1.55;
}

.forgot-password {
  margin-left: auto;
  white-space: nowrap;
  font-size: 12.5px;
}

/* ===== 链接样式 ===== */
.link {
  color: #2563a8;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s;
}

.link:hover {
  color: #1a3a5c;
  text-decoration: underline;
  text-decoration-color: rgba(37,99,168,0.4);
  text-underline-offset: 2px;
}

/* ===== 提交按钮 ===== */
.btn.btn-submit,
button.btn-submit {
  display: block;
  width: 100%;
  padding: 11px 20px;
  background: #1a3a5c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-top: 12px;
  margin-bottom: 0;
  transition: background 0.20s, box-shadow 0.20s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.btn.btn-submit::after,
button.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.45s;
}

.btn.btn-submit:hover:not(:disabled)::after,
button.btn-submit:hover:not(:disabled)::after {
  transform: translateX(100%);
}

.btn.btn-submit:hover:not(:disabled),
button.btn-submit:hover:not(:disabled) {
  background: #2563a8;
  box-shadow: 0 4px 16px rgba(37,99,168,0.28);
  transform: translateY(-1px);
}

.btn.btn-submit:active:not(:disabled),
button.btn-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.btn.btn-submit:disabled,
button.btn-submit:disabled {
  background: #a0aab8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== 错误信息 ===== */
.error-msg {
  color: #c0392b;
  font-size: 12px;
  margin-top: 5px;
  display: none;
  line-height: 1.4;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

.error-msg.show { display: block; }

.form-group.error input[type="text"],
.form-group.error input[type="email"],
.form-group.error input[type="password"],
.form-group.error input[type="tel"] {
  border-color: #c0392b;
  background: #fdf7f6;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
}

/* ===== 底部登录/注册切换链接 ===== */
.login-link {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #8899aa;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

.login-link .link {
  margin-left: 4px;
  font-weight: 600;
}

/* ===== 开发模式提示条 ===== */
.dev-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #f0c040;
  border-left: 3px solid #d4a017;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: #856404;
  line-height: 1.5;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

.dev-notice strong {
  color: #c0392b;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  font-family: 'Courier New', Courier, monospace;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .modal-content.register-modal,
  .modal-content.login-modal,
  .modal-content.reset-modal {
    width: calc(100vw - 24px);
    border-radius: 12px;
  }

  .modal-header  { padding: 18px 20px 14px; }
  .modal-body    { padding: 18px 20px 22px; }
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 11px 20px;
  background: #1a3a5c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-top: 12px;
  margin-bottom: 0;
  transition: background 0.20s, box-shadow 0.20s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.btn-email-cancel {
  display: block;
  width: 100%;
  padding: 11px 20px;
  background: #c9a84c;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-top: 12px;
  margin-bottom: 0;
  transition: background 0.20s, box-shadow 0.20s, transform 0.15s;
  position: relative;
  overflow: hidden;
}