/* 共享导航栏样式 */

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    transition: color 0.3s ease;
}

.logo-link:hover .logo-text {
    color: #007aff;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #007aff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007aff;
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 4px;
    transition: all 0.3s ease;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #1d1d1f;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle:hover span {
    background: #007aff;
}

/* 移动端导航菜单动画 */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 移动端样式 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 130px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .language-selector {
        position: fixed;
        top: 70px;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        z-index: 1001;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 8px;
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .language-selector.visible {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .language-btn {
        width: 80px;
        text-align: center;
        padding: 10px 16px;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
        text-align: center;
        font-size: 1.1rem;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .nav-container {
        padding: 0 16px;
    }
}

/* 导航栏滚动效果 */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* 活跃状态的导航链接 */
.nav-link.active {
    color: #007aff;
}

.nav-link.active::after {
    width: 100%;
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .nav-container {
        height: 60px;
    }
    
    .logo {
        height: 32px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .nav-menu {
        top: 60px;
    }
}
