/* 侧边栏式汉堡包菜单样式 */

/* 遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 侧边栏容器 */
.sidebar-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar-nav.active {
    left: 0;
}

/* 侧边栏头部 */
.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #0f52ba 0%, #0056b3 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-logo i {
    font-size: 24px;
}

/* 关闭按钮 */
.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 侧边栏菜单 */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-menu a:hover {
    background: #f8f9fa;
    color: #0f52ba;
    padding-left: 25px;
}

.sidebar-menu a.active {
    background: #e3f2fd;
    color: #0f52ba;
    border-left: 4px solid #0f52ba;
}

/* 菜单图标 */
.sidebar-menu i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

/* 汉堡包按钮 */
.hamburger-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #0056b3;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    display: none;
}

.hamburger-btn:hover {
    background: #f8f9fa;
    color: #003d82;
    border-color: #adb5bd;
}

.hamburger-btn:active {
    transform: scale(0.95);
}

/* 移动端显示 */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
    
    /* 隐藏原来的导航菜单 */
    .navbar .nav-menu {
        display: none !important;
    }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .sidebar-nav {
        width: 280px;
        left: -280px;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-menu a {
        padding: 12px 15px;
        font-size: 15px;
    }
}

/* 动画效果 */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* 菜单项动画 */
.sidebar-menu li {
    animation: slideInLeft 0.3s ease forwards;
}

.sidebar-menu li:nth-child(1) { animation-delay: 0.1s; }
.sidebar-menu li:nth-child(2) { animation-delay: 0.2s; }
.sidebar-menu li:nth-child(3) { animation-delay: 0.3s; }
.sidebar-menu li:nth-child(4) { animation-delay: 0.4s; }
.sidebar-menu li:nth-child(5) { animation-delay: 0.5s; }
.sidebar-menu li:nth-child(6) { animation-delay: 0.6s; }