|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | + <title>Happy Birthday, Yash! 🎉</title> |
| 7 | + <style> |
| 8 | + body { |
| 9 | + font-family: Arial, sans-serif; |
| 10 | + margin: 0; |
| 11 | + padding: 0; |
| 12 | + background: linear-gradient(to bottom, #000000, #1a1a1a); |
| 13 | + overflow: hidden; |
| 14 | + color: #fff; |
| 15 | + display: flex; |
| 16 | + flex-direction: column; |
| 17 | + align-items: center; |
| 18 | + justify-content: center; |
| 19 | + text-align: center; |
| 20 | + } |
| 21 | + |
| 22 | + h1 { |
| 23 | + font-size: 3rem; |
| 24 | + margin: 1rem 0; |
| 25 | + color: #ffd700; |
| 26 | + } |
| 27 | + |
| 28 | + p { |
| 29 | + font-size: 1.2rem; |
| 30 | + margin: 0.5rem 0; |
| 31 | + } |
| 32 | + |
| 33 | + .container { |
| 34 | + width: 80%; |
| 35 | + max-width: 600px; |
| 36 | + background: rgba(255, 255, 255, 0.1); |
| 37 | + padding: 1.5rem; |
| 38 | + border-radius: 15px; |
| 39 | + box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); |
| 40 | + } |
| 41 | + |
| 42 | + input, |
| 43 | + textarea { |
| 44 | + width: 100%; |
| 45 | + margin: 1rem 0; |
| 46 | + padding: 10px; |
| 47 | + font-size: 1rem; |
| 48 | + border: 2px solid #ffd700; |
| 49 | + border-radius: 10px; |
| 50 | + outline: none; |
| 51 | + background: rgba(255, 255, 255, 0.1); |
| 52 | + color: #fff; |
| 53 | + } |
| 54 | + |
| 55 | + button { |
| 56 | + background-color: #ffd700; |
| 57 | + color: #000; |
| 58 | + border: none; |
| 59 | + padding: 10px 20px; |
| 60 | + font-size: 1rem; |
| 61 | + border-radius: 5px; |
| 62 | + cursor: pointer; |
| 63 | + transition: background-color 0.3s; |
| 64 | + margin: 0.5rem; |
| 65 | + } |
| 66 | + |
| 67 | + button:hover { |
| 68 | + background-color: #ffbf00; |
| 69 | + } |
| 70 | + |
| 71 | + .note { |
| 72 | + font-size: 1rem; |
| 73 | + color: #ffcc00; |
| 74 | + margin-bottom: 1rem; |
| 75 | + } |
| 76 | + |
| 77 | + .fireworks { |
| 78 | + position: absolute; |
| 79 | + top: 50%; |
| 80 | + left: 50%; |
| 81 | + transform: translate(-50%, -50%); |
| 82 | + pointer-events: none; |
| 83 | + z-index: 1; |
| 84 | + } |
| 85 | + |
| 86 | + .firework { |
| 87 | + position: absolute; |
| 88 | + width: 10px; |
| 89 | + height: 10px; |
| 90 | + background: radial-gradient(circle, #ffd700, #ff4500); |
| 91 | + border-radius: 50%; |
| 92 | + animation: explode 1.5s linear infinite; |
| 93 | + } |
| 94 | + |
| 95 | + .firework:nth-child(1) { |
| 96 | + animation-delay: 0s; |
| 97 | + top: 10%; |
| 98 | + left: 20%; |
| 99 | + } |
| 100 | + |
| 101 | + .firework:nth-child(2) { |
| 102 | + animation-delay: 0.5s; |
| 103 | + top: 30%; |
| 104 | + left: 70%; |
| 105 | + } |
| 106 | + |
| 107 | + .firework:nth-child(3) { |
| 108 | + animation-delay: 1s; |
| 109 | + top: 60%; |
| 110 | + left: 40%; |
| 111 | + } |
| 112 | + |
| 113 | + @keyframes explode { |
| 114 | + 0% { |
| 115 | + transform: scale(0.5); |
| 116 | + opacity: 1; |
| 117 | + } |
| 118 | + 100% { |
| 119 | + transform: scale(4); |
| 120 | + opacity: 0; |
| 121 | + } |
| 122 | + } |
| 123 | + |
| 124 | + .thank-you { |
| 125 | + font-size: 1.2rem; |
| 126 | + margin: 1rem 0; |
| 127 | + animation: fadeIn 1s ease-in-out; |
| 128 | + } |
| 129 | + |
| 130 | + @keyframes fadeIn { |
| 131 | + from { |
| 132 | + opacity: 0; |
| 133 | + } |
| 134 | + to { |
| 135 | + opacity: 1; |
| 136 | + } |
| 137 | + } |
| 138 | + </style> |
| 139 | + </head> |
| 140 | + <body> |
| 141 | + <div class="fireworks"> |
| 142 | + <div class="firework"></div> |
| 143 | + <div class="firework"></div> |
| 144 | + <div class="firework"></div> |
| 145 | + </div> |
| 146 | + |
| 147 | + <h1>Happy Birthday, Yash! 🎂🎉</h1> |
| 148 | + <p>Born on 15th March - Let's make it special! 🎈</p> |
| 149 | + <div class="note"> |
| 150 | + Your wish and username will only be visible to Yash! 😊 |
| 151 | + </div> |
| 152 | + <div class="container"> |
| 153 | + <input id="nickname" placeholder="Enter your nickname" /> |
| 154 | + <textarea |
| 155 | + id="wishInput" |
| 156 | + placeholder="Write your birthday wish here..." |
| 157 | + ></textarea> |
| 158 | + <button id="sendWish">Send Wish</button> |
| 159 | + <p id="thankYouMessage" class="thank-you"></p> |
| 160 | + </div> |
| 161 | + |
| 162 | + <script> |
| 163 | + const nicknameInput = document.getElementById("nickname"); |
| 164 | + const wishInput = document.getElementById("wishInput"); |
| 165 | + const sendWishButton = document.getElementById("sendWish"); |
| 166 | + const thankYouMessage = document.getElementById("thankYouMessage"); |
| 167 | + |
| 168 | + const thankYouReplies = [ |
| 169 | + "Thank you so much! You're amazing! 🥰✨", |
| 170 | + "Your wish just made my day brighter! 🌟", |
| 171 | + "You’re awesome, thank you for the lovely message! 🎈", |
| 172 | + "I truly appreciate your kind words, thank you! 💖", |
| 173 | + "Wow, that was so sweet of you! 🥳", |
| 174 | + "Your effort means the world to me, thank you! 🎁", |
| 175 | + "I’m so touched by your wish, you’re the best! 🥂", |
| 176 | + "You’ve made my birthday extra special! 🍰🎉", |
| 177 | + "Thanks for being part of my celebration! 💫", |
| 178 | + "Your words mean so much, thank you! ❤️" |
| 179 | + ]; |
| 180 | + |
| 181 | + sendWishButton.addEventListener("click", () => { |
| 182 | + const nickname = nicknameInput.value.trim(); |
| 183 | + const wish = wishInput.value.trim(); |
| 184 | + |
| 185 | + if (nickname && wish) { |
| 186 | + // Clear inputs |
| 187 | + nicknameInput.value = ""; |
| 188 | + wishInput.value = ""; |
| 189 | + |
| 190 | + // Generate thank-you message and a rating |
| 191 | + const randomReply = |
| 192 | + thankYouReplies[Math.floor(Math.random() * thankYouReplies.length)]; |
| 193 | + const rating = Math.floor(Math.random() * 3) + 8; // Ratings between 8-10 |
| 194 | + |
| 195 | + thankYouMessage.innerText = `${randomReply} I rate your effort: ${rating}/10!`; |
| 196 | + } else { |
| 197 | + thankYouMessage.innerText = "Please enter both your nickname and wish! 😊"; |
| 198 | + } |
| 199 | + }); |
| 200 | + </script> |
| 201 | + </body> |
| 202 | +</html> |
0 commit comments