```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>💅エステサロン管理アプリ✨</title>
<style>
@keyframes bounce {
0% { transform: translateY(0); }
50% { transform: translateY(-10px); }
100% { transform: translateY(0); }
}
@keyframes sparkle {
0% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(1.5); }
100% { opacity: 1; transform: scale(1); }
}
@keyframes fadeOut {
from { opacity: 1; }
to { opacity: 0; }
}
</style>
</head>
<body>
<div style="width: 400px; height: 400px; overflow: auto; padding: 10px; box-sizing: border-box; background: linear-gradient(135deg, #f8f9fa, #e9ecef);">
<h1 style="text-align: center;">🌸エステサロン管理🌸</h1>
<div style="margin-bottom: 10px;">
<input type="text" id="name" placeholder="👤 顧客名" style="width: 100%; padding: 5px;">
<input type="number" id="credit" placeholder="💳 クレジット数" style="width: 100%; padding: 5px; margin-top:5px;">
<button onclick="addCustomer()" style="width: 100%; padding: 10px; margin-top:5px; background-color: #ffb6c1; border: none; border-radius: 5px; cursor: pointer;">➕ 追加する</button>
</div>
<div id="customerList">
<!-- 顧客リストがここに表示されます -->
</div>
<canvas id="animationCanvas" width="400" height="400" style="position:absolute; top:0; left:0; pointer-events:none;"></canvas>
</div>
<script>
const customers = [];
function addCustomer() {
const name = document.getElementById('name').value.trim();
const credit = document.getElementById('credit').value.trim();
if(name && credit) {
customers.push({name, credit});
renderCustomers();
document.getElementById('name').value = '';
document.getElementById('credit').value = '';
triggerAnimation("✨🌟");
}
}
function renderCustomers() {
const list = document.getElementById('customerList');
list.innerHTML = '';
customers.forEach((cust, index) => {
const div = document.createElement('div');
div.style.display = 'flex';
div.style.justifyContent = 'space-between';
div.style.alignItems = 'center';
div.style.padding = '5px';
div.style.marginBottom = '5px';
div.style.backgroundColor = '#ffffff';
div.style.borderRadius = '5px';
div.style.boxShadow = '0 2px 5px rgba(0,0,0,0.1)';
div.innerHTML = `
<span>👤 ${cust.name} 💳 ${cust.credit}</span>
<button onclick="removeCustomer(${index})" style="background-color: #ff69b4; border: none; border-radius: 5px; cursor: pointer;">❌</button>
`;
div.addEventListener('click', () => triggerAnimation("🎉✨"));
list.appendChild(div);
});
}
function removeCustomer(index) {
customers.splice(index, 1);
renderCustomers();
triggerAnimation("💔😭");
}
function triggerAnimation(text) {
const canvas = document.getElementById('animationCanvas');
const ctx = canvas.getContext('2d');
const emojis = text.split('');
const particles = emojis.map(emoji => ({
emoji,
x: Math.random() * canvas.width,
y: canvas.height,
speed: Math.random() * 3 + 2,
opacity: 1,
size: Math.random() * 20 + 10
}));
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
particles.forEach((p, index) => {
p.y -= p.speed;
p.opacity -= 0.02;
ctx.globalAlpha = p.opacity;
ctx.font = `${p.size}px serif`;
ctx.fillText(p.emoji, p.x, p.y);
if(p.opacity <= 0) {
particles.splice(index, 1);
}
});
if(particles.length > 0) {
requestAnimationFrame(animate);
}
}
animate();
}
</script>
</body>
</html>
```