/**
 * A.I.D.E.N. v80.0 - 全局统一顶部导航
 * 所有页面共享的导航样式
 */

.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(40px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 品牌区域 */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-logo {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.nav-title {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-title-cn {
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(102, 126, 234, 0.3);
}

.nav-version {
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #667eea;
    letter-spacing: 0.5px;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-item {
    padding: 10px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-item:hover {
    color: #fff;
    background: rgba(102, 126, 234, 0.12);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.nav-item.active {
    color: #fff;
    background: rgba(102, 126, 234, 0.12);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.2);
}

.nav-item.nav-cta {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(240, 147, 251, 0.2));
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #fff;
    margin-left: 8px;
}

.nav-item.nav-cta:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(240, 147, 251, 0.3));
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.3);
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* 响应式 */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 4px;
    }
    
    .nav-item {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(40px);
        flex-direction: column;
        padding: 20px;
        gap: 8px;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-item {
        width: 100%;
        padding: 14px 20px;
        text-align: left;
    }
    
    .nav-brand {
        gap: 10px;
    }
    
    .nav-logo {
        font-size: 1.8rem;
    }
    
    .nav-title {
        font-size: 1.3rem;
    }
    
    .nav-version {
        display: none;
    }
    
    /* 移动端底部导航栏 */
    .mobile-bottom-nav {
        display: flex;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* 移动端底部固定导航 */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(40px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 60px;
}

.mobile-nav-item .icon {
    font-size: 1.4rem;
    transition: all 0.3s;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #667eea;
    transform: translateY(-2px);
}

.mobile-nav-item.active .icon {
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.6));
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

/* 突出显示的 CTA 按钮 */
.mobile-nav-item.cta {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 8px 16px;
    color: #fbbf24;
}

.mobile-nav-item.cta .icon {
    font-size: 1.5rem;
}

.mobile-nav-item.cta:hover,
.mobile-nav-item.cta.active {
    color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.25));
    border-color: rgba(245, 158, 11, 0.5);
}

/* 移动端页面底部留白，避免内容被导航遮挡 */
@media (max-width: 768px) {
    body {
        padding-bottom: 68px;
    }
    
    /* 返回顶部按钮 */
    .back-to-top {
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        z-index: 999;
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
        border: none;
        color: #fff;
    }
    
    .back-to-top.visible {
        opacity: 1;
        visibility: visible;
    }
    
    .back-to-top:hover {
        transform: translateY(-4px);
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    }
    
    .back-to-top:active {
        transform: scale(0.95);
    }
}

@media (min-width: 769px) {
    .back-to-top {
        display: none !important;
    }
}

/* 移动端隐藏中文标题 */
@media (max-width: 768px) {
    .nav-title-cn {
        display: none;
    }
    .nav-title {
        font-size: 1.3rem;
    }
    .nav-brand {
        gap: 10px;
    }
}

/* 小屏幕进一步优化 */
@media (max-width: 480px) {
    .nav-title {
        font-size: 1.1rem;
    }
    .nav-version {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    .nav-logo {
        font-size: 1.8rem;
    }
}

