Submit buttons are a crucial element in web design, guiding users to complete forms and interact with your site. Their design can significantly impact user experience and conversion rates.
In this article, we will explore 10 submit button examples that showcase a variety of styles and functionalities. These examples will provide inspiration for creating effective and visually appealing submit buttons for your own projects.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Designers and developers love Subframe for its drag-and-drop interface and intuitive, responsive canvas. Create pixel-perfect submit buttons effortlessly, ensuring a seamless user experience every time.
Join the community of satisfied users and elevate your UI design. Start for free today!
CODE6
Here's the code:
CODETEXT6
CODE7
Here's the code:
CODETEXT7
CODE8
Here's the code:
CODETEXT8
CODE9
Here's the code:
CODETEXT9
CODE10
Here's the code:
CODETEXT10
Ready to elevate your UI design game? With Subframe, you can create pixel-perfect submit buttons and entire interfaces effortlessly. Our drag-and-drop editor ensures efficiency and precision.
Don't wait! Start for free and begin designing stunning UIs immediately. Join the community of satisfied designers today!
<html> <head> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; width: 100%; background-color: #f5f7fa; padding: 20px; } .checkout-container { width: 100%; max-width: 600px; background-color: white; border-radius: 16px; padding: 40px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); display: flex; flex-direction: column; position: relative; overflow: hidden; } .order-summary { margin-bottom: 30px; } h1 { font-size: 24px; font-weight: 700; color: #161925; margin-bottom: 25px; } .product-list { border-radius: 12px; border: 1px solid #e8ecf2; margin-bottom: 20px; } .product-item { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid #e8ecf2; } .product-item:last-child { border-bottom: none; } .product-image { width: 60px; height: 60px; border-radius: 10px; background-color: #f3f4f6; margin-right: 16px; overflow: hidden; } .product-image img { width: 100%; height: 100%; object-fit: cover; } .product-details { flex: 1; } .product-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; color: #161925; } .product-variant { font-size: 13px; color: #6b7280; } .product-price { font-weight: 600; font-size: 15px; color: #161925; } .total-section { display: flex; justify-content: space-between; padding: 16px 0; border-top: 1px dashed #e8ecf2; } .total-label { font-weight: 600; font-size: 16px; color: #161925; } .total-amount { font-weight: 700; font-size: 18px; color: #161925; } .checkout-button { position: relative; width: 100%; padding: 18px 0; background-color: #5046e5; color: white; border: none; border-radius: 12px; font-weight: 600; font-size: 16px; cursor: pointer; overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease; margin-top: 10px; } .checkout-button:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 10px 25px rgba(80, 70, 229, 0.3); background-color: #4038c7; } .checkout-button:active { transform: translateY(0) scale(0.99); } .checkout-button.disabled { background-color: #a9adc1; cursor: not-allowed; transform: none; box-shadow: none; } .checkout-button .button-text { position: relative; z-index: 2; transition: opacity 0.3s ease; } .checkout-button .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.3); border-top: 3px solid white; border-radius: 50%; opacity: 0; z-index: 1; transition: opacity 0.3s ease; } .checkout-button.loading .loader { opacity: 1; animation: spin 1s linear infinite; } .checkout-button.loading .button-text { opacity: 0; } /* The wave effect */ .checkout-button .wave { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; background: rgba(255, 255, 255, 0.4); border-radius: 50%; transform: scale(0); pointer-events: none; z-index: 1; } /* Security badge */ .security-badge { display: flex; align-items: center; justify-content: center; margin-top: 20px; color: #65717b; font-size: 13px; } .security-badge svg { margin-right: 8px; } /* Payment Methods */ .payment-methods { display: flex; justify-content: center; gap: 12px; margin-top: 16px; } .payment-methods .method { width: 40px; height: 26px; background-color: #f3f4f6; border-radius: 4px; display: flex; align-items: center; justify-content: center; opacity: 0.7; transition: opacity 0.2s ease; } .payment-methods .method:hover { opacity: 1; } /* Success animation */ .success-animation { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; } .success-animation.show { opacity: 1; pointer-events: auto; } .success-icon { width: 80px; height: 80px; background-color: #10b981; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; transform: scale(0); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .success-animation.show .success-icon { transform: scale(1); } .success-message { font-size: 24px; font-weight: 700; color: #161925; margin-bottom: 12px; opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: 0.3s; } .success-animation.show .success-message { opacity: 1; transform: translateY(0); } .success-details { font-size: 15px; color: #6b7280; text-align: center; max-width: 320px; opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: 0.4s; } .success-animation.show .success-details { opacity: 1; transform: translateY(0); } /* Toggle section */ .toggle-section { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 20px; } .toggle-label { font-size: 14px; color: #4b5563; margin-right: 10px; } .toggle-switch { position: relative; display: inline-block; width: 50px; height: 26px; } .toggle-switch input { opacity: 0; width: 0; height: 0; } .toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #e5e7eb; transition: .4s; border-radius: 34px; } .toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .toggle-slider { background-color: #5046e5; } input:checked + .toggle-slider:before { transform: translateX(24px); } @keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } } @media (max-width: 600px) { .checkout-container { padding: 30px 20px; } h1 { font-size: 20px; } .product-image { width: 50px; height: 50px; } .product-name { font-size: 14px; } .product-variant { font-size: 12px; } .product-price { font-size: 14px; } } </style> </head> <body> <div class="checkout-container"> <div class="toggle-section"> <span class="toggle-label">Demo Mode</span> <label class="toggle-switch"> <input type="checkbox" id="demo-toggle" checked> <span class="toggle-slider"></span> </label> </div> <div class="order-summary"> <h1>Review your order</h1> <div class="product-list"> <div class="product-item"> <div class="product-image"> <img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff" alt="Nike Air Max"> </div> <div class="product-details"> <div class="product-name">Nike Air Max 270</div> <div class="product-variant">Size: 10 · Color: Obsidian</div> </div> <div class="product-price">$149.99</div> </div> <div class="product-item"> <div class="product-image"> <img src="https://images.unsplash.com/photo-1576566588028-4147f3842f27" alt="Running Shorts"> </div> <div class="product-details"> <div class="product-name">Pro Running Shorts</div> <div class="product-variant">Size: M · Color: Black</div> </div> <div class="product-price">$39.99</div> </div> </div> <div class="total-section"> <div class="total-label">Total (with tax)</div> <div class="total-amount">$202.48</div> </div> </div> <button id="checkout-button" class="checkout-button"> <span class="button-text">Complete Purchase</span> <div class="loader"></div> <div class="wave"></div> </button> <div class="security-badge"> <svg width="14" height="16" viewBox="0 0 14 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 0L0 3V7.5C0 11.58 2.99 15.05 7 16C11.01 15.05 14 11.58 14 7.5V3L7 0ZM7 7.5H13C12.8 10.86 10.33 13.71 7 14.48V7.5H1V3.93L7 1.5V7.5Z" fill="#65717B"/> </svg> <span>Secure checkout with 256-bit encryption</span> </div> <div class="payment-methods"> <div class="method"> <svg width="24" height="16" viewBox="0 0 24 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M21.6 0H2.4C1.08 0 0.012 1.08 0.012 2.4L0 13.6C0 14.92 1.08 16 2.4 16H21.6C22.92 16 24 14.92 24 13.6V2.4C24 1.08 22.92 0 21.6 0ZM21.6 13.6H2.4V8H21.6V13.6ZM21.6 4H2.4V2.4H21.6V4Z" fill="#65717B"/> </svg> </div> <div class="method"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM9.5 16.5V7.5L16.5 12L9.5 16.5Z" fill="#65717B"/> </svg> </div> <div class="method"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 5H17V3C17 1.89 16.11 1 15 1H5C3.89 1 3 1.89 3 3V5H1C0.45 5 0 5.45 0 6V15C0 16.11 0.89 17 2 17H18C19.11 17 20 16.11 20 15V6C20 5.45 19.55 5 19 5ZM5 3H15V9H5V3ZM15 15H5V11H15V15ZM3 9H1V7H3V9ZM17 9H19V7H17V9Z" fill="#65717B"/> </svg> </div> <div class="method"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2L4.5 20.29L5.21 21L22 12L5.21 3L4.5 3.71L12 22L13.5 11L12 2Z" fill="#65717B"/> </svg> </div> </div> <div class="success-animation" id="success-animation"> <div class="success-icon"> <svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z" fill="white"/> </svg> </div> <div class="success-message">Purchase Complete!</div> <div class="success-details">Your order #15368 has been placed and will be shipped within 2 business days. A confirmation email has been sent to your inbox.</div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const checkoutButton = document.getElementById('checkout-button'); const demoToggle = document.getElementById('demo-toggle'); const successAnimation = document.getElementById('success-animation'); // Function to create wave effect on button click function createWaveEffect(e) { const button = e.currentTarget; const wave = button.querySelector('.wave'); // Reset animation wave.style.top = e.offsetY + 'px'; wave.style.left = e.offsetX + 'px'; wave.style.transform = 'scale(0)'; // Trigger animation setTimeout(() => { wave.style.transition = 'transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94)'; wave.style.transform = 'scale(30)'; }, 10); // Reset for future use setTimeout(() => { wave.style.transition = 'none'; }, 700); } // Function to simulate loading and success function processCheckout() { if (!checkoutButton.classList.contains('loading') && !checkoutButton.classList.contains('disabled')) { checkoutButton.classList.add('loading'); // Simulate processing time setTimeout(() => { checkoutButton.classList.remove('loading'); successAnimation.classList.add('show'); // Reset after demo if (demoToggle.checked) { setTimeout(() => { successAnimation.classList.remove('show'); }, 5000); } }, 2000); } } // Toggle disabled state for demo purposes demoToggle.addEventListener('change', function() { if (this.checked) { checkoutButton.classList.remove('disabled'); } else { checkoutButton.classList.add('disabled'); } }); // Add click event to the button checkoutButton.addEventListener('click', function(e) { if (!this.classList.contains('disabled')) { createWaveEffect(e); processCheckout(); } }); // Add hover effect enhancement - subtle scale up of button text checkoutButton.addEventListener('mouseenter', function() { if (!this.classList.contains('disabled')) { this.querySelector('.button-text').style.transform = 'scale(1.03)'; this.querySelector('.button-text').style.transition = 'transform 0.3s ease'; } }); checkoutButton.addEventListener('mouseleave', function() { this.querySelector('.button-text').style.transform = 'scale(1)'; }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #f8fafc; padding: 20px; } .booking-container { width: 100%; max-width: 500px; background: white; border-radius: 18px; padding: 32px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; } .pattern { position: absolute; top: 0; right: 0; width: 150px; height: 150px; opacity: 0.1; pointer-events: none; } h1 { font-size: 24px; font-weight: 700; color: #1e293b; margin-bottom: 8px; position: relative; } p { font-size: 16px; color: #64748b; line-height: 1.5; margin-bottom: 32px; } .time-selection { margin-bottom: 30px; } .time-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 30px; } .time-slot { background-color: #f1f5f9; border: 2px solid transparent; border-radius: 12px; padding: 12px 10px; text-align: center; font-size: 14px; color: #475569; font-weight: 500; cursor: pointer; transition: all 0.2s ease; } .time-slot:hover { background-color: #e2e8f0; } .time-slot.selected { background-color: #e0f2fe; border-color: #0ea5e9; color: #0284c7; } .confirm-button { position: relative; width: 100%; padding: 16px 24px; background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%); border: none; border-radius: 14px; color: white; font-size: 16px; font-weight: 600; cursor: pointer; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2); outline: none; } .confirm-button:hover { box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3); transform: translateY(-2px); } .confirm-button:active { transform: translateY(0) scale(0.98); } .confirm-button .ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } @keyframes ripple { to { transform: scale(2.5); opacity: 0; } } .button-content { display: flex; align-items: center; justify-content: center; gap: 8px; } .icon { display: inline-flex; transition: transform 0.3s ease; } .success-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.95); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 10; } .success-overlay.active { opacity: 1; pointer-events: all; } .success-icon { width: 70px; height: 70px; background-color: #4ade80; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; transform: scale(0); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .success-overlay.active .success-icon { transform: scale(1); } .success-message { font-size: 20px; font-weight: 600; color: #1e293b; margin-bottom: 8px; opacity: 0; transform: translateY(10px); transition: all 0.4s ease 0.2s; } .success-overlay.active .success-message { opacity: 1; transform: translateY(0); } .success-details { font-size: 16px; color: #64748b; text-align: center; opacity: 0; transform: translateY(10px); transition: all 0.4s ease 0.3s; max-width: 80%; } .success-overlay.active .success-details { opacity: 1; transform: translateY(0); } .required-indicator { font-size: 14px; color: #94a3b8; margin-bottom: 12px; display: flex; align-items: center; gap: 5px; } .required-indicator svg { color: #0ea5e9; } .accessibility-note { position: absolute; overflow: hidden; height: 1px; width: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); } @media (max-width: 500px) { .booking-container { padding: 24px; border-radius: 14px; } .time-slots { grid-template-columns: repeat(2, 1fr); } h1 { font-size: 22px; } p { font-size: 15px; margin-bottom: 24px; } } /* Visual pattern */ .pattern svg { width: 100%; height: 100%; } </style> </head> <body> <div class="booking-container"> <div class="pattern"> <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path fill="#0ea5e9" d="M10,10 L20,10 L20,20 L10,20 Z"></path> <path fill="#0ea5e9" d="M30,10 L40,10 L40,20 L30,20 Z"></path> <path fill="#0ea5e9" d="M50,10 L60,10 L60,20 L50,20 Z"></path> <path fill="#0ea5e9" d="M70,10 L80,10 L80,20 L70,20 Z"></path> <path fill="#0ea5e9" d="M10,30 L20,30 L20,40 L10,40 Z"></path> <path fill="#0ea5e9" d="M30,30 L40,30 L40,40 L30,40 Z"></path> <path fill="#0ea5e9" d="M50,30 L60,30 L60,40 L50,40 Z"></path> <path fill="#0ea5e9" d="M70,30 L80,30 L80,40 L70,40 Z"></path> <path fill="#0ea5e9" d="M10,50 L20,50 L20,60 L10,60 Z"></path> <path fill="#0ea5e9" d="M30,50 L40,50 L40,60 L30,60 Z"></path> <path fill="#0ea5e9" d="M50,50 L60,50 L60,60 L50,60 Z"></path> <path fill="#0ea5e9" d="M70,50 L80,50 L80,60 L70,60 Z"></path> </svg> </div> <h1>Schedule your annual checkup</h1> <p>Choose an available time slot for Dr. Sarah Chen on Friday, May 17, 2024.</p> <div class="required-indicator"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.486 2 2 6.486 2 12C2 17.514 6.486 22 12 22C17.514 22 22 17.514 22 12C22 6.486 17.514 2 12 2ZM12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12C20 16.411 16.411 20 12 20Z" fill="currentColor"/> <path d="M11 11V7H13V11H17V13H13V17H11V13H7V11H11Z" fill="currentColor"/> </svg> Please select a time slot </div> <div class="time-selection"> <div class="time-slots"> <div class="time-slot" data-time="9:00 AM">9:00 AM</div> <div class="time-slot" data-time="10:15 AM">10:15 AM</div> <div class="time-slot" data-time="11:30 AM">11:30 AM</div> <div class="time-slot" data-time="1:45 PM">1:45 PM</div> <div class="time-slot" data-time="3:00 PM">3:00 PM</div> <div class="time-slot" data-time="4:15 PM">4:15 PM</div> </div> </div> <button class="confirm-button" id="confirmButton" disabled aria-label="Confirm appointment"> <span class="button-content"> <span>Confirm appointment</span> <span class="icon"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </span> </span> </button> <span class="accessibility-note" id="bookingStatus" role="status"></span> </div> <div class="success-overlay" id="successOverlay"> <div class="success-icon"> <svg width="32" height="32" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12L10 17L20 7" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <p class="success-message">Appointment confirmed!</p> <p class="success-details" id="appointmentDetails">Your appointment with Dr. Sarah Chen is scheduled for Friday, May 17 at <span id="selectedTime">3:00 PM</span>.</p> </div> <script> const timeSlots = document.querySelectorAll('.time-slot'); const confirmButton = document.getElementById('confirmButton'); const successOverlay = document.getElementById('successOverlay'); const selectedTimeSpan = document.getElementById('selectedTime'); const bookingStatus = document.getElementById('bookingStatus'); let selectedTime = null; // Time slot selection timeSlots.forEach(slot => { slot.addEventListener('click', () => { // Remove selected class from all slots timeSlots.forEach(s => s.classList.remove('selected')); // Add selected class to clicked slot slot.classList.add('selected'); // Store selected time selectedTime = slot.dataset.time; // Enable confirm button confirmButton.disabled = false; // Update screen reader bookingStatus.textContent = `Time slot ${selectedTime} selected`; }); }); // Ripple effect on button confirmButton.addEventListener('click', function(e) { if (this.disabled) return; // Create ripple element const ripple = document.createElement('span'); ripple.classList.add('ripple'); this.appendChild(ripple); // Set ripple position const rect = this.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); const x = e.clientX - rect.left - size / 2; const y = e.clientY - rect.top - size / 2; ripple.style.width = ripple.style.height = `${size}px`; ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; // Remove ripple after animation setTimeout(() => { ripple.remove(); }, 600); // Animate button icon const icon = this.querySelector('.icon'); icon.style.transform = 'translateX(4px)'; setTimeout(() => { icon.style.transform = 'translateX(0)'; }, 300); // Handle appointment confirmation if (selectedTime) { // Update success message with selected time selectedTimeSpan.textContent = selectedTime; // Show success message setTimeout(() => { successOverlay.classList.add('active'); bookingStatus.textContent = `Appointment confirmed for ${selectedTime}`; }, 500); } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary-color: #00BFB3; --secondary-color: #0499F2; --tertiary-color: #192A56; --light-color: #F8F9FA; --success-color: #05C46B; --error-color: #FF5E57; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #FAFAFA; background-image: linear-gradient(45deg, rgba(25, 42, 86, 0.03) 25%, transparent 25%), linear-gradient(-45deg, rgba(25, 42, 86, 0.03) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(25, 42, 86, 0.03) 75%), linear-gradient(-45deg, transparent 75%, rgba(25, 42, 86, 0.03) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px; padding: 1rem; } .dashboard { width: 100%; max-width: 680px; background-color: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); padding: 2rem; overflow: hidden; } .dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; } .dashboard-title { color: var(--tertiary-color); font-size: 1.5rem; font-weight: 600; } .dashboard-subtitle { color: #666; font-size: 0.9rem; margin-top: 0.25rem; } .stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; } .stat-card { background-color: #F8F9FA; padding: 1rem; border-radius: 8px; border-top: 3px solid var(--primary-color); } .stat-card:nth-child(2) { border-top-color: var(--secondary-color); } .stat-card:nth-child(3) { border-top-color: var(--tertiary-color); } .stat-title { font-size: 0.8rem; color: #666; margin-bottom: 0.5rem; } .stat-value { font-size: 1.5rem; font-weight: 600; color: var(--tertiary-color); } .action-panel { background: linear-gradient(to right, #F8F9FA, white); padding: 1.5rem; border-radius: 8px; margin-bottom: 2rem; border-left: 3px solid var(--primary-color); } .panel-title { color: var(--tertiary-color); font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; } .panel-content { display: flex; flex-direction: column; gap: 1rem; } .input-group { position: relative; } .input-label { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; display: block; } .text-input { width: 100%; padding: 0.75rem 1rem; border: 2px solid #EEE; border-radius: 6px; font-size: 0.9rem; transition: border-color 0.2s ease; background-color: white; } .text-input:focus { outline: none; border-color: var(--primary-color); } .button-container { position: relative; margin-top: 1.5rem; } .submit-button { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.85rem 1.5rem; border: none; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; font-weight: 500; font-size: 0.95rem; cursor: pointer; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background 0.3s ease; border-radius: 6px; position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 191, 179, 0.2); } .submit-button:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 191, 179, 0.3); } .submit-button:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(0, 191, 179, 0.2); } .submit-button:disabled { background: linear-gradient(135deg, #B8B8B8, #D9D9D9); cursor: not-allowed; transform: none; box-shadow: none; } .button-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; position: relative; } .icon-default svg, .icon-loading, .icon-success, .icon-error { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease, transform 0.3s ease; } .icon-loading, .icon-success, .icon-error { opacity: 0; } .button-state-loading .icon-default, .button-state-success .icon-default, .button-state-error .icon-default { opacity: 0; transform: scale(0.5); } .button-state-loading .icon-loading { opacity: 1; animation: spin 1.5s linear infinite; } .button-state-success .icon-success { opacity: 1; transform: scale(1); } .button-state-error .icon-error { opacity: 1; transform: scale(1); } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .button-highlight { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.15); transform: translateX(-100%); transition: transform 0.6s ease; } .submit-button:hover .button-highlight { transform: translateX(100%); } .button-ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } .button-text { position: relative; z-index: 2; transition: all 0.3s ease; } .button-state-loading .button-text, .button-state-success .button-text, .button-state-error .button-text { transform: translateX(10px); } .notification { position: fixed; top: 20px; right: 20px; padding: 1rem 1.5rem; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); color: white; font-size: 0.9rem; display: flex; align-items: center; gap: 0.75rem; transform: translateX(calc(100% + 40px)); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 1000; } .notification.success { background-color: var(--success-color); } .notification.error { background-color: var(--error-color); } .notification.show { transform: translateX(0); } .progress-bar { position: absolute; bottom: 0; left: 0; height: 3px; background-color: rgba(255, 255, 255, 0.3); width: 100%; transform: scaleX(0); transform-origin: left; transition: transform 0.3s linear; } .button-state-loading .progress-bar { animation: progress 2s cubic-bezier(0.1, 0.05, 0.2, 1) forwards; } @keyframes progress { 0% { transform: scaleX(0); } 60% { transform: scaleX(0.6); } 100% { transform: scaleX(1); } } @media (max-width: 600px) { .dashboard { padding: 1.5rem; } .stats-grid { grid-template-columns: 1fr; } .dashboard-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; } .panel-content { flex-direction: column; } } </style> </head> <body> <div class="dashboard"> <div class="dashboard-header"> <div> <h1 class="dashboard-title">Business Analytics</h1> <p class="dashboard-subtitle">Weekly metrics & data refresh</p> </div> <div id="date-display" style="color: #666; font-size: 0.9rem;"></div> </div> <div class="stats-grid"> <div class="stat-card"> <div class="stat-title">ACTIVE USERS</div> <div class="stat-value">3,547</div> </div> <div class="stat-card"> <div class="stat-title">CONVERSION RATE</div> <div class="stat-value">24.8%</div> </div> <div class="stat-card"> <div class="stat-title">REVENUE</div> <div class="stat-value">$18.2K</div> </div> </div> <div class="action-panel"> <h3 class="panel-title">Generate Custom Report</h3> <div class="panel-content"> <div class="input-group"> <label class="input-label" for="report-name">Report Name</label> <input type="text" id="report-name" class="text-input" placeholder="e.g., Q3 Financial Overview"> </div> <div class="input-group"> <label class="input-label" for="report-type">Report Type</label> <select id="report-type" class="text-input"> <option value="performance">Performance Analysis</option> <option value="user">User Engagement</option> <option value="revenue">Revenue Trends</option> <option value="forecast">Market Forecast</option> </select> </div> <div class="button-container"> <button id="submit-button" class="submit-button"> <div class="button-highlight"></div> <div class="button-icon"> <div class="icon-default"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="22 12 18 8 14 12"></polyline> <path d="M18 8v13H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h9l5 5z"></path> </svg> </div> <div class="icon-loading"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> </svg> </div> <div class="icon-success"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="20 6 9 17 4 12"></polyline> </svg> </div> <div class="icon-error"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="18" y1="6" x2="6" y2="18"></line> <line x1="6" y1="6" x2="18" y2="18"></line> </svg> </div> </div> <span class="button-text">Generate Report</span> <div class="progress-bar"></div> </button> </div> </div> </div> <div class="notification success"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path> <polyline points="22 4 12 14.01 9 11.01"></polyline> </svg> <span id="notification-text">Report generated successfully!</span> </div> </div> <script> // Display current date function updateDate() { const date = new Date(); const options = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' }; document.getElementById('date-display').textContent = date.toLocaleDateString('en-US', options); } updateDate(); // Button functionality const button = document.getElementById('submit-button'); const notification = document.querySelector('.notification'); const notificationText = document.getElementById('notification-text'); button.addEventListener('click', function(e) { if (button.disabled) return; // Create ripple effect const ripple = document.createElement('span'); ripple.classList.add('button-ripple'); const rect = button.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; button.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 600); // Form validation const reportName = document.getElementById('report-name').value; if (!reportName.trim()) { button.classList.add('button-state-error'); notificationText.textContent = "Please enter a report name"; notification.className = "notification error"; notification.classList.add('show'); setTimeout(() => { button.classList.remove('button-state-error'); notification.classList.remove('show'); }, 3000); return; } // Set loading state button.disabled = true; button.classList.add('button-state-loading'); // Simulate API request setTimeout(() => { const success = Math.random() > 0.2; // 80% chance of success for demo button.classList.remove('button-state-loading'); if (success) { button.classList.add('button-state-success'); notificationText.textContent = `Report "${reportName}" generated successfully!`; notification.className = "notification success"; } else { button.classList.add('button-state-error'); notificationText.textContent = "Error generating report. Please try again."; notification.className = "notification error"; } notification.classList.add('show'); setTimeout(() => { button.classList.remove('button-state-success', 'button-state-error'); button.disabled = false; notification.classList.remove('show'); }, 3000); }, 2000); }); // Input focus animation const inputs = document.querySelectorAll('.text-input'); inputs.forEach(input => { input.addEventListener('focus', function() { this.parentElement.classList.add('focused'); }); input.addEventListener('blur', function() { this.parentElement.classList.remove('focused'); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; background-color: #f8f9fb; padding: 20px; } .app-container { background: #fff; width: 100%; max-width: 500px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); padding: 36px; overflow: hidden; position: relative; } .app-header { margin-bottom: 32px; } .app-logo { display: flex; align-items: center; margin-bottom: 16px; } .logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, #3B82F6, #2563EB); border-radius: 10px; margin-right: 12px; position: relative; } .logo-icon:after { content: ""; position: absolute; top: 12px; left: 12px; width: 16px; height: 16px; border-radius: 50%; background: #fff; } .logo-text { font-weight: 700; font-size: 22px; color: #1E293B; } h1 { font-size: 28px; font-weight: 700; color: #1E293B; margin-bottom: 8px; } p { color: #64748B; font-size: 16px; line-height: 1.5; margin-bottom: 32px; } .amount-input { position: relative; margin-bottom: 24px; } .input-label { display: block; font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 8px; } .input-wrapper { position: relative; } .currency { position: absolute; left: 16px; top: 17px; font-size: 22px; font-weight: 600; color: #0F172A; } input { width: 100%; padding: 16px 16px 16px 40px; font-size: 22px; border: 2px solid #E2E8F0; border-radius: 12px; outline: none; transition: border-color 0.2s ease; font-weight: 600; color: #0F172A; } input:focus { border-color: #3B82F6; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); } .transfer-details { margin-bottom: 32px; background: #F1F5F9; padding: 16px; border-radius: 12px; } .detail-item { display: flex; justify-content: space-between; margin-bottom: 12px; } .detail-item:last-child { margin-bottom: 0; } .detail-label { font-size: 14px; color: #64748B; } .detail-value { font-size: 14px; font-weight: 600; color: #334155; } .submit-button-container { position: relative; width: 100%; height: 56px; margin-top: 24px; border-radius: 16px; overflow: hidden; } .submit-button { position: relative; width: 100%; height: 100%; border: none; border-radius: 16px; background: linear-gradient(135deg, #3B82F6, #1D4ED8); color: white; font-size: 16px; font-weight: 600; cursor: pointer; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); outline: none; padding: 0 24px; display: flex; align-items: center; justify-content: center; } .submit-button:hover { box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3); transform: translateY(-1px); } .submit-button:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2); } .ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } .progress-container { position: absolute; width: 100%; height: 100%; top: 0; left: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3B82F6, #1D4ED8); opacity: 0; transition: opacity 0.3s ease; border-radius: 16px; } .progress-spinner { width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: white; border-radius: 50%; animation: spinner 0.8s linear infinite; } .success-icon { width: 24px; height: 24px; position: relative; display: none; } .success-icon:before { content: ""; position: absolute; width: 12px; height: 6px; border-left: 3px solid white; border-bottom: 3px solid white; transform: rotate(-45deg); top: 6px; left: 6px; } @keyframes spinner { to { transform: rotate(360deg); } } .vibrate { animation: vibrate 0.1s linear 3; } @keyframes vibrate { 0% { transform: translateX(0); } 25% { transform: translateX(-2px); } 50% { transform: translateX(0); } 75% { transform: translateX(2px); } 100% { transform: translateX(0); } } @media (max-width: 500px) { .app-container { padding: 24px; border-radius: 20px; } h1 { font-size: 24px; } p { font-size: 15px; } .submit-button { height: 52px; } } </style> </head> <body> <div class="app-container"> <div class="app-header"> <div class="app-logo"> <div class="logo-icon"></div> <div class="logo-text">SwiftPay</div> </div> <h1>Transfer Money</h1> <p>Securely send money to friends and family within seconds, with no transaction fees.</p> </div> <div class="amount-input"> <label class="input-label">Amount</label> <div class="input-wrapper"> <span class="currency">$</span> <input type="text" inputmode="decimal" placeholder="0.00" id="amount-input"> </div> </div> <div class="transfer-details"> <div class="detail-item"> <span class="detail-label">Recipient</span> <span class="detail-value">Sarah Johnson</span> </div> <div class="detail-item"> <span class="detail-label">Account</span> <span class="detail-value">••••••8742</span> </div> <div class="detail-item"> <span class="detail-label">Processing time</span> <span class="detail-value">Instant</span> </div> <div class="detail-item"> <span class="detail-label">Transaction fee</span> <span class="detail-value">$0.00</span> </div> </div> <div class="submit-button-container"> <button class="submit-button" id="submit-button"> <span class="button-text">Send Money</span> </button> <div class="progress-container" id="progress-container"> <div class="progress-spinner" id="progress-spinner"></div> <div class="success-icon" id="success-icon"></div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const submitButton = document.getElementById('submit-button'); const progressContainer = document.getElementById('progress-container'); const progressSpinner = document.getElementById('progress-spinner'); const successIcon = document.getElementById('success-icon'); const amountInput = document.getElementById('amount-input'); // Format currency input amountInput.addEventListener('input', function(e) { let value = e.target.value.replace(/[^\d.]/g, ''); if (value.indexOf('.') !== -1) { let decimalPart = value.split('.')[1]; if (decimalPart.length > 2) { value = value.substring(0, value.length - (decimalPart.length - 2)); } } e.target.value = value; }); // Create ripple effect submitButton.addEventListener('mousedown', createRipple); submitButton.addEventListener('touchstart', createRipple); function createRipple(e) { const button = e.currentTarget; const circle = document.createElement('span'); const diameter = Math.max(button.clientWidth, button.clientHeight); const radius = diameter / 2; // Get click position relative to button let rect = button.getBoundingClientRect(); let x, y; if (e.type === 'touchstart') { x = e.touches[0].clientX - rect.left; y = e.touches[0].clientY - rect.top; } else { x = e.clientX - rect.left; y = e.clientY - rect.top; } circle.style.width = circle.style.height = `${diameter}px`; circle.style.left = `${x - radius}px`; circle.style.top = `${y - radius}px`; circle.classList.add('ripple'); const ripple = button.getElementsByClassName('ripple')[0]; if (ripple) { ripple.remove(); } button.appendChild(circle); } // Submit action submitButton.addEventListener('click', function() { const amount = amountInput.value.trim(); if (!amount || parseFloat(amount) <= 0) { // Vibrate animation if no amount is entered submitButton.classList.add('vibrate'); amountInput.focus(); setTimeout(() => { submitButton.classList.remove('vibrate'); }, 400); return; } // Start loading animation progressContainer.style.opacity = '1'; // Simulate loading for 2 seconds setTimeout(() => { progressSpinner.style.display = 'none'; successIcon.style.display = 'block'; // Reset after 1.5 seconds setTimeout(() => { progressContainer.style.opacity = '0'; setTimeout(() => { progressSpinner.style.display = 'block'; successIcon.style.display = 'none'; amountInput.value = ''; }, 300); }, 1500); }, 2000); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary: #FF5757; --secondary: #4A86FF; --accent: #FFC107; --light-bg: #FFFFFF; --dark-bg: #1F1F1F; --light-text: #333333; --dark-text: #F1F1F1; --success: #4CAF50; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: var(--light-bg); transition: background-color 0.3s ease; padding: 20px; } body.dark-mode { background-color: var(--dark-bg); } .container { max-width: 600px; width: 100%; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); background-color: var(--light-bg); transition: all 0.3s ease; position: relative; overflow: hidden; } body.dark-mode .container { background-color: #2A2A2A; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); } .theme-toggle { position: absolute; top: 15px; right: 15px; background: none; border: none; cursor: pointer; font-size: 24px; color: var(--light-text); z-index: 10; transition: transform 0.3s ease; } body.dark-mode .theme-toggle { color: var(--dark-text); } .theme-toggle:hover { transform: rotate(30deg); } h1 { margin-bottom: 20px; color: var(--light-text); font-size: 28px; text-align: center; transition: color 0.3s ease; } body.dark-mode h1 { color: var(--dark-text); } .post-area { width: 100%; min-height: 150px; border-radius: 15px; padding: 15px; margin-bottom: 20px; resize: none; border: 2px solid #e1e1e1; font-size: 16px; transition: all 0.3s ease; color: var(--light-text); background-color: var(--light-bg); } body.dark-mode .post-area { border-color: #444; color: var(--dark-text); background-color: #333; } .post-area:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(74, 134, 255, 0.2); } .submit-btn { display: flex; justify-content: center; align-items: center; width: 100%; padding: 16px; border: none; border-radius: 50px; font-size: 18px; font-weight: 600; cursor: pointer; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; overflow: hidden; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } .submit-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); } .submit-btn:active { transform: translateY(0); } .submit-btn .btn-text { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; } .submit-btn .icon { display: inline-flex; transition: transform 0.3s ease; } .submit-btn:hover .icon { transform: rotate(15deg) scale(1.2); } .submit-btn::before { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; background: radial-gradient(circle, var(--accent), transparent 70%); transform: translate(-50%, -50%) scale(0); opacity: 0; transition: transform 0.5s ease, opacity 0.5s ease; } .submit-btn.clicked::before { transform: translate(-50%, -50%) scale(2); opacity: 0.3; } .emoji-picker { display: flex; justify-content: space-between; margin: 20px 0; padding: 10px; border-radius: 15px; background-color: #f5f5f5; transition: background-color 0.3s ease; } body.dark-mode .emoji-picker { background-color: #333; } .emoji { font-size: 24px; cursor: pointer; transition: transform 0.2s ease; user-select: none; } .emoji:hover { transform: scale(1.3); } .character-count { text-align: right; margin-bottom: 15px; font-size: 14px; color: #777; transition: color 0.3s ease; } body.dark-mode .character-count { color: #aaa; } .character-count.limit { color: var(--primary); font-weight: bold; } .success-message { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background-color: var(--success); color: white; padding: 15px 30px; border-radius: 50px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); z-index: 100; transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); display: flex; align-items: center; gap: 10px; } .success-message.show { transform: translateX(-50%) translateY(0); } .confetti { position: absolute; width: 10px; height: 10px; background-color: var(--accent); border-radius: 50%; pointer-events: none; } @media (max-width: 500px) { .container { padding: 15px; border-radius: 15px; } h1 { font-size: 22px; } .submit-btn { padding: 14px; font-size: 16px; } .emoji { font-size: 20px; } } </style> </head> <body> <div class="container"> <button class="theme-toggle" aria-label="Toggle dark mode">☀️</button> <h1>Share your thoughts with the world</h1> <textarea class="post-area" placeholder="What's on your mind today? Add a dash of personality to your feed..."></textarea> <div class="character-count">0/280 characters</div> <div class="emoji-picker"> <span class="emoji" data-emoji="😂">😂</span> <span class="emoji" data-emoji="❤️">❤️</span> <span class="emoji" data-emoji="🔥">🔥</span> <span class="emoji" data-emoji="👍">👍</span> <span class="emoji" data-emoji="✨">✨</span> <span class="emoji" data-emoji="🎉">🎉</span> </div> <button class="submit-btn"> <span class="btn-text"> <span class="icon">📢</span> <span>Share with friends</span> </span> </button> </div> <div class="success-message"> <span class="icon">✓</span> <span>Post shared successfully!</span> </div> <script> document.addEventListener('DOMContentLoaded', function() { const themeToggle = document.querySelector('.theme-toggle'); const submitBtn = document.querySelector('.submit-btn'); const textarea = document.querySelector('.post-area'); const characterCount = document.querySelector('.character-count'); const emojis = document.querySelectorAll('.emoji'); const successMessage = document.querySelector('.success-message'); // Theme toggle functionality themeToggle.addEventListener('click', function() { document.body.classList.toggle('dark-mode'); themeToggle.textContent = document.body.classList.contains('dark-mode') ? '🌙' : '☀️'; }); // Character count functionality textarea.addEventListener('input', function() { const length = this.value.length; characterCount.textContent = length + '/280 characters'; if (length > 240) { characterCount.classList.add('limit'); } else { characterCount.classList.remove('limit'); } }); // Emoji picker functionality emojis.forEach(emoji => { emoji.addEventListener('click', function() { const emojiChar = this.getAttribute('data-emoji'); textarea.value += emojiChar; // Trigger input event to update character count const event = new Event('input'); textarea.dispatchEvent(event); // Animate the emoji this.style.transform = 'scale(1.5)'; setTimeout(() => { this.style.transform = 'scale(1)'; }, 200); }); }); // Submit button animation and functionality submitBtn.addEventListener('click', function(e) { if (!textarea.value.trim()) { textarea.focus(); return; } this.classList.add('clicked'); // Create confetti effect createConfetti(); // Show success message setTimeout(() => { successMessage.classList.add('show'); setTimeout(() => { successMessage.classList.remove('show'); }, 3000); }, 500); // Reset setTimeout(() => { this.classList.remove('clicked'); textarea.value = ''; characterCount.textContent = '0/280 characters'; characterCount.classList.remove('limit'); }, 1000); }); // Create confetti effect function createConfetti() { const container = document.querySelector('.container'); const colors = ['#FF5757', '#4A86FF', '#FFC107', '#4CAF50', '#9C27B0']; for (let i = 0; i < 50; i++) { const confetti = document.createElement('div'); confetti.classList.add('confetti'); const size = Math.random() * 8 + 6; const color = colors[Math.floor(Math.random() * colors.length)]; confetti.style.width = `${size}px`; confetti.style.height = `${size}px`; confetti.style.backgroundColor = color; confetti.style.left = `${Math.random() * 100}%`; confetti.style.top = `${Math.random() * 100}%`; // Random shape if (Math.random() > 0.5) { confetti.style.borderRadius = '0'; confetti.style.transform = `rotate(${Math.random() * 360}deg)`; } container.appendChild(confetti); // Animate confetti const duration = Math.random() * 1000 + 1000; const keyframes = [ { transform: `translate(0, 0) rotate(0deg)`, opacity: 1 }, { transform: `translate(${Math.random() * 200 - 100}px, ${Math.random() * 200 + 50}px) rotate(${Math.random() * 360}deg)`, opacity: 0 } ]; confetti.animate(keyframes, { duration: duration, easing: 'cubic-bezier(0.23, 1, 0.32, 1)' }); // Remove confetti after animation setTimeout(() => { confetti.remove(); }, duration); } } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap'); body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #f7f9fc, #edf2f7); padding: 20px; } .travel-booking { width: 100%; max-width: 650px; padding: 30px; background: white; box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 12px; position: relative; overflow: hidden; } .travel-booking::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, #e17055, #e67e22, #f39c12); z-index: 1; } h1 { font-size: 28px; color: #2d3748; margin-bottom: 8px; font-weight: 700; position: relative; } h1 span { color: #e67e22; } .subtitle { font-size: 16px; color: #718096; margin-bottom: 30px; line-height: 1.5; } .itinerary { margin-bottom: 35px; border-radius: 8px; overflow: hidden; background: #fafafa; padding: 20px; border-left: 4px solid #e67e22; } .itinerary-title { display: flex; align-items: center; margin-bottom: 15px; } .itinerary-title svg { margin-right: 10px; color: #e67e22; } .itinerary-title h2 { font-size: 18px; font-weight: 600; color: #2d3748; } .itinerary-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-bottom: 20px; } .detail-item { position: relative; } .detail-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #718096; margin-bottom: 5px; font-weight: 500; } .detail-value { font-size: 15px; color: #2d3748; font-weight: 600; } .detail-value span { font-weight: 400; color: #718096; font-size: 13px; } .price-bar { display: flex; justify-content: space-between; align-items: center; margin: 25px 0; padding: 15px 20px; background: #f8f9fa; border-radius: 8px; } .price-label { font-size: 16px; color: #4a5568; font-weight: 500; } .price-value { font-size: 24px; color: #2d3748; font-weight: 700; } .btn-container { position: relative; width: 100%; height: 60px; overflow: hidden; border-radius: 30px; margin-top: 20px; } .submit-btn { position: relative; width: 100%; height: 100%; background: linear-gradient(90deg, #e17055, #e67e22); border: none; border-radius: 30px; color: white; font-size: 16px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; cursor: pointer; overflow: hidden; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; padding: 0 25px; z-index: 1; } .submit-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, #f39c12, #e67e22); z-index: -1; transform: scaleX(0); transform-origin: right; transition: transform 0.5s ease; } .submit-btn:hover::before { transform: scaleX(1); transform-origin: left; } .submit-btn:hover { box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4); } .btn-icon { margin-left: 10px; position: relative; transition: all 0.3s ease; } .submit-btn:hover .btn-icon { transform: translateX(5px); } .btn-text { position: relative; z-index: 2; } /* Loading state */ .submit-btn.loading .btn-text { opacity: 0; } .loading-animation { position: absolute; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; } .submit-btn.loading .loading-animation { opacity: 1; } .loading-dot { width: 8px; height: 8px; margin: 0 3px; background-color: white; border-radius: 50%; display: inline-block; animation: loadingBounce 1.4s infinite ease-in-out both; } .loading-dot:nth-child(1) { animation-delay: -0.32s; } .loading-dot:nth-child(2) { animation-delay: -0.16s; } @keyframes loadingBounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } } /* Success state */ .success-message { position: absolute; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.3s ease; color: white; font-size: 16px; font-weight: 600; } .submit-btn.success .success-message { opacity: 1; } .submit-btn.success { background: linear-gradient(90deg, #27ae60, #2ecc71); } /* Responsive adjustments */ @media (max-width: 600px) { .travel-booking { padding: 20px; } h1 { font-size: 24px; } .subtitle { font-size: 14px; } .itinerary-details { grid-template-columns: repeat(2, 1fr); } .price-value { font-size: 20px; } .btn-container { height: 50px; } .submit-btn { font-size: 14px; } } /* Ornamental elements */ .pattern { position: absolute; width: 150px; height: 150px; opacity: 0.05; z-index: 0; pointer-events: none; } .pattern-1 { top: 10px; right: 10px; background: radial-gradient(circle, #e67e22 10%, transparent 10%); background-size: 15px 15px; } .pattern-2 { bottom: 10px; left: 10px; background: repeating-linear-gradient(45deg, #e67e22, #e67e22 5px, transparent 5px, transparent 15px); } </style> </head> <body> <div class="travel-booking"> <div class="pattern pattern-1"></div> <div class="pattern pattern-2"></div> <h1>Your <span>Desert Adventure</span> Awaits</h1> <p class="subtitle">Prepare for an unforgettable journey across the golden sands of the Sahara Desert. Your custom itinerary is ready for confirmation.</p> <div class="itinerary"> <div class="itinerary-title"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 4H5C3.89543 4 3 4.89543 3 6V20C3 21.1046 3.89543 22 5 22H19C20.1046 22 21 21.1046 21 20V6C21 4.89543 20.1046 4 19 4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M16 2V6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 2V6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M3 10H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> <h2>7-Day Sahara Exploration</h2> </div> <div class="itinerary-details"> <div class="detail-item"> <p class="detail-label">Departure</p> <p class="detail-value">Oct 15, 2023 <span>• 8:30 AM</span></p> </div> <div class="detail-item"> <p class="detail-label">Return</p> <p class="detail-value">Oct 22, 2023 <span>• 3:15 PM</span></p> </div> <div class="detail-item"> <p class="detail-label">Group Size</p> <p class="detail-value">6 Travelers</p> </div> <div class="detail-item"> <p class="detail-label">Guide</p> <p class="detail-value">Experienced Local</p> </div> </div> <div class="itinerary-highlights"> <div class="detail-item"> <p class="detail-label">Highlights</p> <p class="detail-value">Camel Trekking • Berber Camp • Sunset Dunes • Stargazing</p> </div> </div> </div> <div class="price-bar"> <div class="price-label">Total Package (All Inclusive)</div> <div class="price-value">$2,495</div> </div> <div class="btn-container"> <button class="submit-btn"> <span class="btn-text">Confirm Adventure</span> <svg class="btn-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 5L19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> <div class="loading-animation"> <span class="loading-dot"></span> <span class="loading-dot"></span> <span class="loading-dot"></span> </div> <div class="success-message"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin-right: 8px;"> <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Adventure Confirmed! </div> </button> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const submitBtn = document.querySelector('.submit-btn'); let isProcessing = false; submitBtn.addEventListener('click', function() { if (isProcessing) return; isProcessing = true; // Loading state submitBtn.classList.add('loading'); // Simulate processing setTimeout(() => { submitBtn.classList.remove('loading'); submitBtn.classList.add('success'); // Reset button after 3 seconds setTimeout(() => { submitBtn.classList.remove('success'); isProcessing = false; }, 3000); }, 2000); }); // Add button hover sound effect submitBtn.addEventListener('mouseenter', () => { const audio = new Audio('data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU3LjU2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAACAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1f////////////////////////////////////////////////////////////////8AAAAATGF2YzU3LjY0AAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs4uTUAAAAAAAAAAAAAAAAAAAA//tAxAAABKgS0lGQACI9iWpNMYABAAAEsCQOF4XB8IMbjRg5kuJo78y/9LpdBCEJsR7iXdyPO/le4IAQMWlYZzMdEoYE/8vzb0v/aLpu8G44SCcJwfEH5+H/xB+fggZBDD/4Jb/hCDhIJ//B8HwQd5HF2GX/+IIYEP4QNB3//nRgb/4In/wfggZwQ7v8EO/8H/wQz8EPgm7OP8Y3GjBzJcXQSA'); audio.play(); }); }); </script> </body> </html>
<html> <head> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; background-color: #f8f9fa; padding: 20px; } .container { width: 100%; max-width: 600px; background: linear-gradient(135deg, #fff, #f0f4f8); border-radius: 16px; padding: 30px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; } .container::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px; background: linear-gradient(90deg, #a5d8ff, #74c0fc, #4dabf7); z-index: 1; } h1 { color: #495057; font-size: 28px; margin-bottom: 10px; font-weight: 600; } p.description { color: #6c757d; font-size: 16px; line-height: 1.6; margin-bottom: 30px; } .form-group { margin-bottom: 24px; } label { display: block; color: #495057; font-size: 15px; margin-bottom: 8px; font-weight: 500; } input, textarea, select { width: 100%; padding: 12px 16px; border: 2px solid #dee2e6; border-radius: 8px; font-size: 15px; color: #495057; background-color: #fff; transition: all 0.3s ease; } input:focus, textarea:focus, select:focus { outline: none; border-color: #74c0fc; box-shadow: 0 0 0 3px rgba(116, 192, 252, 0.25); } textarea { min-height: 120px; resize: vertical; } .progress-indicator { display: flex; justify-content: space-between; margin-bottom: 30px; position: relative; } .progress-indicator::before { content: ""; position: absolute; top: 15px; left: 0; right: 0; height: 2px; background-color: #dee2e6; z-index: 1; } .progress-step { position: relative; z-index: 2; background-color: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #dee2e6; color: #adb5bd; font-weight: 600; transition: all 0.3s ease; } .progress-step.active { background-color: #74c0fc; border-color: #74c0fc; color: white; } .progress-step.completed { background-color: #a5d8ff; border-color: #a5d8ff; color: white; } .submit-btn { background-color: #a5d8ff; color: #1864ab; border: none; padding: 14px 24px; font-size: 16px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; box-shadow: 0 4px 10px rgba(116, 192, 252, 0.3); } .submit-btn:hover { background-color: #74c0fc; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(116, 192, 252, 0.4); } .submit-btn:active { transform: translateY(0); } .submit-btn .icon { margin-left: 10px; transition: transform 0.3s ease; } .submit-btn:hover .icon { transform: translateX(5px); } .submit-btn .ripple { position: absolute; width: 10px; height: 10px; background-color: rgba(255, 255, 255, 0.7); border-radius: 50%; animation: rippleEffect 0.6s ease-out; transform: scale(0); } @keyframes rippleEffect { to { transform: scale(30); opacity: 0; } } .success-message { display: none; background-color: #d3f9d8; border-left: 4px solid #40c057; padding: 16px 20px; border-radius: 8px; color: #2b8a3e; margin-top: 20px; animation: slideDown 0.4s ease-out; } @keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .submit-btn.submitted { background-color: #74c0fc; color: white; pointer-events: none; } .submit-btn.submitted .btn-text { display: none; } .submit-btn.submitted .success-text { display: inline-flex; align-items: center; } .submit-btn .success-text { display: none; } .submit-btn .checkmark { display: inline-block; width: 18px; height: 18px; margin-right: 8px; position: relative; } .submit-btn .checkmark::before, .submit-btn .checkmark::after { content: ''; position: absolute; background-color: white; } .submit-btn .checkmark::before { width: 6px; height: 2px; top: 10px; left: 3px; transform: rotate(45deg); } .submit-btn .checkmark::after { width: 10px; height: 2px; top: 9px; left: 5px; transform: rotate(-45deg); } @media (max-width: 600px) { .container { padding: 20px; border-radius: 12px; } h1 { font-size: 24px; } p.description { font-size: 14px; margin-bottom: 20px; } .submit-btn { width: 100%; } } .tooltip { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); background-color: #495057; color: white; padding: 8px 12px; border-radius: 6px; font-size: 14px; opacity: 0; transition: opacity 0.3s, bottom 0.3s; pointer-events: none; white-space: nowrap; } .tooltip::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #495057; } .form-group { position: relative; } .form-group:hover .tooltip { opacity: 1; bottom: -30px; } .help-icon { position: absolute; right: 10px; top: 10px; width: 18px; height: 18px; background-color: #e9ecef; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #868e96; font-size: 12px; cursor: pointer; transition: all 0.3s ease; } .help-icon:hover { background-color: #dee2e6; color: #495057; } </style> </head> <body> <div class="container"> <h1>Complete Your Learning Path</h1> <p class="description">You're just one step away from unlocking personalized educational content. Submit your preferences to tailor your learning experience.</p> <div class="progress-indicator"> <div class="progress-step completed">1</div> <div class="progress-step completed">2</div> <div class="progress-step active">3</div> </div> <div class="form-group"> <label for="learning-goal">Primary Learning Goal</label> <select id="learning-goal"> <option value="">Select your main objective</option> <option value="skill">Skill Development</option> <option value="certification">Professional Certification</option> <option value="knowledge">Knowledge Expansion</option> <option value="career">Career Transition</option> </select> <div class="help-icon">?</div> <div class="tooltip">Choose what you want to achieve with this course</div> </div> <div class="form-group"> <label for="experience">Experience Level</label> <select id="experience"> <option value="">Select your experience level</option> <option value="beginner">Beginner - New to the subject</option> <option value="intermediate">Intermediate - Some knowledge</option> <option value="advanced">Advanced - Seeking expertise</option> </select> </div> <div class="form-group"> <label for="time-commitment">Weekly Time Commitment</label> <select id="time-commitment"> <option value="">How much time can you dedicate?</option> <option value="minimal">1-2 hours per week</option> <option value="moderate">3-5 hours per week</option> <option value="significant">6+ hours per week</option> </select> </div> <div class="form-group"> <label for="notes">Additional Learning Preferences</label> <textarea id="notes" placeholder="Tell us about your preferred learning styles, specific topics of interest, or any accessibility needs."></textarea> </div> <button class="submit-btn" id="submitBtn"> <span class="btn-text">Personalize My Learning Path</span> <span class="success-text"><span class="checkmark"></span>Learning Path Created!</span> <span class="icon">→</span> </button> <div class="success-message" id="successMessage"> Thank you! Your learning path is being created. You'll receive a tailored curriculum in your dashboard within the next 15 minutes. </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const submitBtn = document.getElementById('submitBtn'); const successMessage = document.getElementById('successMessage'); submitBtn.addEventListener('click', function(e) { // Create ripple effect const ripple = document.createElement('span'); ripple.classList.add('ripple'); const rect = submitBtn.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; ripple.style.left = x + 'px'; ripple.style.top = y + 'px'; submitBtn.appendChild(ripple); // Form validation (simulated) let isValid = true; const requiredFields = [ document.getElementById('learning-goal'), document.getElementById('experience'), document.getElementById('time-commitment') ]; requiredFields.forEach(field => { if (!field.value) { isValid = false; field.style.borderColor = '#fa5252'; setTimeout(() => { field.style.borderColor = '#dee2e6'; }, 2000); } }); if (!isValid) { // Shake the button slightly to indicate error submitBtn.classList.add('error'); setTimeout(() => { submitBtn.classList.remove('error'); }, 600); return; } // Success state transition submitBtn.classList.add('submitted'); // Show success message setTimeout(() => { successMessage.style.display = 'block'; // Change button color to success green submitBtn.style.backgroundColor = '#63e6be'; // Simulate progress steps completion const progressSteps = document.querySelectorAll('.progress-step'); progressSteps.forEach(step => { step.classList.add('completed'); step.classList.remove('active'); }); }, 600); // Clean up the ripple setTimeout(() => { ripple.remove(); }, 700); }); // Add some interactive behavior to form fields const formFields = document.querySelectorAll('input, textarea, select'); formFields.forEach(field => { field.addEventListener('focus', () => { field.parentElement.querySelector('label').style.color = '#4dabf7'; }); field.addEventListener('blur', () => { field.parentElement.querySelector('label').style.color = '#495057'; }); }); }); </script> </body> </html>
<html> <head> <style> *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Montserrat', sans-serif; background-color: #f8f9fa; display: flex; justify-content: center; align-items: center; min-height: 700px; color: #333; padding: 20px; } .registration-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); width: 100%; max-width: 500px; padding: 35px; position: relative; overflow: hidden; } .registration-title { text-align: center; margin-bottom: 40px; } .registration-title h1 { font-size: 28px; font-weight: 700; margin-bottom: 10px; color: #32164f; } .registration-title p { font-size: 16px; color: #6c757d; line-height: 1.5; } .form-group { margin-bottom: 25px; position: relative; } .form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #495057; } .form-control { width: 100%; padding: 15px; border: 2px solid #e9ecef; border-radius: 8px; transition: all 0.3s ease; font-size: 15px; } .form-control:focus { outline: none; border-color: #7e4b9e; box-shadow: 0 0 0 3px rgba(126, 75, 158, 0.1); } .submit-btn-container { display: flex; justify-content: center; margin-top: 40px; position: relative; } .submit-btn { position: relative; overflow: hidden; background: linear-gradient(135deg, #32164f 0%, #7e4b9e 100%); color: white; border: none; border-radius: 8px; padding: 16px 40px; font-size: 16px; font-weight: 600; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(126, 75, 158, 0.3); outline: none; transform: translateY(0); display: flex; align-items: center; justify-content: center; } .submit-btn:hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(126, 75, 158, 0.4); } .submit-btn:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(126, 75, 158, 0.3); } .submit-btn span { position: relative; z-index: 2; display: flex; align-items: center; } .submit-btn .icon { margin-left: 10px; width: 18px; height: 18px; transition: all 0.3s ease; } .submit-btn:hover .icon { transform: translateX(3px); } .sparkle { position: absolute; background: rgba(255, 255, 255, 0.8); border-radius: 50%; transform: scale(0); pointer-events: none; z-index: 1; } @keyframes sparkle { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(2.5); opacity: 0; } } .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.25); transform: scale(0); animation: ripple 0.6s linear; } @keyframes ripple { to { transform: scale(2.5); opacity: 0; } } .confetti { position: absolute; width: 8px; height: 8px; background-color: transparent; opacity: 0; } @keyframes floating { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(-150px) rotate(540deg); opacity: 0; } } .success-message { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #32164f 0%, #7e4b9e 100%); display: flex; flex-direction: column; justify-content: center; align-items: center; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); border-radius: 12px; padding: 20px; color: white; z-index: 10; text-align: center; } .success-message.show { transform: translateY(0); } .success-icon { font-size: 50px; margin-bottom: 15px; } .success-message h2 { margin-bottom: 15px; font-size: 28px; } .success-message p { font-size: 16px; margin-bottom: 25px; max-width: 400px; line-height: 1.6; } .done-btn { background: rgba(255, 255, 255, 0.2); color: white; border: 2px solid white; border-radius: 8px; padding: 12px 30px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; } .done-btn:hover { background: rgba(255, 255, 255, 0.3); } @media (max-width: 600px) { .registration-card { padding: 25px; } .registration-title h1 { font-size: 24px; } .registration-title p { font-size: 14px; } .submit-btn { padding: 14px 30px; font-size: 15px; } } </style> </head> <body> <div class="registration-card"> <div class="registration-title"> <h1>Annual Gala Registration</h1> <p>Secure your place at our renowned charity fundraiser on December 10th</p> </div> <form id="registrationForm"> <div class="form-group"> <label for="name">Full Name</label> <input type="text" class="form-control" id="name" placeholder="Your Full Name"> </div> <div class="form-group"> <label for="email">Email Address</label> <input type="email" class="form-control" id="email" placeholder="[email protected]"> </div> <div class="form-group"> <label for="tickets">Number of Tickets</label> <select class="form-control" id="tickets"> <option value="1">1 Ticket</option> <option value="2">2 Tickets</option> <option value="3">3 Tickets</option> <option value="4">4 Tickets</option> <option value="5">5+ Tickets (Group Rate)</option> </select> </div> <div class="submit-btn-container"> <button type="button" id="submitBtn" class="submit-btn"> <span> Secure My Reservation <svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M5 12h14M12 5l7 7-7 7"/> </svg> </span> </button> </div> </form> <div class="success-message"> <div class="success-icon">✨</div> <h2>Celebration Awaits!</h2> <p>Your registration for the Annual Gala is confirmed. We've sent the details to your email and look forward to seeing you.</p> <button class="done-btn" id="doneBtn">Got it</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const submitBtn = document.getElementById('submitBtn'); const successMessage = document.querySelector('.success-message'); const doneBtn = document.getElementById('doneBtn'); const registrationForm = document.getElementById('registrationForm'); // Create ripple effect on button click submitBtn.addEventListener('click', function(e) { // Create ripple element const ripple = document.createElement('span'); ripple.classList.add('ripple'); // Position the ripple const rect = submitBtn.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); const x = e.clientX - rect.left - size / 2; const y = e.clientY - rect.top - size / 2; ripple.style.width = ripple.style.height = `${size}px`; ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; submitBtn.appendChild(ripple); // Create sparkle effects createSparkles(submitBtn); // Show success message after delay setTimeout(() => { successMessage.classList.add('show'); createConfetti(); }, 800); // Remove ripple after animation setTimeout(() => { ripple.remove(); }, 600); }); doneBtn.addEventListener('click', () => { successMessage.classList.remove('show'); registrationForm.reset(); }); // Create sparkle effects function createSparkles(element) { const numSparkles = 5; const colors = ['#FFD700', '#E6E6FA', '#FFF', '#FFFACD']; for (let i = 0; i < numSparkles; i++) { const sparkle = document.createElement('span'); sparkle.classList.add('sparkle'); // Random position within the button const rect = element.getBoundingClientRect(); const size = Math.random() * 10 + 5; const x = Math.random() * rect.width; const y = Math.random() * rect.height; sparkle.style.width = `${size}px`; sparkle.style.height = `${size}px`; sparkle.style.left = `${x}px`; sparkle.style.top = `${y}px`; sparkle.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; element.appendChild(sparkle); // Animate and remove sparkle.style.animation = `sparkle ${Math.random() * 0.4 + 0.6}s forwards`; setTimeout(() => { sparkle.remove(); }, 1000); } } // Create confetti for success message function createConfetti() { const colors = ['#7e4b9e', '#32164f', '#9370DB', '#E6E6FA', '#B19CD9', '#FFD700']; const confettiCount = 50; for (let i = 0; i < confettiCount; i++) { const confetti = document.createElement('div'); confetti.classList.add('confetti'); const color = colors[Math.floor(Math.random() * colors.length)]; const size = Math.random() * 8 + 4; const shape = Math.random() > 0.5 ? '50%' : '0%'; confetti.style.backgroundColor = color; confetti.style.width = `${size}px`; confetti.style.height = `${size}px`; confetti.style.borderRadius = shape; confetti.style.left = `${Math.random() * 100}%`; confetti.style.top = `${Math.random() * 20 + 80}%`; const animationDuration = Math.random() * 2 + 1; const animationDelay = Math.random() * 0.5; confetti.style.animation = `floating ${animationDuration}s ease-in ${animationDelay}s forwards`; successMessage.appendChild(confetti); setTimeout(() => { confetti.remove(); }, (animationDuration + animationDelay) * 1000); } } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Professional Job Application Portal</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: #f8f9fa; display: flex; justify-content: center; align-items: center; height: 100vh; width: 100%; padding: 20px; } .application-container { width: 100%; max-width: 600px; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); overflow: hidden; transition: all 0.3s ease; } .application-header { background: #2c3e50; padding: 25px 30px; color: #fff; position: relative; } .header-pattern { position: absolute; top: 0; right: 0; width: 100%; height: 100%; background-image: radial-gradient(#3a5066 1px, transparent 1px); background-size: 15px 15px; opacity: 0.2; } .application-header h1 { font-size: 24px; font-weight: 600; margin-bottom: 5px; position: relative; } .application-header p { font-size: 15px; opacity: 0.9; position: relative; } .application-status { padding: 20px 30px; background: #f1f3f5; border-bottom: 1px solid #eaedf0; } .status-bar { width: 100%; height: 6px; background: #e0e4e8; border-radius: 10px; overflow: hidden; margin-top: 10px; } .status-progress { height: 100%; width: 75%; background: #2c3e50; border-radius: 10px; transition: width 0.5s ease; } .application-form { padding: 30px; } .form-group { margin-bottom: 20px; } .form-group label { display: block; font-size: 14px; font-weight: 500; color: #495057; margin-bottom: 8px; } .form-group input, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid #dee2e6; border-radius: 6px; font-size: 15px; transition: all 0.2s ease; background: #f8f9fa; color: #212529; } .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #2c3e50; background: #fff; box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1); } .submit-container { position: relative; margin-top: 30px; } .submit-btn { width: 100%; padding: 16px; background: #2c3e50; color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: 600; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; } .submit-btn:hover { background: #34495e; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15); } .submit-btn:active { background: #1a2530; transform: translateY(0); box-shadow: none; } .btn-content { display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; } .btn-icon { margin-left: 8px; display: flex; } .loading-spinner { display: none; width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; margin: 0 auto; } @keyframes spin { to { transform: rotate(360deg); } } .success-message { display: none; text-align: center; padding: 20px; background: #f1f9f5; border-radius: 6px; margin-top: 20px; } .success-message h3 { color: #2c3e50; margin-bottom: 10px; } .success-message p { color: #495057; font-size: 15px; line-height: 1.5; } .success-icon { width: 60px; height: 60px; margin: 0 auto 15px; background: #2c3e50; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 30px; } .ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.6s linear; } @keyframes ripple { to { transform: scale(2.5); opacity: 0; } } @media (max-width: 480px) { .application-header { padding: 20px; } .application-header h1 { font-size: 20px; } .application-form { padding: 20px; } } </style> </head> <body> <div class="application-container"> <div class="application-header"> <div class="header-pattern"></div> <h1>Complete Your Application</h1> <p>Final steps before your profile is submitted to our hiring team</p> </div> <div class="application-status"> <div>Step 3 of 4: Professional Summary</div> <div class="status-bar"> <div class="status-progress"></div> </div> </div> <div class="application-form"> <div class="form-group"> <label for="professional-summary">Professional Summary</label> <textarea id="professional-summary" rows="4" placeholder="Briefly describe your key qualifications and career highlights..."></textarea> </div> <div class="form-group"> <label for="key-achievement">Key Achievement</label> <input type="text" id="key-achievement" placeholder="Your most significant professional accomplishment"> </div> <div class="submit-container"> <button id="submit-btn" class="submit-btn"> <span class="btn-content"> Submit Professional Summary <span class="btn-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zM4.5 7.5a.5.5 0 0 1 0 1H2.95l1.22 1.22a.5.5 0 0 1-.7.7L1.2 8.2a.5.5 0 0 1 0-.7l2.26-2.26a.5.5 0 0 1 .7.7L2.95 7.5h1.55zM7.5 4.5a.5.5 0 0 1 1 0v1.55l1.22-1.22a.5.5 0 0 1 .7.7L8.2 7.8a.5.5 0 0 1-.7 0L5.2 5.56a.5.5 0 0 1 .7-.7L7.5 6.05V4.5zm-1 7a.5.5 0 0 1 1 0v1.55l1.22-1.22a.5.5 0 0 1 .7.7L7.2 14.8a.5.5 0 0 1-.7 0L4.26 12.56a.5.5 0 0 1 .7-.7L6.5 13.05V11.5z"/> </svg> </span> </span> <span class="loading-spinner"></span> </button> </div> <div class="success-message" id="success-message"> <div class="success-icon">✓</div> <h3>Professional Summary Submitted</h3> <p>Your profile has been updated. Our hiring team will now be able to review your complete application. Proceed to the final step to set up your interview preferences.</p> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const submitBtn = document.getElementById('submit-btn'); const btnContent = document.querySelector('.btn-content'); const loadingSpinner = document.querySelector('.loading-spinner'); const successMessage = document.getElementById('success-message'); const applicationForm = document.querySelector('.application-form'); submitBtn.addEventListener('click', function(e) { // Create ripple effect const ripple = document.createElement('span'); ripple.classList.add('ripple'); this.appendChild(ripple); const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; setTimeout(() => { ripple.remove(); }, 600); // Show loading state btnContent.style.opacity = '0'; loadingSpinner.style.display = 'block'; submitBtn.disabled = true; // Simulate form submission setTimeout(() => { loadingSpinner.style.display = 'none'; successMessage.style.display = 'block'; submitBtn.style.backgroundColor = '#2c3e50'; // Animate progress bar to 100% document.querySelector('.status-progress').style.width = '100%'; // Update status text document.querySelector('.application-status div:first-child').textContent = 'Step 4 of 4: Interview Preferences'; // Clear form inputs document.getElementById('professional-summary').value = ''; document.getElementById('key-achievement').value = ''; // Enable button after delay setTimeout(() => { btnContent.style.opacity = '1'; submitBtn.disabled = false; submitBtn.querySelector('.btn-content').textContent = 'Continue to Final Step'; }, 500); }, 2000); }); // Focus effect on inputs const formInputs = document.querySelectorAll('.form-group input, .form-group textarea'); formInputs.forEach(input => { input.addEventListener('focus', function() { this.parentElement.style.transform = 'translateY(-2px)'; this.parentElement.style.transition = 'transform 0.3s ease'; }); input.addEventListener('blur', function() { this.parentElement.style.transform = 'translateY(0)'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; width: 100%; max-width: 700px; margin: 0 auto; background-color: #f8f9fa; color: #333; padding: 20px; } .donation-container { background: white; border-radius: 24px; padding: 32px; width: 100%; max-width: 600px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; } .donation-pattern { position: absolute; top: 0; right: 0; width: 150px; height: 150px; background: linear-gradient(135deg, rgba(255, 127, 80, 0.15) 25%, transparent 25%) -10px 0, linear-gradient(225deg, rgba(255, 127, 80, 0.15) 25%, transparent 25%) -10px 0, linear-gradient(315deg, rgba(255, 127, 80, 0.15) 25%, transparent 25%), linear-gradient(45deg, rgba(255, 127, 80, 0.15) 25%, transparent 25%); background-size: 20px 20px; border-radius: 0 24px 0 50%; opacity: 0.6; z-index: 0; } h1 { font-size: 28px; margin-bottom: 16px; color: #333; position: relative; z-index: 1; } p { margin-bottom: 24px; line-height: 1.6; color: #555; position: relative; z-index: 1; } .amount-selector { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; position: relative; z-index: 1; } .amount-option { flex: 1; min-width: 80px; padding: 12px; background: #f5f5f5; border: 2px solid transparent; border-radius: 12px; text-align: center; cursor: pointer; transition: all 0.3s ease; font-weight: 600; } .amount-option:hover { background: #fff0eb; border-color: #ff7f50; } .amount-option.selected { background: #fff0eb; border-color: #ff7f50; color: #ff7f50; box-shadow: 0 4px 12px rgba(255, 127, 80, 0.2); } .custom-amount { display: flex; position: relative; margin-bottom: 24px; z-index: 1; } .custom-amount:before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #888; font-weight: 600; z-index: 2; } .custom-amount input { width: 100%; padding: 14px 14px 14px 28px; border: 1px solid #ddd; border-radius: 12px; font-size: 16px; transition: all 0.3s ease; } .custom-amount input:focus { outline: none; border-color: #ff7f50; box-shadow: 0 0 0 3px rgba(255, 127, 80, 0.2); } .frequency-selector { display: flex; gap: 10px; margin-bottom: 32px; position: relative; z-index: 1; } .frequency-option { flex: 1; padding: 10px; background: #f5f5f5; border: 2px solid transparent; border-radius: 12px; text-align: center; cursor: pointer; transition: all 0.3s ease; font-weight: 600; font-size: 14px; } .frequency-option:hover { background: #fff0eb; border-color: #ff7f50; } .frequency-option.selected { background: #fff0eb; border-color: #ff7f50; color: #ff7f50; box-shadow: 0 4px 12px rgba(255, 127, 80, 0.2); } .donate-button-container { position: relative; z-index: 1; } .donate-button { display: block; width: 100%; padding: 16px 26px; background: linear-gradient(135deg, #ff7f50, #ff6347); color: white; border: none; border-radius: 16px; font-size: 18px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 6px 15px rgba(255, 127, 80, 0.3); position: relative; overflow: hidden; } .donate-button:before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(255, 255, 255, 0.1), transparent); transform: translateY(-100%); transition: transform 0.3s ease; } .donate-button:hover { box-shadow: 0 8px 20px rgba(255, 127, 80, 0.4); transform: translateY(-2px); } .donate-button:hover:before { transform: translateY(0); } .donate-button:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(255, 127, 80, 0.3); } .donate-button:focus { outline: none; box-shadow: 0 0 0 3px rgba(255, 127, 80, 0.3), 0 6px 15px rgba(255, 127, 80, 0.3); } .donate-button:disabled { background: linear-gradient(135deg, #cccccc, #aaaaaa); cursor: not-allowed; box-shadow: none; transform: none; } .donate-button .heart-pulse { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); width: 300px; height: 300px; background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%); border-radius: 50%; opacity: 0; z-index: 0; } @keyframes heartbeat { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0.7; } 50% { opacity: 0.3; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } } .donate-button:hover .heart-pulse { animation: heartbeat 1.5s infinite cubic-bezier(0.66, 0, 0.33, 1); } .donate-button .button-text { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; } .donate-button .icon { margin-right: 10px; display: inline-flex; } .success-message { display: none; text-align: center; margin-top: 20px; padding: 16px; background-color: rgba(46, 204, 113, 0.1); border-radius: 12px; color: #2ecc71; font-weight: 600; } .secure-badge { display: flex; align-items: center; justify-content: center; margin-top: 20px; color: #888; font-size: 14px; } .secure-badge svg { margin-right: 8px; } @media (max-width: 500px) { .donation-container { padding: 24px; border-radius: 16px; } h1 { font-size: 24px; } .amount-option { min-width: 70px; padding: 10px; } .donate-button { padding: 14px 20px; font-size: 16px; } } </style> </head> <body> <div class="donation-container"> <div class="donation-pattern"></div> <h1>Your Generosity Changes Lives</h1> <p>Every donation helps us provide vital resources to communities in need. Together, we can create lasting impact where it matters most.</p> <div class="amount-selector"> <div class="amount-option" data-amount="25">$25</div> <div class="amount-option selected" data-amount="50">$50</div> <div class="amount-option" data-amount="100">$100</div> <div class="amount-option" data-amount="250">$250</div> </div> <div class="custom-amount"> <input type="text" placeholder="Other amount" id="customAmount"> </div> <div class="frequency-selector"> <div class="frequency-option selected" data-frequency="one-time">One-time</div> <div class="frequency-option" data-frequency="monthly">Monthly</div> <div class="frequency-option" data-frequency="quarterly">Quarterly</div> </div> <div class="donate-button-container"> <button class="donate-button" id="donateButton" aria-label="Donate"> <div class="heart-pulse"></div> <span class="button-text"> <span class="icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 21.35L10.55 20.03C5.4 15.36 2 12.28 2 8.5C2 5.42 4.42 3 7.5 3C9.24 3 10.91 3.81 12 5.09C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.42 22 8.5C22 12.28 18.6 15.36 13.45 20.04L12 21.35Z" fill="white"/> </svg> </span> Donate Now </span> </button> </div> <div class="success-message" id="successMessage"> Thank you for your generous support! Your donation will make a real difference. </div> <div class="secure-badge"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1ZM12 11.99H19C18.47 16.11 15.72 19.78 12 20.93V12H5V6.3L12 3.19V11.99Z" fill="#888888"/> </svg> Secure SSL Encrypted Payment </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Amount selector const amountOptions = document.querySelectorAll('.amount-option'); const customAmountInput = document.getElementById('customAmount'); let selectedAmount = 50; // Default selected amount amountOptions.forEach(option => { option.addEventListener('click', function() { // Remove selected class from all options amountOptions.forEach(opt => opt.classList.remove('selected')); // Add selected class to the clicked option this.classList.add('selected'); // Update selected amount selectedAmount = parseInt(this.dataset.amount); // Clear custom amount customAmountInput.value = ''; }); }); customAmountInput.addEventListener('input', function() { // If custom amount is entered, remove selected class from all preset options if (this.value.trim() !== '') { amountOptions.forEach(opt => opt.classList.remove('selected')); // Update selected amount if valid number const customValue = parseFloat(this.value.replace(/[^0-9.]/g, '')); if (!isNaN(customValue)) { selectedAmount = customValue; } } else { // If custom amount is cleared, default to the previously selected preset document.querySelector('.amount-option[data-amount="50"]').classList.add('selected'); selectedAmount = 50; } }); // Frequency selector const frequencyOptions = document.querySelectorAll('.frequency-option'); let selectedFrequency = 'one-time'; // Default frequency frequencyOptions.forEach(option => { option.addEventListener('click', function() { // Remove selected class from all options frequencyOptions.forEach(opt => opt.classList.remove('selected')); // Add selected class to the clicked option this.classList.add('selected'); // Update selected frequency selectedFrequency = this.dataset.frequency; }); }); // Donate button const donateButton = document.getElementById('donateButton'); const successMessage = document.getElementById('successMessage'); donateButton.addEventListener('click', function() { // Simulating form submission this.disabled = true; this.innerHTML = ` <div class="heart-pulse"></div> <span class="button-text">Processing...</span> `; // Simulate a 2-second delay for API call setTimeout(() => { this.innerHTML = ` <div class="heart-pulse"></div> <span class="button-text"> <span class="icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 16.2L4.8 12L3.4 13.4L9 19L21 7L19.6 5.6L9 16.2Z" fill="white"/> </svg> </span> Thank You! </span> `; // Show success message successMessage.style.display = 'block'; // Reset button after 3 seconds setTimeout(() => { this.disabled = false; this.innerHTML = ` <div class="heart-pulse"></div> <span class="button-text"> <span class="icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 21.35L10.55 20.03C5.4 15.36 2 12.28 2 8.5C2 5.42 4.42 3 7.5 3C9.24 3 10.91 3.81 12 5.09C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.42 22 8.5C22 12.28 18.6 15.36 13.45 20.04L12 21.35Z" fill="white"/> </svg> </span> Donate Now </span> `; // Reset form amountOptions.forEach(opt => opt.classList.remove('selected')); document.querySelector('.amount-option[data-amount="50"]').classList.add('selected'); customAmountInput.value = ''; selectedAmount = 50; frequencyOptions.forEach(opt => opt.classList.remove('selected')); document.querySelector('.frequency-option[data-frequency="one-time"]').classList.add('selected'); selectedFrequency = 'one-time'; // Hide success message after 5 seconds setTimeout(() => { successMessage.style.display = 'none'; }, 5000); }, 3000); }, 2000); }); // Force numeric input for custom amount with decimal customAmountInput.addEventListener('keypress', function(e) { const charCode = (e.which) ? e.which : e.keyCode; if (charCode !== 46 && charCode > 31 && (charCode < 48 || charCode > 57)) { e.preventDefault(); } // Allow only one decimal point if (charCode === 46 && this.value.indexOf('.') !== -1) { e.preventDefault(); } }); }); </script> </body> </html>