/* ============================================================
   common.css — Midnight Aurora 基底（深空紫 / 靛蓝 / 霓虹粉点缀）
   导航 · 页脚 · 登录弹窗 · 按钮 · Toast · 页面过渡
   ============================================================ */

:root {
  --aurora-bg0: #070510;
  --aurora-bg1: #0c0618;
  --aurora-bg2: #12081f;
  --aurora-ink: #e8e4f5;
  --aurora-muted: #9b92b8;
  --aurora-indigo: #6366f1;
  --aurora-violet: #8b5cf6;
  --aurora-fuchsia: #e879f9;
  --aurora-neon: #f472b6;
  --aurora-accent: #a78bfa;
  --aurora-glow: rgba(167, 139, 250, 0.35);
  --aurora-card: rgba(22, 12, 38, 0.72);
  --aurora-border: rgba(167, 139, 250, 0.18);
  --aurora-border-strong: rgba(244, 114, 182, 0.28);

  --bg: var(--aurora-bg1);
  --white: #f5f3ff;
  --dark: var(--aurora-ink);
  --muted: var(--aurora-muted);
  --accent: var(--aurora-indigo);
  --accent-bright: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-border: var(--aurora-border);

  --soft-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.45);
  --soft-shadow-sm: 0 12px 28px -8px rgba(0, 0, 0, 0.35);
  --cta-shadow: 0 20px 44px -10px rgba(139, 92, 246, 0.42);

  --bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: all 0.3s ease;

  --nav-height: 92px;
  --nav-inner-max: 1180px;
  --nav-surface: rgba(12, 6, 24, 0.78);
  --nav-border: rgba(167, 139, 250, 0.14);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  color-scheme: dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  background-color: var(--aurora-bg0);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(99, 102, 241, 0.22) 0, transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 30%, rgba(139, 92, 246, 0.12) 0, transparent 45%),
    radial-gradient(ellipse 70% 50% at 0% 80%, rgba(232, 121, 249, 0.08) 0, transparent 50%),
    linear-gradient(180deg, var(--aurora-bg0) 0%, var(--aurora-bg2) 100%);
  background-attachment: fixed;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

body > * {
  position: relative;
  z-index: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--nav-inner-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* —— 顶栏 #site-nav · 霓虹胶囊（渐变描边 pill）
   默认：内页等为独立顶带。首页覆盖为「浮在首屏 hero 上」见 :has(#page-home)。 —— */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  padding: clamp(10px, 2vw, 16px) clamp(12px, 3vw, 20px) clamp(10px, 2vw, 14px);
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 42%),
    linear-gradient(
      180deg,
      #020208 0%,
      #060512 38%,
      rgba(10, 8, 22, 0.96) 100%
    );
  border-bottom: 1px solid rgba(71, 63, 104, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.034) inset,
    0 18px 48px -12px rgba(0, 0, 0, 0.62);
}

/* backdrop-filter 放在伪元素上，避免在 Chrome 中把 position:fixed 的子元素
   (移动端抽屉 .nav-links) 的包含块限制为 #site-nav 自身，导致抽屉无法全屏展开 */
#site-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  pointer-events: none;
}

#site-nav.is-scrolled {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, transparent 38%),
    linear-gradient(
      180deg,
      #010106 0%,
      #05040f 45%,
      rgba(8, 6, 18, 0.98) 100%
    );
  border-bottom-color: rgba(99, 102, 241, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 22px 56px -14px rgba(0, 0, 0, 0.72);
}

/* 首页：顶栏不单独「分节」，叠在 idx-hero 极光之上；下滑后再显示可读衬底 */
html.theme-midnight-aurora:has(#page-home) #site-nav {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

html.theme-midnight-aurora:has(#page-home) #site-nav::before {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.theme-midnight-aurora:has(#page-home) #site-nav.is-scrolled {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 42%),
    linear-gradient(
      180deg,
      #020208 0%,
      #060512 38%,
      rgba(10, 8, 22, 0.96) 100%
    );
  border-bottom: 1px solid rgba(71, 63, 104, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.034) inset,
    0 18px 48px -12px rgba(0, 0, 0, 0.62);
}

html.theme-midnight-aurora:has(#page-home) #site-nav.is-scrolled::before {
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

#site-nav nav {
  width: 100%;
  max-width: min(1152px, 96vw);
  margin: 0 auto;
  border: none;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#site-nav nav::before {
  display: none;
}

.nav-neon-shell {
  width: 100%;
}

.nav-neon-border {
  padding: 1px;
  border-radius: 9999px;
  background: linear-gradient(
    105deg,
    #e879f9 0%,
    #a855f7 28%,
    #6366f1 52%,
    #22d3ee 100%
  );
  box-shadow:
    0 0 24px rgba(168, 85, 247, 0.28),
    0 0 48px rgba(99, 102, 241, 0.12);
  transition: box-shadow 0.35s ease;
}

#site-nav.is-scrolled .nav-neon-border {
  box-shadow:
    0 0 28px rgba(168, 85, 247, 0.34),
    0 12px 40px -20px rgba(0, 0, 0, 0.55);
}

/* 登录弹窗挂载点：`body > * { z-index: 1 }` 会与 DOM 顺序叠加；main 在 #site-auth 之后，
   若无更高层级则整页内容会盖住内部的 position:fixed 弹层（内部 z-index 无法溢出父层）。 */
#site-auth {
  position: relative;
  z-index: 950;
}

.nav-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 auto;
  min-height: 52px;
  padding: 10px clamp(14px, 2.8vw, 22px);
}

.nav-inner--neon {
  border-radius: 9999px;
  background: #090914;
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo--neon {
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
}

.logo-neon-ico {
  display: inline-flex;
  color: #f0abfc;
  flex-shrink: 0;
}

.logo-neon-ico svg,
.logo-neon-ico i {
  width: 22px;
  height: 22px;
}

.logo-neon-text {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.logo-neon-grad {
  margin-left: 1px;
  background: linear-gradient(120deg, #f0abfc 0%, #a78bfa 45%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo-neon-grad {
    color: #e879f9;
    -webkit-text-fill-color: unset;
  }
}

.nav-links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(8px, 1.8vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.nav-links li {
  flex-shrink: 0;
}

.nav-links a {
  text-decoration: none;
  color: #cbd5e1;
  font-weight: 600;
  font-size: clamp(13px, 1.05vw, 14px);
  padding: 8px 4px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #67e8f9;
  background: transparent;
  box-shadow: none;
}

.nav-links a.active {
  color: #ecfeff;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 14px);
  flex-shrink: 0;
}

.nav-right--neon {
  gap: 10px;
}

/* 语言 */
.lang-dropdown {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--aurora-border);
  background: rgba(22, 12, 38, 0.65);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--ease);
}

.lang-trigger--neon {
  padding: 7px 11px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: #94a3b8;
}

.lang-trigger--neon:hover {
  color: #f8fafc;
  border-color: rgba(103, 232, 249, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

.lang-trigger:hover {
  color: var(--white);
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(99, 102, 241, 0.1);
}

.lang-trigger i {
  width: 16px;
  height: 16px;
}

.lang-chevron {
  opacity: 0.7;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  margin: 0;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(9, 9, 20, 0.97);
  box-shadow: var(--soft-shadow);
  z-index: 950;
  display: none;
}

.lang-dropdown.open .lang-menu {
  display: block;
}

.lang-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-menu a:hover,
.lang-menu a:focus-visible {
  background: rgba(99, 102, 241, 0.15);
  color: var(--white);
}

.lang-menu a[aria-current='true'] {
  color: var(--accent-bright);
  background: rgba(99, 102, 241, 0.12);
}

/* 登录（霓虹条） */
.btn-nav-login {
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #c084fc 100%);
  box-shadow: var(--cta-shadow);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-nav-login--neon {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fdf4ff;
  background: linear-gradient(105deg, #c026d3 0%, #9333ea 42%, #6366f1 100%);
  border: none;
  box-shadow:
    0 0 22px rgba(192, 38, 211, 0.35),
    0 4px 18px -6px rgba(99, 102, 241, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.25s ease;
}

.btn-nav-login--neon:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 0 28px rgba(232, 121, 249, 0.42),
    0 8px 24px -8px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-nav-login--neon:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(14, 9, 22, 0.95),
    0 0 0 5px rgba(167, 139, 250, 0.55),
    0 0 26px rgba(192, 38, 211, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* 用户区 */
.nav-user-area {
  position: relative;
}

.nav-user-dropdown-wrap {
  position: relative;
}

.nav-user-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-user-account-home {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  color: inherit;
}

.nav-user-account-home:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.75);
  outline-offset: 2px;
}

.nav-user-trigger {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--aurora-border);
  background: rgba(22, 12, 38, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-user-trigger--neon {
  width: auto;
  min-width: 32px;
  height: 38px;
  padding: 0 7px;
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
}

.nav-user-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: rgba(226, 232, 240, 0.88);
}

.nav-user-chevron svg {
  width: 18px;
  height: 18px;
}

.nav-user-trigger:hover {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.nav-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #e879f9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.nav-user-account-home .nav-avatar-circle {
  border-radius: 999px;
  width: 30px;
  height: 30px;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  margin: 0;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--aurora-border);
  background: rgba(14, 8, 26, 0.98);
  box-shadow: var(--soft-shadow);
  display: none;
  z-index: 960;
}

.nav-user-dropdown-wrap.is-open .nav-user-dropdown {
  display: block;
}

.nav-user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

a.nav-user-menu-item {
  color: var(--muted);
}

.nav-user-menu-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--white);
}

.nav-user-menu-quit {
  color: #fb7185;
}

.nav-user-menu-sep {
  height: 1px;
  margin: 6px 0;
  background: var(--aurora-border);
  list-style: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
  flex-shrink: 0;
}

.hamburger--neon {
  padding: 8px;
  border-radius: 999px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, background 0.2s ease;
}

/* 汉堡 → ✕ 变形动画 */
.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: #f0abfc;
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: #f0abfc;
}

/* 移动端菜单遮罩 */
.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 889;
  background: rgba(4, 2, 12, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-mobile-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body.mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .nav-links {
    gap: clamp(6px, 1vw, 14px);
  }

  .nav-links a {
    font-size: 12px;
    padding-inline: 2px;
  }
}

@media (max-width: 900px) {
  #site-nav {
    padding-left: clamp(10px, 3vw, 16px);
    padding-right: clamp(10px, 3vw, 16px);
  }

  .nav-neon-border {
    border-radius: clamp(22px, 6vw, 9999px);
  }

  .nav-inner--neon {
    border-radius: clamp(22px, 6vw, 9999px);
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(80vw, 300px);
    flex-direction: column;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: calc(var(--nav-height) + 16px) 20px 32px;
    gap: 6px;
    background:
      radial-gradient(ellipse 90% 55% at 80% 0%, rgba(99, 102, 241, 0.2) 0%, transparent 52%),
      linear-gradient(168deg, rgba(18, 10, 40, 0.98) 0%, rgba(8, 5, 18, 0.99) 100%);
    border-left: 1px solid rgba(167, 139, 250, 0.18);
    box-shadow: -24px 0 56px -16px rgba(0, 0, 0, 0.55);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 890;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.mobile-active {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    border-color: rgba(103, 232, 249, 0.35);
    background: rgba(34, 211, 238, 0.08);
    transform: translateX(3px);
  }

  .nav-links a.active {
    border-color: rgba(232, 121, 249, 0.45);
    color: #fff;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.22), rgba(99, 102, 241, 0.15));
    text-shadow: none;
  }
}

.page-main {
  padding-top: 8px;
  padding-bottom: 64px;
}

.page-enter {
  animation: page-enter-fade 0.6s ease-out both;
}

@keyframes page-enter-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* 按钮（首页等） */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border: none;
  transition: var(--bounce);
  box-sizing: border-box;
}

.btn-primary i,
.btn-secondary i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 尾部有箭头时：左侧留与箭头同宽空槽，中间文案才真正几何居中（避免「文字+图标」整体居中导致字偏左） */
.btn-has-trail-icon {
  gap: 0;
}

.btn-has-trail-icon .btn__balance,
.btn-has-trail-icon .btn__trail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
}

.btn-has-trail-icon .btn__text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

.btn-has-trail-icon .btn__trail i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-gold,
.btn-primary.btn-gold {
  color: #0f0518;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #f59e0b 100%);
  box-shadow: 0 16px 40px -12px rgba(251, 191, 36, 0.45);
}

.btn-gold:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-primary:not(.btn-gold) {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
  box-shadow: var(--cta-shadow);
}

.btn-secondary {
  color: var(--white);
  background: rgba(22, 12, 38, 0.6);
  border: 1px solid var(--aurora-border);
  box-shadow: none;
}

.btn-secondary:hover {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(99, 102, 241, 0.12);
}

/* 页脚 — 品牌区 + 三列导航 + 底栏 */
#global-footer {
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 0 0 clamp(28px, 4vw, 40px);
  border-top: 1px solid rgba(167, 139, 250, 0.14);
  background:
    radial-gradient(ellipse 90% 55% at 50% -30%, rgba(99, 102, 241, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(14, 8, 26, 0.88) 0%, rgba(4, 2, 12, 0.97) 100%);
  overflow: hidden;
}

/* Canvas「根系 / 孢子」特效（脚本控制尺寸；减弱动效偏好下隐藏） */
.footer-ecosystem-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

.footer-ecosystem-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 92% 72% at 50% 42%, transparent 26%, rgba(4, 2, 12, 0.55) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .footer-ecosystem-canvas {
    display: none;
  }

  .footer-ecosystem-vignette {
    opacity: 0.85;
  }
}

#global-footer::after {
  content: '';
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 55%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 100%, rgba(124, 58, 237, 0.09), transparent 62%);
}

.footer-ribbon {
  position: relative;
  z-index: 3;
  height: 3px;
  margin: 0;
  background: linear-gradient(90deg, transparent 0%, #6366f1 18%, #c084fc 50%, #f472b6 82%, transparent 100%);
  opacity: 0.92;
  box-shadow: 0 0 42px rgba(139, 92, 246, 0.35);
}

.footer-wrap {
  position: relative;
  z-index: 3;
  padding-top: clamp(36px, 5vw, 52px);
}

.footer-core {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}

.footer-brand {
  max-width: 34ch;
}

.footer-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #f5f3ff;
  font-weight: 900;
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  letter-spacing: -0.03em;
  transition: opacity 0.2s ease;
}

.footer-brand__logo:hover {
  opacity: 0.92;
}

.footer-brand__logo-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.35), rgba(232, 121, 249, 0.12));
  border: 1px solid rgba(196, 181, 253, 0.28);
  box-shadow: 0 10px 28px -14px rgba(99, 102, 241, 0.55);
}

.footer-brand__logo-ico i {
  width: 22px;
  height: 22px;
  color: #e879f9;
}

.footer-brand__logo-text {
  background: linear-gradient(120deg, #f5f3ff 0%, #e9d5ff 55%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .footer-brand__logo-text {
    color: #f5f3ff;
  }
}

.footer-brand__kicker {
  margin: 14px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dd3fc;
  opacity: 0.95;
}

.footer-brand__blurb {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-brand__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #e9d5ff;
  text-decoration: none;
  background: rgba(8, 5, 18, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 8px 24px -12px rgba(99, 102, 241, 0.45);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.footer-brand__mail:hover {
  color: #fff;
  border-color: rgba(196, 181, 253, 0.55);
  background: rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

.footer-brand__mail-ico {
  display: inline-flex;
  color: #a78bfa;
}

.footer-brand__mail-ico i {
  width: 18px;
  height: 18px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.footer-col__title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.95);
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.footer-col__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col__list a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.65;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col__list a:hover {
  color: #f5f3ff;
}

.footer-legal {
  margin-top: clamp(36px, 5vw, 48px);
  padding-top: 22px;
  border-top: 1px solid rgba(167, 139, 250, 0.14);
}

.footer-legal__copy {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(161, 161, 170, 0.85);
}

@media (max-width: 960px) {
  .footer-core {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* 登录弹窗 */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

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

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 12, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.auth-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  max-width: 900px;
  width: 100%;
  max-height: min(92vh, 720px);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(167, 139, 250, 0.26);
  background: linear-gradient(
    155deg,
    rgba(28, 16, 48, 0.94) 0%,
    rgba(14, 8, 28, 0.96) 48%,
    rgba(18, 10, 36, 0.94) 100%
  );
  box-shadow:
    0 40px 100px -36px rgba(79, 70, 229, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

@media (max-width: 800px) {
  .auth-modal-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
    border-radius: 18px;
  }

  .auth-modal-brand {
    display: none;
  }

  .auth-modal-brand-mini {
    display: flex;
  }
}

/* ── 左侧：品牌与卖点 ── */
.auth-modal-brand {
  position: relative;
  overflow: hidden;
  padding: 32px 26px 28px;
  border-right: 1px solid rgba(167, 139, 250, 0.14);
}

.auth-modal-brand__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-modal-brand__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.35;
}

.auth-modal-brand__blob--1 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.85) 0%, transparent 72%);
  top: -48px;
  left: -40px;
}

.auth-modal-brand__blob--2 {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.55) 0%, transparent 72%);
  bottom: 12%;
  right: -28px;
}

.auth-modal-brand__blob--3 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, transparent 72%);
  top: 42%;
  left: 28%;
  opacity: 0.22;
}

.auth-modal-brand__inner {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-brand-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #6366f1 0%, #8b5cf6 50%, #e879f9 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 26px -6px rgba(139, 92, 246, 0.65);
  color: #fff;
}

.auth-brand-logo-mark svg,
.auth-brand-logo-mark i {
  width: 22px;
  height: 22px;
}

.auth-brand-logo-mark--sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.auth-brand-logo-mark--sm svg,
.auth-brand-logo-mark--sm i {
  width: 18px;
  height: 18px;
}

.auth-brand-name {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ddd6fe 0%, #e879f9 45%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand-name--sm {
  font-size: 17px;
}

.auth-brand-tagline {
  color: rgba(196, 181, 253, 0.72);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  margin: 0 0 22px;
}

.auth-brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-brand-feature {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.14);
  background: rgba(12, 8, 22, 0.38);
}

.auth-brand-feature__ico {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
}

.auth-brand-feature__ico svg,
.auth-brand-feature__ico i {
  width: 15px;
  height: 15px;
}

.auth-brand-feature__txt {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.82);
}

/* ── 右侧：表单区 ── */
.auth-modal-form-side {
  position: relative;
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: radial-gradient(ellipse 90% 55% at 100% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 58%),
    rgba(8, 4, 18, 0.25);
  overflow: auto;
}

.auth-modal-brand-mini {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-modal-heading {
  margin-bottom: 22px;
  padding-right: 48px;
}

.auth-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
}

.auth-modal-kicker svg {
  width: 13px;
  height: 13px;
  opacity: 0.85;
}

.auth-modal-close {
  position: absolute;
  top: 22px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(22, 12, 38, 0.65);
  color: rgba(196, 181, 253, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}

.auth-modal-close:hover {
  color: var(--white);
  border-color: rgba(167, 139, 250, 0.42);
  background: rgba(99, 102, 241, 0.18);
}

.auth-modal-close i {
  width: 18px;
  height: 18px;
}

.auth-modal-title {
  font-size: clamp(1.25rem, 3vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fdf4ff;
  margin: 0;
  line-height: 1.2;
}

.auth-pane {
  display: none;
}

.auth-pane.active {
  display: block;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--aurora-border);
  background: rgba(8, 4, 18, 0.65);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-wrap:focus-within {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.field-icon {
  color: var(--muted);
  display: flex;
}

.field-icon i {
  width: 18px;
  height: 18px;
}

.auth-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.auth-input-wrap input::placeholder {
  color: rgba(155, 146, 184, 0.65);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 6px 0 16px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.15);
}

.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  color: rgba(196, 181, 253, 0.55);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.18s ease, background 0.18s ease;
}

.auth-tab:hover {
  color: rgba(226, 232, 240, 0.85);
}

.auth-tab.active {
  color: #fdf4ff;
  background: rgba(139, 92, 246, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-tab.active::after {
  display: none;
}

.auth-submit.btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  box-sizing: border-box;
}

.auth-submit.btn-primary:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.65);
  outline-offset: 3px;
}

.auth-msg {
  margin-top: 12px;
  font-size: 13px;
  color: #fb7185;
  min-height: 1.2em;
}

.auth-switch {
  margin-top: 16px;
  text-align: center;
}

.auth-link {
  background: none;
  border: none;
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.auth-row--agree {
  margin-bottom: 12px;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.auth-code-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.auth-send-code {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--aurora-border);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.auth-send-code:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auth-reset-lead {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-toggle-pw {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.auth-toggle-pw .icon-eye-off {
  display: none;
}

.auth-toggle-pw.is-visible .icon-eye {
  display: none;
}

.auth-toggle-pw.is-visible .icon-eye-off {
  display: block;
}

/* Toast */
.maclogin-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 3000;
  max-width: min(92vw, 420px);
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: rgba(22, 12, 38, 0.95);
  border: 1px solid var(--aurora-border);
  box-shadow: var(--soft-shadow);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.maclogin-toast:not([hidden]) {
  transform: translateX(-50%) translateY(0);
}

.maclogin-toast--error {
  border-color: rgba(251, 113, 133, 0.45);
}

.maclogin-toast--ok {
  border-color: rgba(52, 211, 153, 0.4);
}

/* 页面过渡（顶/底极光边线） */
#maclogin-transition {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
}

.maclogin-tx__layer {
  position: absolute;
  inset: 0;
}

.maclogin-tx__rim {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transform: scaleX(0.3);
  filter: blur(0.5px);
}

.maclogin-tx__rim--top {
  top: 0;
  background: linear-gradient(90deg, transparent, #818cf8, #e879f9, #f472b6, transparent);
}

.maclogin-tx__rim--bottom {
  bottom: 0;
  background: linear-gradient(90deg, transparent, #f472b6, #a78bfa, #6366f1, transparent);
}

.maclogin-transition--active .maclogin-tx__rim {
  animation: maclogin-rim-flash 0.42s ease-out both;
}

@keyframes maclogin-rim-flash {
  0% {
    opacity: 0;
    transform: scaleX(0.25);
  }
  35% {
    opacity: 1;
    transform: scaleX(1);
  }
  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

html.maclogin-enter-from-nav .page-main {
  animation: maclogin-enter-main 0.65s ease-out both;
}

@keyframes maclogin-enter-main {
  from {
    opacity: 0.85;
    filter: brightness(1.08);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .page-enter {
    animation: none;
  }

  .maclogin-transition--active .maclogin-tx__rim {
    animation: none;
    opacity: 0.9;
    transform: scaleX(1);
  }

  html.maclogin-enter-from-nav .page-main {
    animation: none;
  }
}

/* ============================================================
   Aurora Crystal Icon — 全站自定义四叶星图标
   取代 Lucide sparkles，使用 CSS mask-image 实现 currentColor 继承
   形状：四方向尖角 + 内凹 Bezier 曲线 = 极光水晶感
   ============================================================ */
i.icon-aurora-crystal {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 0.5Q10.8 5.2 15.5 8Q10.8 10.8 8 15.5Q5.2 10.8 0.5 8Q5.2 5.2 8 0.5Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 0.5Q10.8 5.2 15.5 8Q10.8 10.8 8 15.5Q5.2 10.8 0.5 8Q5.2 5.2 8 0.5Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
