/* Mobile Navigation Styles */

/* 移动端顶部导航栏 */
#mobile-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 平板端：窄侧边栏，只显示图标 */
@media (min-width: 768px) and (max-width: 1023px) {
    aside {
        width: 80px !important; /* 窄侧边栏 */
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        overflow-x: hidden; /* 防止内容溢出 */
    }
    
    /* 隐藏所有文字，只保留图标 - 使用更精确的选择器 */
    aside span:not([class*="ph"]):not([class*="material-symbols"]),
    aside h3 {
        display: none !important;
    }
    
    /* 确保图标显示 */
    aside i,
    aside .ph,
    aside .material-symbols-outlined {
        display: inline-block !important;
    }
    
    /* 调整导航链接样式 */
    aside nav a {
        justify-content: center !important;
        padding: 0.75rem !important;
    }
    
    /* 头像区域只显示头像，居中显示 */
    aside > div:first-child {
        padding: 1rem 0.5rem !important;
    }
    
    aside > div:first-child > div:first-child {
        margin-bottom: 2rem;
        justify-content: center !important;
    }
    
    aside > div:first-child > div:first-child > div:last-child {
        display: none !important;
    }
    
    /* 底部按钮区域调整 */
    aside > div:last-child {
        flex-direction: column !important;
        gap: 0.5rem;
        padding: 0.5rem !important;
        align-items: center;
    }
    
    /* 主题切换按钮 */
    aside > div:last-child > button {
        margin: 0 !important;
    }
    
    /* 语言切换按钮调整 */
    aside > div:last-child > div {
        flex-direction: column !important;
        gap: 0.25rem;
        width: 100%;
        padding: 0.25rem !important;
    }
    
    aside > div:last-child > div button {
        padding: 0.5rem 0.25rem !important;
        font-size: 10px !important;
        width: 100%;
    }
}

/* 手机端：隐藏侧边栏，使用下拉菜单 */
@media (max-width: 767px) {
    /* 隐藏桌面端侧边栏 */
    aside {
        display: none !important;
    }
    
    /* 主内容区域在移动端占满宽度，并留出顶部导航栏的空间 */
    main {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 80px !important; /* 为顶部导航栏留出空间 (64px + 16px) */
    }
}

/* 平板端和桌面端隐藏移动端顶部导航栏和遮罩层 */
@media (min-width: 768px) {
    #mobile-header,
    #mobile-overlay,
    #mobile-menu {
        display: none !important;
    }
}

/* 汉堡菜单按钮动画 */
#mobile-menu-btn {
    transition: all 0.2s ease;
}

#mobile-menu-btn:active {
    transform: scale(0.95);
}

/* 遮罩层动画 */
#mobile-overlay {
    transition: opacity 0.3s ease;
}

#mobile-overlay:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
