<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Prime Videos – Home</title>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<style>
  :root{
    --bg:#0b0b0e;
    --card:#16161b;
    --soft:#1d1d24;
    --text:#e9e9ef;
    --muted:#a7a7b3;
    --brand:#5a43eb;
    --gold:#d9b872;
    --gold-2:#f5d293;
    --chip:#2a2a33;
    --shadow:0 6px 18px rgba(0,0,0,.35);
    --radius:16px;
  }
  *{box-sizing:border-box}
  html,body{height:100%}
  body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
  }
  img{max-width:100%;display:block}
  a{color:inherit;text-decoration:none}
  .page{
    max-width:420px;
    margin:0 auto;
    background:linear-gradient(180deg,#0b0b0e 0%, #0b0b0e 58%, #0f0f14 100%);
    min-height:100%;
    padding-bottom:92px;
  }

/* ===== PRELOADER ===== */
#preloader{
  position:fixed; inset:0; z-index:9999;
  display:grid; place-items:center;
  background:#000;
}
.prewrap{display:flex; flex-direction:column; align-items:center; gap:14px}
.loader-ring{
  width:54px; height:54px; border-radius:50%;
  border:3px solid rgba(217,184,114,.2);
  border-top-color:var(--gold);
  animation:spin 1s linear infinite;
}
.prelogo{
  font-weight:800; letter-spacing:4px; font-size:14px;
  background:linear-gradient(180deg,var(--gold),var(--gold-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #302816 0%, #000000 100%);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid #000;
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}
.logo {
  font-size: 16px;
  font-weight: 700;
  color: #ebca7c;
}
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #000;
  border: 1px solid #ebca7c;
  color: #ebca7c;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 4px;
}
.icon-btn img {
  width: 18px; height: 18px; object-fit: contain;
}
.icon-btn:hover { background:#ebca7c; color:#302816; }

.logo{display:flex; align-items:center; gap:10px}
.logo img{height:22px}
.h-actions{margin-left:auto; display:flex; align-items:center; gap:10px}
.icon-btn{background:var(--soft); box-shadow:var(--shadow); font-size:14px; color:#fff}

/* BANNER */
.banner{ padding:8px 14px 0; }
.banner .frame{
  border-radius:16px; overflow:hidden; position:relative;
  aspect-ratio: 18/9; background:#111; box-shadow:var(--shadow);
}
.slides{display:flex; width:100%; height:100%; transition:transform .6s ease}
.slide{min-width:100%; height:100%; position:relative}
.slide img{width:100%; height:100%; object-fit:cover}
.dots{ position:absolute; left:12px; bottom:10px; display:flex; gap:6px; }
.dot{ width:7px; height:7px; border-radius:10px; background:#ffffff55 }
.dot.active{background:#fff}

/* QUICK NAV GRID (you also have a special home-section below) */
.quick{
  padding:14px;
  display:grid; grid-template-columns:repeat(4,1fr); gap:12px;
}
.q-item{
  background:linear-gradient(180deg,#17171e,#14141a);
  border:1px solid #22222b;
  border-radius:14px; padding:10px 8px; text-align:center;
  box-shadow:var(--shadow);
}
.q-ico{
  width:32px;height:32px;border-radius:12px;margin:0 auto 8px;
  display:grid;place-items:center;font-weight:700;
  background:linear-gradient(180deg,#2b2b36,#23232c);
  border:1px solid #2f2f3a;
}
.q-item span{font-size:11px; color:#dfe0e6; display:block; line-height:1.1}
.q-item small{font-size:10px; color:#aab; display:block; margin-top:2px}

/* NOTICE (ticker) */
.notice{
  margin:0 14px 8px;
  background:#121217; border:1px solid #1f1f28; border-radius:14px;
  padding:10px 12px; display:flex; align-items:center; gap:10px;
}
.notice .bell{width:22px;height:22px;border-radius:7px;background:#222233;display:grid;place-items:center}
.marquee{ position:relative; overflow:hidden; height:18px; flex:1; }
.marquee .track{
  position:absolute; inset:0; display:flex; flex-direction:column; gap:10px;
  animation:marq 8s linear infinite;
}
.marquee p{margin:0; font-size:12px; color:#cfd1da; white-space:nowrap}
@keyframes marq{ 0%{transform:translateY(0)} 100%{transform:translateY(-100%)} }

/* SECTION HEADER */
.section{ padding:10px 14px 0; }
.sec-head{ display:flex; align-items:center; justify-content:space-between; margin:6px 2px 8px; }
.sec-head h3{ margin:0; font-size:13px; letter-spacing:.2px; color:#fff; font-weight:800; }
.sec-head a{font-size:11px; color:#a9acc3}

/* MOVIE GRID */
.grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.card{ border-radius:14px; overflow:hidden; background:var(--card); border:1px solid #22222b; box-shadow:var(--shadow)}
.poster{position:relative; aspect-ratio:16/11; overflow:hidden; background:#0f0f12}
.poster img{width:100%;height:100%;object-fit:cover}
.badge{
  position:absolute; inset:auto 8px 8px auto;
  background:rgba(0,0,0,.55); backdrop-filter:blur(3px);
  font-size:10px; padding:4px 6px; border-radius:8px; color:#fff;
}
.meta{padding:8px}
.title{font-size:12px; font-weight:700; margin:2px 0 6px}
.stars{display:flex; gap:2px; margin-bottom:8px}
.star{font-size:12px; color:var(--brand)}
.btn{
  display:inline-block; width:100%;
  background:linear-gradient(180deg,var(--gold),var(--gold-2));
  color:#2c230c; font-weight:700; font-size:11px;
  border:none; padding:8px 10px; border-radius:10px; cursor:pointer;
}

/* FOOTER NAV */
.footer {
  position: fixed; bottom: 0; width: 100%;
  background: #000000; border-top: 1px solid #302816;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.4);
}
.footer .tabs{ display:flex; justify-content:space-around; align-items:center; padding:8px 0; }
.footer .tab{ flex:1; text-align:center; font-size:13px; color:#ebca7c; text-decoration:none; transition: color .3s ease; }
.footer .tab .ti{
  display:flex; justify-content:center; align-items:center; margin-bottom:4px;
  width:34px; height:34px; border-radius:10px;
  background:#302816; box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
.footer .tab img{
  width:22px; height:22px;
  filter: brightness(0) saturate(100%) invert(84%) sepia(24%) saturate(458%) hue-rotate(356deg) brightness(92%) contrast(87%);
}
.footer .tab.active span{ color:#ebca7c; font-weight:700; }

/* utility tabs duplication kept for your layout */
.tabs{display:grid; grid-template-columns:repeat(4,1fr); padding:8px}
.tab{text-align:center; padding:6px 4px; border-radius:12px}
.tab .ti{ width:26px;height:26px;border-radius:10px; margin:0 auto 4px; background:#1c1c24; display:grid;place-items:center; font-size:14px }
.tab span{display:block; font-size:11px; color:#cdd0db}
.tab.active .ti{background:linear-gradient(180deg,#282837,#1d1d2a); outline:1px solid #303044}
.tab.active span{color:#fff; font-weight:700}

/* DESKTOP */
@media (min-width: 900px){
  .page{max-width:1180px}
  .banner{padding-top:16px}
  .banner .frame{border-radius:18px; aspect-ratio: 21/8}
  .quick{grid-template-columns:repeat(8,1fr)}
  .grid{grid-template-columns:repeat(4,1fr)}
  .footer{width:min(1180px,100%)}
}

/* chips */
.chip{
  display:inline-flex; gap:6px; align-items:center;
  background:var(--chip); border:1px solid #2b2b35; color:#cfd1da;
  padding:6px 10px; border-radius:999px; font-size:12px;
}

/* NAV ICONS section over background */
.nav-icons{
  position:relative;
  display:grid; grid-template-columns: repeat(4, 1fr);
  gap: 15px; padding: 20px 15px; list-style:none; margin:0;
  border-radius: 20px; overflow:hidden;
}
.nav-icons::before{
  content:""; position:absolute; inset:0;
  background: url("") no-repeat center/cover; filter:brightness(.6); z-index:0;
}
.nav-icons li{ position:relative; z-index:1; text-align:center; color:#fff; font-size:13px; }
.nav-icons .ico{ width:55px; height:55px; margin:0 auto 8px; background:#2a2a2a; border-radius:15px; display:flex; align-items:center; justify-content:center; }
.nav-icons .ico img{ width:28px; height:28px; object-fit:contain; }

.home-section{
  background: url("{{asset ('bg.png')}}") no-repeat center/cover;
  border-radius: 15px;
}
.home-section .n, .home-section h3, .home-section a, .home-section p{ color:#fff; }

/* ===== POPUP (WhatsApp + Telegram) ===== */
.pop-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.6);
  backdrop-filter:blur(2px);
  display:none; align-items:center; justify-content:center;
  z-index:9998;
}
.pop{
  width:min(92%, 460px);
  background:linear-gradient(180deg,#171410,#0c0a07);
  border:1px solid #3a2f18;
  box-shadow:0 20px 60px rgba(0,0,0,.6);
  border-radius:20px; overflow:hidden; color:#f6e7c2;
}
.pop-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; background:linear-gradient(180deg,#2b2414,#171309); border-bottom:1px solid #3a2f18;
}
.pop-title{
  margin:0; font-size:16px; letter-spacing:.5px; font-weight:800;
  background:linear-gradient(180deg,var(--gold),var(--gold-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.pop-close{
  width:32px; height:32px; border-radius:10px; display:grid; place-items:center;
  background:#12100a; border:1px solid #3a2f18; color:#f6e7c2; cursor:pointer;
}
.pop-body{ padding:16px; }
.pop-note{
  font-size:13px; color:#e8d9ae; margin:0 0 14px;
}
.pop-cta{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
.btn-cta{
  display:flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 10px; border-radius:14px; font-weight:800; letter-spacing:.3px;
  border:1px solid #3a2f18; background:#0f0c08; color:#f6e7c2; cursor:pointer;
  text-decoration:none;
}
.btn-cta:hover{ filter:brightness(1.1); }
.btn-cta svg{ width:20px; height:20px; flex:0 0 20px; }

/* helper: small text under CTAs */
.pop-foot{
  padding:10px 16px 16px; font-size:12px; color:#c9b98d; display:flex; justify-content:space-between; align-items:center;
}
.pop-foot .reload{
  background:#12100a; border:1px solid #3a2f18; color:#f6e7c2;
  padding:6px 10px; border-radius:10px; cursor:pointer;
  font-weight:700; font-size:12px;
}
</style>
</head>
<body>
  <!-- PRELOADER -->
  <div id="preloader" aria-hidden="true">
    <div class="prewrap">
      <div class="loader-ring"></div>
      <div class="prelogo">Prime Videos</div>
    </div>
  </div>

  <!-- POPUP -->
  <div class="pop-overlay" id="joinPop" aria-modal="true" role="dialog">
    <div class="pop" role="document">
      <div class="pop-head">
        <h3 class="pop-title">Join Our Official Channels</h3>
        <button class="pop-close" id="popClose" aria-label="Close popup">✕</button>
      </div>
      <div class="pop-body">
        <p class="pop-note">Get instant updates, announcements, and support on WhatsApp and Telegram.</p>
        <div class="pop-cta">
          <!-- WhatsApp -->
          <a class="btn-cta" href="https://chat.whatsapp.com/G6wp1qVbYeT2OIViJKOlIv?mode=ems_copy_t" target="_blank" rel="noopener">
            <!-- WhatsApp SVG -->
            <svg viewBox="0 0 24 24" aria-hidden="true"><path fill="#25D366" d="M20.52 3.48A11.94 11.94 0 0012 0C5.37 0 0 5.37 0 12c0 2.11.55 4.18 1.59 6.01L0 24l6.17-1.62A11.94 11.94 0 0012 24c6.63 0 12-5.37 12-12 0-3.19-1.24-6.19-3.48-8.52z"/><path fill="#111" d="M12.02 2.4c5.28 0 9.58 4.3 9.58 9.58 0 5.28-4.3 9.58-9.58 9.58-1.67 0-3.3-.44-4.74-1.29l-.34-.2-3.67.96.98-3.58-.22-.37a9.5 9.5 0 01-1.59-5.1c0-5.28 4.3-9.58 9.58-9.58z"/><path fill="#25D366" d="M9.58 7.7c-.18-.41-.37-.42-.54-.42h-.46c-.16 0-.42.06-.64.29-.22.24-.83.81-.83 1.98s.85 2.29.97 2.45c.12.16 1.64 2.64 4.02 3.6 1.99.78 2.39.62 2.82.58.43-.04 1.39-.57 1.59-1.13.2-.55.2-1.03.14-1.13-.06-.1-.22-.16-.46-.29-.24-.12-1.39-.68-1.61-.76-.22-.08-.38-.12-.54.12-.16.24-.62.76-.76.92-.14.16-.28.18-.52.06-.24-.12-1.01-.37-1.92-1.17-.71-.63-1.19-1.41-1.33-1.65-.14-.24-.02-.36.1-.48.1-.1.24-.26.36-.4.12-.14.16-.24.24-.4.08-.16.04-.3-.02-.42-.06-.12-.52-1.22-.72-1.67z"/></svg>
            WhatsApp
          </a>
          <!-- Telegram -->
          <a class="btn-cta" href="https://chat.whatsapp.com/G6wp1qVbYeT2OIViJKOlIv?mode=ems_copy_t" target="_blank" rel="noopener">
            <!-- Telegram SVG -->
            <svg viewBox="0 0 24 24" aria-hidden="true"><path fill="#0088cc" d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0z"/><path fill="#fff" d="M17.78 7.54c.2-.88-.34-1.22-1.02-.96L5.34 11.23c-.86.34-.84.82-.15 1.03l2.96.93 7.4-4.66c.35-.22.67-.1.41.14l-6 5.4-.22 3.24c.32 0 .47-.15.66-.33l1.58-1.53 3.29 2.43c.6.33 1.03.16 1.17-.56l1.38-9.85z"/></svg>
            Telegram
          </a>
        </div>
      </div>
      <div class="pop-foot">
        <span>Tip: Join WhatsApp to get Lucky Codes.</span>
        <button class="reload" id="popReload">Reload</button>
      </div>
    </div>
  </div>

  <div class="page" id="app">

<!-- Header -->
<header class="header">
  <div class="header-wrap">
    <div class="logo"><h1 class="logo-text">Prime Videos</h1></div>
    <div class="h-actions">
      <div class="icon-btn">🔔</div>
      <div class="icon-btn">🌐</div>
      <div class="icon-btn">⚙️</div>
    </div>
  </div>
</header>

<style>
  .header{background:#111; padding:10px 20px;}
  .header-wrap{display:flex; justify-content:space-between; align-items:center;}
  .logo-text{font-size:24px; font-weight:700; color:#fff; letter-spacing:2px; font-family:"Arial", sans-serif;}
  .h-actions{display:flex; gap:10px;}
  .icon-btn{cursor:pointer; font-size:18px; color:#fff;}
</style>

    <!-- Banner Slider -->
    <section class="banner">
      <div class="frame">
        <div class="slides" id="slides">
          <div class="slide">
            <img src="{{asset ('1.jpeg')}}" alt="">
          </div>
          <div class="slide">
            <img src="{{asset ('2.jpeg')}}" alt="">
          </div>
            <div class="slide">
            <img src="{{asset ('3.jpeg')}}" alt="">
          </div>
            <div class="slide">
            <img src="{{asset ('4.jpeg')}}" alt="">
          </div>
        </div>
        <div class="dots" id="dots">
          <span class="dot active"></span>
          <span class="dot"></span>
        </div>
      </div>
    </section>

<div class="home-section">
<!-- Quick Navigation -->
<ul class="nav-icons">
  <li onclick="window.location.href='{{route ('user.deposit')}}'">
    <div class="ico"><img src="{{asset('mira/dash/upload/20250426/785001779c57f48c4adc1c34b342e143.png')}}" alt=""></div>
    <div class="n">Top up</div>
  </li>
  <li onclick="window.location.href='{{route ('user.withdraw')}}'">
    <div class="ico"><img src="{{asset('mira/dash/upload/20250426/3c7c2950ffd933e01c2d72e3ef86411b.png')}}" alt=""></div>
    <div class="n">Withdrawal</div>
  </li>
<!-- Checkin Menu Item -->
<li>
  <div class="ico" onclick="openCheckinPopup()">
    <img src="{{asset('mira/dash/upload/20250426/d1e7486e9691bd5e26bdce8a11317ac7.png')}}" alt="">
  </div>
  <div class="n">Check in</div>
</li>

<!-- Popup Modal -->
<div class="popup" id="checkinPopup">
  <div class="popup-content">
    <h2>Daily Check-in</h2>
    <p>You can claim your reward amount of R3 now.</p>
    <div class="actions">
      <button class="btn-cancel" onclick="closeCheckinPopup()">Cancel</button>
      <button class="btn-claim" onclick="claimCheckin()">Claim Now</button>
    </div>
  </div>
</div>

<style>
  /* Popup background */
  .popup {
    display:none;
    position:fixed;
    top:0;left:0;right:0;bottom:0;
    background:rgba(0,0,0,.6);
    z-index:9999;
    align-items:center;
    justify-content:center;
  }
  /* Popup box */
  .popup-content {
    background:#16161b;
    padding:20px;
    border-radius:14px;
    max-width:360px;
    width:90%;
    text-align:center;
    box-shadow:0 6px 18px rgba(0,0,0,.4);
    animation:fadeIn .3s ease;
  }
  .popup-content h2 {
    margin:0 0 10px;
    color:#f5d293;
  }
  .popup-content p {
    margin-bottom:20px;
    color:#a7a7b3;
    font-size:14px;
  }
  .actions {
    display:flex;
    justify-content:space-between;
    gap:12px;
  }
  .btn-cancel, .btn-claim {
    flex:1;
    padding:12px;
    border:none;
    border-radius:10px;
    font-weight:600;
    cursor:pointer;
    font-size:15px;
  }
  .btn-cancel {
    background:#1d1d24;
    color:#e9e9ef;
  }
  .btn-claim {
    background:linear-gradient(90deg,#d9b872,#f5d293);
    color:#1c1c1c;
  }
  .btn-claim:hover {
    transform:translateY(-2px);
  }
  @keyframes fadeIn {
    from {opacity:0;transform:scale(.95)}
    to {opacity:1;transform:scale(1)}
  }
</style>

<script>
  function openCheckinPopup(){
    document.getElementById('checkinPopup').style.display = 'flex';
  }
  function closeCheckinPopup(){
    document.getElementById('checkinPopup').style.display = 'none';
  }
  function claimCheckin(){
    window.location.href = "{{ route('checkin') }}"; 
  }
</script>

  <li onclick="window.location.href='{{route ('user.team')}}'">
    <div class="ico"><img src="{{asset('mira/dash/upload/20250426/10ecb0b18bbaa5cf26f3fbdde01243ea.png')}}" alt=""></div>
    <div class="n">Team</div>
  </li>
  <li onclick="window.location.href='{{route ('user.bank.create')}}'">
    <div class="ico"><img src="{{asset('mira/dash/upload/20250426/a8e4d770ed53bf4f4b5ece947b12cb4e.png')}}" alt=""></div>
    <div class="n">Bank</div>
  </li>
  <li onclick="window.location.href='{{route ('exchange')}}'">
    <div class="ico"><img src="{{asset('mira/dash/upload/20250426/838df12cd45fb80acf553231e43da2c6.png')}}" alt=""></div>
    <div class="n">Lucky Code</div>
  </li>
  <li onclick="window.location.href=''">
    <div class="ico"><img src="{{asset('mira/dash/upload/20250513/d7be04081a6c185ed85c34b7ea748b3c.png')}}" alt=""></div>
    <div class="n">Guidebook</div>
  </li>
  <li onclick="window.location.href='{{route ('user.invite')}}'">
    <div class="ico"><img src="{{asset('mira/dash/upload/20250426/09ed68846ebed04970d962df9caf8e7e.png')}}" alt=""></div>
    <div class="n">Invite</div>
  </li>
</ul>

<!-- Notice -->
<div class="notice">
  <div class="bell">🔔</div>
  <div class="marquee" id="marquee">
    <div class="track">
      <p>ID:19***45 Deposit {{currency()}}480  successfully.</p>
      
    </div>
  </div>
</div>
<!-- Popular Videos -->
<section class="section">
  <div class="sec-head">
    <h3>Popular Videos</h3>
    <a href="{{ route('vip') }}">View more</a>
  </div>

 <div class="grid">
    @foreach($videos as $video)
        <div class="card">
            <div class="poster">
                <img src="{{ asset('public/' . $video->thumbnail) }}" alt="{{ $video->title }}">
                <span class="badge">👁 {{ rand(100,999) }} Views</span>
            </div>

            <div class="meta">
                <div class="title">{{ Str::limit($video->title, 35) }}</div>
                
                <div class="stars">
                    @for($i = 0; $i < 5; $i++)
                        <span class="star">★</span>
                    @endfor
                </div>
 @if($purchase)
                    <!-- User has package → show Watch button -->
                    <button class="btn"
                        onclick="window.location.href='{{ route('video.show', $video->id) }}'">
                        🎬 Watch & Earn
                    </button>
                @else
                    <!-- No package → show Upgrade button -->
                    <button class="btn"
                        onclick="window.location.href='{{ route('vip') }}'">
                        Upgrade Now
                    </button>
                @endif

            </div>
        </div>
    @endforeach
</div>

</section>




<!-- Footer nav -->
<nav class="footer">
  <div class="tabs">
    <a class="tab active" href="{{route ('dashboard')}}">
      <div class="ti">
        <img src="{{asset ('mira/dash/static/img/ico-home-on.bcecb8cc.png')}}" alt="Home">
      </div>
      <span>Home</span>
    </a>
    <a class="tab" href="{{route ('user.team')}}">
      <div class="ti">
        <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALNSURBVHgB7ZnBVdtAEIaHJAU4HYibb0lu3GJXgFNBTAWICixVYOvGzY8KUCrAqYAcfWNLoIMwPztrj4RkP3ZXErzH9948Rivp6fdodnZWEL0zTsiT2Ww24j+XcliUZfkY8/o2vpA/KdtCfIi5OnL9Qu4BCFRGHnyiOKQcwUnbSTmXUgRCBK/YjDpey2uvIGNrNWTkXi+8BUsOXqihhPYpolnIOceFb/6CzxTAdrs14/H4K7tnMnTGx38xjgNJhWt1CybbNQXgXSUc8srvaR9Fw/ZD/BfjIdEFJweETPjPOVyqvtIu+SeW8w8zTRe8ECwR0yVoKDAx8/obqQgWsXds3+ltgGhPtej6woHIarGGrZAb+wDPxmqYqGNo2i1KuwhzdHHRg7r5hi0NnSSvRd4y0uG3GkaUN3B0HdY11NAAYoE8M6XqojRzjhasU6EYQqxDnl2ooXPntAnuK2cPoTUkzonV/PRGSHu5gyeKq9uYMK7wl9QBwRFmsUuyva3r1JBatzy+lsoTlSDBIqhtRZyz3Uv0oxEa4UT5mNm/qFqOEPWMRT+wzSkCMSfdY2k5ZT8n+wMcCdkGPzhNOqkSLDoj22Le1E7NyaaJd6/SWVlDe8g2p+Y0uSNPOq/DKk30rnrkG+U+F47/teMReRBl4TiE7FxQ2iZq2JDn8t+Z4CM7lyvf5qqTlGCxaMLRW9fFbthOQ5btmBHGRELfCrGT2jlDNqrB/UWoYJ2HSIHbhmuwiKxi9ddBKdHQaGs2ZF9/FnMzEJwSLCa1mfC8K0jICs3dHiw2UXIYoqmn7xjvbsehBRvlezcnEWncY2rBf5R/2fStty9q/14AjYJ1jUzYlkOIlmcuqbo5yJ1T/7a2ouovMzTspypQyKR+pl4lMraftM8f3Lik4UCgMj1QqRJS4KfUvhj0CTRMD35u1cjeK2P7Rv1VDUN28pddLTwfHOMJAg7z3bQ+0FcAAAAASUVORK5CYII=" alt="Promotion">
      </div>
      <span>Subordinates</span>
    </a>
    <a class="tab" href="{{route ('vip')}}">
      <div class="ti">
        <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMVSURBVHgB7ViLceIwEN1kroCU4OsgV8GZCg4qiKkAqACogFABpALcQUgFRwkqISXcLlknT0Ifg0XGl8mb0VjW93n1dtc20TeuixvKhOFweMeXCZdSi+DAZV3X9ZYyIQthJlvw5ZlLERhiuAyYuKGOuKU8iJEl7XvWU+iEzoSZREU22S2XEZcBlydolzFT6ogf1B0TqG/52Mdwv+cHkuuD3v+mjsghiXuoP3n6a6iX1BG5NNzAp9FXyogchPdQ/+Ppf4D6gToih4Zf6OOoK9WsSEOsLQ9Qwdg1dcRJHOYNS/qw1As7UR1bQEPVX4qHNYHhpX4mxiT3v3EGSzwtnTVkzojimxT0RjoUZw21SByh/bmMee7RF25h8Jz8XsxdwxVdGbpH6esiiN/odBXUxTkM3E95wWlgI7GqWKaxrlhCjn4AwwouGwqTnZCdVNz9Jz7CBdRnXH45k1a8MMbc93Zn7lKOnste6tBe+k5K13yEJkNvD4sJ6M5H2IJqRiZiHN2pXpvNREYV9Mub2SOssSA77MlJDWG+rLWD/uOejV59iMZhdRJ80qLZQC2zgD6xqk824rAG7jfw0DuyT2eccsxk4tCwgkd7zxtuyLaMIVuzOP9VSTc4al7XQIktUyG0FWHddEH2O0FFjuZjluE+caIZNBVkS6nWPZI4JzWLNIynvZVlVNu+TGfIll0UrQnr0a5Pm9tZRiFj3feJWczJXLQmrI4yhyZD9jEnAXpGgqtzvkRaEfYkB8FF32ixyNMGbS08pzOcLAVP5Ck1pieRJOxJm1ZyuBSepLLApBJClLDq1k2bC8oHN/JgUvEiSBj+NTRIps1zobJyk8ou5oQxC7svNZ10G4InqUj2C+o5RFgmoJ6WOX83uVCfwC9u8ZmJb2yIcAn1w5nJ4VIISQP3XgdMRQlDtsauhsDr7AlShEfX0G0InqRygthnvjzpqkVo/FTECEtoKalnQEkY6i9MU0ELi+Ar6ie29L/C/fMjWab1u+lnQX8ZHPFOWP8ZTKmf2DPp40cuOl1fyQrKpoKEl9Rf9JnbF8M/jtQjriuCPywAAAAASUVORK5CYII=" alt="VIP">
      </div>
      <span>Jobs</span>
    </a>
    <a class="tab" href="{{route ('profile')}}">
      <div class="ti">
        <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR0SURBVHgB1VkxdtswDIXTHsC5gbJlS3KCKFu32CeIc4I4J4hyAscnqDN1rDp2inKCulu2sFtH9wQtvgVaEENKlOykLd6DLZEg+EWAAEQR/Wc0oC1oNBoN+e+Y+Zw5keuhsEtGeMn8nbnI89xQR+oFmIGmVIKcBMDFkmGeM+ex4DsBFqA3zCntnhbMt23AowCL6QF0GhApqDQzzG0CMtCRMJ9S6TpJQC5j0LeBvnbADDbhvwfPBIZKcy54ghV1JNYL0FiA04DuM99qDyKUAuzQUQbTLWgHJNYD8AuqA8emPHPlB9QNLFY067OibSSWfFZNS57nxJV73zD4M9XBXrOCO3o9OnfuvX78ArCYyPXZy125QAPpDQ13yH1Ce542RINE3d++AViQUdcpL9yNT2jtw9z5kcrYaqgeYxEBLukNKBCNECkKLTeQzfWtQZeNrTbOLvuk1BjygDbMJ3qTDyR7PVA3goKl8CMUs9Il7YA8eOCSmb0JAQagPjWCtcYjVdbok1QQja4UlgOr531gzDUzdukxVWn0iKpqLERWfqQmt9awDxFjjYzKRGIrv6m0BX34IOSnIp8IsCNqrgtChIe4a6oZeJ6Myoi1lmfZfVwgrBlHtq1OhalmzL9Zbsx8wNdQhjRqLdO2gli1rEWm0PLiupuwhpSYSCdi9tinQWJjppr2m3xUWSOl0hqp6vamXme8xrXOtNaHV3W50dSmYfVW4auD0V5QgMRXwTnrmTjj59ROX6jafHjgzaZLHMEZTzCjdsLmKlqFypXW+kxk9tSuleLHpuYuIcyo6wuxQJBU2NRyZxRH2vLr8b5aIrRhCmak6RNHyU1AHmBhThfsdYdM+QKw9mGr9FpAH8u9oTKsrBQQRAIba6dweiorukL6U/L7/DZV3yoEOJGJi4bBeCgdf/H/UOL2Zkm0jd1CJoISdW3wY11Cu8ExtZCYFH6Ye7pdsNB90gOsi6W2wj9UxxFFkIAeS7hCGk0dEfTPt3xL0ViQ2jeJI6V6AbTftWhR8Rpkti1BPe9469rYrjDMpn1vwtxpZeQBC9odpep6ZV1qT012rwSu6O+TDpebvbLna2RKxDeDBBeAjGSxnZLMnaimTRofOILw41RuDTmvJ44sjgFGSragcmMU2/iv5zWpdqDiZjpdn2JAMItRPeRAdsKMl9lnFE/Un9y39tpLcA2wOLauoqYNkyN5mEBfrz0g5etENc1da/lqicwBMhuPxxeuUF4SincwVgF7wLrPPXUkmSNTTYY8Rb73bE38CK9NOms1HoOqscMeMRwWuXPAdju9DBwGLiji0DmWAufOKwG79I15F1L29PT08/Dw8CtffqAK9PqNmNt/cX+oDI0FO+G/T6I/Ciyo8XxYFCcUPtCGi0SHMVnRCZWbMvHoO9vlJ4OMwru/oOrrkHH6EqqOA9LA+Ohz5yjAlmS17cHhLqigck8UsQM6Abakvk/gEHrYcbitW/I+NXIvwJqkNAXj4wrAJ1Q9xIqqg0PU3IjVy/wVPjn8s/QH+Tzho3q2G1sAAAAASUVORK5CYII=" alt="Mine">
      </div>
      <span>Mine</span>
    </a>
  </div>
</nav>
<script>
  /* ===== PRELOADER ===== */
  window.addEventListener('load', function(){
    const pre = document.getElementById('preloader');
    if(pre){
      pre.style.opacity = '0';
      pre.style.transition = 'opacity .35s ease';
      setTimeout(()=> pre.remove(), 400);
    }
  });

  /* ===== SLIDER ===== */
  (function(){
    const slides = document.getElementById('slides');
    const dotsWrap = document.getElementById('dots');
    const dots = Array.from(dotsWrap.children);
    let i = 0;
    function go(n){
      i = (n + dots.length) % dots.length;
      slides.style.transform = `translateX(-${i*100}%)`;
      dots.forEach((d,idx)=>d.classList.toggle('active', idx===i));
    }
    setInterval(()=>go(i+1), 3500);
    dotsWrap.addEventListener('click', e=>{
      const idx = [...dotsWrap.children].indexOf(e.target);
      if(idx>-1){ go(idx); }
    });
  })();

  /* ===== POPUP LOGIC =====
     - Shows every time page loads
     - Close button hides it.
     - "Reload" button forces page reload.
     - After clicking any CTA, soft-reload after 1.5s.
  */
  (function(){
    const overlay = document.getElementById('joinPop');
    const btnClose = document.getElementById('popClose');
    const btnReload = document.getElementById('popReload');

    function openPop(){
      overlay.style.display='flex';
      document.documentElement.style.overflow='hidden';
      document.body.style.overflow='hidden';
    }
    function closePop(){
      overlay.style.display='none';
      document.documentElement.style.overflow='';
      document.body.style.overflow='';
    }

    // auto-open every time
    setTimeout(openPop, 1200); // slight delay after load

    btnClose.addEventListener('click', closePop);
    overlay.addEventListener('click', (e)=>{ if(e.target===overlay) closePop(); });
    btnReload.addEventListener('click', ()=> location.reload());

    overlay.querySelectorAll('.btn-cta').forEach(a=>{
      a.addEventListener('click', ()=>{
        setTimeout(()=> location.reload(), 1500);
      });
    });
  })();

  /* ===== OPTIONAL AUTO-RELOAD (set minutes > 0 to enable) ===== */
  (function(){
    const minutes = 5; // change to 0 to disable auto reload
    if(minutes > 0){
      setTimeout(()=> location.reload(), minutes*60*1000);
    }
  })();
</script>

</body>
@include('partials.notify')
</html>
