/**
 * 导航栏样式
 * 实现悬浮导航栏的样式，包括响应式设计
 */

/* 导航栏基础样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 滚动后的导航栏样式 */
.navbar.scrolled {
    height: 60px;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* 导航栏容器 */
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 15px;
}

/* Logo样式 */
.navbar-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
	font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

.navbar-logo:hover {
    color: var(--secondary-color);
    transform: scale(1.05);
}

/* 导航菜单 */
.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-item {
    margin: 0 5px;
}

.navbar-link {
    display: block;
    padding: 8px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
}

.navbar-link:hover {
    color: var(--primary-color);
}

.navbar-link.active {
    color: var(--primary-color);
}

.navbar-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* 移动端菜单按钮 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.navbar-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px 0;
    }

    .navbar.scrolled .navbar-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-item {
        width: 100%;
        margin: 0;
    }

    .navbar-link {
        padding: 15px 25px;
        width: 100%;
        text-align: left;
        border-radius: 0;
    }

    .navbar-link.active::after {
        left: 25px;
        bottom: 12px;
        transform: none;
        width: 15px;
    }
}

/* 调整页面内容，避免被固定导航栏遮挡 */
body {
    padding-top: 70px;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}