/* ============================================================
 * top-nav.css —— 宽屏顶部文字导航栏（可复用模块）
 * 移动端隐藏，PC ≥1070px 固定顶部显示（Feed / Messages / Cart 复用）
 * 依赖：top-nav.js（填充登录态）、Login_Auth.js（window.ouserId）
 * ============================================================ */

/* 默认（移动端）隐藏 */
#pc-top-nav {
    display: none;
}

@media (min-width: 1070px) {
    /* 定位与首页 #home-header 完全一致：固定顶部、96vw 居中，
       左右 0.31rem 内边距；垂直 padding 与 #home-top-nav 对齐：
       顶部 0.21rem(header 留白) + 0.08rem(nav 自身) = 0.29rem */
    #pc-top-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 96vw;
        z-index: 1001;
        align-items: center;
        justify-content: flex-end;
        gap: 0.3rem;
        padding: 0.29rem 0.31rem 0.34rem 0.31rem;
        background: #f5f5f5;
        font-size: 0.38rem;
        box-sizing: border-box;
    }
    #pc-top-nav a {
        display: flex;
        align-items: center;
        font-size: 0.38rem;
        font-weight: 400;
        color: #333;
        text-decoration: none;
        white-space: nowrap;
        line-height: normal;
    }
    #pc-top-nav a:hover { color: #1976d2; }
    #pc-top-nav .pc-top-nav-brand {
        display: inline-flex;
        align-items: baseline;
        margin-right: auto;
        font-size: 0.38rem;
        font-weight: 400;
        color: #333;
        line-height: normal;
        white-space: nowrap;
    }
    #pc-top-nav .pc-top-nav-login {
        display: inline;
        margin-left: 0.24rem;
        font-size: 0.38rem;
        font-weight: 400;
        color: #333;
        text-decoration: none;
        line-height: normal;
        white-space: nowrap;
    }
    #pc-top-nav .pc-top-nav-login:hover { color: #1976d2; }
    #pc-top-nav .pc-top-nav-login .pc-top-nav-name { color: #bbb; }
    #pc-top-nav .pc-top-nav-login .pc-top-nav-logout {
        margin-left: 0.12rem;
        cursor: pointer;
        color: #bbb;
    }

    /* 让出固定导航栏的空间（0.29rem 顶留白 + 行高 + 0.34rem 底留白），避免遮挡页面内容 */
    body {
        padding-top: 1.08rem;
        box-sizing: border-box;
    }
    /* 宽屏：隐藏移动端底部 5Tab 导航，与顶部文字导航保持一致 */
    #bottom-nav {
        display: none !important;
    }
}
