<?php
include __DIR__ . "/deepanshu/conn.php";

$telegramLink = 'https://t.me/CV111updates';
$tgResult = $conn->query("SELECT setting_value FROM site_settings WHERE setting_key = 'social_telegram' LIMIT 1");
if ($tgResult) {
    $tgRow = $tgResult->fetch_assoc();
    if ($tgRow && !empty($tgRow['setting_value'])) $telegramLink = $tgRow['setting_value'];
}
?>
<!DOCTYPE html>
<html lang="bn">
<head>
<?php include __DIR__ . '/performance_boost.php'; ?>
<meta charset="UTF-8">
<title>cv111.site - Casino</title>
<meta name="google-site-verification" content="QcsTSjV0IDTZusTHyWClN_CUx0TkKlqGh0TBbe6BVd0" />
<meta name="google-site-verification" content="kR632-KLcaTE36i_Ve-Y-UEds5f5yFk8gTbp7pyldHI" />
<meta name="google-site-verification" content="kR632-KLcaTE36i_Ve-Y-UEds5f5yFk8gTbp7pyldHI" />
<meta name="google-site-verification" content="kR632-KLcaTE36i_Ve-Y-UEds5f5yFk8gTbp7pyldHI" />
<meta name="google-site-verification" content="kxnZespQscsBBd3JbBzpYDPDmkZVb1vfa4I-ox4ysYw" />
<meta name="description" content="CV111 — বাংলাদেশের জনপ্রিয় Online Gaming Platform। Slot, Fishing, Live Casino, Sports-Betting খেলো bKash/Nagad দিয়ে সহজ Deposit-Withdraw-এ।">
<meta name="keywords" content="online casino bangladesh, CV111, bkash casino, nagad casino, online slot game bangladesh, live casino bangladesh, online betting">
<meta name="author" content="CV111">
<link rel="canonical" href="https://cv111.site/">

<!-- Open Graph (Facebook/WhatsApp Share) -->
<meta property="og:type" content="website">
<meta property="og:title" content="CV111 - বাংলাদেশের সেরা Online Gaming Platform">
<meta property="og:description" content="Slot, Fishing, Live Casino, Sports-Betting খেলো bKash/Nagad দিয়ে সহজ Deposit-Withdraw-এ।">
<meta property="og:url" content="https://cv111.site/">
<meta property="og:site_name" content="CV111">
<meta property="og:locale" content="bn_BD">

<!-- Twitter Card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="CV111 - বাংলাদেশের সেরা Online Gaming Platform">
<meta name="twitter:description" content="Slot, Fishing, Live Casino, Sports-Betting খেলো bKash/Nagad দিয়ে সহজ Deposit-Withdraw-এ।">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/tailwind-static.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap">
<style>
    :root{
        --bg:#0A0714; --card:#181129; --border:rgba(255,255,255,.07); --border-hi:rgba(155,93,229,.35);
        --gold:#F5C542; --purple:#9B5DE5;
        --grad-main:linear-gradient(135deg,#6C3FC5 0%,#9B5DE5 50%,#B57EF0 100%);
        --grad-gold:linear-gradient(135deg,#F5C542,#E0A926);
        --muted:#9691B0;
    }
    body { background-color: var(--bg); font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #f5f5f5; }
    .neon-green { color: var(--gold); }
    .neon-border { border-color: var(--border-hi) !important; }
    .gold-text { color: var(--gold); }
    .gold-gradient { background: var(--grad-gold); }
    .green-gradient { background: var(--grad-main); }
    .card-bg { background: rgba(24,17,41,.65); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .15s ease, border-color .2s ease; }
    .card-bg:active { transform: scale(.97); }
    .scrollbar-none::-webkit-scrollbar { display: none; }
    .scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }
    .tab-active { background: var(--grad-main) !important; color: #fff !important; font-weight: 800; box-shadow: 0 8px 20px -8px rgba(155,93,229,.6); }

    .jackpot-box { background: linear-gradient(160deg, #1D1533 0%, #120D24 100%); border: 1px solid var(--border-hi); box-shadow: 0 20px 50px -12px rgba(108,63,197,.35); }
    .digit-box { background: #0D0918; border: 1px solid rgba(245,197,66,.3); color: var(--gold); font-family: 'Courier New', monospace; text-shadow: 0 0 8px rgba(245,197,66,.6); }
    @keyframes pulse-glow { 0%,100% { box-shadow: 0 0 20px rgba(155,93,229,.15) inset; } 50% { box-shadow: 0 0 35px rgba(155,93,229,.3) inset; } }
    .jackpot-box { animation: pulse-glow 2.5s ease-in-out infinite; }

    .game-card-hover { transition: transform 0.15s ease; }
    .game-card-hover:active { transform: scale(0.95); }
    .fav-icon { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; background: rgba(0,0,0,.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; pointer-events: none; }

    .float-social { position: fixed; right: 10px; top: 45%; z-index: 40; display: flex; flex-direction: column; gap: 10px; }
    .float-social a { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.4); }

    .bottom-nav { background: var(--card); border-top: 1px solid var(--border-hi); }
    .fade-in-up { animation: fadeInUp .3s ease both; }
    @keyframes scrollTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    /* ✅ Skeleton-Loading Shimmer — Instant Visual Feedback-এর জন্য */
    .skeleton-shimmer {
        background: linear-gradient(90deg, #181129 25%, #241D3D 50%, #181129 75%);
        background-size: 200% 100%;
        animation: shimmer 1.4s ease-in-out infinite;
    }
    @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
</style>
</head>
<body class="pb-20">

<?php include __DIR__ . '/newbonuspopup.php'; ?>
<?php include __DIR__ . '/newsitepopup.php'; ?>
<?php $pt = __DIR__ . '/page_transition.php'; if (file_exists($pt)) { include $pt; } ?>


<!-- ✅ App Download Banner -->
<div class="green-gradient text-center py-1.5 text-[11px] font-bold text-gray-900 flex items-center justify-center gap-2">
    <i class="fa-solid fa-download"></i> App Download করে, আরও দ্রুত খেলো!
</div>

<!-- Header -->
<header class="bg-[#181129]/80 backdrop-blur-xl border-b neon-border px-4 py-3 flex items-center justify-between sticky top-0 z-40">
    <button class="text-gray-300 text-lg"><i class="fa-solid fa-bars"></i></button>
    <div class="text-lg font-black italic gold-text tracking-wide">SPORTS<span class="neon-green">365</span></div>

    <!-- ✅ নতুন যোগ — Login না করা থাকলে, Login/Register Button দেখাবে -->
    <div id="loggedOutButtons" class="hidden items-center gap-2">
        <a href="/newlogin.php" class="text-gray-300 text-xs font-bold px-3 py-1.5">Login</a>
        <a href="/newregister.php" class="green-gradient text-white text-xs font-bold px-4 py-1.5 rounded-full">Register</a>
    </div>

    <a href="/newdeposit_panel.php" id="loggedInBadge" class="card-bg border neon-border rounded-full px-3 py-1.5 items-center gap-1.5 backdrop-blur-md">
        <i class="fa-solid fa-coins gold-text text-xs"></i>
        <span id="balanceBadge" class="text-white text-xs font-bold">...</span>
    </a>
</header>

<!-- ✅ নতুন যোগ — Deposit/Withdraw সরাসরি Homepage-এ (আসল Payment-Logo সহ) -->
<div class="px-4 pt-4 grid grid-cols-2 gap-3">
    <a href="/newdeposit_panel.php" class="card-bg border neon-border rounded-2xl p-4 flex items-center gap-3 backdrop-blur-md transition-transform active:scale-95">
        <div class="w-11 h-11 rounded-xl flex items-center justify-center overflow-hidden flex-shrink-0">
            <img src="/assets/png/rechargeIcon-efb79f43.png" alt="Deposit" class="w-full h-full object-contain p-1">
        </div>
        <div>
            <div class="text-white font-bold text-sm">Deposit</div>
            <div class="text-gray-400 text-[10px]">Instant Add</div>
        </div>
    </a>
    <a href="/newwithdraw_premium.php" class="card-bg border neon-border rounded-2xl p-4 flex items-center gap-3 backdrop-blur-md transition-transform active:scale-95">
        <div class="w-11 h-11 rounded-xl flex items-center justify-center overflow-hidden flex-shrink-0">
            <img src="/assets/png/withdrawHistory-033a34f8.png" alt="Withdraw" class="w-full h-full object-contain p-1">
        </div>
        <div>
            <div class="text-white font-bold text-sm">Withdraw</div>
            <div class="text-gray-400 text-[10px]">15-30 Min</div>
        </div>
    </a>
</div>

<main class="px-4">

    <!-- ✅ Jackpot Counter (আসল Image-Asset দিয়ে) -->
    <div class="pt-4">
        <div class="jackpot-box rounded-2xl p-4 text-center relative overflow-hidden">
            <img src="/assets/png/jackpot-banner.18b6f58e.png" alt="" class="absolute inset-0 w-full h-full object-cover opacity-40">
            <div class="relative z-10">
                <img src="/assets/png/jp-title.3e25a2ff.png" alt="Mega Jackpot" class="h-8 mx-auto mb-2">
                <div id="jackpotDigits" class="flex justify-center gap-1"></div>
            </div>
        </div>
    </div>

    <!-- ✅ Real Banner Slider (GetBannerList.php থেকে) -->
    <div class="relative rounded-xl overflow-hidden shadow-2xl my-4 border neon-border">
        <div id="bannerContainer" class="relative w-full aspect-[16/7] bg-black/30">
            <div class="absolute inset-0 flex items-center justify-center text-gray-500 text-xs">Banner লোড হচ্ছে...</div>
        </div>
        <div id="bannerDots" class="absolute bottom-2 left-1/2 -translate-x-1/2 flex gap-1.5"></div>
    </div>

    <!-- ✅ নতুন যোগ — Recent Winners Live Feed -->
    <div class="card-bg border neon-border rounded-lg mt-3 py-2 overflow-hidden">
        <div id="winnersTicker" class="flex items-center gap-2 text-xs whitespace-nowrap"></div>
    </div>

    <!-- ✅ নতুন যোগ — Big Wins Showcase (Decorative) -->
    <div class="mt-3">
        <div class="text-[11px] gold-text font-bold tracking-widest mb-2 flex items-center gap-1"><i class="fa-solid fa-fire"></i> BIG WINS</div>
        <div id="awardShowcase" class="flex gap-2.5 overflow-x-auto scrollbar-none pb-1"></div>
    </div>

    <div class="card-bg rounded-lg px-3 py-2 border neon-border flex items-center gap-2 mb-4 text-xs text-gray-300">
        <i class="fa-solid fa-volume-high neon-green animate-pulse"></i>
        <marquee behavior="scroll" direction="left" class="w-full">CV111-এ স্বাগতম! দ্রুত Deposit, দ্রুত Withdraw, ২৪/৭ Support।</marquee>
    </div>

    <!-- Category Tabs -->
    <div class="flex items-center gap-2 overflow-x-auto scrollbar-none mb-1">
        <button onclick="filterMainCategory('all')" class="cat-btn main-cat-btn tab-active text-xs font-bold px-4 py-1.5 rounded-full flex-shrink-0" data-cat="all">All</button>
        <button onclick="filterMainCategory('popular')" class="cat-btn main-cat-btn card-bg border neon-border text-gray-300 text-xs font-bold px-4 py-1.5 rounded-full flex-shrink-0" data-cat="popular">Popular</button>
        <button onclick="window.location.href='/newslots.php'" class="cat-btn main-cat-btn card-bg border neon-border text-gray-300 text-xs font-bold px-4 py-1.5 rounded-full flex-shrink-0" data-cat="slot">Slot</button>
        <button onclick="filterMainCategory('fish')" class="cat-btn main-cat-btn card-bg border neon-border text-gray-300 text-xs font-bold px-4 py-1.5 rounded-full flex-shrink-0" data-cat="fish">Fish</button>
        <button onclick="filterMainCategory('sport')" class="cat-btn main-cat-btn card-bg border neon-border text-gray-300 text-xs font-bold px-4 py-1.5 rounded-full flex-shrink-0" data-cat="sport">Sport</button>
        <button onclick="filterMainCategory('video')" class="cat-btn main-cat-btn card-bg border neon-border text-gray-300 text-xs font-bold px-4 py-1.5 rounded-full flex-shrink-0" data-cat="video">Casino</button>
    </div>

    <!-- Provider Tabs (শুধু Slot-এ দেখাবে) -->
    <div id="vendor-tabs-row" class="hidden items-center gap-1.5 overflow-x-auto scrollbar-none py-2"></div>

    <div class="flex items-center justify-between my-3">
        <h2 id="section-title" class="text-sm font-bold text-white flex items-center gap-2">
            <span class="w-2 h-5 green-gradient rounded-full inline-block"></span> All Games
        </h2>
        <span id="game-count" class="text-xs card-bg text-gray-400 px-2 py-0.5 rounded-full">লোড হচ্ছে...</span>
    </div>

    <div class="mb-3 relative">
        <input type="text" id="search-input" onkeyup="searchGames()" placeholder="Game খুঁজো..."
               class="w-full card-bg border neon-border rounded-lg px-4 py-2 pl-10 text-xs text-white placeholder-gray-500 focus:outline-none">
        <i class="fa-solid fa-magnifying-glass absolute left-3.5 top-2.5 text-gray-500 text-xs"></i>
    </div>

    <div id="vendor-back-btn" style="display:none;" class="mb-3 neon-green text-xs font-bold flex items-center gap-1 cursor-pointer"></div>

    <!-- Games Grid (৩-Column) -->
    <div id="games-grid" class="grid grid-cols-3 gap-2.5"><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div><div class="rounded-2xl overflow-hidden" style="background:#181129;"><div class="aspect-square skeleton-shimmer"></div><div style="height:34px; padding:6px 8px;"><div class="skeleton-shimmer" style="height:8px; width:70%; border-radius:4px;"></div></div></div></div>

    <button id="load-more-btn" onclick="loadMoreGames()" class="w-full mt-4 py-2.5 rounded-lg card-bg border neon-border text-gray-300 text-xs font-bold">আরও দেখাও</button>

</main>

<!-- Floating Social -->
<div class="float-social">
    <a href="https://whatsapp.com/channel/0029Vb8evJ9AO7RBmKZbqU1E" class="overflow-hidden" style="background:#fff;">
        <img src="/assets/png/CStype2-d7b94bf8.png" alt="WhatsApp" class="w-full h-full object-contain p-2">
    </a>
    <a href="/chatbot_widget.html" class="overflow-hidden" style="background:#fff;">
        <img src="/assets/png/customer-4afe1e50.png" alt="Support" class="w-full h-full object-contain p-2">
    </a>
    <a href="<?php echo htmlspecialchars($telegramLink); ?>" class="overflow-hidden" style="background:#fff;">
        <img src="/assets/png/CStype5-6b3a66e3.png" alt="Telegram" class="w-full h-full object-contain p-2">
    </a>
    <a href="https://www.facebook.com/share/1By9fX4FNj/" class="overflow-hidden" style="background:#fff;">
        <img src="https://cv111.site/my/fb.png" alt="Facebook" class="w-full h-full object-contain p-2">
    </a>
</div>

<!-- Bottom Nav -->
<div class="bottom-nav fixed bottom-0 left-0 right-0 py-2 px-2 flex justify-between items-center z-40">
    <a href="/newhome.php" class="neon-green flex flex-col items-center text-[10px] gap-0.5 flex-1"><i class="fa-solid fa-house text-base"></i>Home</a>
    <a href="/newpromotions.php" class="text-gray-400 flex flex-col items-center text-[10px] gap-0.5 flex-1"><i class="fa-solid fa-fire text-base"></i>Promotion</a>
    <a href="/newreferral.php" class="text-gray-400 flex flex-col items-center text-[10px] gap-0.5 flex-1"><i class="fa-solid fa-user-group text-base"></i>Invite</a>
    <a href="/newrewardcenter.php" class="text-gray-400 flex flex-col items-center text-[10px] gap-0.5 flex-1"><i class="fa-solid fa-gift text-base"></i>Reward</a>
    <a href="/newprofile.php" class="text-gray-400 flex flex-col items-center text-[10px] gap-0.5 flex-1"><i class="fa-solid fa-user text-base"></i>Member</a>
</div>

<script src="/newhome_core.js" defer></script>
<script src="/newhome_games.js" defer></script>
<script src="/newhome_launch.js" defer></script>
<script src="/newhome_bigwin.js" defer></script>
<script src="/newhome_init.js" defer></script>

</body>
</html>
