/* 移动端导航折叠样式 */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    background: #fff;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 8px 12px;
    color: #333;
    z-index: 10001;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    z-index: 10;
}

@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
    }
    
    .mobile-close-btn {
        display: block !important;
    }
    
    /* 匹配React生成的导航 */
    [role="navigation"],
    [role="banner"] nav,
    header nav,
    nav {
        position: fixed !important;
        top: 0 !important;
        right: -320px !important;
        width: 300px !important;
        height: 100vh !important;
        background: #fff !important;
        flex-direction: column !important;
        padding: 70px 20px 20px !important;
        box-shadow: -2px 0 15px rgba(0,0,0,0.2) !important;
        transition: right 0.3s ease !important;
        z-index: 10000 !important;
        overflow-y: auto !important;
        display: flex !important;
    }
    
    [role="navigation"].mobile-open,
    [role="banner"] nav.mobile-open,
    header nav.mobile-open,
    nav.mobile-open {
        right: 0 !important;
    }
    
    [role="navigation"] a,
    [role="banner"] nav a,
    header nav a,
    nav a {
        display: block !important;
        padding: 15px 10px !important;
        border-bottom: 1px solid #eee !important;
        font-size: 16px !important;
        color: #333 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }
    
    [role="navigation"] a:hover,
    [role="banner"] nav a:hover,
    header nav a:hover,
    nav a:hover {
        color: #1890ff !important;
        background: #f5f5f5 !important;
    }
    
    /* 隐藏原来的导航栏位置 */
    [role="banner"] > div:first-child {
        flex-wrap: wrap;
    }
}
