/* ================= 藏真在线 统一导航栏样式 ================= */
/* 与 shared.css 中 :root 品牌色一致；印章/网课/云签仅加载本文件，故变量需保留在此 */
:root {
    --apple-bg: #f5f5f7;
    --apple-card: #ffffff;
    --apple-text: #1d1d1f;
    --apple-text-muted: #86868b;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
}

/* 顶栏外壳：透明全宽，左右留白；实际白条为内层 .nav-content 圆角卡片（与印章/网课/云签一致） */
.top-nav {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: sticky;
    top: 0;
    z-index: 1000; /* 确保在最上层 */
    display: flex;
    justify-content: center;
    padding: 16px 24px 12px;
    border-bottom: none !important;
}
/* ==========================================
       下拉菜单样式 (高级毛玻璃效果)
       ========================================== */
    .nav-dropdown { position: relative; display: inline-flex; }
    .dropdown-trigger { cursor: pointer; gap: 4px; }
    .nav-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 12px; }
    .dropdown-menu {
        position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-10px);
        background: rgba(255, 255, 255, 0.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-radius: 14px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); border: 1px solid rgba(0,0,0,0.05);
        padding: 6px; display: flex; flex-direction: column; gap: 4px; opacity: 0; visibility: hidden;
        transition: all 0.3s cubic-bezier(0.2, 0.85, 0.32, 1.2); min-width: 120px; z-index: 200;
    }
    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
    .dropdown-item { text-decoration: none; color: var(--apple-text); padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; transition: all 0.2s ease; text-align: center; white-space: nowrap; }
    .dropdown-item:hover { background: rgba(0, 0, 0, 0.05); }
    .dropdown-item.active { background: white; box-shadow: 0 1px 4px rgba(0,0,0,0.08); color: var(--apple-blue); }
.nav-content {
    width: 100%;
    max-width: 1040px; /* 强制统一容器宽度 */
    height: 56px !important;
    padding: 0 24px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-logo img { width: 24px; height: 24px; border-radius: 6px; }
.nav-logo span {
    max-width: 240px; /* 统一文字限宽，防止挤压 */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0 !important;
}

.nav-links {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.06) !important;
    padding: 4px !important;
    border-radius: 99px !important;
    flex-shrink: 0 !important;
}

/* 核心：强制所有页面按钮宽度一致 */
.nav-link.as-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px !important;
    font-weight: 500;
    color: var(--apple-text) !important;
    border-radius: 99px;
    transition: all 0.3s ease;
    min-height: 36px;
    height: 36px;
    width: 130px !important; /* 关键数值 */
    padding: 0 12px !important;
    box-sizing: border-box !important;
}

.nav-link.active {
    background: white !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px !important;
    padding: 0 16px !important;
    border-radius: 999px;
    background: var(--apple-blue) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 200px; /* 防止超长邮箱撑爆导航栏 */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.nav-login:hover {
    background: var(--apple-blue-hover) !important;
    transform: scale(0.98);
}

/* 响应式：三页面必须共用一套逻辑 */
@media (max-width: 800px) {
    .nav-link.as-link { width: 100px !important; font-size: 13px !important; }
}

@media (max-width: 640px) {
    .top-nav {
        padding: 12px 12px 8px;
    }
    .nav-content {
        flex-direction: column !important;
        padding: 16px 12px !important;
        height: auto !important;
        gap: 14px !important;
        border-radius: 16px;
    }
    .nav-right {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }
}

/* 与 index.html 对齐：VIP 深色按钮 + 金色边框 + hover 按压反馈 */
.nav-login.nav-vip {
    background: #1c1c1e !important;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 0 14px !important;
}

.nav-login.nav-vip:hover {
    background: #2c2c2e !important;
    border-color: rgba(212, 175, 55, 0.5);
}