<?php
// Oturumu tüm sayfalarda HTML çıkışından önce başlat
if (session_status() !== PHP_SESSION_ACTIVE) {
    $secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
    // Güvenli ve tutarlı çerez ayarları
    @ini_set('session.cookie_secure', $secure ? '1' : '0');
    @ini_set('session.cookie_httponly', '1');
    @ini_set('session.cookie_samesite', 'Lax');
    if (function_exists('session_set_cookie_params')) {
        $host = $_SERVER['HTTP_HOST'] ?? '';
        $domain = '';
        if ($host && strpos($host, '.') !== false && !preg_match('/^(localhost|\d+\.\d+\.\d+\.\d+)$/', $host)) { $domain = $host; }
        $params = [
            'lifetime' => 0,
            'path' => '/',
            'secure' => $secure,
            'httponly' => true,
            'samesite' => 'Lax'
        ];
        if ($domain) { $params['domain'] = $domain; }
        session_set_cookie_params($params);
    }
    session_start();
}
?>
<!doctype html>
<html lang="en">
<head>
    <title> Canlı Casino ve Canlı Bahisler </title>
  <meta charset="utf-8">
  <base href="/">
  <link rel="icon" type="image/x-icon" href="./assets/images/piefab.png" id="appFavicon">

  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="keywords" content="">
  <meta name="robots" content="index, follow">
  <meta name="language" content="English">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="Blackbet yeni adres, Blackbet giriş adresi, Blackbet giriş, bahis, spor bahisleri, casino, poker, bahis sitesi, en iyi oranlar, online bahis, canlı bahis, türk pokeri, casino oyunları, casino rehberi, kazı kazan, oyunlar, oyun sitesi, bonus, bonuslar, yabancı bahis siteleri, sayısal loto, canlı chat, tombala">
  <!-- Stylesheets -->
  <!-- style-whitelabale.css kaldırıldı: dosya mevcut değil -->
  <link href="/inc/assets/style-glob.css" rel="stylesheet">
  <link href="/inc/assets/css/daterangepicker.css" rel="stylesheet">
  <link rel="stylesheet" href="/inc/styles.09e2c710755c8867a460.css">
  <!-- Global UI/UX theme -->
  <link href="/assets/css/ui-ux.css" rel="stylesheet">

  <style>
    .sports-bottom-space .mainWrap,
    .sports-bottom-space .centerWrap,
    .sports-bottom-space .container,
    .sports-bottom-space .container-fluid { padding-bottom: 56px; }
    @media (min-width: 769px){
      .sports-bottom-space .centerWrap,
      .sports-bottom-space .container-fluid { padding-bottom: 40px; }
    }
  </style>
  <!-- Content Security Policy -->
  <meta http-equiv="Content-Security-Policy" content="wss://*.sptpub.com' self'">

  <!-- Optional JavaScript (External) -->
  <!-- jQuery önce yüklenmeli -->
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  <!-- jQuery bağımlı kütüphaneler -->
  <script src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" referrerpolicy="no-referrer"></script>
  <!-- Bootstrap 5 bundle -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>


  <!-- Sportbook -->
  <script type="text/javascript" id="sportbook" src="https://iceexchange.sptpub.com/bt-renderer.min.js"></script>

  <!-- AES Encryption/Decryption -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>

  <!-- Comm100 Live Chat Code -->
  <div id="comm100-button-a46d8663-32b5-4489-a970-ce6047514c31" style="position: fixed !important; bottom: 20px !important; right: 20px !important; z-index: 9999 !important;">
    <div class="fallback-chat-button" onclick="openChatWindow()">
      <i class="fas fa-comments"></i>
      <span>Canlı Destek</span>
    </div>
  </div>
  
  <script type="text/javascript">
    // Alternative chat solution - Simple contact button
    function openChatWindow() {
      // Create a simple contact modal or redirect to WhatsApp/Telegram
      var chatOptions = confirm("Canlı destek için iletişim seçenekleri:\n\nTamam: WhatsApp\nİptal: Telegram");
      if (chatOptions) {
        window.open('https://wa.me/905555555555', '_blank'); // WhatsApp numaranızı buraya ekleyin
      } else {
        window.open('https://t.me/yourusername', '_blank'); // Telegram kullanıcı adınızı buraya ekleyin
      }
    }
  </script>
  <!-- End Comm100 Live Chat Code -->

</head>
<body id="bodyId">

  <app-root></app-root>
  <script>
    (function(){
      try{
        var p = window.location.pathname || '';
        if (p === '/sports' || p.indexOf('/sports/') === 0){
          document.documentElement.classList.add('sports-bottom-space');
          document.body.classList.add('sports-bottom-space');
        }
      }catch(e){}
    })();
  </script>

  <script type="text/javascript">
    // Casino Stream Functions
    function loadHTMLVideo(sname) {
        try {
            const webrtcPlayer = new T20RTCPlayer("remoteVideo", sname, "", "real-game.live", "", true, true, "tcp");
            webrtcPlayer.Play();
        } catch (error) {
            console.error(error);
        }
    }

    function loadStreamVideo(sname, url) {
        try {
            const webrtcPlayer = new T20RTCPlayer("remoteVideo", sname, "", url, "", true, true, "tcp");
            webrtcPlayer.Play();
        } catch (error) {
            console.error(error);
        }
    }

    window.addEventListener('online', () => document.getElementById('gscale').classList.remove('grayscale'));
    window.addEventListener('offline', () => document.getElementById('gscale').classList.add('grayscale'));
  </script>

  <!-- Angular Scripts removed: legacy bundles not present -->


</body>
</html>