/**
 * 页脚 - 桌面：左 Logo+版权+备案 | 右标语；移动端：纵向居中分层（无标语）
 */

.Foot {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000;
    transition: background 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease, border-color 0.2s ease;
}

body {
    position: relative;
    margin: 0;
    padding: 0;
    padding-bottom: var(--footer-height, 44px) !important;
    box-sizing: border-box !important;
}

/* 内容与固定页脚之间的统一间距（全站 .Whole 容器） */
body > .Whole,
.Whole {
    padding-bottom: var(--content-footer-gap, 20px) !important;
}

/* 版心与顶栏 .nav .layui-container 一致 */
.foot-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 0;
    box-sizing: border-box;
    font-size: 11px;
    color: #71717a;
}

body.site-layout-wide .foot-inner {
    max-width: 1560px !important;
}

@media screen and (max-width: 1350px) {
    .foot-inner {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.foot-left {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.foot-logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}

.foot-logo {
    display: block;
    height: 22px;
    width: auto;
    max-width: min(100px, 28vw);
    object-fit: contain;
    vertical-align: middle;
}

.foot-meta {
    color: #71717a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.foot-slogan-main {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #52525b;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex: 0 0 auto;
    text-align: right;
}

.foot-copy {
    color: #71717a;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.foot-copy:hover {
    color: #3f3f46;
}

/* ========== 移动端：标语隐藏；单行不换行、整体居中 ========== */
@media screen and (max-width: 960px) {
    :root {
        --footer-height: 48px;
    }

    body {
        padding-bottom: var(--footer-height, 48px) !important;
    }

    .foot-inner {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        max-width: 100% !important;
        padding: 8px 16px;
        gap: 0;
        text-align: center;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .foot-inner::-webkit-scrollbar {
        display: none;
    }

    .foot-slogan-main {
        display: none !important;
    }

    .foot-left {
        flex: 0 1 auto;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        width: auto;
        max-width: 100%;
        gap: 6px;
        min-width: 0;
    }

    .foot-logo-link {
        flex-shrink: 0;
    }

    .foot-logo {
        height: 20px;
        max-width: 72px;
    }

    .foot-meta {
        flex-shrink: 0;
        width: auto;
        max-width: none;
        text-align: center;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        font-size: clamp(9px, 2.85vw, 11px);
    }

    .foot-copy {
        flex-shrink: 0;
        display: inline;
        width: auto;
        text-align: center;
        white-space: nowrap;
        line-height: 1.2;
        font-size: clamp(9px, 2.85vw, 11px);
    }
}

/* 旧类名兼容 */
.foot-row,
.foot-brand,
.foot-slogan,
.foot-sep,
.foot-center,
.foot-nav {
    display: none;
}

.Foot dl, .Foot dt, .Foot dd,
.foot-top, .foot-bottom {
    display: none;
}

/* 深色模式：实心 Logo 直接显示（mask 渐变仅适用于旧版透明字标） */
html.dark-mode body.dark-mode .foot-logo-link {
    background: none;
    -webkit-mask-image: none;
    mask-image: none;
}

html.dark-mode body.dark-mode .foot-logo-link:hover {
    background-position: unset;
    filter: none;
}

html.dark-mode body.dark-mode .foot-logo-link .foot-logo {
    opacity: 1;
    filter: none;
    transition: opacity 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html.dark-mode body.dark-mode .foot-logo-link:hover .foot-logo {
    opacity: 0.88;
    transform: scale(1.03);
}

body.dark-mode .foot-meta,
body.dark-mode .foot-copy {
    color: #9ca3af;
}

body.dark-mode .foot-slogan-main {
    color: #d4d4d8;
}

body.dark-mode .foot-copy:hover {
    color: #f4f4f5;
}

/* ========== 全站：滚到底透明；滚动中铺底（footer-overlap-scroll.js 切换 html/body.footer-overlap） ========== */

/* 明亮模式 · 滚到底：全透明底，仅保留与顶栏 nav-scrolled 一致的浅灰分割线（勿用白边，白底/渐变底上会看不见） */
html:not(.dark-mode) body:not(.footer-overlap):not(.no-footer-overlap) .Foot,
html:not(.dark-mode):not(.footer-overlap) body:not(.no-footer-overlap) .Foot {
    background: transparent !important;
    background-color: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: none !important;
}

/* 明亮 · Hero 渐变页滚到底：分割线略加深，在彩色背景上更易辨认 */
html:not(.dark-mode) body.hero-ambient-page:not(.footer-overlap):not(.no-footer-overlap) .Foot,
html:not(.dark-mode):not(.footer-overlap) body.hero-ambient-page:not(.no-footer-overlap) .Foot {
    border-top-color: rgba(15, 23, 42, 0.1) !important;
}

html:not(.dark-mode) body.footer-overlap .Foot,
html:not(.dark-mode).footer-overlap body .Foot {
    background: var(--color-bg-page, #ffffff) !important;
    background-color: var(--color-bg-page, #ffffff) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.06) !important;
    border-radius: 12px 12px 0 0;
}

/* 暗黑 · 滚到底：透明 + 极淡白线（与顶栏滚后分割线同系） */
html.dark-mode body.dark-mode:not(.footer-overlap):not(.no-footer-overlap) .Foot,
html.dark-mode:not(.footer-overlap) body.dark-mode:not(.no-footer-overlap) .Foot {
    background: transparent !important;
    background-color: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html.dark-mode body.dark-mode.hero-ambient-page:not(.footer-overlap) .foot-meta,
html.dark-mode body.dark-mode.hero-ambient-page:not(.footer-overlap) .foot-copy,
html.dark-mode body.dark-mode.hero-ambient-page:not(.footer-overlap) .foot-slogan-main,
html.dark-mode:not(.footer-overlap) body.dark-mode.hero-ambient-page .foot-meta,
html.dark-mode:not(.footer-overlap) body.dark-mode.hero-ambient-page .foot-copy,
html.dark-mode:not(.footer-overlap) body.dark-mode.hero-ambient-page .foot-slogan-main {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

html.dark-mode body.dark-mode.footer-overlap .Foot,
html.dark-mode.footer-overlap body.dark-mode .Foot {
    background: var(--dm-page-bg, #111111) !important;
    background-color: var(--dm-page-bg, #111111) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.055) !important;
    box-shadow: none !important;
    border-radius: 12px 12px 0 0;
}

html.dark-mode body.dark-mode.hero-ambient-page.footer-overlap .Foot,
html.dark-mode.footer-overlap body.dark-mode.hero-ambient-page .Foot {
    background: var(--dm-index-canvas, #111111) !important;
    background-color: var(--dm-index-canvas, #111111) !important;
}

html.dark-mode body.dark-mode.footer-overlap .foot-meta,
html.dark-mode body.dark-mode.footer-overlap .foot-copy,
html.dark-mode body.dark-mode.footer-overlap .foot-slogan-main,
html.dark-mode.footer-overlap body.dark-mode .foot-meta,
html.dark-mode.footer-overlap body.dark-mode .foot-copy,
html.dark-mode.footer-overlap body.dark-mode .foot-slogan-main {
    text-shadow: none !important;
}
