/* 新版全站页脚（主题设置 → 页脚设置） */
/* 浅色：与上方正文区（多为白/近白）拉开层次 — 略深底 + 顶边 + 向上柔和阴影 */
html body .site-footer-modern {
  --sf-bg: #e8ecf3;
  --sf-text: #434343;
  --sf-muted: #6f7785;
  --sf-line: rgba(0, 0, 0, 0.1);
  --sf-card: #fff;
  --sf-popover-bg: #fff;
  --sf-popover-shadow: 0 12px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);
  --sf-accent: var(--theme-color, #3eaf7c);
  --sf-accent-contrast: #0d0d0d;
  /* 弹层与底部按钮统一宽度：卡片左右内边距 + 左侧竖条 + 间距 + 二维码区 */
  --sf-qr-img: 6.75rem;
  --sf-qr-slot-width: calc(1.15rem + 1.45rem + 0.45rem + var(--sf-qr-img));
  width: 100%;
  text-align: left;
  color: var(--sf-text);
  background: var(--sf-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 -10px 36px rgba(15, 23, 42, 0.06);
  padding: 2.25rem 1rem 1.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
  box-sizing: border-box;
  position: relative;
  z-index: 0;
}

html body .site-footer-modern *,
html body .site-footer-modern *::before,
html body .site-footer-modern *::after {
  box-sizing: border-box;
}

html body .site-footer-modern__inner {
  max-width: 72rem;
  margin: 0 auto;
}

html body .site-footer-modern__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.75rem 2rem;
  padding-bottom: 1.5rem;
}

html body .site-footer-modern__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

html body .site-footer-modern__brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem 1.1rem;
  text-decoration: none;
  color: var(--sf-text);
  transition: opacity 0.2s ease;
}

html body .site-footer-modern__brand-row:hover {
  opacity: 0.92;
}

html body .site-footer-modern__logo {
  width: clamp(3rem, 6.5vw, 4.25rem);
  height: clamp(3rem, 6.5vw, 4.25rem);
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1);
}

/* 优设标题黑（放入 assets/fonts/YouSheBiaoTiHei.woff2 后优先）+ Noto Sans SC 特粗作备用，偏标题展示风格 */
html body .site-footer-modern__sitename {
  font-family: 'YouSheBiaoTiHei', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.12;
  color: var(--sf-text);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.55);
}

html.dark .site-footer-modern .site-footer-modern__sitename,
.dark .site-footer-modern .site-footer-modern__sitename {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

html body .site-footer-modern__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

html body .site-footer-modern__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease, filter 0.2s ease;
  font-family: inherit;
  background: transparent;
  color: var(--sf-text);
}

html body .site-footer-modern__btn:hover {
  opacity: 0.92;
}

html body .site-footer-modern__btn--outline {
  border-color: var(--sf-accent);
  color: var(--sf-accent);
  background: transparent;
}

html body .site-footer-modern__btn--accent {
  background: var(--sf-accent);
  color: var(--sf-accent-contrast);
  border-color: var(--sf-accent);
}

html body .site-footer-modern__btn--accent:hover {
  filter: brightness(1.05);
  opacity: 1;
}

html body .site-footer-modern__btn--ghost {
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--sf-text);
  background: transparent;
}

html body .site-footer-modern__qrs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
}

/* 悬浮才显示二维码：触发器 + 上方弹出层 */
html body .site-footer-modern__qr-pop {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: var(--sf-qr-slot-width);
  max-width: 100%;
}

html body .site-footer-modern__qr-pop:hover,
html body .site-footer-modern__qr-pop:focus-within {
  z-index: 60;
}

html body .site-footer-modern__qr-popover {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  /* 与按钮略重叠，避免鼠标经过缝隙时弹出层消失 */
  bottom: calc(100% - 6px);
  transform: translateY(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

html body .site-footer-modern__qr-pop:hover .site-footer-modern__qr-popover,
html body .site-footer-modern__qr-pop:focus-within .site-footer-modern__qr-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

html body .site-footer-modern__qr-popover-card {
  padding: 0.55rem 0.55rem 0.55rem 0.6rem;
  background: var(--sf-popover-bg);
  border: 1px solid var(--sf-line);
  border-radius: 12px;
  box-shadow: var(--sf-popover-shadow);
  box-sizing: border-box;
}

html body .site-footer-modern__qr-popover-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
}

/* 左侧竖排「按钮」条，主题色底 + 白字 */
html body .site-footer-modern__qr-pop-hint {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 6.75rem;
  padding: 0.3rem 0.36rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: #fff;
  text-align: center;
  writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  text-orientation: upright;
  -webkit-text-orientation: upright;
  background-color: var(--sf-accent);
  border: none;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 3px 12px rgba(0, 0, 0, 0.14);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

html body .site-footer-modern__qr-popover-row .site-footer-modern__qr-frame {
  flex: 0 0 auto;
}

/* 横版长方形：与上方弹层同宽 */
html body .site-footer-modern__qr-trigger {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem 0.65rem;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem 0.5rem 0.65rem;
  font: inherit;
  cursor: pointer;
  color: var(--sf-text);
  background: var(--sf-card);
  border: 1px solid var(--sf-line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

html body .site-footer-modern__qr-trigger:hover,
html body .site-footer-modern__qr-pop:focus-within .site-footer-modern__qr-trigger {
  border-color: var(--sf-accent);
  color: var(--sf-accent);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1), 0 0 0 1px var(--sf-accent);
  transform: translateY(-1px);
}

html body .site-footer-modern__qr-trigger-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: inherit;
}

html body .site-footer-modern__qr-trigger-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

html body .site-footer-modern__qr-trigger-label {
  flex: 0 1 auto;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: inherit;
  line-height: 1.25;
  white-space: nowrap;
}

html body .site-footer-modern__qr-pop:hover .site-footer-modern__qr-trigger-icon,
html body .site-footer-modern__qr-pop:focus-within .site-footer-modern__qr-trigger-icon {
  background: var(--theme-color-20, rgba(66, 185, 131, 0.18));
}

html.dark .site-footer-modern .site-footer-modern__qr-trigger-icon,
.dark .site-footer-modern .site-footer-modern__qr-trigger-icon {
  background: rgba(255, 255, 255, 0.08);
}

html body .site-footer-modern__qr-frame {
  width: var(--sf-qr-img);
  height: var(--sf-qr-img);
  border-radius: 10px;
  background: var(--sf-card);
  border: 1px solid var(--sf-line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

html body .site-footer-modern__qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

html body .site-footer-modern__qr-placeholder {
  display: block;
  padding: 0.4rem 0.5rem;
  font-size: 0.65rem;
  line-height: 1.35;
  text-align: center;
  color: var(--sf-muted);
}

html body .site-footer-modern__qr-frame.is-empty {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(0, 0, 0, 0.04) 6px,
    rgba(0, 0, 0, 0.04) 12px
  );
}

@media (prefers-reduced-motion: reduce) {
  html body .site-footer-modern__qr-popover,
  html body .site-footer-modern__qr-trigger {
    transition: none;
  }

  html body .site-footer-modern__qr-trigger:hover,
  html body .site-footer-modern__qr-pop:focus-within .site-footer-modern__qr-trigger {
    transform: none;
  }
}

html body .site-footer-modern__mid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 1.5rem 0 1rem;
}

html body .site-footer-modern__intro {
  flex: 1 1 18rem;
  max-width: 40rem;
  color: var(--sf-muted);
  font-size: 0.8125rem;
}

html body .site-footer-modern__intro p {
  margin: 0 0 0.65rem;
}

html body .site-footer-modern__intro p:last-child {
  margin-bottom: 0;
}

/* 简介区 / 底部额外代码区链接：无下划线（含备案链接；压过内联 style） */
html body .site-footer-modern__intro a,
html body .site-footer-modern__copyright a {
  text-decoration: none !important;
}

html body .site-footer-modern__intro a:hover,
html body .site-footer-modern__copyright a:hover {
  text-decoration: none !important;
  opacity: 0.88;
}

html body .site-footer-modern__highlight {
  flex: 0 1 auto;
  text-align: right;
}

html body .site-footer-modern__highlight-num {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--sf-accent);
  letter-spacing: -0.02em;
}

html body .site-footer-modern__highlight-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--sf-muted);
}

html body .site-footer-modern__friends {
  padding: 1rem 0 0;
  margin-top: 0.35rem;
}

html body .site-footer-modern__friends-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sf-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
}

html body .site-footer-modern__friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

html body .site-footer-modern__friends-list a {
  color: var(--sf-text);
  text-decoration: none;
  font-size: 0.8125rem;
}

html body .site-footer-modern__friends-list a:hover {
  color: var(--sf-accent);
}

html body .site-footer-modern__copyright {
  padding-top: 1.1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--sf-muted);
}

html body .site-footer-modern__copyright a {
  color: var(--sf-accent);
}

html.dark .site-footer-modern,
.dark .site-footer-modern {
  --sf-bg: #0a0b0e;
  --sf-text: rgba(255, 255, 255, 0.88);
  --sf-muted: rgba(255, 255, 255, 0.55);
  --sf-line: rgba(255, 255, 255, 0.1);
  --sf-card: #1a1f28;
  --sf-popover-bg: #1e2430;
  --sf-popover-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.35);
  --sf-accent-contrast: #0a0a0a;
  border-top-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .site-footer-modern .site-footer-modern__btn--ghost,
.dark .site-footer-modern .site-footer-modern__btn--ghost {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--sf-text);
}

html.dark .site-footer-modern .site-footer-modern__qr-frame.is-empty,
.dark .site-footer-modern .site-footer-modern__qr-frame.is-empty {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(255, 255, 255, 0.06) 6px,
    rgba(255, 255, 255, 0.06) 12px
  );
}

html.dark .site-footer-modern .site-footer-modern__qr-trigger,
.dark .site-footer-modern .site-footer-modern__qr-trigger {
  background: #151a22;
  color: rgba(255, 255, 255, 0.88);
}

html.dark .site-footer-modern .site-footer-modern__qr-trigger:hover,
html.dark .site-footer-modern .site-footer-modern__qr-pop:focus-within .site-footer-modern__qr-trigger,
.dark .site-footer-modern .site-footer-modern__qr-trigger:hover,
.dark .site-footer-modern .site-footer-modern__qr-pop:focus-within .site-footer-modern__qr-trigger {
  background: rgba(0, 0, 0, 0.35);
  color: var(--sf-accent);
}

@media screen and (max-width: 1024px) {
  html body .site-footer-modern__top {
    flex-direction: column;
    align-items: stretch;
  }

  html body .site-footer-modern__qrs {
    justify-content: flex-start;
  }

  html body .site-footer-modern__qr-pop {
    width: min(var(--sf-qr-slot-width), 100%);
  }

  html body .site-footer-modern__qr-trigger {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  html body .site-footer-modern__mid {
    flex-direction: column;
    align-items: flex-start;
  }

  html body .site-footer-modern__highlight {
    text-align: left;
    width: 100%;
  }
}
