How do I customize the search results?

I need to know how to incorporate the search results from the Google Custom Search into my client’s existing site design, and using our existing styled search bar. Right now, the search bar is just displaying the results in what looks like a separate page, without our website’s CSS styles. I’ve search the community but haven’t found any helpful solutions. The embed code in your examples looks really different than what Google is providing me:


(function() {

var cx = ‘015581385104005164796:bidnajnteua’;

var gcse = document.createElement(‘script’:wink:;

gcse.type = ‘text/javascript’;

gcse.async = true;

gcse.src = (document.location.protocol == ‘https:’ ? ‘https:’ : ‘http:’:wink: +

‘//’ + cx;

var s = document.getElementsByTagName(‘script’:wink:[0];

s.parentNode.insertBefore(gcse, s);