
<div _ngcontent-tqr-c15="" class="col-12 fade-out d-none">
                        <div _ngcontent-tqr-c15="" class="game-carousel landingGameRow loaderGames">
                            <div _ngcontent-tqr-c15="" class="gameCol"></div>
                            <div _ngcontent-tqr-c15="" class="gameCol"></div>
                            <div _ngcontent-tqr-c15="" class="gameCol"></div>
                            <div _ngcontent-tqr-c15="" class="gameCol"></div>
                            <div _ngcontent-tqr-c15="" class="gameCol"></div>
                            <div _ngcontent-tqr-c15="" class="gameCol"></div>
                        </div>
                    </div>
                    
                    
                    <!-- Önceki küçük hızlı erişim şeridi kaldırıldı -->

                    <!-- Site İstatistikleri Bölümü -->
                    <?php include './inc/stats_section.php' ?>
                                
                                
                                
                                
                                

<?php
// Oturum zaten başlatılmışsa tekrar başlatma
if (session_status() === PHP_SESSION_NONE) {
    session_start(); // Oturumu başlat
}

// Kullanıcının giriş yapıp yapmadığını kontrol et
$girisYapildi = isset($_SESSION['loggedin']) && $_SESSION['loggedin'];
?>



                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <!----></div>
                    </div><!----><!---->
                    
                <!-- CASINO başlığı altında 2x2 büyük kart yapısı -->
                <style>
                    .featureCardGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
                    .featureCard { position: relative; display: block; height: 170px; border-radius: 14px; overflow: hidden; text-decoration: none; background: #0e1830; }
                    .featureCard .bg { position: absolute; inset: 0; background-color: #000; background-size: contain; background-repeat: no-repeat; background-position: center center; filter: saturate(1.1) contrast(1.05) brightness(0.95); transform: scale(1); transition: transform .2s ease; }
                    .featureCard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.35), rgba(0,0,0,.1)); }
                    .featureCard:hover .bg { transform: scale(1.04); }
                    .featureCard .content { position: absolute; left: 18px; top: 18px; right: 18px; color: #fff; z-index: 2; }
                    .featureCard .content h4 { margin: 0 0 6px 0; font-size: 22px; font-weight: 800; letter-spacing: .3px; }
                    .featureCard .content p { margin: 0; font-size: 13px; opacity: .95; }
                    .featureCard .badges { position: absolute; left: 18px; bottom: 16px; display: flex; gap: 8px; z-index: 2; }
                    .featureCard .badge { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
                    @media (max-width: 768px) { .featureCardGrid { grid-template-columns: repeat(2, 1fr); } .featureCard { height: 150px; } }
                </style>
                <div class="col-12">
                    <div class="secTitle categoryspacebtn">
                        <h5>CASİNO</h5>
                        <a class="viewMore" href="/slot">Daha Fazla <i class="fa fa-angle-right" aria-hidden="true"></i></a>
                    </div>
                    <div class="featureCardGrid">
                        <!-- 1: Slot Oyunları -->
                        <a class="featureCard" href="/slot" title="Slot Oyunları">
                            <div class="bg" style="background-image:url('/seker/casino/slotturnuva.webp');"></div>
                            <div class="content">
                              
                            </div>
                            <div class="badges"><span class="badge"></span><span class="badge"></span></div>
                        </a>
                        <!-- 2: Canlı Casino -->
                        <a class="featureCard" href="/livecasino" title="Canlı Casino">
                            <div class="bg" style="background-image:url('/seker/casino/canlicasino.webp');"></div>
                            <div class="content">
                               
                            </div>
                            <div class="badges"><span class="badge"></span></div>
                        </a>
                        <!-- 3: Slot Turnuva -->
                        <a class="featureCard" href="/slot" title="Slot Turnuva">
                            <div class="bg" style="background-image:url('/seker/casino/slotturnuva.webp');"></div>
                            <div class="content">
                                                        
                            </div>
                            <div class="badges"><span class="badge"></span></div>
                        </a>
                        <!-- 4: Aviator ile Uç -->
                        <a class="featureCard" href="javascript:void(0)" onclick="openGame(26718)" title="Aviator ile Uç">
                            <div class="bg" style="background-image:url('/seker/casino/aviatorileuc.webp');"></div>
                            <div class="content">
                              
                            </div>
                            <div class="badges"><span class="badge"></span></div>
                        </a>
                    </div>
                </div>

                

                <?php
                // TREND SLOT OYUNLARI bölümünü CASİNO kartlarının hemen altına ekle
                $trendSlotDirFs = dirname(__DIR__) . '/seker/trendslot';
                $trendSlotDirWeb = '/seker/trendslot';
                $trendSlotFiles = glob($trendSlotDirFs . '/*.{jpg,jpeg,png,webp}', GLOB_BRACE);
                if (!function_exists('formatTrendTitle')) {
                    function formatTrendTitle($filename) {
                        $name = pathinfo($filename, PATHINFO_FILENAME);
                        $name = preg_replace('/[_-]+/', ' ', $name);
                        return ucwords($name);
                    }
                }
                ?>
                <div class="col-12">
                    <div class="secTitle categoryspacebtn">
                        <h5>TREND SLOT OYUNLARI</h5>
                        <a class="viewMore" href="/slot">Daha Fazla <i class="fa fa-angle-right" aria-hidden="true"></i></a>
                    </div>
                    <div class="featureCardGrid">
                        <?php 
                        // Game ID mapping for trend slots
                        $gameIdMap = [
                            'bigbassholdspinner' => 23662,
                            'bookdelsolmultiplier' => 64010,
                            'gatesofolympus' => 23002,
                            'rocketblast' => 23645,
                            'sweetbonanza' => 23003
                        ];
                        
                        foreach ($trendSlotFiles as $absPath): 
                            $file = basename($absPath); 
                            $title = formatTrendTitle($file); 
                            $webPath = $trendSlotDirWeb . '/' . $file;
                            $filename = pathinfo($file, PATHINFO_FILENAME);
                            
                            // Check if we have a game ID for this file
                            $gameId = isset($gameIdMap[$filename]) ? $gameIdMap[$filename] : null;
                            $clickAction = $gameId ? "openGame($gameId)" : "window.location.href='/slot'";
                        ?>
                            <div class="featureCard" onclick="<?php echo $clickAction; ?>" style="cursor: pointer;" title="<?php echo htmlspecialchars($title); ?>">
                                <div class="bg" style="background-image:url('<?php echo $webPath; ?>');"></div>
                            </div>
                        <?php endforeach; ?>
                    </div>
                </div>
                <?php
                // TREND CASINO OYUNLARI bölümünü Trend Slot'un hemen altına ekle
                $trendCasinoDirFs = dirname(__DIR__) . '/seker/trendcasino';
                $trendCasinoDirWeb = '/seker/trendcasino';
                $trendCasinoFiles = glob($trendCasinoDirFs . '/*.{jpg,jpeg,png,webp}', GLOB_BRACE);
                ?>
                <div class="col-12">
                    <div class="secTitle categoryspacebtn">
                        <h5>TREND CASINO OYUNLARI</h5>
                        <a class="viewMore" href="/livecasino">Daha Fazla <i class="fa fa-angle-right" aria-hidden="true"></i></a>
                    </div>
                    <div class="featureCardGrid">
                        <?php 
                        // Game ID mapping for trend casino görselleri
                        $casinoIdMap = [
                            'craps' => 8734,
                            'crazypochinko' => 39011,
                            'doubleball' => 8765,
                            'dreamcatcher' => 8755,
                            'funkytime' => 8748,
                            'lightningrulet' => 8773,
                            'monopolybigdaller' => 8758,
                            'xxxtremeroulette' => 8918
                        ];
                        foreach ($trendCasinoFiles as $absPath): 
                            $file = basename($absPath); 
                            $title = function_exists('formatTrendTitle') ? formatTrendTitle($file) : pathinfo($file, PATHINFO_FILENAME);
                            $webPath = $trendCasinoDirWeb . '/' . $file;
                            $filename = pathinfo($file, PATHINFO_FILENAME);
                            // Eşleşen ID varsa oyunu yeni sekmede aç, yoksa canlı casino sayfasına yönlendir
                            $gameId = isset($casinoIdMap[$filename]) ? $casinoIdMap[$filename] : null;
                            $clickAction = $gameId ? "openGame($gameId)" : "window.location.href='/livecasino'";
                        ?>
                            <div class="featureCard" onclick="<?php echo $clickAction; ?>" style="cursor: pointer;" title="<?php echo htmlspecialchars($title); ?>">
                                <div class="bg" style="background-image:url('<?php echo $webPath; ?>');"></div>
                                //<div class="badges"><span class="badge">TREND</span></div>
                            </div>
                        <?php endforeach; ?>
                    </div>
                </div>

                 <div class="col-12">
    <div class="game-carousel">
        <div class="secTitle categoryspacebtn">
            <h5>CASİNO OYUNLARI</h5>
            <a class="viewMore" href="/slot">Daha Fazla <i class="fa fa-angle-right" aria-hidden="true"></i></a>
        </div>
        <div class="row">
            <div class="col-12 gameRow">
                <div class="gameCol">
                    <div class="playBox">
                        <h6>Saray Ruyası</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(23758)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/pragmaticplay/SarayRuyasi/SarayRuyasi1.jpg" alt="Saray Ruyası">
                </div>
                <div class="gameCol">
                    <div class="playBox">
                        <h6>Sugar Rush Dice</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(23875)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/pragmaticplay/SugarRushDice/SugarRushDice1.jpg" alt="Sugar Rush Dice">
                </div>
                <div class="gameCol">
                    <div class="playBox">
                        <h6>Aztec Gems</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(23005)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/prod/v2-dashboard-pi/casino-image/20230822/317530.png" alt="Aztec Gems">
                </div>
                <div class="gameCol">
                    <div class="playBox">
                        <h6>Joker's Jewels</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(23011)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/pragmaticplay/JokersJewels/JokersJewels1.jpg" alt="Joker's Jewels">
                </div>
                <div class="gameCol">
                    <div class="playBox">
                        <h6>Gems Bonanza</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(23032)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/pragmaticplay/GemsBonanza/GemsBonanza1.jpg" alt="Gems Bonanza">
                </div>
                <div class="gameCol">
                    <div class="playBox">
                        <h6>Sweet Bonanza</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(23003)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/pragmaticplay/SweetBonanza/SweetBonanza1.jpg" alt="Sweet Bonanza">
                </div>



<script>
    
        // PHP tarafındaki oturum durumunu JavaScript'e aktar
        const isUserLoggedIn = <?php echo $isLoggedIn; ?>;

        // Oyun oynatma fonksiyonu
        function handlePlay(gameId) {
            if (!isUserLoggedIn) {
                // Oturum açılmamışsa uyarı göster
                Swal.fire({
                    icon: 'warning',
                    title: 'Oturum Açılmadı',
                    text: 'Lütfen oyuna devam etmek için giriş yapın.',
                    confirmButtonText: 'Tamam'
                }).then(() => {
                    // Giriş sayfasına yönlendirme
                    window.location.href = '/login.php';
                });
            } else {
                // Oturum açılmışsa oyun açma
                window.open(`/start/game.php?gameid=${gameId}`, '_blank');
            }
        }
    </script>

                                </div>
                            </div>
                        </div>
                    </div>
<div class="col-12 ng-star-inserted">
    <div class="game-carousel">
        <div class="secTitle categoryspacebtn">
            <h5>Canlı Casino</h5>
            <a class="viewMore" href="/livecasino">Daha Fazla <i aria-hidden="true" class="fa fa-angle-right"></i></a>
        </div>
        <div class="row">
            <div class="col-12 gameRow">
                <!-- Oyunlar -->
                <div class="gameCol ng-star-inserted">
                    <div class="playBox">
                        <h6>Baccarat C02</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(7910)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/sagaming/BaccaratC02/BaccaratC021.jpg" alt="undefined">
                </div>
                <div class="gameCol ng-star-inserted">
                    <div class="playBox">
                        <h6>Baccarat C07</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(7923)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/sagaming/BaccaratC07/BaccaratC071.jpg" alt="undefined">
                </div>
                <div class="gameCol ng-star-inserted">
                    <div class="playBox">
                        <h6>C Roulette</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(7908)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/sagaming/CRoulette/CRoulette1.jpg" alt="undefined">
                </div>
                <div class="gameCol ng-star-inserted">
                    <div class="playBox">
                        <h6>M Andar Bahar</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(7906)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/sagaming/MAndarBahar/MAndarBahar1.jpg" alt="undefined">
                </div>
                <div class="gameCol ng-star-inserted">
                    <div class="playBox">
                        <h6>M Blackjack</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(7905)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/sagaming/MBlackjack/MBlackjack1.jpg" alt="undefined">
                </div>
                <div class="gameCol ng-star-inserted">
                    <div class="playBox">
                        <h6>M Pok Deng</h6>
                        <button class="btn btn-sm btn-dark" onclick="handlePlay(7904)">Oyna</button>
                    </div>
                    <span class="topText">Popüler</span>
                    <img height="400" loading="lazy" width="294" src="https://d122775g111yth.cloudfront.net/pi-casino-df-img/slg2/sagaming/MPokDeng/MPokDeng1.jpg" alt="undefined">
                </div>

<script>
    function handlePlay(gameId) {
        // Kullanıcı giriş yaptıysa yeni sekmede oyunu aç
        window.open(`/start/game.php?gameid=${gameId}`, '_blank');
    }
</script>


                                    
                                    
                        
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
                <!-- CANLI MAÇLAR: Sports sayfasındaki alanı aynen ana sayfaya ekleme (Canlı Casino bölümünün hemen altında) -->
                <?php
                    $isMobileDevice = preg_match('/(android|iphone|ipod|ipad|mobile)/i', $_SERVER['HTTP_USER_AGENT']);
                    $sportIframeSrc = $isMobileDevice ? '/mobilyenispor' : '/yenispor';
                ?>
                <style>
                    .home-sports-embed iframe { width: 100%; border: none; display: block; }
                    @media screen and (max-width: 768px) { .home-sports-embed iframe { margin-bottom: 96px; } }
                </style>
                <div class="col-12">
                    <div class="secTitle categoryspacebtn">
                        <h5>Canlı Maçlar</h5>
                        <a class="viewMore" href="/sports.php">Tüm Maçlar <i class="fa fa-angle-right" aria-hidden="true"></i></a>
                    </div>
                    <div class="home-sports-embed">
                        <iframe id="homeSportIframe" src="<?php echo $sportIframeSrc; ?>"></iframe>
                    </div>
                </div>
                <script>
                    document.addEventListener('DOMContentLoaded', function(){
                        const iframe = document.getElementById('homeSportIframe');
                        const header = document.querySelector('header.headBar');
                        const mobileFooter = document.querySelector('.mobFooter');
                        const adjustIframeLayout = () => {
                            const windowHeight = window.innerHeight;
                            const isMobile = window.innerWidth <= 768;
                            const headerHeight = header ? header.getBoundingClientRect().height : 0;
                            const footerHeight = (isMobile && mobileFooter) ? mobileFooter.getBoundingClientRect().height : 0;
                            document.body.style.paddingTop = '0px';
                            const veritralHeaderHeightMobile = 80;
                            const marginTopOffset = headerHeight + (isMobile ? veritralHeaderHeightMobile : 0);
                            iframe.style.marginTop = marginTopOffset + 'px';
                            iframe.style.transform = isMobile ? `translateY(-${veritralHeaderHeightMobile}px)` : 'none';
                            iframe.style.willChange = 'transform';
                            const baseHeight = Math.max(0, windowHeight - headerHeight - footerHeight);
                            iframe.style.height = (isMobile ? baseHeight + veritralHeaderHeightMobile : baseHeight) + 'px';
                            iframe.style.marginBottom = isMobile && mobileFooter ? (footerHeight + 16) + 'px' : '0px';
                        };
                        adjustIframeLayout();
                        window.addEventListener('resize', adjustIframeLayout);
                    });
                </script>

      <?php include './inc/footer.php' ?>
      
    </section><!---->
</app-g6-landing-page>

