/* ============================================================
   common.css — 全站公共「导航栏」与「页脚」样式
   首页 / 用户后台 / 登录 / 注册 / 改密 五个前端页统一引用
   说明：导航栏与页脚的样式只在本文件维护，修改一处即全站生效，
        以保证各前端页的导航栏、页脚始终一致、保持不变。
   ============================================================ */

/* ===================== 顶部导航栏 ===================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.nav-inner {
    max-width: none;
    margin: 0 auto;
    height: 46px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    position: relative;
}
.nav-logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
}
.nav-logo {
    height: 32px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}
.nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
    z-index: 1;
}
.nav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    flex-shrink: 0;
    z-index: 2;
}
.nav-login {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, .25);
    background: transparent;
    transition: all .2s;
    white-space: nowrap;
}
.nav-login:hover {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
}
.user-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}
.user-bar .user-name {
    color: rgba(255, 255, 255, .9);
    font-weight: 600;
}
.user-bar .user-link {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 6px;
    background: transparent;
    transition: all .2s;
}
.user-bar .user-link:hover {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
}
.logout-form { display: inline-flex; margin: 0; padding: 0; }
.logout-form .user-link,
.logout-form .sidebar-logout,
.logout-form .side-btn {
    font: inherit;
    cursor: pointer;
}
.logout-form .user-link { appearance: none; }
.nav-auth-btns { display: flex; align-items: center; gap: 10px; }
.nav-register {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    transition: all .2s;
}
.nav-register:hover { background: rgba(255, 255, 255, .28); color: #fff; }

/* ===================== 页脚 ===================== */
.site-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: rgba(255, 255, 255, .85);
    padding: 12px 24px;
    margin-top: 0;
}
/* 跟随鼠标的动态光晕 */
.footer-cursor-glow {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 68%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .35s;
}
.site-footer:hover .footer-cursor-glow { opacity: 1; }
/* 页脚 LOGO 绝对定位靠左（相对整个页脚，最左上角） */
.footer-logo-wrap {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.footer-logo {
    height: 38px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}
.site-footer .footer-inner {
    position: relative;
    z-index: 1;
    max-width: 1500px;
    margin: 0 auto;
    text-align: center;
}
.footer-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .95);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    display: inline-block;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 8px;
    margin-bottom: 6px;
}
/* 胶囊按钮：半透明背景框 + hover 上浮发光扫光 */
.footer-links a {
    position: relative;
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
    font-size: 12px;
    line-height: 18px;
    overflow: hidden;
    transition: all .25s ease;
}
.footer-links a:hover {
    background: #fff;
    border-color: #fff;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 60, 160, .35);
}
/* 鼠标扫光特效 */
.footer-links a::after {
    content: '';
    position: absolute;
    top: 0; left: -70%;
    width: 45%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
    transform: skewX(-20deg);
    transition: left .55s ease;
}
.footer-links a:hover::after {
    left: 130%;
}
.footer-copy {
    color: rgba(255, 255, 255, .5);
    font-size: 11px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}
@media (max-width: 600px) {
    .site-footer { padding: 16px 14px; }
    .footer-links { gap: 6px 14px; }
    .footer-logo-wrap { display: none; }
}
