/* 作者专区 - 侧边栏样式 */

.author-sidebar {
    width: 250px;
    background-color: #fff;
    border-radius: 10px;
    padding: 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px); /* 与主内容区域保持一致的最小高度 */
    flex-shrink: 0; /* 防止侧边栏收缩 */
}

.sidebar-content {
    padding: 20px 0;
    flex: 1; /* 填充剩余高度 */
    display: flex;
    flex-direction: column;
}

.menu-title {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 20px 10px 20px;
    margin-top: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}

.menu-title:first-child {
    margin-top: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0; /* 添加底部间距 */
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background-color: #f8f9fa;
    color: #5D9968;
    border-left-color: #5D9968;
}

.sidebar-menu a.active {
    background-color: #f0f7f2;
    color: #5D9968;
    border-left-color: #5D9968;
    font-weight: 500;
}

.sidebar-menu a i {
    margin-right: 12px;
    font-size: 16px;
    width: 16px;
    text-align: center;
}

/* 侧边栏底部留白区域，确保最后一个菜单项与底部有距离 */
.sidebar-spacer {
    flex: 1;
    min-height: 20px;
}

/* 移动端侧边栏 */
@media (max-width: 768px) {
    .author-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0;
        border: none;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        min-height: 100vh;
    }
    
    .author-sidebar.mobile-open {
        left: 0;
    }
    
    .mobile-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .mobile-sidebar-overlay.show {
        display: block;
    }
    
    .mobile-sidebar-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background-color: #5D9968;
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: 18px;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-toggle:hover {
        background-color: #4C8055;
        transform: scale(1.05);
    }
}