<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: rgba(0, 0, 0, 0.75);
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
overflow: hidden;
}
.container {
width: 85%;
max-width: 320px;
background: #ffffff;
border-radius: 28px;
padding: 40px 24px;
position: relative;
text-align: center;
box-shadow: 0 25px 50px rgba(0,0,0,0.6);
animation: zoomIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
z-index: 10;
}
@keyframes zoomIn {
0% { opacity: 0; transform: scale(0.3) rotate(-5deg); }
100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.gift-wrapper {
position: relative;
display: inline-block;
margin-bottom: 25px;
}
.gift-box {
font-size: 90px;
display: block;
filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
animation: superBounce 1.5s infinite ease-in-out;
}
.gift-wrapper::before {
content: '';
position: absolute;
top: 50%; left: 50%;
width: 120px; height: 120px;
background: radial-gradient(circle, rgba(255,223,0,0.4) 0%, rgba(255,223,0,0) 70%);
transform: translate(-50%, -50%);
animation: pulse 2s infinite;
z-index: -1;
}
@keyframes superBounce {
0%, 100% { transform: scale(1) translateY(0); }
30% { transform: scale(1.1, 0.9) translateY(-20px); }
50% { transform: scale(0.9, 1.1) translateY(0); }
70% { transform: scale(1.05, 0.95) translateY(-10px); }
}
@keyframes pulse {
0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
}
.title { font-size: 24px; font-weight: 900; color: #111; margin-bottom: 12px; line-height: 1.3; }
.desc { font-size: 16px; color: #444; margin-bottom: 30px; line-height: 1.6; font-weight: 500; }
.cta-btn {
width: 100%;
padding: 18px;
border: none;
border-radius: 16px;
background: linear-gradient(45deg, #FF0050, #FF5C33, #FFD700);
background-size: 200% 200%;
color: white;
font-size: 18px;
font-weight: 800;
cursor: pointer;
box-shadow: 0 8px 20px rgba(255, 65, 108, 0.4);
animation: gradientMove 3s ease infinite;
transition: transform 0.2s;
}
@keyframes gradientMove {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.cta-btn:active { transform: scale(0.95); }
.close-btn {
margin-top: 20px;
background: none;
border: none;
color: #aaa;
text-decoration: none;
font-size: 14px;
font-weight: 500;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<div class="gift-wrapper">
<span class="gift-box">🎁</span>
</div>
<h2 class="title">축하합니다!<br>특별 선물이 도착했어요</h2>
<p class="desc">지금 바로 선물을 확인하고<br>준비된 혜택을 누려보세요!</p>
<button class="cta-btn" id="gift-receive">지금 선물 받기</button>
<button class="close-btn" id="close-btn">다음에 받을게요</button>
</div>
<script>
function startMegaConfetti() {
const duration = 5 * 1000;
const animationEnd = Date.now() + duration;
const frame = () => {
confetti({
particleCount: 3,
angle: 60,
spread: 55,
origin: { x: 0 },
colors: ['#FF0050', '#FFD700', '#00E5FF', '#7C4DFF'],
scalar: 1.5
});
confetti({
particleCount: 3,
angle: 120,
spread: 55,
origin: { x: 1 },
colors: ['#FF0050', '#FFD700', '#00E5FF', '#7C4DFF'],
scalar: 1.5
});
if (Date.now() < animationEnd) {
requestAnimationFrame(frame);
}
};
confetti({
particleCount: 150,
spread: 100,
origin: { y: 0.6 },
colors: ['#FF0050', '#FFD700', '#FFFFFF'],
scalar: 2
});
frame();
}
startMegaConfetti();
// 핵클 브릿지 연동
window.addEventListener("hackleBridgeReady", function () {
document.getElementById('gift-receive').addEventListener('click', function() {
// 선물 받기 클릭 트래킹 및 이동
Hackle.bridge.handleUrl("https://example.com/gift", "mega_gift_receive");
});
document.getElementById('close-btn').addEventListener('click', function() {
Hackle.bridge.closeInAppMessage();
});
});
</script>
</body>
</html>