/* ============================================================
 * qqshiye 全站公共顶部 nav 样式（方案 A）
 *
 * 从global-vision index.php 抽取，所有子站统一引用
 * 配套使用：<link rel="stylesheet" href="/css/nav.css">
 * 配套组件：/includes/nav.php
 *
 * 设计基调：暗色电影感（与global-vision主站一致）
 * 颜色用项目统一 CSS 变量（--moon-white / --horizon-gold / --mist-blue）
 * ============================================================ */

/* nav 容器 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* 必须高于登录浮层(.qq-login-layer z-index:80)，浮层打开时菜单仍可点击 */
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 2rem;
    padding: clamp(0.9rem, 2vh, 1.25rem) 4vw;
    /* 常驻极淡顶部压暗渐变：不破坏沉浸感，又压出地球背景上的可读性 */
    background: linear-gradient(to bottom,
        rgba(6, 10, 16, 0.62) 0%,
        rgba(6, 10, 16, 0.28) 62%,
        transparent 100%);
    transition: background-color 0.45s ease, box-shadow 0.45s ease;
}

/* 滚动后：实底加深 + 底缘发丝分割 */
.nav.is-scrolled {
    background-color: rgba(8, 13, 20, 0.88);
    box-shadow:
        0 1px 0 rgba(147, 168, 189, 0.12),
        0 12px 32px rgba(4, 8, 14, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* 品牌字样：衬线小字 + 轻辉光 */
.nav__brand {
    font-family: var(--serif-cn, "Songti SC", "STSong", "SimSun", serif);
    font-weight: 500;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    letter-spacing: 0.32em;
    color: var(--moon-white, #e8eef5);
    text-decoration: none;
    text-shadow:
        0 0 14px rgba(147, 168, 189, 0.4),
        0 0 40px rgba(147, 168, 189, 0.16);
    white-space: nowrap;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 2.2vw, 2.2rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    position: relative;
    display: inline-block;
    padding: 0.3em 0;
    font-size: clamp(0.72rem, 1vw, 0.8rem);
    letter-spacing: 0.18em;
    color: rgba(200, 214, 228, 0.78);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.35s ease, text-shadow 0.35s ease;
}

/* 下方细金线：悬停/激活时自中心生长 */
.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(217, 179, 132, 0.85) 50%,
        transparent);
    transform: scaleX(0);
    transition: transform 0.35s ease;
}

.nav__link:hover {
    color: var(--horizon-gold, #d9b384);
    text-shadow: 0 0 14px rgba(217, 179, 132, 0.35);
}
.nav__link:hover::after { transform: scaleX(1); }

/* 当前页激活态 */
.nav__link.is-active {
    color: var(--horizon-gold, #d9b384);
}
.nav__link.is-active::after { transform: scaleX(1); }

/* 窄屏：品牌与菜单上下两行，菜单条横向可滑不折行不重叠 */
@media (max-width: 720px) {
    .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        padding: 0.8rem 5vw 0.55rem;
    }
    .nav__brand { text-align: center; }
    .nav__menu {
        gap: 1.15rem;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        scrollbar-width: none;
    }
    .nav__menu::-webkit-scrollbar { display: none; }
}

/* 减弱动态偏好：导航取消过渡 */
@media (prefers-reduced-motion: reduce) {
    .nav, .nav__link, .nav__link::after { transition: none; }
}

/* ============================================================
 * nav 右侧登录/用户区（#navAuth 由 /js/auth.js 渲染）
 * 极简版：未登录显示「登录」按钮，已登录显示「已登录」+ 下拉「退出登录」
 * ============================================================ */
#navAuth { display: inline-flex; align-items: center; }
#navAuth .n-btn-out {
    display: inline-block;
    color: #d9b384;
    background: transparent;
    border: 1px solid #d9b384;
    padding: 4px 13px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
    transition: .2s;
    cursor: pointer;
    text-decoration: none;
}
#navAuth .n-btn-out:hover { background: rgba(217, 179, 132, 0.12); }
#navAuth .n-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    border-radius: 18px;
    cursor: pointer;
    transition: .2s;
    margin-left: 4px;
}
#navAuth .n-user:hover { background: rgba(147, 168, 189, 0.10); }
#navAuth .n-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0;
}
#navAuth .n-name {
    font-size: 12px;
    color: rgba(200, 214, 228, 0.78);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
#navAuth .n-arrow {
    font-size: 10px;
    color: #93a8bd;
    transition: .2s;
}
#navAuth .n-user:hover .n-arrow { color: #d9b384; }
#navAuth .n-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: rgba(11, 17, 24, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(147, 168, 189, 0.18);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(4, 8, 14, 0.65);
    padding: 4px 0;
    display: none;
    z-index: 1000;
}
#navAuth .n-menu.on { display: block; }
#navAuth .n-menu-item {
    display: block;
    padding: 8px 14px;
    font-size: 12px;
    color: #e8eef5;
    text-decoration: none;
    transition: .15s;
    cursor: pointer;
    letter-spacing: 0.06em;
}
#navAuth .n-menu-item:hover {
    background: rgba(217, 179, 132, 0.10);
    color: #d9b384;
}
#navAuth .n-menu-div {
    height: 1px;
    background: rgba(147, 168, 189, 0.18);
    margin: 4px 0;
}

/* 下载客户端按钮 */
#navAuth .n-btn-dl {
    display: inline-block;
    color: #e8eef5;
    background: rgba(29, 79, 145, 0.6);
    border: 1px solid rgba(147, 168, 189, 0.3);
    padding: 4px 13px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    transition: .2s;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.06em;
}
#navAuth .n-btn-dl:hover {
    background: rgba(29, 79, 145, 0.9);
    border-color: #d9b384;
    color: #d9b384;
}

/* 主站覆盖登录：透明非模态——不压暗页面、不挡菜单与页面点击 */
.qq-login-layer {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem 2rem;
    /* 容器本身不拦截鼠标，只有卡片可交互 */
    pointer-events: none;
}
.qq-login-layer[hidden] { display: none !important; }
.qq-login-mask {
    position: absolute;
    inset: 0;
    /* 透明遮罩：仅占位，不压暗背景、不挡点击（关闭走卡片内"返回主站"） */
    background: transparent;
    pointer-events: none;
}
.qq-login-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 2.5rem 2.2rem 2.2rem;
    /* 半透明毛玻璃：地球背景可透过来，文字仍清晰 */
    background: linear-gradient(180deg, rgba(11, 17, 24, 0.5) 0%, rgba(11, 17, 24, 0.4) 100%);
    border: 1px solid rgba(147, 168, 189, 0.24);
    border-radius: 4px;
    box-shadow: 0 24px 70px rgba(4, 8, 14, 0.45);
    -webkit-backdrop-filter: blur(20px) saturate(1.1);
    backdrop-filter: blur(20px) saturate(1.1);
    color: #e8eef5;
    /* 卡片恢复交互，其余区域点击穿透 */
    pointer-events: auto;
}
.qq-login-head { text-align: center; margin-bottom: 1.4rem; }
.qq-login-title {
    font-family: "Songti SC", "STSong", "SimSun", serif;
    font-weight: 500;
    font-size: 1.35rem;
    letter-spacing: 0.18em;
    margin-bottom: 0.4rem;
}
.qq-login-sub {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    color: #93a8bd;
    opacity: 0.8;
}
.qq-login-divider {
    height: 1px;
    margin: 0 0 1.4rem;
    background: linear-gradient(90deg, transparent, rgba(217, 179, 132, 0.5) 50%, transparent);
}
.qq-login-error {
    padding: 0.55rem 0.85rem;
    margin-bottom: 1rem;
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fda4af;
    font-size: 0.78rem;
}
.qq-login-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: #c3d0de;
    margin: 0.7rem 0 0.35rem;
}
.qq-login-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(232, 238, 245, 0.92);
    border: 1px solid rgba(147, 168, 189, 0.3);
    border-radius: 4px;
    color: #1a2430;
    font-size: 0.86rem;
    outline: none;
}
.qq-login-input:focus {
    border-color: rgba(217, 179, 132, 0.55);
}
.qq-login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.9rem 0 1.2rem;
    font-size: 0.76rem;
    color: rgba(210, 222, 234, 0.9);
    cursor: pointer;
}
.qq-login-submit {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    background: #d9b384;
    color: #0b1118;
    font-size: 0.92rem;
    letter-spacing: 0.28em;
    cursor: pointer;
}
.qq-login-submit:hover { filter: brightness(1.05); }
.qq-login-foot {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.76rem;
    color: rgba(160, 176, 194, 0.85);
}
.qq-login-foot a {
    color: #d9b384;
    text-decoration: none;
    border-bottom: 1px solid rgba(217, 179, 132, 0.35);
}
/* 浮层为透明非模态，不再锁定页面滚动 */
