<!DOCTYPE html>
<html>
<head>
  <style>
    @keyframes gradientBG {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    body {
      font-family: system-ui, -apple-system, sans-serif;
      background: #1a1a1a;
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      overflow: hidden;
    }

    .popup {
      background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
      border: 1px solid #333;
      border-radius: 20px;
      padding: 2rem;
      width: 90%;
      max-width: 480px;
      position: relative;
      animation: floatIn 1s cubic-bezier(0.23, 1, 0.32, 1);
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }

    .popup::before {
      content: '';
      position: absolute;
      inset: -2px;
      background: linear-gradient(90deg, #ff4d4d, #ff8c00, #00ff9d, #00b8ff, #ff4d4d);
      border-radius: 22px;
      z-index: -1;
      animation: gradientBG 3s linear infinite;
      background-size: 400% 400%;
      opacity: 0.5;
    }

    .close-btn {
      position: absolute;
      top: 1rem;
      right: 1rem;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.1);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 1.2rem;
      transition: all 0.3s ease;
    }

    .close-btn:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: rotate(90deg);
    }

    @keyframes floatIn {
      0% {
        opacity: 0;
        transform: translateY(60px) scale(0.8) rotate(-2deg);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
      }
    }

    .header {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      margin-bottom: 2rem;
      padding-bottom: 2rem;
      border-bottom: 1px solid #333;
      animation: slideRight 0.8s ease-out 0.2s both;
    }

    .header-text p {
      color: #fff;
      margin: 0.5rem 0 0 0;
    }

    .sparkle {
      position: absolute;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: white;
      pointer-events: none;
      animation: sparkleAnim 1.5s linear forwards;
    }

    @keyframes sparkleAnim {
      0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
      }
    }

    .profile-pic {
      width: 80px;
      height: 80px;
      border-radius: 20px;
      background: linear-gradient(45deg, #FF4D4D, #FF8C00, #00ff9d);
      background-size: 300% 300%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
      position: relative;
      animation: profileFloat 3s ease-in-out infinite, gradientBG 3s linear infinite;
    }

    @keyframes profileFloat {
      0%, 100% { transform: translateY(0) rotate(0deg); }
      50% { transform: translateY(-10px) rotate(5deg); }
    }

    .profile-pic::after {
      content: '';
      position: absolute;
      width: 150%;
      height: 150%;
      background: inherit;
      border-radius: inherit;
      filter: blur(20px);
      opacity: 0.3;
      z-index: -1;
      animation: glowPulse 2s ease-in-out infinite;
    }

    @keyframes glowPulse {
      0%, 100% { transform: scale(1); opacity: 0.3; }
      50% { transform: scale(1.2); opacity: 0.5; }
    }

    .header-text h2 {
      margin: 0;
      color: #fff;
      font-size: 1.5rem;
      position: relative;
      display: inline-block;
    }

    .header-text h2::after {
      content: '';
      position: absolute;
      bottom: -5px;
      left: 0;
      width: 0;
      height: 2px;
      background: linear-gradient(90deg, #FF4D4D, #FF8C00);
      animation: lineGrow 0.6s ease-out 1s forwards;
    }

    @keyframes lineGrow {
      to { width: 100%; }
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
      margin-bottom: 2rem;
      perspective: 1000px;
    }

    .stat-card {
      background: rgba(255, 255, 255, 0.05);
      padding: 1.5rem 1rem;
      border-radius: 15px;
      text-align: center;
      transition: all 0.4s ease;
      animation: cardFlip 0.6s ease-out backwards;
      transform-style: preserve-3d;
    }

    .stat-card:nth-child(1) { animation-delay: 0.4s; }
    .stat-card:nth-child(2) { animation-delay: 0.6s; }

    .stat-label {
      color: #fff;
    }

    @keyframes cardFlip {
      0% { transform: rotateX(90deg); opacity: 0; }
      100% { transform: rotateX(0deg); opacity: 1; }
    }

    .stat-card:hover {
      transform: translateY(-5px) rotateY(10deg);
      box-shadow: -5px 5px 15px rgba(0,0,0,0.3);
      background: rgba(255, 255, 255, 0.1);
    }

    .stat-number {
      background: linear-gradient(90deg, #fff, #888, #fff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      font-size: 1.8rem;
      font-weight: bold;
      animation: numberShine 3s linear infinite;
      background-size: 200% 100%;
    }

    @keyframes numberShine {
      from { background-position: -100% 0; }
      to { background-position: 200% 0; }
    }

    .social-buttons {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
      animation: buttonsRise 0.8s ease-out 0.8s both;
    }

    @keyframes buttonsRise {
      from { transform: translateY(30px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    .btn {
      padding: 1rem;
      border-radius: 12px;
      border: none;
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      text-decoration: none;
      font-weight: 600;
      position: relative;
      overflow: hidden;
    }

    .btn svg {
      transition: transform 0.3s ease;
    }

    .btn:hover svg {
      transform: scale(1.2) rotate(10deg);
    }

    .btn::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
      transform: scale(0);
      transition: transform 0.6s ease-out;
    }

    .btn:hover::before {
      transform: scale(1) rotate(45deg);
    }

    .telegram-btn {
      background: #0088cc;
      color: white;
    }

    .youtube-btn {
      background: #FF0000;
      color: white;
    }

    .btn:hover {
      transform: translateY(-5px) scale(1.02);
      box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    }

    .live-indicator {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: #fff;
      margin-top: 1.5rem;
      justify-content: center;
      animation: fadeSlideUp 0.6s ease-out 1.2s both;
    }

    @keyframes fadeSlideUp {
      from { transform: translateY(20px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    .pulse {
      width: 8px;
      height: 8px;
      background: #22c55e;
      border-radius: 50%;
      position: relative;
    }

    .pulse::before,
    .pulse::after {
      content: '';
      position: absolute;
      width: 100%;
      height: 100%;
      background: inherit;
      border-radius: inherit;
      animation: triplePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

    .pulse::after {
      animation-delay: 0.5s;
    }

    @keyframes triplePulse {
      0% { transform: scale(1); opacity: 1; }
      100% { transform: scale(4); opacity: 0; }
    }

    .hidden {
      display: none;
    }
  </style>
</head>
<body>
  <div class="popup">
    <button class="close-btn">×</button>
    <div class="header">
      <div class="profile-pic">⚡️</div>
      <div class="header-text">
        <h2>Join Our Community</h2>
        <p>Get exclusive content and updates</p>
      </div>
    </div>

    <div class="stats">
      <div class="stat-card">
        <div class="stat-number">50K+</div>
        <div class="stat-label">Telegram Members</div>
      </div>
      <div class="stat-card">
        <div class="stat-number">100K+</div>
        <div class="stat-label">YouTube Subscribers</div>
      </div>
    </div>

    <div class="social-buttons">
      <a href="#" class="btn telegram-btn">
        <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
          <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69.01-.03.01-.14-.07-.2-.08-.06-.19-.04-.27-.02-.11.02-1.93 1.23-5.46 3.62-.51.35-.98.52-1.4.51-.46-.01-1.35-.26-2.01-.48-.81-.27-1.46-.42-1.4-.88.03-.24.37-.48 1.03-.74 4.03-1.75 6.72-2.91 8.07-3.48 3.85-1.63 4.64-1.91 5.17-1.92.11 0 .37.03.54.18.17.15.21.36.23.5-.01.14.01.55-.01.55z"/>
        </svg>
        Join Telegram
      </a>
      <a href="#" class="btn youtube-btn">
        <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
          <path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>
        </svg>
        Subscribe
      </a>
    </div>

    <div class="live-indicator">
      <div class="pulse"></div>
      <span>1,234 people online now</span>
    </div>
  </div>

  <script>
    // Add sparkle effect on mouse move
    document.addEventListener('mousemove', function(e) {
      const sparkle = document.createElement('div');
      sparkle.className = 'sparkle';
      sparkle.style.left = e.pageX + 'px';
      sparkle.style.top = e.pageY + 'px';
      
            // Random direction for each sparkle
      sparkle.style.setProperty('--tx', (Math.random() * 100 - 50) + 'px');
      sparkle.style.setProperty('--ty', (Math.random() * 100 - 50) + 'px');
      
      document.body.appendChild(sparkle);

      // Remove the sparkle after animation
      setTimeout(() => {
        sparkle.remove();
      }, 1500);
    });

    // Close button functionality
    const closeButton = document.querySelector('.close-btn');
    closeButton.addEventListener('click', () => {
      const popup = document.querySelector('.popup');
      popup.classList.add('hidden'); // Hide the popup by adding a hidden class
    });
  </script>
</body>
</html>
