Tympizzas – Pizza Wheel Game
body {
font-family: Arial, sans-serif;
background: #f8efe6;
text-align: center;
padding: 30px;
}
h1 {
color: #d62828;
}
#wheel {
margin: 30px auto;
width: 300px;
height: 300px;
border-radius: 50%;
border: 10px solid #333;
position: relative;
overflow: hidden;
transform: rotate(0deg);
transition: transform 4s cubic-bezier(.17,.67,.83,.67);
}
.slice {
width: 50%;
height: 50%;
background: #ffba08;
position: absolute;
top: 50%;
left: 50%;
transform-origin: 0% 0%;
text-align: right;
padding: 10px;
color: #000;
font-weight: bold;
}
#arrow {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 40px solid #d62828;
margin: 0 auto;
}
#result {
margin-top: 20px;
font-size: 22px;
font-weight: bold;
color: #003049;
}
#code {
margin-top: 10px;
font-size: 20px;
color: #d62828;
}
button {
background: #d62828;
color: white;
border: none;
padding: 12px 24px;
font-size: 18px;
border-radius: 5px;
cursor: pointer;
margin-top: 20px;
}
button:hover {
background: #9d0208;
}
a {
display: inline-block;
margin-top: 15px;
text-decoration: none;
background: #3bb143;
color: white;
padding: 10px 20px;
border-radius: 5px;
font-weight: bold;
}
🎉 Tympizzas – Spin & Win 🎉
SPIN
let wheel = document.getElementById(«wheel»);
let result = document.getElementById(«result»);
let codeDiv = document.getElementById(«code»);
let whatsappDiv = document.getElementById(«whatsapp»);
function spin() {
let random = Math.floor(Math.random() * 360) + 720; // mínimo 2 vueltas
wheel.style.transform = «rotate(» + random + «deg)»;
setTimeout(() => {
let deg = random % 360;
let prize;
if (deg >= 0 && deg = 60 && deg = 120 && deg = 180 && deg = 240 && deg < 300) prize = «🍟 Papas XL!»;
else prize = «🍕 Free Pizzeta!»;
result.innerHTML = «🎊 You won: » + prize;
// Generar código único
let code = «TYM» + Math.floor(1000 + Math.random() * 9000);
codeDiv.innerHTML = «🔑 Your Code: » + code + ««;
// WhatsApp link con tu número (Uruguay: +598 94 274 486)
let phone = «59894274486»;
let message = encodeURIComponent(«Hola Tympizzas! Gané en la ruleta: » + prize + » 🎉 Código: » + code);
whatsappDiv.innerHTML = `📲 Send Code by WhatsApp`;
}, 4000);
}
