/* =============================================
   Candy Theme — 页脚（对齐 footer-final.html）
   主结构复用 layout.css 的 footer.site / .ft-inner /
   .ft-brand / .ft-links / .ft-social / .ft-bottom
   （设计系统标准答案，零裸 hex，颜色全走 Token）。
   本文件只补充：分栏挂件(.ft-cols) / 变体配色 /
   返回顶部 / 移动端底栏 / 友链菜单(组件安全保留)。
   ============================================= */

/* 分栏挂件容器（后台 footer_col1..N 位置） */
.ft-cols {
    display: grid;
    gap: 20px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 24px 32px 0;
}
.ft-col { min-width: 0; }

/* 快速导航 / 友链 列表（.ft-* 与组件 .footer-* 同形，统一保留） */
.ft-menu-list,
.footer-menu-list,
.ft-friend-list,
.footer-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ft-menu-list a,
.footer-menu-list a,
.ft-friend-list a,
.footer-links-list a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition-fast);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ft-menu-list a:hover,
.footer-menu-list a:hover,
.ft-friend-list a:hover,
.footer-links-list a:hover { color: var(--gold); }
.ft-friend-logo,
.footer-link-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}
.ft-friend-list li,
.footer-links-list li {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 底部版权栏文字（.ft-bottom 基础样式在 layout.css） */
.ft-copy { color: var(--muted); }
.ft-icp,
.ft-stats { color: var(--faint); font-size: 12px; }

/* 返回顶部按钮 — 暖金实心（保留原有功能） */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .3s;
    box-shadow: 0 4px 12px rgba(var(--gold-rgb), .3);
    z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover {
    background: var(--gold-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(var(--gold-rgb), .4);
}

/* 移动端底部导航（零内联，class 驱动） */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    z-index: 99;
    padding: 6px 0;
    justify-content: space-around;
}
.mobile-bottom-nav .mb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: var(--muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}
.mobile-bottom-nav .mb-item svg { width: 18px; height: 18px; }

/* 页脚配色变体（后台 footer_style：light 默认 / dark / accent）
   light = footer-final.html 标准（layout.css 已定义）；
   dark / accent 仅覆盖 .ft-* 颜色，保持设置可用（禁五不写死开关）。 */
.site.footer-style-dark { background: var(--ink); color: var(--faint); }
.site.footer-style-dark .ft-brand { color: var(--bg); }
.site.footer-style-dark .ft-brand .en { color: var(--faint); }
.site.footer-style-dark .ft-links a { color: var(--muted); }
.site.footer-style-dark .ft-links a:hover { color: var(--gold); }
.site.footer-style-dark .ft-bottom { color: var(--faint); border-top-color: rgba(var(--gold-rgb), .18); }
.site.footer-style-dark .ft-bottom a { color: var(--muted); }
.site.footer-style-dark .ft-social a { color: var(--muted); border-color: rgba(var(--gold-rgb), .25); }
.site.footer-style-dark .ft-social a:hover { color: var(--gold); border-color: var(--gold); }
.site.footer-style-dark .ft-col-title { color: var(--bg); border-bottom-color: rgba(var(--gold-rgb), .25); }
.site.footer-style-dark .ft-menu-list a,
.site.footer-style-dark .ft-friend-list a,
.site.footer-style-dark .footer-menu-list a,
.site.footer-style-dark .footer-links-list a { color: var(--muted); }
.site.footer-style-dark .ft-menu-list a:hover,
.site.footer-style-dark .ft-friend-list a:hover,
.site.footer-style-dark .footer-menu-list a:hover,
.site.footer-style-dark .footer-links-list a:hover { color: var(--gold); }

.site.footer-style-accent { background: var(--gold); color: var(--on-accent); }
.site.footer-style-accent .ft-brand { color: var(--on-accent); }
.site.footer-style-accent .ft-brand .en { color: var(--on-accent-soft); }
.site.footer-style-accent .ft-links a { color: var(--on-accent); }
.site.footer-style-accent .ft-links a:hover { color: var(--bg); }
.site.footer-style-accent .ft-bottom { color: var(--on-accent-soft); border-top-color: var(--on-accent-line); }
.site.footer-style-accent .ft-bottom a { color: var(--on-accent); }
.site.footer-style-accent .ft-social a { color: var(--on-accent); border-color: var(--on-accent-line); }
.site.footer-style-accent .ft-social a:hover { color: var(--bg); border-color: var(--bg); }
.site.footer-style-accent .ft-col-title { color: var(--on-accent); border-bottom-color: var(--on-accent-line); }
.site.footer-style-accent .ft-menu-list a,
.site.footer-style-accent .ft-friend-list a,
.site.footer-style-accent .footer-menu-list a,
.site.footer-style-accent .footer-links-list a { color: var(--on-accent); }
.site.footer-style-accent .ft-menu-list a:hover,
.site.footer-style-accent .ft-friend-list a:hover,
.site.footer-style-accent .footer-menu-list a:hover,
.site.footer-style-accent .footer-links-list a:hover { color: var(--bg); }

/* 响应式 */
@media (max-width: 768px) {
    .ft-cols { grid-template-columns: 1fr !important; padding: 16px 20px 0; }
    .mobile-bottom-nav { display: flex !important; }
    body { padding-bottom: 50px; }
    .back-to-top { bottom: 64px; }
}
