/* 导航栏样式 */
nav {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sidebar {
    display: none;
}

.overlay {
    display: none;
}

.nav-container {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
}


.nav-container-mobile {
    display: none;
}


.nav-container .nav-logo {
    margin-left: 5%;
}

.nav-container .nav-logo img {
    height: 40px;
    width: auto;
}

.nav-container .nav-links {
    display: flex;
    margin-left: 7%;
    height: 100%;
    list-style: none;
}

.nav-container .nav-links a {
    height: 100%;
    width: 120px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-container .nav-links a:hover {
    background-color: #FFE4E9;
}

.nav-container .nav-auth {
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: auto;
    margin-right: 5%;
}

.nav-container .nav-auth a {
    height: 100%;
    width: 120px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-container .nav-auth a:hover {
    background-color: #FFE4E9;
}

/* 移动端nav */
.nav-container-mobile .nav-logo {
    margin-left: 0;
}

.nav-container-mobile .nav-logo img {
    height: 40px;
    width: auto;
}

.nav-container-mobile .nav-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.nav-container-mobile .nav-menu-btn:hover {
    transform: scale(1.1);
}

.nav-container-mobile .nav-menu-btn img {
    width: 24px;
    height: 24px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        display: none;
    }

    .nav-container-mobile {
        display: flex;
        width: 100%;
        height: 60px;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        box-sizing: border-box;
    }

    /* 侧边栏基础样式 - 在移动端显示 */
    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        max-width: 80%;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
        z-index: 1100;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        border-radius: 8px 0 0 8px;
        box-sizing: border-box;
    }
    
    .sidebar.active {
        right: 0;
    }
    
    .sidebar-header {
        height: 60px;
        padding: 0 20px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #fafafa;
    }
    
    .sidebar-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #666;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s ease;
    }
    
    .sidebar-close:hover {
        background-color: #f0f0f0;
        color: #333;
        transform: rotate(90deg);
    }
    
    .sidebar-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .sidebar-links li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .sidebar-links a {
        display: block;
        padding: 16px 20px;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }
    
    .sidebar-links a:hover {
        background-color: #FFE4E9;
        border-left-color: #ff6b9d;
        padding-left: 23px;
    }
    
    .sidebar-auth {
        padding: 20px;
        margin-top: 20px;
    }
    
    .sidebar-auth a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px 20px;
        color: #333;
        background-color: #f5f5f5;
        text-decoration: none;
        font-size: 16px;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
        font-weight: 500;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .sidebar-auth a img {
        width: 24px;
        margin-right: 10px;
    }
    
    .sidebar-auth a:hover {
        background-color: #FFE4E9;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* 遮罩层 - 在移动端显示 */
    .overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
}