I’m constantly excited to take on fresh challenges and work alongside inspiring innovators.

Phone

+38349706007

Email

waloonn@live.com

Website

https://molla.host

Address

40000 | Mitrovicë

Social Links

Christmas Referral Bonus Popup UI

A festive popup component with animations, snow effects, and referral reward details for a holiday promotion.

Dec 04, 2025 By Valon Tahiri
<div id="christmasPopup" class="popup">
  <div class="popup-content">
    <span class="close-btn">&times;</span>
    <h2>{{ __('Christmas Referral Bonus!') }}</h2>
    <p>{{ __('Invite your friends & earn rewards:') }}</p>
    <ul>
      <li><strong>$0.50</strong> {{ __('for you per referral') }}</li>
      <li><strong>$2.00</strong> {{ __('for your friend') }}</li>
    </ul>
    <p class="offer-deadline">
      {{ __('Offer valid until') }} <strong>{{ __('31st December') }}</strong>
    </p>
    <a href="{{ route('user.referral') }}" class="btn">{{ __('Refer Now') }}</a>
    <button class="withdraw-btn" id="withdrawBtn">
      <i class="icon-info-circle"></i> {{ __('Withdraw Info') }}
      <span class="tooltiptext">
        {{ __('Only verified referrals will be counted for withdrawal. Unverified referral bonuses will be deducted.') }}
      </span>
    </button>
    <!-- Snowflakes Container -->
    <div class="snowflakes" aria-hidden="true">
      <div class="snowflake">❅</div>
      <div class="snowflake">❆</div>
      <div class="snowflake">❅</div>
      <div class="snowflake">❆</div>
      <div class="snowflake">❅</div>
      <div class="snowflake">❆</div>
      <div class="snowflake">❅</div>
      <div class="snowflake">❆</div>
      <div class="snowflake">❅</div>
      <div class="snowflake">❆</div>
      <div class="snowflake">❅</div>
      <div class="snowflake">❆</div>
    </div> 
  </div>
</div>
<style>
/* Christmas Theme Colors */
:root {
  --primary: #c41e3a;     /* Christmas Red */
  --secondary: #006400;   /* Dark Green */
  --accent: #ffd700;      /* Gold */
  --light: #fffaf0;       /* Warm White */
  --snow: #ffffff;
  --popupcon: #869d71;
}

/* Overlay with Christmas Gradient */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.9), rgba(0, 100, 0, 0.85));
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.7s ease-out;
  overflow: hidden;
}

/* Popup Box - Christmas Card Style */
.popup-content {
  background: var(--popupcon);
  border-radius: 20px;
  width: 95%;
  max-width: 480px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  border: 4px solid var(--accent);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.popup-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    45deg,
    var(--primary), var(--primary) 10px,
    var(--secondary) 10px, var(--secondary) 20px
  );
}

.popup-content:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 70px rgba(0,0,0,0.35);
}

/* Close Button - Gold Star */
.close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  cursor: pointer;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255,215,0,0.6);
  transition: all 0.3s;
  z-index: 10;
}
.close-btn:hover {
  color: #ffcc00;
  transform: rotate(180deg) scale(1.2);
}

/* Headings */
.popup-content h2 {
  color: var(--primary);
  font-size: 28px;
  margin-bottom: 18px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  position: relative;
}
.popup-content h2::after {
  content: '🎄';
  display: inline-block;
  margin-left: 10px;
  animation: twinkle 1.5s infinite;
}

/* Content */
.popup-content p, .popup-content ul {
  color: #333;
  margin-bottom: 16px;
  line-height: 1.7;
  font-size: 16px;
}
.popup-content ul {
  list-style: none;
  padding: 0;
}
.popup-content ul li {
  margin: 10px 0;
  font-size: 17px;
}
.popup-content ul li strong {
  color: var(--primary);
  font-size: 19px;
}
.popup-content ul li::before {
  content: '🎁';
  margin-right: 12px;
  font-size: 18px;
}

/* Deadline */
.offer-deadline {
  font-weight: bold;
  color: var(--secondary);
  margin: 25px 0;
  font-size: 17px;
}
.offer-deadline strong {
  color: var(--primary);
}

/* Buttons */
.popup-content .btn,
.popup-content .withdraw-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  margin: 12px 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.popup-content .btn {
  background: linear-gradient(45deg, var(--primary), #e63946);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}
.popup-content .btn:hover {
  background: linear-gradient(45deg, #e63946, var(--primary));
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(196, 30, 58, 0.5);
}
.popup-content .btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}
.popup-content .btn:hover::before {
  left: 100%;
}

.popup-content .withdraw-btn {
  background: #fff;
  color: var(--secondary);
  border: 2.5px solid var(--secondary);
}
.popup-content .withdraw-btn:hover {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-2px);
}

/* Tooltip */
.withdraw-btn .tooltiptext {
  visibility: hidden;
  width: 240px;
  background: var(--secondary);
  color: #fff;
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  position: absolute;
  z-index: 10;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.withdraw-btn .tooltiptext::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  border: 8px solid transparent;
  border-top-color: var(--secondary);
}
.withdraw-btn:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Snowflakes Animation */
.snowflakes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.snowflake {
  color: var(--snow);
  font-size: 1.2em;
  position: absolute;
  top: -10px;
  animation: fall linear infinite;
  user-select: none;
  opacity: 0.9;
}
@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Generate unique snowflake animations */
.snowflake:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; font-size: 1em; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 15s; animation-delay: 2s; font-size: 1.3em; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 10s; animation-delay: 4s; font-size: 0.9em; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 18s; animation-delay: 1s; font-size: 1.1em; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 13s; animation-delay: 6s; font-size: 1.4em; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 16s; animation-delay: 3s; font-size: 1em; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 11s; animation-delay: 5s; font-size: 1.2em; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 14s; animation-delay: 7s; font-size: 0.8em; }
.snowflake:nth-child(9) { left: 15%; animation-duration: 17s; animation-delay: 8s; font-size: 1.1em; }
.snowflake:nth-child(10){ left: 25%; animation-duration: 12s; animation-delay: 9s; font-size: 1.3em; }
.snowflake:nth-child(11){ left: 75%; animation-duration: 15s; animation-delay: 10s; font-size: 1em; }
.snowflake:nth-child(12){ left: 90%; animation-duration: 13s; animation-delay: 11s; font-size: 1.2em; }

/* Fade-in */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Mobile */
@media (max-width: 480px) {
  .popup-content {
    padding: 30px 20px;
    margin: 10px;
  }
  .popup-content h2 {
    font-size: 24px;
  }
  .popup-content .btn,
  .popup-content .withdraw-btn {
    padding: 12px 24px;
    font-size: 15px;
    display: block;
    width: 80%;
    margin: 12px auto;
  }
  .withdraw-btn .tooltiptext {
    width: 200px;
    font-size: 12px;
  }
  .snowflake {
    font-size: 0.9em;
  }
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
    const popup = document.getElementById('christmasPopup');
    const closeBtn = document.querySelector('#christmasPopup .close-btn');
    const popupKey = 'christmasPopupSeen';
    const sixHours = 6 * 60 * 60 * 1000;
    const now = new Date().getTime();
    const lastSeen = localStorage.getItem(popupKey);

    if (!lastSeen || now - lastSeen > sixHours) {
        popup.style.display = 'flex';
    } else {
        popup.style.display = 'none';
    }

    function closePopupHandler() {
        popup.style.display = 'none';
        localStorage.setItem(popupKey, new Date().getTime());
    }

    closeBtn.addEventListener('click', closePopupHandler);
    window.addEventListener('click', function(e) {
        if (e.target === popup) {
            closePopupHandler();
        }
    });
});
</script>
Share

Leave a comment

Your email address will not be published. Required fields are marked *

Your experience on this site will be improved by allowing cookies. Cookie Policy