/* ============================================================
   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: #2dd4bf;
  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, #5eead4 0%, #22d3ee 45%, #60a5fa 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: #2dd4bf;
    -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;
}

/* 桌面端默认：登录按钮短文字隐藏 */
.login-label-short {
  display: 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: nowrap;
  }

  /* 语言按钮：隐藏文字和下箭头，只保留图标 → 宽度从 ~135px 缩减到 ~36px */
  .lang-current-label,
  .lang-chevron {
    display: none;
  }

  .lang-trigger {
    padding: 8px;
  }

  /* 登录按钮：显示短文字"登录"，隐藏全文 */
  .login-label-full {
    display: none;
  }
  .login-label-short {
    display: inline;
  }

  .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);
}

/* ══ 页脚 — editorial 纸质风格 ══════════════════════════════════ */

#global-footer {
  position: relative;
  margin-top: clamp(48px, 9vw, 96px);
  padding: 0;
  border-top: none;
  overflow: visible;
  background: linear-gradient(175deg, #ebe4da 0%, #f2ebe0 22%, #fcf9f4 55%, #faf7f2 100%);
}

/* 顶部彩色分隔条 */
#global-footer::before {
  content: '';
  display: block;
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, #0d5c4d 0%, #f59e0b 42%, #c9a882 100%);
}

#global-footer::after { display: none; }

/* 隐藏极光动画元素 */
.footer-ecosystem-canvas,
.footer-ecosystem-vignette,
.footer-ribbon {
  display: none !important;
}

.footer-wrap {
  position: relative;
  z-index: 1;
  padding-top: clamp(40px, 6vw, 68px);
  padding-bottom: 0;
}

.footer-core {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

/* 品牌区：左侧琥珀线书签 */
.footer-brand {
  max-width: none;
  margin: 0;
  padding: 4px 0 12px clamp(22px, 3vw, 32px);
  border-left: 5px solid #f59e0b;
}

/* 页脚品牌：徽标与域名分栏上下排，避免 L 图标紧挨 ZavCloud 被误读为域名一部分 */
.footer-brand__home {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: #14120f;
  transition: opacity 0.2s ease;
}

.footer-brand__home:hover { opacity: 0.9; }

.footer-brand__seal {
  display: block;
  line-height: 0;
}

.footer-brand__seal img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 12px rgba(251, 191, 36, 0.22);
}

.footer-brand__wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(117deg, #14120f 0%, #0d5c4d 55%, #b45309 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)) {
  .footer-brand__wordmark {
    color: #14120f;
    -webkit-text-fill-color: unset;
  }
}

.footer-brand__logo-ico { display: none; }

.footer-brand__kicker {
  margin: clamp(14px, 2vw, 20px) 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: none;
  color: #0d5c4d;
  opacity: 1;
}

.footer-brand__blurb {
  margin: 14px 0 0;
  font-size: clamp(14px, 1.12vw, 16px);
  line-height: 1.78;
  color: #5c564c;
  max-width: 38rem;
}

.footer-brand__mail {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 22px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: clamp(14px, 1vw, 15px);
  font-weight: 700;
  color: #14120f;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(20, 18, 15, 0.1);
  box-shadow: 0 4px 14px rgba(26, 18, 10, 0.06), 0 16px 40px rgba(26, 18, 10, 0.06);
  transition: transform 0.25s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.footer-brand__mail:hover {
  color: #0d5c4d;
  border-color: rgba(13, 92, 77, 0.35);
  background: #fffefb;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(26, 18, 10, 0.1), 0 22px 50px rgba(26, 18, 10, 0.08);
}

.footer-brand__mail-ico { color: #f59e0b; }
.footer-brand__mail-ico i { width: 19px; height: 19px; }

.footer-brand svg.lucide,
#global-footer svg.lucide { stroke: currentColor; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3.5vw, 40px);
  padding-top: 6px;
}

.footer-col__title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #14120f;
  border-bottom: 3px solid rgba(245, 158, 11, 0.55);
}

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

.footer-col__list a {
  display: inline-block;
  padding: 9px 0;
  position: relative;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  color: #5c564c;
  text-decoration: none;
}

.footer-col__list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f59e0b, #c9a882);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.footer-col__list a:hover,
.footer-col__list a:focus-visible {
  color: #0d5c4d;
  transform: none;
}

.footer-col__list a:hover::after,
.footer-col__list a:focus-visible::after {
  transform: scaleX(1);
}

/* 版权区：全宽深色底栏 */
.footer-legal {
  margin-top: clamp(40px, 6vw, 56px);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: none;
  padding: clamp(24px, 3.8vw, 34px) clamp(20px, 4vw, 48px);
  border-top: 3px solid #f59e0b;
  background: #0a0908;
  box-sizing: border-box;
}

.footer-legal__copy {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 240, 232, 0.55);
}

@media (max-width: 960px) {
  .footer-core {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-brand {
    border-left: none;
    border-top: 5px solid #f59e0b;
    padding: 28px 0 0;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .footer-brand__mail:hover { transform: none; }
  .footer-col__list a::after { transition: none; }
}

/* ══ 登录弹窗 v3 — 单列居中，editorial 风格 ══════════════════════════ */

.auth-modal {
  --auth-paper: #efebe6;
  --auth-ink: #1d1d1f;
  --auth-muted: #6b6b6b;
  --auth-accent: #0d5c4d;
  --auth-border: rgba(0, 0, 0, 0.09);
  --auth-input-bg: rgba(0, 0, 0, 0.04);
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  background: var(--auth-paper);
}

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

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

/* 遮罩：直接用背景色，不用单独的backdrop元素 */
.auth-modal-backdrop {
  display: none;
}

/* ── 面板卡片 ── */
.auth-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--auth-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.05);
  padding: 40px 40px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: 92vh;
  overflow-y: auto;
}

@media (max-width: 520px) {
  .auth-modal-panel {
    padding: 32px 24px 24px;
    border-radius: 20px;
    max-height: 94vh;
  }
}

/* 隐藏旧两列品牌侧边 */
.auth-modal-brand,
.auth-modal-brand-mini {
  display: none !important;
}

/* ── 关闭按钮 ── */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--auth-border);
  background: rgba(0, 0, 0, 0.03);
  color: var(--auth-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  z-index: 2;
}
.auth-modal-close:hover {
  background: rgba(0, 0, 0, 0.07);
  color: var(--auth-ink);
  border-color: rgba(0, 0, 0, 0.14);
}
.auth-modal-close i { width: 16px; height: 16px; }

/* ── 顶部 Logo 标志 ── */
.auth-panel-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-brand-logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #1d1d1f;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.auth-brand-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-brand-logo-mark svg,
.auth-brand-logo-mark i { width: 24px; height: 24px; }

.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; }

/* keep brand name used elsewhere */
.auth-brand-name {
  font-family: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--auth-ink);
}
.auth-brand-name__pre { color: var(--auth-ink); }
.auth-brand-name__accent { color: var(--auth-accent); font-weight: 800; }
.auth-brand-name--sm { font-size: 16px; }

/* ── 标题区 ── */
.auth-modal-heading {
  text-align: center;
  margin-bottom: 28px;
}

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

.auth-modal-title {
  font-family: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--auth-ink);
  margin: 0 0 10px;
  line-height: 1.18;
}

.auth-modal-subtitle {
  font-size: 14px;
  line-height: 1.55;
  color: var(--auth-muted);
  margin: 0;
}
.auth-modal-subtitle strong {
  font-weight: 700;
  color: var(--auth-ink);
}

/* ── 表单 pane ── */
.auth-pane { display: none; }
.auth-pane.active { display: block; }

/* ── 字段 ── */
.auth-field { margin-bottom: 14px; }

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-muted);
  margin-bottom: 7px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--auth-input-bg);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.auth-input-wrap:focus-within {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 0 0 3px rgba(13, 92, 77, 0.09);
}

.field-icon { color: var(--auth-muted); display: flex; }
.field-icon i { width: 17px; height: 17px; }

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

/* ── 登录方式 tabs ── */
.auth-tabs {
  display: flex;
  gap: 3px;
  margin: 4px 0 14px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--auth-border);
}
.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--auth-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.auth-tab:hover { color: var(--auth-ink); }
.auth-tab.active {
  color: var(--auth-ink);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* ── 提交按钮 ── */
.auth-submit.btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  box-sizing: border-box;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  background: #1d1d1f;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s, transform 0.15s;
  box-shadow: none;
}
.auth-submit.btn-primary:hover {
  background: var(--auth-accent);
  transform: translateY(-1px);
  filter: none;
}
.auth-submit.btn-primary:active { transform: none; }
.auth-submit.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.auth-submit.btn-primary:focus-visible {
  outline: 2px solid rgba(13, 92, 77, 0.55);
  outline-offset: 3px;
}

/* 兼容旧 btn-gold 写法 */
.auth-modal .auth-submit.btn-primary.btn-gold {
  background: #1d1d1f;
  color: #ffffff;
  box-shadow: none;
}
.auth-modal .auth-submit.btn-primary.btn-gold:hover {
  background: var(--auth-accent);
  transform: translateY(-1px);
  filter: none;
}

/* ── 自动发送提示 ── */
.auth-auto-send-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -2px 0 14px;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: #0d5c4d;
  background: rgba(13, 92, 77, 0.07);
  border: 1px solid rgba(13, 92, 77, 0.14);
}
.auth-auto-send-hint i,
.auth-auto-send-hint svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.8; }

/* ── 验证码行 ── */
.auth-code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.auth-code-input { flex: 1; }
.auth-send-code {
  flex-shrink: 0;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--auth-border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--auth-accent);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}
.auth-send-code:hover:not(:disabled) {
  border-color: rgba(13, 92, 77, 0.3);
  background: rgba(13, 92, 77, 0.06);
}
.auth-send-code:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── 工具行（记住我 / 忘记密码） ── */
.auth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--auth-muted);
  cursor: pointer;
}

/* ── 消息 / 错误 ── */
.auth-msg {
  margin-top: 10px;
  font-size: 13px;
  color: #b91c1c;
  min-height: 1.2em;
}
.auth-msg[data-ok="1"] { color: #0d5c4d; }

/* ── 切换入口 ── */
.auth-switch {
  margin-top: 14px;
  text-align: center;
}

/* ── 链接按钮 ── */
.auth-link {
  background: none;
  border: none;
  color: var(--auth-accent);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.auth-link--sm { font-size: 12px; }

/* ── 密码显示切换 ── */
.auth-toggle-pw {
  background: none;
  border: none;
  color: var(--auth-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; }

/* ── 重置密码提示 ── */
.auth-reset-lead {
  color: var(--auth-muted);
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.55;
}

/* ── 分隔线 ── */
.auth-modal-divider {
  width: 100%;
  height: 1px;
  background: var(--auth-border);
  margin: 20px 0 0;
}

/* ── 页脚条款 ── */
.auth-modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--auth-border);
  text-align: center;
}
.auth-modal-footer p {
  font-size: 12px;
  color: rgba(107, 107, 107, 0.7);
  margin: 0;
  line-height: 1.55;
}
.auth-modal-footer .auth-link {
  font-size: 12px;
  color: rgba(107, 107, 107, 0.85);
}

/* Toast — editorial 风格 */
.maclogin-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 3000;
  max-width: min(92vw, 420px);
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  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(220, 38, 38, 0.2);
  color: #b91c1c;
}

.maclogin-toast--ok {
  border-color: rgba(13, 92, 77, 0.2);
  color: #0d5c4d;
}

/* 页面过渡（顶/底极光边线） */
#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;
}
