<!DOCTYPE html>
<html lang="bn">
<head>
<meta charset="UTF-8">
<title>CV111 - Loading</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
    *{box-sizing:border-box; margin:0; padding:0;}
    body{
        min-height:100vh; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
        background:radial-gradient(circle at 20% 0%, rgba(155,93,229,.18), transparent 45%),
                   radial-gradient(circle at 90% 100%, rgba(245,197,66,.1), transparent 40%), #0A0714;
        display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative;
    }
    body::before{content:''; position:absolute; width:320px; height:320px; border-radius:50%;
        background:radial-gradient(circle, rgba(155,93,229,.12), transparent 70%); top:-100px; left:-100px; animation:float 8s ease-in-out infinite;}
    body::after{content:''; position:absolute; width:240px; height:240px; border-radius:50%;
        background:radial-gradient(circle, rgba(245,197,66,.1), transparent 70%); bottom:-80px; right:-60px; animation:float 10s ease-in-out infinite reverse;}
    @keyframes float{0%,100%{transform:translateY(0);} 50%{transform:translateY(-20px);}}

    .loading-wrap{text-align:center; position:relative; z-index:1;}

    .logo-glow{width:130px; height:130px; margin:0 auto 28px; border-radius:32px; padding:4px;
        background:linear-gradient(135deg, #F5C542, #E0A926);
        box-shadow:0 0 50px rgba(245,197,66,.4), 0 0 90px rgba(155,93,229,.25);
        animation:pulse-scale 2s ease-in-out infinite;}
    .logo-glow img{width:100%; height:100%; object-fit:contain; border-radius:28px; background:#181129; padding:10px;}
    @keyframes pulse-scale{0%,100%{transform:scale(1);} 50%{transform:scale(1.05);}}

    .brand{font-size:24px; font-weight:900; font-style:italic; letter-spacing:1.5px; margin-bottom:8px;
        background:linear-gradient(135deg,#F5C542,#E0A926); -webkit-background-clip:text; background-clip:text; color:transparent;}
    .tagline{font-size:12px; color:#9691B0; margin-bottom:36px; letter-spacing:.5px;}

    .loader-bar{width:180px; height:5px; border-radius:10px; background:rgba(255,255,255,.08); margin:0 auto; overflow:hidden; position:relative;}
    .loader-fill{position:absolute; top:0; left:0; height:100%; width:40%; border-radius:10px;
        background:linear-gradient(90deg,#6C3FC5,#9B5DE5,#F5C542); animation:loading-slide 1.3s ease-in-out infinite;}
    @keyframes loading-slide{0%{left:-40%;} 100%{left:100%;}}

    .loading-text{margin-top:16px; font-size:11.5px; color:#6C6684; letter-spacing:.5px;}
</style>
</head>
<body>

<div class="loading-wrap">
    <div class="logo-glow">
        <img src="https://files.catbox.moe/1ltcl9.png" alt="CV111">
    </div>
    <div class="brand">CV111</div>
    <div class="tagline">Premium Gaming Experience</div>
    <div class="loader-bar"><div class="loader-fill"></div></div>
    <div class="loading-text" id="loadingText">লোড হচ্ছে...</div>
</div>

<script>
// ✅ কিছুক্ষণ পর, স্বয়ংক্রিয়ভাবে Homepage-এ পাঠানো
// (Login থাকলে Home, না থাকলে Login Page)
setTimeout(() => {
    const token = localStorage.getItem('token');
    window.location.href = token ? '/newhome.php' : '/newlogin.php';
}, 2200);
</script>

</body>
</html>
