/* ========================================
   NCDA - Global Navigation Bar (优化?
   ======================================== */

.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: linear-gradient(
        180deg,
        rgba(255, 253, 248, 0.55) 0%,
        rgba(255, 250, 245, 0.48) 100%
    );
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid rgba(212, 168, 83, 0.15);
    box-shadow:
        0 4px 24px rgba(139, 115, 85, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.global-nav.visible {
    transform: translateY(0);
}

/* 顶部触发区域 */
.global-nav-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 25px;
    z-index: 9998;
}

/* Logo区域 */
.global-nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #5c4033;
    font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    position: relative;
}

.global-nav-logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4a853, #a6661a);
    transition: width 0.4s ease;
}

.global-nav-logo:hover {
    color: #a6661a;
}

.global-nav-logo:hover::after {
    width: 100%;
}

.global-nav-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(92, 64, 51, 0.15));
    transition: transform 0.3s ease;
}

.global-nav-logo:hover img {
    transform: scale(1.05) rotate(-3deg);
}

/* 导航链接容器 */
.global-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 导航链接 */
.global-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: #5c5248;
    font-size: 13px;
    font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    border-radius: 25px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.global-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.12), rgba(166, 102, 26, 0.06));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.global-nav-link:hover {
    color: #3d3229;
    transform: translateY(-1px);
    background: rgba(212, 168, 83, 0.1);
}

.global-nav-link:hover::before {
    opacity: 1;
}

.global-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #c4843c 0%, #a6661a 100%);
    box-shadow: 0 2px 12px rgba(166, 102, 26, 0.25);
}

.global-nav-link.active::before {
    display: none;
}

.global-nav-link.active .global-nav-dir {
    border-color: rgba(255, 255, 255, 0.7);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

/* 方位标识 */
.global-nav-dir {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 1.5px solid;
    transition: all 0.3s ease;
    position: relative;
}

.global-nav-dir::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0;
    transition: all 0.3s ease;
}

.global-nav-link:hover .global-nav-dir::after {
    opacity: 0.4;
    inset: -4px;
}

.global-nav-link[data-dir="north"] .global-nav-dir {
    color: #3a8fb7;
    border-color: rgba(58, 143, 183, 0.5);
    background: rgba(58, 143, 183, 0.1);
}

.global-nav-link[data-dir="east"] .global-nav-dir {
    color: #c4a35a;
    border-color: rgba(196, 163, 90, 0.5);
    background: rgba(196, 163, 90, 0.1);
}

.global-nav-link[data-dir="south"] .global-nav-dir {
    color: #5d8c5d;
    border-color: rgba(93, 140, 93, 0.5);
    background: rgba(93, 140, 93, 0.1);
}

.global-nav-link[data-dir="west"] .global-nav-dir {
    color: #b8835f;
    border-color: rgba(184, 131, 95, 0.5);
    background: rgba(184, 131, 95, 0.1);
}

/* 分隔?*/
.global-nav-divider {
    width: 1px;
    height: 20px;
    background: linear-gradient(180deg, transparent, rgba(92, 64, 51, 0.15), transparent);
    margin: 0 8px;
}

/* 返回首页按钮 */
.global-nav-home {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    text-decoration: none;
    color: #5c5248;
    font-size: 13px;
    font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    border-radius: 25px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.global-nav-home:hover {
    color: #3d3229;
    background: rgba(212, 168, 83, 0.1);
    transform: translateY(-1px);
}

.global-nav-home.active {
    color: #a6661a;
    font-weight: 600;
}

.global-nav-home svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.global-nav-home:hover svg {
    transform: scale(1.1);
}

/* 当前页面指示器（小竖线） - 已禁?*/
/*.global-nav-link::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 16px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.global-nav-link.active::after {
    transform: translateY(-50%) scaleY(1);
}*/

/* 页面名称 */
.global-nav-link span:last-child {
    position: relative;
}

.global-nav-link span:last-child::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #a6661a;
    transition: width 0.3s ease;
}

.global-nav-link:hover span:last-child::after {
    width: 100%;
}

.global-nav-link.active span:last-child::after {
    display: none;
}

/* 响应?*/
@media (max-width: 768px) {
    .global-nav {
        padding: 0 16px;
        height: 56px;
    }

    .global-nav-logo span {
        display: none;
    }

    .global-nav-links {
        gap: 2px;
        padding: 4px 8px;
    }

    .global-nav-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    .global-nav-link span:last-child {
        display: none;
    }

    .global-nav-divider {
        margin: 0 4px;
    }

    .global-nav-home {
        padding: 6px 10px;
    }

    .global-nav-home span {
        display: none;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .global-nav-trigger {
        height: 45px;
    }
}

/* 加载动画 */
@keyframes navSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.global-nav.visible {
    transform: translateY(0);
}
