/* ============================================================
   FanCloud 登录/注册页背景 v2
   目标：让登录页背景与首页（#root > div.bg-background）完全一致。

   背景体系现状（由 /custom/fancloud-bg.css 提供）：
     · 首页容器 .bg-background  → 渐变底色 + 纹样 + 左上渐隐遮罩
     · 其余整页容器 .h-svh      → 只有纹样，无渐变底色、无遮罩
   登录页容器是 div.relative.grid.h-svh.max-w-none，落在第二条规则里，
   所以纹样是满屏均匀铺开的，比首页重得多。

   本文件用更高特异性（多一个 .max-w-none）只接管登录/注册容器，
   把首页那套「渐变底色 + 同参数纹样 + 同参数遮罩」原样搬过来。
   不改 fancloud-bg.css 本体，避免与并行改动打架。
   ============================================================ */

/* ---------- 深色主题：底色 + 渐变 ---------- */
html.dark #root > div.relative.grid.h-svh.max-w-none {
  isolation: isolate;
  background-color: #070a0f;
  background-image:
    radial-gradient(80% 55% at 80% 6%, rgba(34, 211, 238, 0.13), rgba(0, 0, 0, 0) 62%),
    radial-gradient(65% 50% at 8% 94%, rgba(139, 92, 246, 0.11), rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #05080d 0%, #080d15 48%, #06090f 100%);
  background-repeat: no-repeat;
}

/* 深色主题：纹样 + 左上渐隐（与首页 .bg-background::before 完全同参数） */
html.dark #root > div.relative.grid.h-svh.max-w-none::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("/brand/bg/pattern-dark-v1.svg");
  background-size: 420px 420px;
  background-repeat: repeat;
  opacity: 0.32;
  -webkit-mask-image: radial-gradient(125% 100% at 15% 12%, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.26) 38%, rgba(0, 0, 0, 1) 100%);
  mask-image: radial-gradient(125% 100% at 15% 12%, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.26) 38%, rgba(0, 0, 0, 1) 100%);
}

/* ---------- 浅色主题：底色 + 渐变 ---------- */
html:not(.dark) #root > div.relative.grid.h-svh.max-w-none {
  isolation: isolate;
  background-color: #f7f3ea;
  background-image:
    radial-gradient(70% 50% at 88% 4%, rgba(13, 148, 136, 0.055), rgba(0, 0, 0, 0) 60%),
    radial-gradient(55% 42% at 8% 94%, rgba(79, 70, 229, 0.05), rgba(0, 0, 0, 0) 58%),
    linear-gradient(180deg, #fbf8f1 0%, #f6f0e4 55%, #f9f5ec 100%);
  background-repeat: no-repeat;
}

/* 浅色主题：纹样 + 左上渐隐 */
html:not(.dark) #root > div.relative.grid.h-svh.max-w-none::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("/brand/bg/pattern-light-v1.svg");
  background-size: 420px 420px;
  background-repeat: repeat;
  opacity: 0.30;
  -webkit-mask-image: radial-gradient(125% 100% at 15% 12%, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.24) 38%, rgba(0, 0, 0, 1) 100%);
  mask-image: radial-gradient(125% 100% at 15% 12%, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.24) 38%, rgba(0, 0, 0, 1) 100%);
}

/* 清掉早先版本给 ::after 加的网格层，避免与首页观感不一致 */
#root > div.relative.grid.h-svh.max-w-none::after {
  content: none;
  background: none;
  opacity: 0;
}
