<div id="rpopup-overlay" style="display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.82);backdrop-filter:blur(4px);z-index:999999;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;">
<div id="rpopup-container" style="position:relative;max-width:92vw;animation:rpopupBounce 0.4s cubic-bezier(0.34,1.56,0.64,1) both;">
<div id="rpopup-close" style="position:absolute;top:-16px;right:-16px;width:46px;height:46px;background:#e74c3c;border:3px solid white;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;color:white;cursor:pointer;transition:0.2s;box-shadow:0 5px 15px rgba(0,0,0,0.3);z-index:20;font-family:monospace;line-height:1;" title="Close">✕</div>
<div id="rpopup-frame" style="display:inline-block;padding:5px;border-radius:26px;background:#1a1a2e;box-shadow:0 0 0 3px #ff3366,0 20px 40px rgba(0,0,0,0.5);animation:rpopupRainbow 2.2s linear infinite;line-height:0;">
<img id="rpopup-img" src="https://benighatrorangmun.gov.np/sites/benighatrorangmun.gov.np/files/IM... alt="Notice Banner" style="display:block;border-radius:21px;max-width:100%;height:auto;max-height:78vh;object-fit:contain;animation:rpopupZoom 0.35s ease 0.05s both;">
</div>
<div style="text-align:center;margin-top:12px;font-size:12px;color:rgba(255,255,240,0.65);background:rgba(0,0,0,0.3);padding:4px 12px;border-radius:50px;width:fit-content;margin-left:auto;margin-right:auto;">✕ top corner or ESC</div>
</div>
</div>
<style>
@keyframes rpopupBounce{0%{opacity:0;transform:scale(0.75) translateY(40px);}100%{opacity:1;transform:scale(1) translateY(0);}}
@keyframes rpopupRainbow{0%{box-shadow:0 0 0 3px #ff3366,0 20px 40px rgba(0,0,0,0.5);}25%{box-shadow:0 0 0 3px #ffcc33,0 20px 40px rgba(0,0,0,0.5);}50%{box-shadow:0 0 0 3px #33ccff,0 20px 40px rgba(0,0,0,0.5);}75%{box-shadow:0 0 0 3px #aa66ff,0 20px 40px rgba(0,0,0,0.5);}100%{box-shadow:0 0 0 3px #ff3366,0 20px 40px rgba(0,0,0,0.5);}}
@keyframes rpopupZoom{0%{opacity:0;transform:scale(0.96);}100%{opacity:1;transform:scale(1);}}
@media (max-width:680px){#rpopup-close{width:40px;height:40px;font-size:24px;top:-14px;right:-12px;border-width:2.5px;}#rpopup-frame{padding:4px;border-radius:22px;}#rpopup-frame img{border-radius:18px;max-height:65vh;}}
@media (max-width:480px){#rpopup-overlay{padding:10px;}#rpopup-close{width:36px;height:36px;font-size:22px;top:-12px;right:-10px;}#rpopup-frame img{max-height:58vh;}}
@media (max-height:500px) and (orientation:landscape){#rpopup-frame img{max-height:60vh;}}
</style>
<script>
(function(){
var overlay = document.getElementById('rpopup-overlay');
var closeBtn = document.getElementById('rpopup-close');
if(!overlay) return;
function showPopup(){ overlay.style.display='flex'; document.body.style.overflow='hidden'; }
function hidePopup(){ overlay.style.display='none'; document.body.style.overflow=''; }
if(closeBtn) closeBtn.onclick = hidePopup;
overlay.onclick = function(e){ if(e.target === overlay) hidePopup(); };
document.addEventListener('keydown', function(e){ if(e.key === 'Escape' || e.keyCode === 27) hidePopup(); });
window.addEventListener('load', function(){ setTimeout(showPopup, 600); });
window.rpopupShow = showPopup;
window.rpopupHide = hidePopup;
})();
</script>