/* FoxDub 官网 — 复用插件登录/注册/忘记密码页样式
 * 自设计稿 xiaoli-ai-auth.html 的 <style> 原样抽取（login.html / forget.html 共用）。
 * 不加载远程字体（扩展页离线可用/CSP 友好），font-family 走系统中文字体栈回退。
 * 文末另有一小段设计稿之外的扩展页新增样式（提交禁用态）。
 */
:root {
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --line: #e7e5e4;
  --paper: #fffdfb;
  --fox: #e85d04;
  --fox-deep: #c2410c;
  --fox-ring: rgba(232, 93, 4, 0.16);
  --danger: #b91c1c;
  --good: #15803d;
  --teal-soft: #ecfdf8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html:not([data-ui-ready]) body { visibility: hidden; }
html, body { min-height: 100%; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 620px at 12% -8%, #ffd7ba 0%, transparent 55%),
    radial-gradient(900px 520px at 92% 8%, #fde68a 0%, transparent 48%),
    radial-gradient(800px 480px at 70% 110%, #d8efe8 0%, transparent 50%),
    linear-gradient(180deg, #faf6f1 0%, #f4efe8 100%);
}
.top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
/* logo 与「名字(16px×1.2)+介绍(10px×1.3+2px 间距)」总高一致：34px */
.top-brand .logo {
  position: relative; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px; background: linear-gradient(160deg, #ff8a3d, #e85d04);
  box-shadow: 0 6px 14px var(--fox-ring);
}
.top-brand .logo svg { position: absolute; inset: 20%; width: 60%; height: 60%; }
.brand-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; }
/* 品牌字标与 web 官网同一效果：Avenir Next 750 粗体、紧字距、结尾橙色句点 */
.brand-english { font-family: "Avenir Next", "Segoe UI", sans-serif; font-size: 16px; font-weight: 750; letter-spacing: -.8px; line-height: 1.2; white-space: nowrap; }
.brand-period { color: var(--fox); }
/* 介绍小字：固定 10px，不按名字宽度缩放 */
.brand-sub { margin-top: 2px; font-size: 10px; line-height: 1.3; white-space: nowrap; color: var(--muted); }
.top-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.top-link:hover { color: var(--ink); }
.wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 48px;
}
.stats {
  width: min(420px, 100%);
  display: flex; align-items: center; justify-content: center;
  column-gap: 14px; row-gap: 10px;
  margin-bottom: 22px; color: var(--ink-2); flex-wrap: wrap;
}
.stats-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
  margin-inline: auto;
}
.stat { flex: 1 1 0; min-width: 0; text-align: center; overflow-wrap: anywhere; }
.stat b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.stat small { font-size: 11px; color: var(--muted); }
.stat-div { flex: 0 0 1px; width: 1px; height: 28px; background: #e7e5e4; }
.note {
  flex: none;
  max-width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #a8a29e;
  background: transparent;
  border: 1px solid #e7e5e4;
  padding: 5px 10px;
  border-radius: 999px;
}
.card {
  width: min(420px, 100%);
  background: var(--paper);
  border: 1px solid #efe8df;
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.08);
}
.card-brand { margin-bottom: 22px; }
.card-brand h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.field { margin-bottom: 14px; }
.field-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; min-height: 18px; margin-bottom: 6px;
}
.field-top label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.err {
  display: none; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: var(--danger);
  text-align: right; line-height: 1.35;
}
.err.show { display: inline-flex; }
.err svg { flex-shrink: 0; }
.input-wrap { position: relative; }
.input {
  width: 100%; height: 44px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; padding: 0 14px;
  font: inherit; font-size: 14px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input.has-toggle { padding-right: 42px; }
.input::placeholder { color: #a8a29e; }
.input:focus { border-color: #fdba74; box-shadow: 0 0 0 4px var(--fox-ring); }
.field.invalid .input { border-color: #fecaca; background: #fffafa; }
.field.invalid .input:focus { box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12); }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; background: transparent;
  color: #a8a29e; cursor: pointer; border-radius: 8px;
  display: grid; place-items: center;
}
.eye:hover { color: var(--ink-2); background: #f5f0ea; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.send {
  height: 44px; padding: 0 14px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #ff8a3d, var(--fox));
  color: #fff; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; box-shadow: 0 6px 14px var(--fox-ring);
}
.send:hover { filter: brightness(1.03); }
.send:disabled { background: #e7e5e4; color: #a8a29e; box-shadow: none; cursor: not-allowed; filter: none; }
.cta {
  width: 100%; height: 44px; margin-top: 8px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #ff8a3d, var(--fox));
  color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; box-shadow: 0 10px 22px var(--fox-ring);
}
.cta:hover { filter: brightness(1.03); }
.switch { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
/* 「免费注册 / 去登录 / 返回登录」链接：橙色 + 加大加粗，从灰字中跳出来 */
.switch a { color: var(--fox); font-size: 15px; font-weight: 700; text-decoration: none; }
.switch a:hover { color: var(--fox-deep); }
.legal a { color: var(--fox); font-weight: 600; text-decoration: none; }
/* 「忘记密码？」位于密码标签右侧：淡色、正常粗细、带下划线 */
.forgot { margin-left: auto; font-size: 12px; font-weight: 400; color: #a8a29e; text-decoration: underline; text-underline-offset: 3px; }
.forgot:hover { color: var(--fox); }
/* 表单结果提示（.toast）：通栏圆角横条，位于提交按钮正上方；
 * 左侧 4px 色条 + 实心圆图标（白 glyph）+ 文字；good 绿 / bad 玫红。 */
.toast {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  margin: 2px 0 10px;
  padding: 0 14px 0 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  overflow: hidden;
}
.toast.show { display: flex; }
.toast > i { width: 4px; height: 100%; flex-shrink: 0; }
.toast .ico {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  color: #fff;
}
.toast.good { border-color: #bbf7d0; background: #f6fef9; color: #15803d; }
.toast.good > i, .toast.good .ico { background: #22c55e; }
.toast.bad { border-color: #fecaca; background: #fffafa; color: #b91c1c; }
.toast.bad > i, .toast.bad .ico { background: #f87171; }
.legal { margin-top: 22px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; max-width: 420px; }
@media (max-width: 520px) {
  .card { padding: 22px 18px 20px; }
  .code-row { grid-template-columns: 1fr; }
}

/* —— 以下为设计稿之外的扩展页新增 —— */
/* 提交中（loading）禁用态 */
.cta:disabled { opacity: .65; cursor: not-allowed; filter: none; }
/* 成功提示条内的「前往个人中心」链接（home.html 用户中心入口） */
.toast .ok-link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.toast .ok-link:hover { opacity: .8; }
/* 发码成功提示下方的垃圾邮件提醒：与对应 toast 一并显隐 */
.spam-hint { display: none; margin: -6px 0 10px; padding: 0 4px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.spam-hint.show { display: block; }

/* 官网表单的键盘访问与字体放大适配，保持插件原有布局。 */
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--fox); outline-offset: 4px; }
.top-brand { cursor: pointer; }
.field-top { flex-wrap: wrap; }
.field-top .forgot { margin-left: auto; }
.input { min-height: 44px; height: auto; padding-top: 12px; padding-bottom: 12px; font-size: .875rem; }
.field-top label, .top-link, .switch { font-size: .8125rem; }
.cta, .send { min-height: 44px; height: auto; padding-top: 12px; padding-bottom: 12px; }
.cta { font-size: .9375rem; }
.send { font-size: .8125rem; }
.toast { height: auto; min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
.toast > i { align-self: stretch; height: auto; min-height: 24px; }
.toast .msg { min-width: 0; overflow-wrap: anywhere; }
.stat b { font-size: 1.125rem; }
.card-brand h1 { font-size: 1.25rem; }
.card { overflow-wrap: anywhere; }
@media (max-width: 520px) { .top { padding: 20px 20px 0; gap: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
