🔑 パスワードジェネレーター 🎈
🎁 あなたのパスワード候補:
🌟 クリックしてもっと楽しもう!
✨
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Password Generator 🎉🔐</title>
<style>
@keyframes bounce {
0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
40% { transform: translateY(-30px); }
60% { transform: translateY(-15px); }
}
@keyframes sparkle {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.bounce {
animation: bounce 1s;
}
.sparkle {
animation: sparkle 2s infinite;
}
</style>
</head>
<body>
<div style="width: 100%; text-align: center; padding: 10px;">
<h1 style="font-size: 24px; margin-bottom: 10px;">🔑 パスワードジェネレーター 🎈</h1>
<div style="margin-bottom: 10px;">
<input type="text" id="name" placeholder="名前 📝" style="padding: 8px; width: 80%; border-radius: 5px; border: 1px solid #ccc;">
</div>
<div style="margin-bottom: 10px;">
<input type="date" id="birthday" style="padding: 8px; width: 80%; border-radius: 5px; border: 1px solid #ccc;">
</div>
<button onclick="generatePassword()" style="padding: 10px 20px; font-size: 16px; border: none; border-radius: 5px; background-color: #4CAF50; color: white; cursor: pointer;"
onmousedown="this.classList.add('bounce')" onmouseup="this.classList.remove('bounce')">
生成 💥
</button>
<div id="passwords" style="margin-top: 20px; font-size: 18px;">
🎁 あなたのパスワード候補:
<ul id="passwordList" style="list-style: none; padding: 0;">
</ul>
</div>
<div style="margin-top: 20px;">
🌟 クリックしてもっと楽しもう!
<span onclick="sparkleEffect()" style="cursor: pointer; font-size: 24px;">✨</span>
</div>
</div>
<script>
function generatePassword() {
const name = document.getElementById('name').value || '名無し';
const birthday = document.getElementById('birthday').value || '0000-00-00';
const passwords = [
`${name}${birthday.replace(/-/g, '')}!`,
`${birthday.slice(-2)}${name}2024`,
`@${name}${birthday.substring(0,4)}`,
`${name.charAt(0).toUpperCase()}${birthday.replace(/-/g, '')}`,
`_${birthday}${name}_`
];
const list = document.getElementById('passwordList');
list.innerHTML = '';
passwords.forEach(pw => {
const li = document.createElement('li');
li.textContent = pw;
li.style.margin = '5px 0';
li.style.padding = '5px';
li.style.backgroundColor = '#f0f0f0';
li.style.borderRadius = '4px';
li.onclick = function() { animateClick(li); }
list.appendChild(li);
});
}
function animateClick(element) {
element.classList.add('bounce');
setTimeout(() => {
element.classList.remove('bounce');
}, 1000);
}
function sparkleEffect() {
const sparkles = document.createElement('span');
sparkles.textContent = '✨';
sparkles.style.position = 'absolute';
sparkles.style.left = `${Math.random() * 80}%`;
sparkles.style.top = `${Math.random() * 80}%`;
sparkles.classList.add('sparkle');
document.body.appendChild(sparkles);
setTimeout(() => {
document.body.removeChild(sparkles);
}, 2000);
}
</script>
</body>
</html>
```