const GAME_URL="https://slotslaunch.com/iframe/20070?token=rTjzIxxxheWrotJCxhibckE7qASpPBEN1HuJQJGVNRD8CdKuRH";document.addEventListener('DOMContentLoaded',()=>{initMobileMenu();const gameLauncher=document.getElementById('gameLauncher');if(gameLauncher){initGameLauncher()} const faqAccordion=document.querySelector('.faq-accordion');if(faqAccordion){initFAQAccordion()}},{passive:!0});function initGameLauncher(){const playNowBtn=document.getElementById('playNowBtn');const playFullscreenBtn=document.getElementById('playFullscreenBtn');const gameFrame=document.getElementById('gameFrame');const gameOverlay=document.getElementById('gameOverlay');const fullscreenModal=document.getElementById('fullscreenModal');const modalClose=document.getElementById('modalClose');const modalContent=document.getElementById('modalContent');if(!playNowBtn||!playFullscreenBtn)return;const createIframe=()=>{const iframe=document.createElement('iframe');iframe.src=GAME_URL;iframe.setAttribute('allowfullscreen','');iframe.setAttribute('allow','autoplay; fullscreen');iframe.setAttribute('loading','lazy');return iframe};const loadGameInPlace=()=>{if(!gameFrame||!gameOverlay)return;gameOverlay.style.display='none';gameFrame.appendChild(createIframe())};const openFullscreenGame=()=>{if(!fullscreenModal||!modalContent)return;modalContent.appendChild(createIframe());fullscreenModal.setAttribute('aria-hidden','false');document.body.style.overflow='hidden';if(modalClose)modalClose.focus();};const closeFullscreenGame=()=>{if(!fullscreenModal||!modalContent)return;const iframe=modalContent.querySelector('iframe');if(iframe)iframe.remove();fullscreenModal.setAttribute('aria-hidden','true');document.body.style.overflow=''};playNowBtn.addEventListener('click',loadGameInPlace);playFullscreenBtn.addEventListener('click',openFullscreenGame);if(modalClose){modalClose.addEventListener('click',closeFullscreenGame)} document.addEventListener('keydown',(e)=>{if(e.key==='Escape')closeFullscreenGame();})} function initFAQAccordion(){const faqQuestions=document.querySelectorAll('.faq-question');faqQuestions.forEach((question)=>{question.addEventListener('click',function(){const isExpanded=this.getAttribute('aria-expanded')==='true';const answer=this.nextElementSibling;this.setAttribute('aria-expanded',!isExpanded);requestAnimationFrame(()=>{if(!isExpanded){answer.style.maxHeight=answer.scrollHeight+'px'}else{answer.style.maxHeight='0'}})},{passive:!0})})} function initMobileMenu(){const burgerMenu=document.getElementById('burgerMenu');const navList=document.getElementById('navList');if(!burgerMenu||!navList)return;burgerMenu.addEventListener('click',function(){const isExpanded=this.getAttribute('aria-expanded')==='true';this.setAttribute('aria-expanded',!isExpanded);navList.classList.toggle('active')});navList.addEventListener('click',(e)=>{if(e.target.tagName==='A'){navList.classList.remove('active');burgerMenu.setAttribute('aria-expanded','false')}})}