<!-- Countdown-Container -->
<div id="countdown-container">
<div id="countdown">Lädt...</div>
<div id="afterCountdown" style="display:none">
🎉 Der Countdown ist abgelaufen!
</div>
</div>
<style>
/* Zentrierter Countdown für PC */
#countdown-container {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
font-family: Arial, sans-serif;
font-size: 36px;
background-color: #ffffff;
padding: 20px 40px;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0,0,0,0.3);
z-index: 9999;
max-width: 600px;
}
/* Text nach Countdown */
#afterCountdown {
font-size: 42px;
font-weight: bold;
}
</style>
<!-- Canvas Confetti -->
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.5.1/dist/confetti.browser.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var countDownDate = new Date("Dec 22, 2025 00:00:00").getTime();
var x = setInterval(function() {
var now = new Date().getTime();
var distance = countDownDate - now;
if (distance > 0) {
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000*60*60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000*60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
document.getElementById("countdown").innerHTML =
days + "d " + hours + "h " + minutes + "m " + seconds + "s ";
} else {
clearInterval(x);
document.getElementById("countdown").style.display = "none";
document.getElementById("afterCountdown").style.display = "block";
// EPISCHES Konfetti für 8 Sekunden
var duration = 8 * 1000;
var end = Date.now() + duration;
(function frame() {
// Mehrere Partikelgrößen und Farben
confetti({
particleCount: 10,
angle: 60,
spread: 120,
origin: { x: Math.random(), y: 0 },
gravity: 0.8,
scalar: Math.random() * 1.5 + 0.5, // verschiedene Größen
colors: ['#ff0a54','#ff477e','#ff85a1','#fbb1b1','#cdb4db','#845ec2','#00d2ff','#00ff99']
});
confetti({
particleCount: 10,
angle: 120,
spread: 120,
origin: { x: Math.random(), y: 0 },
gravity: 0.8,
scalar: Math.random() * 1.5 + 0.5,
colors: ['#ff0a54','#ff477e','#ff85a1','#fbb1b1','#cdb4db','#845ec2','#00d2ff','#00ff99']
});
if (Date.now() < end) {
requestAnimationFrame(frame);
}
}());
}
}, 1000);
});
</script>
Lädt…