<style>
body {
margin: 0;
background: #e0f7fa;
font-family: "Segoe UI", sans-serif;
overflow: hidden;
position: relative;
}
.gift {
width: 100px;
height: 100px;
background-color: #ff4081;
border-radius: 10px;
position: absolute;
top: 55%;
left: 50%;
transform: translate(-50%, -50%);
cursor: pointer;
animation: bounce 2s infinite, pulse 3s infinite alternate,
rotateBox 6s infinite linear;
z-index: 10;
}
.gift::before,
.gift::after {
content: "";
position: absolute;
background: white;
}
.gift::before {
top: 0;
left: 50%;
transform: translateX(-50%);
width: 10px;
height: 100%;
}
.gift::after {
top: 50%;
left: 0;
transform: translateY(-50%);
width: 100%;
height: 10px;
}
@keyframes bounce {
0%,
100% {
transform: translate(-50%, -50%) translateY(0);
}
50% {
transform: translate(-50%, -50%) translateY(-15px);
}
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(255, 64, 129, 0.7);
}
100% {
box-shadow: 0 0 15px 15px rgba(255, 64, 129, 0);
}
}
@keyframes rotateBox {
0% {
transform: translate(-50%, -50%) rotate(0deg);
}
100% {
transform: translate(-50%, -50%) rotate(2deg);
}
}
.click-text {
position: absolute;
top: calc(55% + 70px);
left: 50%;
transform: translateX(-50%);
font-size: 18px;
color: #d81b60;
font-weight: bold;
animation: blink 1.5s infinite;
z-index: 9;
}
@keyframes blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
.slide-container {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(255, 255, 255, 0.95);
display: none;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
padding: 20px;
z-index: 5;
}
.slide {
display: none;
font-size: 24px;
color: #d81b60;
margin-bottom: 20px;
max-width: 80%;
line-height: 1.6;
}
.slide.active {
display: block;
}
.next-button {
padding: 10px 20px;
background: #ff4081;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
}
.heart {
position: absolute;
top: -50px;
color: #f06292;
font-size: 24px;
animation: fall 6s linear infinite;
}
@keyframes fall {
to {
transform: translateY(110vh);
opacity: 0;
}
}
/* Responsif untuk HP */
@media screen and (max-width: 600px) {
.gift {
width: 70px;
height: 70px;
}
.click-text {
font-size: 16px;
top: calc(55% + 50px);
}
.slide {
font-size: 18px;
max-width: 90%;
}
.next-button {
font-size: 14px;
padding: 8px 16px;
}
}
</style>
</head>
</html>