/* ============================================
   组件：站点底部
   依赖：themes/*.css
   ============================================ */

.app-footer {
    margin-top: 3rem;
    padding: 2rem 1rem;
    background: var(--app-surface);
    border-top: 1px solid var(--app-border);
    color: var(--app-text-muted);
    font-size: .85rem;
    /* 移动端底部安全区（iPhone 横条） */
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.app-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    text-align: center;
}

.app-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.app-footer__links a {
    color: var(--app-text-muted);
}
.app-footer__links a:hover {
    color: var(--app-accent);
}

.app-footer__copy {
    margin: 0;
    font-size: .8rem;
    opacity: .85;
}

/* 回到顶部按钮 */
.to-top {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 1020;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--app-border);
    border-radius: 50%;
    background: var(--app-surface);
    color: var(--app-text-muted);
    box-shadow: var(--app-shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s,
                color .15s ease, border-color .15s ease;
}
.to-top.is-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.to-top:hover {
    color: var(--app-accent);
    border-color: var(--app-accent);
}

@media (min-width: 768px) {
    .app-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}
