/* 侧滑菜单 - 优化版 */

/* 隐藏 Logo 图标，用菜单按钮替代 */
.logo-icon {
    display: none !important;
}

/* 菜单按钮样式 */
.menu-toggle {
    display: block !important;
    order: 0;
    margin-right: 0.5rem;
}

/* 导航栏布局 */
nav {
    display: flex;
    align-items: center;
}

.logo {
    order: 1;
    margin-right: auto;
}

/* 侧滑菜单容器 - 从标题栏下方开始 */
.nav-links {
    position: fixed;
    top: 80px;
    left: -300px;
    width: 300px;
    height: calc(100vh - 80px);
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 1rem;
    border-right: none;
    gap: 0.5rem;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    display: flex;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 15px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 15px), transparent 100%);
}

.light-mode .nav-links {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.1);
}

.nav-links.active {
    left: 0;
}

/* 菜单项样式 */
.nav-links a {
    padding: 1rem 1.5rem !important;
    width: 100%;
    text-align: center !important;
    font-size: 1.05rem !important;
    font-weight: 500;
    transition: all 0.2s ease;
    display: block !important;
    box-sizing: border-box;
    border-radius: 16px;
    text-decoration: none !important;
    color: var(--text);
}

.nav-links a::after {
    display: none !important;
}

.nav-links a:hover {
    background-color: rgba(245, 158, 11, 0.15);
    transform: scale(1.02);
}

.nav-links a.active {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--primary) !important;
}

.nav-links a:last-child {
    border-bottom: none;
}

/* 遮罩层 - 从标题栏下方开始 */
.nav-overlay {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 80px);
    background-color: transparent;
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

.nav-overlay.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nav-actions {
    order: 3;
    margin-left: auto;
}

@media (max-width: 768px) {
    .nav-actions { gap: 0.3rem !important; }
    .nav-actions .user-id-text { display: none; }
    .nav-actions .btn { padding: 0.5rem 0.8rem !important; font-size: 0.85rem !important; }
    .nav-actions .btn-manage { display: none; }
    .nav-actions .user-avatar { width: 30px !important; height: 30px !important; font-size: 0.9rem !important; }
    .nav-actions .theme-toggle { width: 2rem !important; height: 2rem !important; font-size: 1rem !important; }
}

@media (max-width: 480px) {
    .nav-actions .btn { padding: 0.4rem 0.6rem !important; font-size: 0.8rem !important; }
    .nav-links { width: 280px; left: -280px; }
}
