/* ============================================================
   智流（FluxLane）认证页 — 左动态区 + 右表单
   与首页同一套 loom 令牌与 flux-theme 昼夜机制
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --violet: #685dff;
  --cyan: #35d7d1;
  --blue: #4b8fff;
  --font-sans: "Noto Sans SC", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

/* ---------- 昼夜令牌（默认夜晚，is-light 为白天） ---------- */
#page {
  --paper: #0a0b13;
  --panel: #0c0e1a;
  --ink: #f5f5fa;
  --muted: #999daf;
  --faint: #6b7186;
  --dim: #4a5064;
  --line: rgba(245, 245, 250, .14);
  --line-soft: rgba(245, 245, 250, .08);
  --field-ph: rgba(245, 245, 250, .30);
  --field-bg: transparent;
  --chip-bg: rgba(245, 245, 250, .04);
  --chip-line: rgba(245, 245, 250, .15);
  --note-bg: rgba(53, 215, 209, .07);
  --note-line: rgba(53, 215, 209, .35);
  --note-ink: #c9f0ee;
  --thread-1: rgba(104, 93, 255, .55);
  --thread-2: rgba(53, 215, 209, .50);
  --thread-3: rgba(75, 143, 255, .45);
  --glow: rgba(104, 93, 255, .16);
  --card-bg: rgba(16, 18, 36, .58);
  --card-line: rgba(245, 245, 250, .10);
  --card-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}
#page.is-light {
  --paper: #fcfcff;
  --panel: #e7ebf9;
  --ink: #171827;
  --muted: #565e74;
  --faint: #79819a;
  --dim: #9aa1b8;
  --line: rgba(23, 24, 39, .18);
  --line-soft: rgba(23, 24, 39, .12);
  --field-ph: rgba(23, 24, 39, .34);
  --chip-bg: rgba(23, 24, 39, .03);
  --chip-line: rgba(23, 24, 39, .16);
  --note-bg: rgba(15, 158, 153, .08);
  --note-line: rgba(15, 158, 153, .38);
  --note-ink: #0d6f6b;
  --thread-1: rgba(90, 77, 240, .55);
  --thread-2: rgba(15, 158, 153, .50);
  --thread-3: rgba(47, 111, 224, .46);
  --glow: rgba(104, 93, 255, .18);
  --cyan: #0f9e99;
  --card-bg: rgba(255, 255, 255, .78);
  --card-line: rgba(23, 24, 39, .10);
  --card-shadow: 0 24px 70px rgba(23, 24, 39, .10);
}

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#page {
  min-height: 100vh;
  background:
    radial-gradient(760px 500px at 16% 6%, var(--glow), transparent 62%),
    radial-gradient(680px 440px at 90% 98%, var(--glow), transparent 60%),
    var(--paper);
  color: var(--ink);
  transition: background-color .45s ease, color .45s ease;
  position: relative;
}

#particles {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

#cursor-sparks {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 60;
}

::selection { background: rgba(104, 93, 255, .35); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ================= 顶部导航 ================= */
.nav {
  height: 92px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 80px;
  border-bottom: 1px solid var(--line-soft);
  position: relative; z-index: 10;
  transition: border-color .45s ease;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  object-fit: cover; display: block;
  box-shadow: 0 0 24px var(--glow);
}
.brand-name {
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 20px; font-weight: 700; letter-spacing: -0.05em;
}
.brand-sub {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px; letter-spacing: .2em;
  color: var(--muted); margin-top: 3px;
}
.nav-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--chip-line);
  background: var(--chip-bg);
  color: var(--ink);
  display: grid; place-items: center;
  transition: border-color .25s ease, transform .25s ease, background-color .45s ease;
}
.icon-btn:hover { border-color: var(--violet); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.pill-link {
  height: 50px; padding: 0 26px;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  background: var(--chip-bg);
  font-size: 14px; font-weight: 500;
  transition: border-color .25s ease, transform .25s ease, background-color .45s ease;
}
.pill-link:hover { border-color: var(--violet); transform: translateY(-1px); }
.pill-link svg { width: 14px; height: 14px; }

/* ================= 主体双栏 ================= */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 6.4fr);
  min-height: calc(100vh - 92px);
  position: relative; z-index: 1;
}

/* ---------- 左侧动态区（开放式） ---------- */
.stage {
  position: relative;
  overflow: hidden;
}
.stage-inner {
  position: relative; z-index: 2;
  height: 100%;
  padding: 0 80px;
  display: flex; flex-direction: column;
  justify-content: center;
}
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .22em;
  color: var(--muted);
}
.live-dot { position: relative; width: 8px; height: 8px; flex: none; }
.live-dot::before, .live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--cyan);
}
.live-dot::after { animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(3.2); opacity: 0; }
}
.eyebrow-rule { width: 34px; height: 1px; background: var(--line); }
.eyebrow-tag { color: var(--faint); }

.headline { margin-top: 40px; }
.headline .l1 {
  font-size: 56px; font-weight: 700; line-height: 1.16;
  letter-spacing: .01em;
}
.headline .l2 {
  margin-top: 10px;
  font-size: 42px; font-weight: 700; line-height: 1.2;
  background: linear-gradient(92deg, var(--violet) 0%, var(--blue) 46%, #35d7d1 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.statement {
  margin-top: 26px;
  max-width: 470px;
  font-size: 15px; line-height: 1.85;
  color: var(--muted);
}
.metrics {
  margin-top: 40px;
  display: flex; align-items: center; gap: 20px;
  font-family: var(--font-mono);
  font-size: 8px; letter-spacing: .18em;
  color: var(--faint);
}
.metrics .dash {
  width: 13px; height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}
.stage-caption {
  position: absolute; left: 80px; bottom: 40px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 8px; letter-spacing: .26em;
  color: var(--dim);
}

/* 路径流动线（全页环境层） */
.threads {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 0;
  width: 100%; height: 340px;
  pointer-events: none;
}
.threads path { fill: none; stroke-width: 1.5; }
.threads .t1 { stroke: var(--thread-1); }
.threads .t2 { stroke: var(--thread-2); }
.threads .t3 { stroke: var(--thread-3); }
.threads .packet { fill: var(--cyan); }
.threads .packet.p1 { fill: var(--violet); }
.threads .packet.p3 { fill: var(--blue); }

/* ---------- 右侧表单区 ---------- */
.panel {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 48px 88px;
}
/* 右侧表单小卡片：突出输入区 */
.form-wrap {
  width: 100%; max-width: 448px;
  box-sizing: border-box;
  padding: 40px 40px 30px;
  border: 1px solid var(--card-line);
  border-radius: 22px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  transition: background-color .45s ease, border-color .45s ease;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .26em;
  color: var(--muted);
}
.form-title { margin-top: 20px; font-size: 40px; font-weight: 700; }
.form-desc { margin-top: 12px; font-size: 13px; line-height: 1.8; color: var(--muted); }

.flux-form { margin-top: 44px; display: flex; flex-direction: column; gap: 32px; }
.field { position: relative; }
.field-label {
  display: block;
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  margin-bottom: 2px;
}
.field-label-row {
  display: flex; align-items: baseline; justify-content: space-between;
}
.inline-link { font-size: 11px; color: var(--cyan); transition: opacity .2s ease; }
.inline-link:hover { opacity: .75; }
.field input {
  width: 100%;
  border: 0; outline: 0;
  background: var(--field-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  padding: 8px 28px 10px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color .3s ease;
}
.field input::placeholder { color: var(--field-ph); }
.field::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.22, .8, .3, 1);
}
.field:focus-within::after { transform: scaleX(1); }
.eye-btn {
  position: absolute; right: 0; top: 26px;
  width: 26px; height: 26px;
  border: 0; background: none;
  color: var(--faint);
  display: grid; place-items: center;
  transition: color .2s ease;
}
.eye-btn:hover { color: var(--ink); }
.eye-btn svg { width: 16px; height: 16px; }

/* 邮箱验证码字段 */
.field.has-code input { padding-right: 122px; }
.code-btn {
  position: absolute; right: 0; top: 16px;
  height: 32px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  background: var(--chip-bg);
  color: var(--cyan);
  font-size: 11px; font-weight: 500;
  white-space: nowrap;
  transition: border-color .25s ease, opacity .25s ease;
}
.code-btn:hover:not(:disabled) { border-color: var(--cyan); }
.code-btn:disabled { opacity: .55; cursor: default; color: var(--faint); }

.btn-primary {
  height: 52px; border: 0; border-radius: 999px;
  background: linear-gradient(92deg, var(--violet), var(--blue));
  color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: .18em;
  box-shadow: 0 10px 32px rgba(104, 93, 255, .35);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(104, 93, 255, .45);
  filter: brightness(1.06);
}
.btn-primary:active { transform: translateY(0); }

.switch-row {
  margin-top: 30px;
  text-align: center;
  font-size: 13px; color: var(--muted);
}
.switch-row a {
  color: var(--cyan); font-weight: 600; margin-left: 10px;
  transition: opacity .2s ease;
}
.switch-row a:hover { opacity: .75; }

.divider {
  margin-top: 34px;
  display: flex; align-items: center; gap: 16px;
  font-size: 10px; color: var(--faint);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line-soft);
}
.oauth-row { margin-top: 22px; display: flex; gap: 16px; }
.oauth-btn {
  flex: 1; height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  background: var(--chip-bg);
  color: var(--ink);
  font-size: 13px; font-weight: 500;
  transition: border-color .25s ease, transform .25s ease, background-color .45s ease;
}
.oauth-btn:hover { border-color: var(--violet); transform: translateY(-1px); }
.oauth-btn svg { width: 18px; height: 18px; }

.agree-note {
  margin-top: 22px;
  text-align: center;
  font-size: 10px; color: var(--faint);
}

/* 重置页：已发送状态 */
.sent-note {
  margin-top: 40px;
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 22px;
  border-radius: 12px;
  border: 1px solid var(--note-line);
  background: var(--note-bg);
  transition: background-color .45s ease, border-color .45s ease;
}
.sent-note .dot {
  flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--cyan); margin-top: 5px;
  box-shadow: 0 0 12px var(--cyan);
}
.sent-note p { font-size: 11px; line-height: 1.8; color: var(--note-ink); }

/* 页脚 */
.foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between;
  padding: 26px 40px;
  font-family: var(--font-mono);
  font-size: 8px; letter-spacing: .22em;
  color: var(--dim);
  pointer-events: none;
}

/* 提示条 */
#toast {
  position: fixed; left: 50%; bottom: 36px; z-index: 80;
  transform: translate(-50%, 16px);
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ================= 入场动效 ================= */
.rise { opacity: 0; animation: rise .8s cubic-bezier(.22, .8, .3, 1) forwards; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.d1 { animation-delay: .06s; } .d2 { animation-delay: .14s; }
.d3 { animation-delay: .22s; } .d4 { animation-delay: .30s; }
.d5 { animation-delay: .38s; } .d6 { animation-delay: .46s; }
.d7 { animation-delay: .54s; } .d8 { animation-delay: .62s; }
.d9 { animation-delay: .70s; } .d10 { animation-delay: .78s; }

/* ================= 响应式 ================= */
@media (max-width: 1080px) {
  .nav { padding: 0 28px; }
  .shell { grid-template-columns: 1fr; }
  .stage { display: none; }
  .panel { padding: 48px 24px 120px; }
  .form-wrap { padding: 32px 26px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; }
  .live-dot::after { animation: none; }
}

/* ================= 会话检测提示条（2026-09-28：已登录无感跳转，表单不闪现） ================= */
.auth-probe-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 260px;
  color: var(--muted); font-size: 13px;
}
.auth-probe-spin {
  width: 16px; height: 16px; flex: 0 0 auto;
  border: 2px solid var(--line); border-top-color: var(--cyan);
  border-radius: 50%; animation: auth-probe-rot .8s linear infinite;
}
@keyframes auth-probe-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-probe-spin { animation: none; } }
