In today's digital landscape, capturing leads is crucial for any business. A well-designed subscribe form can make all the difference.
Here are 10 subscribe form examples that stand out for their effectiveness and design.
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 subscribe forms effortlessly.
Experience the ease and precision that Subframe offers. 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 subscribe forms and other UI elements in minutes. Our drag-and-drop interface ensures efficiency and precision.
Don't wait to experience the ease and power of Subframe. Start for free and begin designing stunning UIs right away!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MODRN - E-commerce Newsletter</title> <style> :root { --primary: #2a2a2a; --secondary: #f8f8f8; --accent: #ff6b6b; --success: #6bff9e; --text: #333; --light-gray: #f1f1f1; --border-radius: 4px; --font-primary: 'Segoe UI', Helvetica, Arial, sans-serif; --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: var(--font-primary); background-color: var(--secondary); color: var(--text); display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow-x: hidden; padding: 20px; } .container { width: 100%; max-width: 650px; background-color: white; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); position: relative; } .pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(var(--light-gray) 1px, transparent 1px); background-size: 20px 20px; opacity: 0.3; pointer-events: none; } .newsletter { padding: 40px; position: relative; z-index: 1; } .logo { font-size: 24px; font-weight: 700; margin-bottom: 10px; letter-spacing: 2px; color: var(--primary); display: inline-block; position: relative; } .logo::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 40%; height: 3px; background-color: var(--accent); transition: var(--transition); } .logo:hover::after { width: 100%; } h1 { font-size: 28px; margin-bottom: 15px; font-weight: 600; } p { font-size: 16px; line-height: 1.6; margin-bottom: 30px; color: #666; } .benefits { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 30px; } .benefit { background-color: var(--light-gray); padding: 12px 18px; border-radius: var(--border-radius); font-size: 14px; font-weight: 500; display: flex; align-items: center; transition: var(--transition); } .benefit:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); } .benefit i { margin-right: 8px; font-size: 16px; } .form-group { position: relative; margin-bottom: 30px; } .email-input { width: 100%; padding: 16px 20px; font-size: 16px; border: 2px solid var(--light-gray); border-radius: var(--border-radius); background-color: white; transition: var(--transition); outline: none; } .email-input:focus { border-color: var(--primary); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); } .email-input.valid { border-color: var(--success); } .email-input.invalid { border-color: var(--accent); } .validation-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 18px; opacity: 0; transition: var(--transition); } .valid-icon { color: var(--success); } .invalid-icon { color: var(--accent); } .submit-btn { width: 100%; padding: 16px; background-color: var(--primary); color: white; border: none; border-radius: var(--border-radius); font-size: 16px; font-weight: 600; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; z-index: 1; } .submit-btn::before { content: ''; position: absolute; left: 0; top: 0; width: 0; height: 100%; background-color: var(--accent); transition: var(--transition); z-index: -1; } .submit-btn:hover::before { width: 100%; } .submit-btn:hover { box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3); } .privacy { font-size: 13px; color: #888; text-align: center; margin-top: 20px; } .privacy a { color: var(--accent); text-decoration: none; position: relative; } .privacy a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px; background-color: var(--accent); transition: var(--transition); } .privacy a:hover::after { width: 100%; } /* Success message */ .success-message { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; z-index: 10; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67); } .success-message.show { transform: translateY(0); } .success-icon { width: 80px; height: 80px; background-color: var(--success); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-bottom: 30px; animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(107, 255, 158, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(107, 255, 158, 0); } 100% { box-shadow: 0 0 0 0 rgba(107, 255, 158, 0); } } .success-icon i { color: white; font-size: 40px; } .success-title { font-size: 24px; font-weight: 600; margin-bottom: 15px; color: var(--primary); } .success-text { text-align: center; margin-bottom: 30px; } .close-btn { padding: 12px 24px; background-color: var(--primary); color: white; border: none; border-radius: var(--border-radius); font-size: 16px; cursor: pointer; transition: var(--transition); } .close-btn:hover { background-color: var(--accent); } /* Loading animation */ .loading { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } .loading::after { content: ''; display: block; width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; border-color: #fff transparent #fff transparent; animation: loading 1.2s linear infinite; } @keyframes loading { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .submit-btn.is-loading .loading { display: block; } .submit-btn.is-loading .btn-text { visibility: hidden; } /* Mobile responsiveness */ @media (max-width: 600px) { .newsletter { padding: 30px 20px; } h1 { font-size: 24px; } .benefits { flex-direction: column; gap: 10px; } .benefit { width: 100%; } } </style> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> </head> <body> <div class="container"> <div class="pattern"></div> <div class="newsletter"> <span class="logo">MODRN</span> <h1>Join the style revolution</h1> <p>Subscribe to our curated newsletter and be the first to discover our exclusive drops, seasonal edits, and limited-edition collaborations.</p> <div class="benefits"> <div class="benefit"> <i class="fas fa-tag"></i> <span>Early access to sales</span> </div> <div class="benefit"> <i class="fas fa-gift"></i> <span>Subscriber-only perks</span> </div> <div class="benefit"> <i class="fas fa-badge-percent"></i> <span>10% off first order</span> </div> </div> <form id="newsletter-form"> <div class="form-group"> <input type="email" id="email" class="email-input" placeholder="Your email address" required> <div class="validation-icon valid-icon"> <i class="fas fa-check-circle"></i> </div> <div class="validation-icon invalid-icon"> <i class="fas fa-exclamation-circle"></i> </div> </div> <button type="submit" class="submit-btn"> <span class="btn-text">Subscribe Now</span> <div class="loading"></div> </button> </form> <p class="privacy">By subscribing, you agree to our <a href="#">Privacy Policy</a> and consent to receive updates from MODRN.</p> </div> <div class="success-message"> <div class="success-icon"> <i class="fas fa-check"></i> </div> <h2 class="success-title">You're on the list!</h2> <p class="success-text">Thanks for joining the MODRN community. <br>We've sent a welcome gift to your inbox.</p> <button class="close-btn">Continue Shopping</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById('newsletter-form'); const emailInput = document.getElementById('email'); const submitBtn = document.querySelector('.submit-btn'); const successMessage = document.querySelector('.success-message'); const closeBtn = document.querySelector('.close-btn'); const validIcon = document.querySelector('.valid-icon'); const invalidIcon = document.querySelector('.invalid-icon'); // Real-time email validation emailInput.addEventListener('input', function() { const email = this.value.trim(); const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (email === '') { this.classList.remove('valid', 'invalid'); validIcon.style.opacity = 0; invalidIcon.style.opacity = 0; } else if (emailRegex.test(email)) { this.classList.add('valid'); this.classList.remove('invalid'); validIcon.style.opacity = 1; invalidIcon.style.opacity = 0; } else { this.classList.add('invalid'); this.classList.remove('valid'); validIcon.style.opacity = 0; invalidIcon.style.opacity = 1; } }); // Form submission form.addEventListener('submit', function(e) { e.preventDefault(); // Email validation const email = emailInput.value.trim(); const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailRegex.test(email)) { emailInput.classList.add('invalid'); invalidIcon.style.opacity = 1; return; } // Show loading state submitBtn.classList.add('is-loading'); // Simulate API call (1.5 seconds) setTimeout(function() { submitBtn.classList.remove('is-loading'); // Show success message successMessage.classList.add('show'); // Reset form form.reset(); emailInput.classList.remove('valid', 'invalid'); validIcon.style.opacity = 0; invalidIcon.style.opacity = 0; }, 1500); }); // Close button for success message closeBtn.addEventListener('click', function() { successMessage.classList.remove('show'); }); // Add micro-interaction to input focus emailInput.addEventListener('focus', function() { this.parentElement.style.transform = 'translateY(-2px)'; this.parentElement.style.transition = 'transform 0.3s ease'; }); emailInput.addEventListener('blur', function() { this.parentElement.style.transform = 'translateY(0)'; }); // Add ripple effect to submit button submitBtn.addEventListener('mousedown', function(e) { const button = e.currentTarget; const ripple = document.createElement('span'); const rect = button.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`; ripple.style.position = 'absolute'; ripple.style.borderRadius = '50%'; ripple.style.backgroundColor = 'rgba(255, 255, 255, 0.3)'; ripple.style.transform = 'scale(0)'; ripple.style.animation = 'ripple 0.6s linear'; button.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 600); }); // Add keyframe for ripple effect const style = document.createElement('style'); style.textContent = ` @keyframes ripple { to { transform: scale(4); opacity: 0; } } `; document.head.appendChild(style); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Corporate Blog Subscription</title> <style> :root { --primary: #2c4a8e; --secondary: #4a6fb0; --tertiary: #2a3f6a; --light-gray: #e6ebf5; --dark-gray: #465866; --white: #ffffff; --error: #d94d4d; --success: #4bb543; --transition: all 0.3s ease-in-out; } * { 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 { background: linear-gradient(135deg, var(--light-gray), var(--white)); height: 100vh; display: flex; justify-content: center; align-items: center; color: var(--dark-gray); padding: 20px; } .container { background-color: var(--white); border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); overflow: hidden; width: 100%; max-width: 650px; position: relative; } .pattern { position: absolute; top: 0; left: 0; right: 0; height: 10px; background: repeating-linear-gradient( 135deg, var(--primary), var(--primary) 10px, var(--secondary) 10px, var(--secondary) 20px ); } .content { padding: 35px 40px; } .header { margin-bottom: 30px; position: relative; } .header::after { content: ''; position: absolute; bottom: -15px; left: 0; width: 70px; height: 4px; background-color: var(--primary); border-radius: 2px; } .title { font-size: 28px; font-weight: 700; color: var(--tertiary); margin-bottom: 15px; letter-spacing: -0.5px; } .subtitle { font-size: 16px; line-height: 1.6; color: var(--dark-gray); } .benefits { display: flex; flex-wrap: wrap; margin: 25px 0; gap: 15px; } .benefit { flex-basis: calc(50% - 8px); display: flex; align-items: center; padding: 10px 0; } .benefit-icon { background-color: var(--light-gray); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 12px; color: var(--primary); flex-shrink: 0; } .benefit-text { font-size: 14px; line-height: 1.4; } .form-group { margin-bottom: 20px; position: relative; } .form-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--tertiary); } .form-input { width: 100%; padding: 16px 20px; border: 2px solid var(--light-gray); border-radius: 8px; font-size: 16px; transition: var(--transition); background-color: var(--white); outline: none; } .form-input:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(74, 111, 176, 0.15); } .form-input.error { border-color: var(--error); } .form-input.success { border-color: var(--success); } .validation-message { font-size: 12px; position: absolute; bottom: -20px; left: 2px; opacity: 0; transform: translateY(-5px); transition: var(--transition); } .error-message { color: var(--error); } .success-message { color: var(--success); } .visible { opacity: 1; transform: translateY(0); } .checkbox-group { display: flex; align-items: flex-start; margin-bottom: 25px; } .custom-checkbox { position: relative; margin-right: 12px; flex-shrink: 0; margin-top: 3px; } .custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } .checkmark { position: absolute; top: 0; left: 0; height: 20px; width: 20px; background-color: var(--light-gray); border-radius: 4px; transition: var(--transition); } .custom-checkbox input:checked ~ .checkmark { background-color: var(--primary); } .checkmark:after { content: ""; position: absolute; display: none; } .custom-checkbox input:checked ~ .checkmark:after { display: block; } .custom-checkbox .checkmark:after { left: 7px; top: 3px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); } .checkbox-label { font-size: 14px; line-height: 1.5; color: var(--dark-gray); } .btn { display: block; width: 100%; padding: 16px 20px; background-color: var(--primary); color: var(--white); border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; } .btn:hover { background-color: var(--tertiary); } .btn:disabled { opacity: 0.7; cursor: not-allowed; } .btn-text { position: relative; z-index: 2; transition: var(--transition); } .btn-icon { margin-left: 8px; display: inline-block; transition: transform 0.2s ease; } .btn:hover .btn-icon { transform: translateX(4px); } .btn-ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.3); transform: scale(0); animation: ripple 0.6s linear; z-index: 1; } @keyframes ripple { to { transform: scale(2.5); opacity: 0; } } .success-container { display: none; text-align: center; padding: 30px 0; } .success-icon { width: 70px; height: 70px; background-color: #f2f7fd; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: var(--success); font-size: 32px; } .success-title { font-size: 24px; font-weight: 700; color: var(--tertiary); margin-bottom: 15px; } .success-message-text { font-size: 16px; line-height: 1.6; color: var(--dark-gray); margin-bottom: 25px; } .frequency-options { display: flex; gap: 10px; margin-bottom: 25px; } .frequency-option { flex: 1; position: relative; } .frequency-option input { position: absolute; opacity: 0; cursor: pointer; } .frequency-label { display: block; background-color: var(--light-gray); padding: 12px; border-radius: 8px; font-size: 14px; text-align: center; cursor: pointer; transition: var(--transition); border: 2px solid transparent; } .frequency-option input:checked + .frequency-label { background-color: rgba(74, 111, 176, 0.1); color: var(--primary); border-color: var(--primary); font-weight: 600; } .pulse { animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(44, 74, 142, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(44, 74, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(44, 74, 142, 0); } } @media (max-width: 600px) { .content { padding: 25px; } .title { font-size: 24px; } .benefit { flex-basis: 100%; } .frequency-options { flex-direction: column; gap: 8px; } } </style> </head> <body> <div class="container"> <div class="pattern"></div> <div class="content" id="subscription-form"> <div class="header"> <h1 class="title">Stay ahead in the industry</h1> <p class="subtitle">Subscribe to TechCorpX's exclusive newsletter for industry-specific insights and strategic innovations.</p> </div> <div class="benefits"> <div class="benefit"> <div class="benefit-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8 12L11 15L16 9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2"/> </svg> </div> <div class="benefit-text">Exclusive market trends and forecasts</div> </div> <div class="benefit"> <div class="benefit-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 16V12M12 8H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <div class="benefit-text">Case studies from industry leaders</div> </div> <div class="benefit"> <div class="benefit-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2"/> <path d="M12 8V16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/> <path d="M8 12H16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/> </svg> </div> <div class="benefit-text">Actionable tech implementation guides</div> </div> <div class="benefit"> <div class="benefit-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M15 10L11 14L9 12M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <div class="benefit-text">Early invites to executive roundtables</div> </div> </div> <form id="subscribe-form"> <div class="form-group"> <label for="email" class="form-label">Work Email</label> <input type="email" id="email" class="form-input" placeholder="[email protected]" autocomplete="email" required> <div class="validation-message error-message" id="email-error"></div> <div class="validation-message success-message" id="email-success"></div> </div> <div class="form-group"> <label for="name" class="form-label">Full Name</label> <input type="text" id="name" class="form-input" placeholder="John Smith" autocomplete="name" required> <div class="validation-message error-message" id="name-error"></div> <div class="validation-message success-message" id="name-success"></div> </div> <div class="form-group"> <label for="company" class="form-label">Company</label> <input type="text" id="company" class="form-input" placeholder="TechCorpX" autocomplete="organization" required> <div class="validation-message error-message" id="company-error"></div> <div class="validation-message success-message" id="company-success"></div> </div> <div class="form-group"> <label class="form-label">Preferred Frequency</label> <div class="frequency-options"> <div class="frequency-option"> <input type="radio" id="weekly" name="frequency" value="weekly" checked> <label for="weekly" class="frequency-label">Weekly</label> </div> <div class="frequency-option"> <input type="radio" id="bi-weekly" name="frequency" value="bi-weekly"> <label for="bi-weekly" class="frequency-label">Bi-Weekly</label> </div> <div class="frequency-option"> <input type="radio" id="monthly" name="frequency" value="monthly"> <label for="monthly" class="frequency-label">Monthly</label> </div> </div> </div> <div class="checkbox-group"> <label class="custom-checkbox"> <input type="checkbox" id="consent" required> <span class="checkmark"></span> </label> <label for="consent" class="checkbox-label">I agree to receive industry insights, event invites, and product updates from TechCorpX. We respect your privacy and you can unsubscribe at any time.</label> </div> <button type="submit" class="btn pulse" id="submit-btn"> <span class="btn-text">Subscribe to Updates <span class="btn-icon">โ</span></span> </button> </form> </div> <div class="content success-container" id="success-message"> <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="M22 11.0857V12.0057C21.9988 14.1621 21.3005 16.2604 20.0093 17.9875C18.7182 19.7147 16.9033 20.9782 14.8354 21.5896C12.7674 22.201 10.5573 22.1276 8.53447 21.3803C6.51168 20.633 4.78465 19.2518 3.61096 17.4428C2.43727 15.6338 1.87979 13.4938 2.02168 11.342C2.16356 9.19029 2.99721 7.14205 4.39828 5.5028C5.79935 3.86354 7.69279 2.72111 9.79619 2.24587C11.8996 1.77063 14.1003 1.98806 16.07 2.86572" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M22 4L12 14.01L9 11.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <h2 class="success-title">You're all set!</h2> <p class="success-message-text">Thank you for subscribing to our corporate insights. You'll receive a confirmation email shortly. Your first industry bulletin will arrive next week.</p> <button class="btn" id="back-btn"> <span class="btn-text">Back to Subscription</span> </button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Elements const form = document.getElementById('subscribe-form'); const emailInput = document.getElementById('email'); const nameInput = document.getElementById('name'); const companyInput = document.getElementById('company'); const submitBtn = document.getElementById('submit-btn'); const subscriptionForm = document.getElementById('subscription-form'); const successMessage = document.getElementById('success-message'); const backBtn = document.getElementById('back-btn'); // Email validation emailInput.addEventListener('blur', function() { validateEmail(this.value); }); emailInput.addEventListener('input', function() { if (this.value.length > 0) { validateEmail(this.value); } else { resetValidation('email'); } }); // Name validation nameInput.addEventListener('blur', function() { validateName(this.value); }); nameInput.addEventListener('input', function() { if (this.value.length > 0) { validateName(this.value); } else { resetValidation('name'); } }); // Company validation companyInput.addEventListener('blur', function() { validateCompany(this.value); }); companyInput.addEventListener('input', function() { if (this.value.length > 0) { validateCompany(this.value); } else { resetValidation('company'); } }); // Button ripple effect document.querySelectorAll('.btn').forEach(button => { button.addEventListener('click', function(e) { const x = e.clientX - e.target.getBoundingClientRect().left; const y = e.clientY - e.target.getBoundingClientRect().top; const ripple = document.createElement('span'); ripple.classList.add('btn-ripple'); ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; this.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 600); }); }); // Form submission form.addEventListener('submit', function(e) { e.preventDefault(); // Validate all fields again const isEmailValid = validateEmail(emailInput.value); const isNameValid = validateName(nameInput.value); const isCompanyValid = validateCompany(companyInput.value); if (isEmailValid && isNameValid && isCompanyValid) { // Disable button and show loading state submitBtn.disabled = true; submitBtn.innerHTML = '<span class="btn-text">Processing...</span>'; // Simulate an API call setTimeout(() => { subscriptionForm.style.display = 'none'; successMessage.style.display = 'block'; submitBtn.disabled = false; }, 1500); } }); // Back button functionality backBtn.addEventListener('click', function() { successMessage.style.display = 'none'; subscriptionForm.style.display = 'block'; form.reset(); resetValidation('email'); resetValidation('name'); resetValidation('company'); submitBtn.innerHTML = '<span class="btn-text">Subscribe to Updates <span class="btn-icon">โ</span></span>'; }); // Validation functions function validateEmail(email) { const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; const errorMsg = document.getElementById('email-error'); const successMsg = document.getElementById('email-success'); if (!regex.test(email)) { showError(emailInput, errorMsg, 'Please enter a valid email address'); return false; } else if (!email.includes('.com') && !email.includes('.org') && !email.includes('.io') && !email.includes('.net')) { showError(emailInput, errorMsg, 'Please enter a valid domain extension'); return false; } else { showSuccess(emailInput, successMsg, 'Valid email format'); return true; } } function validateName(name) { const errorMsg = document.getElementById('name-error'); const successMsg = document.getElementById('name-success'); if (name.length < 3) { showError(nameInput, errorMsg, 'Name must be at least 3 characters'); return false; } else { showSuccess(nameInput, successMsg, 'Looks good!'); return true; } } function validateCompany(company) { const errorMsg = document.getElementById('company-error'); const successMsg = document.getElementById('company-success'); if (company.length < 2) { showError(companyInput, errorMsg, 'Company name is too short'); return false; } else { showSuccess(companyInput, successMsg, 'Looks good!'); return true; } } function showError(input, errorElement, message) { input.classList.add('error'); input.classList.remove('success'); errorElement.textContent = message; errorElement.classList.add('visible'); const siblingSuccess = errorElement.parentElement.querySelector('.success-message'); siblingSuccess.classList.remove('visible'); } function showSuccess(input, successElement, message) { input.classList.add('success'); input.classList.remove('error'); successElement.textContent = message; successElement.classList.add('visible'); const siblingError = successElement.parentElement.querySelector('.error-message'); siblingError.classList.remove('visible'); } function resetValidation(field) { const input = document.getElementById(field); const errorMsg = document.getElementById(`${field}-error`); const successMsg = document.getElementById(`${field}-success`); input.classList.remove('error', 'success'); errorMsg.classList.remove('visible'); successMsg.classList.remove('visible'); } }); </script> </body> </html>
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Montserrat:wght@300;400;500&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } :root { --color-bg: #f8f4f2; --color-primary: #d4c1b8; --color-secondary: #b8a99e; --color-accent: #a08e82; --color-text: #4a4039; --color-light: #fdfbf9; --color-error: #d17d7d; --color-success: #8eb896; --border-radius: 4px; --spacing-xs: 0.5rem; --spacing-sm: 1rem; --spacing-md: 1.5rem; --spacing-lg: 2rem; --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); } body { font-family: 'Montserrat', sans-serif; background-color: var(--color-bg); color: var(--color-text); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: var(--spacing-md); line-height: 1.6; } .container { width: 100%; max-width: 620px; background: var(--color-light); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05); overflow: hidden; position: relative; transition: var(--transition); } .container::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(to right, var(--color-primary), var(--color-secondary), var(--color-accent)); opacity: 0.7; } .signup-form { padding: var(--spacing-lg); position: relative; } .form-header { margin-bottom: var(--spacing-lg); text-align: center; } h1 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 2.4rem; color: var(--color-text); margin-bottom: var(--spacing-xs); letter-spacing: 1px; } .subtitle { font-size: 0.95rem; color: var(--color-accent); font-weight: 300; max-width: 80%; margin: 0 auto; } .form-group { margin-bottom: var(--spacing-md); position: relative; } label { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; margin-bottom: var(--spacing-xs); font-weight: 500; letter-spacing: 0.5px; color: var(--color-text); transition: var(--transition); } input, select { width: 100%; padding: var(--spacing-sm); background-color: transparent; border: 1px solid var(--color-primary); border-radius: var(--border-radius); font-family: 'Montserrat', sans-serif; font-size: 0.95rem; color: var(--color-text); transition: var(--transition); } input::placeholder { color: var(--color-secondary); opacity: 0.6; } input:focus, select:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(160, 142, 130, 0.1); } .input-icon { position: absolute; right: var(--spacing-sm); top: 2.7rem; color: var(--color-secondary); pointer-events: none; transition: var(--transition); } .form-row { display: flex; gap: var(--spacing-md); } .form-row .form-group { flex: 1; } .preferences { display: flex; flex-wrap: wrap; gap: var(--spacing-xs); margin: var(--spacing-sm) 0 var(--spacing-md); } .preference-tag { padding: 8px 14px; background-color: var(--color-bg); border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: var(--transition); border: 1px solid transparent; } .preference-tag:hover { background-color: rgba(212, 193, 184, 0.2); } .preference-tag.active { background-color: var(--color-primary); color: var(--color-light); } button { width: 100%; padding: var(--spacing-md); background-color: var(--color-accent); color: var(--color-light); border: none; border-radius: var(--border-radius); font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 500; cursor: pointer; transition: var(--transition); letter-spacing: 1px; margin-top: var(--spacing-sm); position: relative; overflow: hidden; } button:hover { background-color: var(--color-text); } button::after { content: ""; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; background: rgba(255, 255, 255, 0.5); opacity: 0; border-radius: 100%; transform: scale(1, 1) translate(-50%, -50%); transform-origin: 50% 50%; } button:focus::after { animation: ripple 1s ease-out; } .terms { margin-top: var(--spacing-md); font-size: 0.8rem; color: var(--color-secondary); text-align: center; } .terms a { color: var(--color-accent); text-decoration: none; border-bottom: 1px solid transparent; transition: var(--transition); } .terms a:hover { border-color: var(--color-accent); } .form-footer { display: flex; justify-content: center; margin-top: var(--spacing-md); } .social-signup { display: flex; gap: var(--spacing-sm); justify-content: center; } .social-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--color-bg); color: var(--color-accent); transition: var(--transition); } .social-icon:hover { transform: translateY(-3px); background: var(--color-primary); color: var(--color-light); } .password-strength { height: 4px; background-color: #e9e6e4; border-radius: 2px; margin-top: 8px; overflow: hidden; } .password-strength-bar { height: 100%; width: 0; transition: var(--transition); border-radius: 2px; } .confirmation { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--color-light); display: flex; align-items: center; justify-content: center; flex-direction: column; opacity: 0; visibility: hidden; transition: var(--transition); padding: var(--spacing-lg); text-align: center; } .confirmation.show { opacity: 1; visibility: visible; } .confirmation-icon { font-size: 3rem; color: var(--color-success); margin-bottom: var(--spacing-md); } .confirmation h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; margin-bottom: var(--spacing-sm); font-size: 2rem; } .confirmation p { color: var(--color-secondary); margin-bottom: var(--spacing-md); max-width: 80%; } .brand-pattern { position: absolute; top: 0; right: 0; width: 120px; height: 120px; opacity: 0.04; pointer-events: none; } .input-wrap { position: relative; } .floating-label { position: absolute; left: var(--spacing-sm); top: 50%; transform: translateY(-50%); font-size: 0.95rem; color: var(--color-secondary); pointer-events: none; transition: var(--transition); } input:focus + .floating-label, input:not(:placeholder-shown) + .floating-label { top: 0; font-size: 0.8rem; background-color: var(--color-light); padding: 0 4px; } .error-message { color: var(--color-error); font-size: 0.8rem; margin-top: 4px; display: none; } .pulse { animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(160, 142, 130, 0.4); } 70% { box-shadow: 0 0 0 8px rgba(160, 142, 130, 0); } 100% { box-shadow: 0 0 0 0 rgba(160, 142, 130, 0); } } @keyframes ripple { 0% { transform: scale(0, 0); opacity: 1; } 20% { transform: scale(25, 25); opacity: 1; } 100% { opacity: 0; transform: scale(40, 40); } } @media screen and (max-width: 580px) { .form-row { flex-direction: column; gap: var(--spacing-sm); } h1 { font-size: 2rem; } .signup-form { padding: var(--spacing-md); } } </style> </head> <body> <div class="container"> <div class="signup-form"> <svg class="brand-pattern" viewBox="0 0 100 100"> <defs> <pattern id="pattern" patternUnits="userSpaceOnUse" width="10" height="10"> <path d="M-5,5 L15,5" stroke="currentColor" stroke-width="1"/> <path d="M5,-5 L5,15" stroke="currentColor" stroke-width="1"/> </pattern> </defs> <rect x="0" y="0" width="100" height="100" fill="url(#pattern)" /> </svg> <div class="form-header"> <h1>Join the LUXEWEAVE</h1> <p class="subtitle">Subscribe to receive curated collections, exclusive designer previews, and personalized style recommendations.</p> </div> <form id="fashion-signup"> <div class="form-row"> <div class="form-group"> <label for="first-name">First Name</label> <div class="input-wrap"> <input type="text" id="first-name" placeholder=" " required> <span class="floating-label">First Name</span> </div> <div class="error-message" id="first-name-error">Please enter your first name</div> </div> <div class="form-group"> <label for="last-name">Last Name</label> <div class="input-wrap"> <input type="text" id="last-name" placeholder=" " required> <span class="floating-label">Last Name</span> </div> </div> </div> <div class="form-group"> <label for="email">Email Address</label> <div class="input-wrap"> <input type="email" id="email" placeholder=" " required> <span class="floating-label">Email Address</span> <span class="input-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path> <polyline points="22,6 12,13 2,6"></polyline> </svg> </span> </div> <div class="error-message" id="email-error">Please enter a valid email address</div> </div> <div class="form-group"> <label for="password">Password</label> <div class="input-wrap"> <input type="password" id="password" placeholder=" " required> <span class="floating-label">Password</span> <span class="input-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect> <path d="M7 11V7a5 5 0 0 1 10 0v4"></path> </svg> </span> </div> <div class="password-strength"> <div class="password-strength-bar" id="password-strength-bar"></div> </div> </div> <div class="form-group"> <label>Style Preferences</label> <p class="subtitle" style="margin: 0 0 8px; font-size: 0.85rem;">Select all that interest you</p> <div class="preferences"> <div class="preference-tag" data-preference="minimalist">Minimalist</div> <div class="preference-tag" data-preference="vintage">Vintage</div> <div class="preference-tag" data-preference="streetwear">Streetwear</div> <div class="preference-tag" data-preference="luxury">Luxury</div> <div class="preference-tag" data-preference="sustainable">Sustainable</div> <div class="preference-tag" data-preference="avantgarde">Avant-garde</div> </div> </div> <button type="submit" id="submit-btn"> JOIN THE COLLECTION </button> <p class="terms"> By signing up, you agree to our <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a> </p> <div class="form-footer"> <div class="social-signup"> <a href="#" class="social-icon"> <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="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path> </svg> </a> <a href="#" class="social-icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect> <path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path> <line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line> </svg> </a> <a href="#" class="social-icon"> <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="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path> </svg> </a> </div> </div> </form> <div class="confirmation" id="confirmation"> <div class="confirmation-icon"> <svg width="48" height="48" 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> </div> <h2>Welcome to LUXEWEAVE</h2> <p>Thank you for joining our exclusive community. We're preparing your personalized style recommendations now.</p> <button id="back-btn" style="max-width: 200px;">CONTINUE</button> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Handle preference tags const preferenceTags = document.querySelectorAll('.preference-tag'); preferenceTags.forEach(tag => { tag.addEventListener('click', function() { this.classList.toggle('active'); }); }); // Password strength meter const passwordInput = document.getElementById('password'); const strengthBar = document.getElementById('password-strength-bar'); passwordInput.addEventListener('input', function() { const password = this.value; let strength = 0; if (password.length >= 8) strength += 25; if (password.match(/[A-Z]/)) strength += 25; if (password.match(/[0-9]/)) strength += 25; if (password.match(/[^A-Za-z0-9]/)) strength += 25; strengthBar.style.width = strength + '%'; if (strength <= 25) { strengthBar.style.backgroundColor = '#d17d7d'; } else if (strength <= 50) { strengthBar.style.backgroundColor = '#d1b97d'; } else if (strength <= 75) { strengthBar.style.backgroundColor = '#a0c17d'; } else { strengthBar.style.backgroundColor = '#8eb896'; } }); // Input focus effects const allInputs = document.querySelectorAll('input'); allInputs.forEach(input => { input.addEventListener('focus', function() { this.parentElement.querySelector('.input-icon')?.classList.add('pulse'); }); input.addEventListener('blur', function() { this.parentElement.querySelector('.input-icon')?.classList.remove('pulse'); }); }); // Handle form submission const form = document.getElementById('fashion-signup'); const confirmation = document.getElementById('confirmation'); form.addEventListener('submit', function(e) { e.preventDefault(); // Basic validation let isValid = true; const firstName = document.getElementById('first-name'); const email = document.getElementById('email'); const firstNameError = document.getElementById('first-name-error'); const emailError = document.getElementById('email-error'); if (!firstName.value.trim()) { firstNameError.style.display = 'block'; isValid = false; } else { firstNameError.style.display = 'none'; } if (!email.value.trim() || !email.value.includes('@')) { emailError.style.display = 'block'; isValid = false; } else { emailError.style.display = 'none'; } if (isValid) { // Simulate API call const submitBtn = document.getElementById('submit-btn'); submitBtn.innerHTML = 'PROCESSING...'; setTimeout(() => { confirmation.classList.add('show'); }, 1200); } }); // Back button in confirmation screen const backBtn = document.getElementById('back-btn'); backBtn.addEventListener('click', function() { confirmation.classList.remove('show'); form.reset(); strengthBar.style.width = '0'; document.getElementById('submit-btn').innerHTML = 'JOIN THE COLLECTION'; }); // Add floating effect document.querySelectorAll('.container').forEach(el => { el.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const xPercent = x / rect.width - 0.5; const yPercent = y / rect.height - 0.5; this.style.transform = `perspective(1000px) rotateX(${yPercent * -2}deg) rotateY(${xPercent * 2}deg) translateZ(10px)`; }); el.addEventListener('mouseleave', function() { this.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) translateZ(0)'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>EarthGuardian Alliance Donation Subscribe</title> <style> @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); :root { --primary: #3FAB6D; --primary-light: #5EC88A; --primary-dark: #2A8C50; --accent: #FF7D54; --accent-light: #FFA183; --text-dark: #2D3B4E; --text-light: #647380; --background: #F8F9FA; --white: #FFFFFF; --gray-light: #E9ECEF; --success: #28a745; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } body { background-color: var(--background); display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; padding: 15px; } .container { width: 100%; max-width: 670px; background: var(--white); border-radius: 20px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05); overflow: hidden; position: relative; height: auto; max-height: 670px; display: flex; flex-direction: column; } .pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.05; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233FAB6D' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); } .header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); padding: 30px; text-align: center; color: var(--white); position: relative; overflow: hidden; } .header h1 { font-weight: 600; margin-bottom: 5px; font-size: 1.8rem; position: relative; } .header p { font-weight: 300; opacity: 0.9; max-width: 450px; margin: 0 auto; position: relative; font-size: 0.95rem; } .leaf-icon { position: absolute; opacity: 0.2; width: 120px; height: 120px; } .leaf-1 { top: -30px; right: -30px; transform: rotate(45deg); } .leaf-2 { bottom: -40px; left: -20px; transform: rotate(-15deg); } .form-container { padding: 30px; overflow-y: auto; flex: 1; } .form-group { margin-bottom: 20px; position: relative; } .form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-dark); font-size: 0.9rem; } .form-control { width: 100%; padding: 14px 18px; border: 1px solid var(--gray-light); border-radius: 10px; background-color: var(--white); color: var(--text-dark); font-size: 0.95rem; transition: all 0.3s ease; } .form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(63, 171, 109, 0.15); } .form-row { display: flex; gap: 15px; margin-bottom: 20px; } .form-col { flex: 1; } .frequency-options { display: flex; gap: 10px; margin-bottom: 20px; } .frequency-option { flex: 1; position: relative; } .frequency-option input { position: absolute; opacity: 0; cursor: pointer; } .frequency-option label { display: block; text-align: center; padding: 12px; background-color: var(--gray-light); border-radius: 10px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; } .frequency-option input:checked + label { background-color: var(--primary); color: var(--white); box-shadow: 0 4px 10px rgba(63, 171, 109, 0.2); } .btn { width: 100%; padding: 16px; background-color: var(--primary); color: var(--white); border: none; border-radius: 10px; font-weight: 600; font-size: 1.05rem; cursor: pointer; transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; } .btn:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 12px rgba(63, 171, 109, 0.2); } .btn:active { transform: translateY(0); } .btn-accent { background-color: var(--accent); } .btn-accent:hover { background-color: #e7643c; } .privacy-text { font-size: 0.8rem; color: var(--text-light); text-align: center; margin-top: 20px; } .privacy-text a { color: var(--primary); text-decoration: none; font-weight: 500; position: relative; } .privacy-text a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 1px; background-color: var(--primary); transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease; } .privacy-text a:hover::after { transform: scaleX(1); transform-origin: left; } .impact-message { background-color: rgba(63, 171, 109, 0.1); padding: 15px; border-radius: 10px; margin-bottom: 20px; position: relative; overflow: hidden; } .impact-message p { font-size: 0.9rem; color: var(--text-dark); position: relative; z-index: 2; } .impact-message strong { color: var(--primary-dark); } .impact-message::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233FAB6D' fill-opacity='0.1'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); opacity: 0.7; } .form-success { display: none; text-align: center; padding: 20px; } .success-icon { width: 80px; height: 80px; background-color: var(--success); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; position: relative; overflow: hidden; } .success-icon svg { width: 40px; height: 40px; fill: white; } .success-title { font-size: 1.8rem; color: var(--text-dark); margin-bottom: 10px; font-weight: 600; } .success-message { color: var(--text-light); margin-bottom: 25px; } .ripple { position: absolute; top: 50%; left: 50%; width: 0; height: 0; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 255, 255, 0.4); opacity: 0; animation: ripple 1s ease-out; } @keyframes ripple { 0% { width: 0; height: 0; opacity: 0.5; } 100% { width: 160px; height: 160px; opacity: 0; } } .plant-animation { position: absolute; bottom: -40px; right: -30px; width: 150px; height: 150px; opacity: 0.15; transform-origin: bottom center; animation: sway 6s ease-in-out infinite alternate; } @keyframes sway { 0% { transform: rotate(-5deg); } 100% { transform: rotate(5deg); } } /* Responsiveness */ @media (max-width: 580px) { .header { padding: 20px; } .header h1 { font-size: 1.5rem; } .header p { font-size: 0.85rem; } .form-container { padding: 20px; } .form-row { flex-direction: column; gap: 10px; } .form-control { padding: 12px 15px; } .btn { padding: 14px; font-size: 1rem; } .frequency-options { flex-wrap: wrap; } .frequency-option { min-width: 45%; } } /* Animation for checkmark */ .checkmark { stroke-dasharray: 180; stroke-dashoffset: 180; animation: draw 0.5s ease-in-out forwards; animation-delay: 0.2s; } @keyframes draw { to { stroke-dashoffset: 0; } } /* Newsletter form animation */ .fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 0.5s ease forwards; } @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } } .fade-up-delay-1 { animation-delay: 0.1s; } .fade-up-delay-2 { animation-delay: 0.2s; } .fade-up-delay-3 { animation-delay: 0.3s; } .fade-up-delay-4 { animation-delay: 0.4s; } .fade-up-delay-5 { animation-delay: 0.5s; } .confetti { position: absolute; width: 10px; height: 10px; background-color: var(--accent); opacity: 0; } @keyframes confetti-fall { 0% { transform: translateY(-50px) rotate(0deg); opacity: 1; } 100% { transform: translateY(150px) rotate(360deg); opacity: 0; } } /* Input focus animation */ .form-control:focus + .focus-border { opacity: 1; width: calc(100% - 2px); } .focus-border { position: absolute; bottom: 0; left: 1px; width: 0; height: 2px; background-color: var(--primary); transition: 0.4s; opacity: 0; } /* Custom dropdown styles */ .custom-select { position: relative; } .custom-select::after { content: 'โผ'; font-size: 0.7rem; color: var(--text-light); position: absolute; right: 15px; top: 50%; transform: translateY(-50%); pointer-events: none; } select.form-control { appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; } </style> </head> <body> <div class="container"> <div class="pattern"></div> <div class="header"> <h1>Join EarthGuardian Alliance</h1> <p>Subscribe to our newsletter and help us protect wildlife habitats around the world</p> <!-- Leaf decorations --> <svg class="leaf-icon leaf-1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path fill="white" d="M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z" /> </svg> <svg class="leaf-icon leaf-2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path fill="white" d="M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z" /> </svg> <svg class="plant-animation" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path fill="white" d="M12,3.9C7.03,3.9 3,7.93 3,12.9C3,15.23 3.96,17.33 5.5,18.87L5.5,18.87C8,21.37 12,21.37 12,21.37C12,21.37 16,21.37 18.5,18.87C20.04,17.33 21,15.23 21,12.9C21,7.93 16.97,3.9 12,3.9M12,6.9C14.67,6.9 16.9,9.13 16.9,11.8C16.9,13.14 16.32,14.34 15.4,15.18C14.92,15.61 14.37,15.97 13.78,16.23C13.19,16.5 12.55,16.67 11.9,16.74V18.8H11V16.83C9.87,16.91 8.73,16.67 7.71,16.12C6.93,15.69 6.24,15.13 5.67,14.5C5.67,14.5 8.3,14.3 9.3,13C10.3,11.8 11.28,11.18 11.28,11.18C11.28,11.18 9.4,11.28 8.3,12.18C7.2,13.08 5.32,14.47 5.32,14.47C5.32,14.47 5.67,11.5 8.24,9.63C9.5,8.77 10.5,8.5 12,8.5C10.5,8.5 9.5,8.5 8.34,7.74C7.17,6.97 5.67,5.5 5.67,5.5C5.67,5.5 7.8,5.87 9.3,6.7C10.8,7.5 12,8.5 12,8.5V6.5H13V8.5C13.67,8.5 14.2,8.67 14.9,9.13C16.27,10.13 16.9,11.5 16.9,11.5S15.3,10.57 13.08,10.4C10.87,10.23 9.53,11.7 9.53,11.7C9.53,11.7 12.77,11.97 14.7,13.57C16.64,15.17 15.67,16.97 15.67,16.97C16.1,16.4 16.4,15.75 16.6,15.07C16.8,14.38 16.9,13.67 16.9,12.93C16.9,9.6 14.67,6.9 12,6.9Z" /> </svg> </div> <div id="form-content" class="form-container"> <div class="impact-message fade-up fade-up-delay-1"> <p><strong>Your impact:</strong> Every subscription helps us plant a tree and support conservation projects in endangered habitats. Last month, our subscribers helped protect 58 acres of rainforest.</p> </div> <form id="newsletter-form"> <div class="form-row"> <div class="form-col"> <div class="form-group fade-up fade-up-delay-1"> <label for="firstName">First Name</label> <input type="text" id="firstName" class="form-control" placeholder="Your first name" required> <span class="focus-border"></span> </div> </div> <div class="form-col"> <div class="form-group fade-up fade-up-delay-1"> <label for="lastName">Last Name</label> <input type="text" id="lastName" class="form-control" placeholder="Your last name" required> <span class="focus-border"></span> </div> </div> </div> <div class="form-group fade-up fade-up-delay-2"> <label for="email">Email Address</label> <input type="email" id="email" class="form-control" placeholder="[email protected]" required> <span class="focus-border"></span> </div> <div class="form-group fade-up fade-up-delay-3"> <label for="interests">Area of Interest</label> <div class="custom-select"> <select id="interests" class="form-control" required> <option value="" disabled selected>Select your conservation interest</option> <option value="rainforests">Rainforest Protection</option> <option value="oceans">Ocean Conservation</option> <option value="wildlife">Wildlife Protection</option> <option value="climate">Climate Action</option> <option value="all">All Areas</option> </select> <span class="focus-border"></span> </div> </div> <div class="form-group fade-up fade-up-delay-4"> <label>Newsletter Frequency</label> <div class="frequency-options"> <div class="frequency-option"> <input type="radio" id="weekly" name="frequency" value="weekly" checked> <label for="weekly">Weekly</label> </div> <div class="frequency-option"> <input type="radio" id="monthly" name="frequency" value="monthly"> <label for="monthly">Monthly</label> </div> <div class="frequency-option"> <input type="radio" id="quarterly" name="frequency" value="quarterly"> <label for="quarterly">Quarterly</label> </div> </div> </div> <button type="submit" id="submit-btn" class="btn btn-accent fade-up fade-up-delay-5"> Subscribe & Make a Difference </button> <p class="privacy-text fade-up fade-up-delay-5"> We respect your privacy. Your information is secure and will never be shared with third parties. Read our <a href="#">Privacy Policy</a> and <a href="#">Terms of Service</a>. </p> </form> <div id="success-message" class="form-success"> <div class="success-icon"> <svg viewBox="0 0 52 52" xmlns="http://www.w3.org/2000/svg"> <circle class="checkmark-circle" cx="26" cy="26" r="25" fill="none" stroke="white" stroke-width="2" /> <path class="checkmark" fill="none" stroke="white" stroke-width="4" d="M14.1 27.2l7.1 7.2 16.7-16.8" /> </svg> </div> <h2 class="success-title">Thank You!</h2> <p class="success-message">Your subscription to EarthGuardian Alliance has been confirmed. Look out for our welcome email with more information about how your support makes a difference.</p> <button id="reset-btn" class="btn">Subscribe Another Email</button> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById('newsletter-form'); const formContent = document.getElementById('form-content'); const successMessage = document.getElementById('success-message'); const resetBtn = document.getElementById('reset-btn'); const submitBtn = document.getElementById('submit-btn'); // Create ripple effect on button click submitBtn.addEventListener('click', function(e) { const ripple = document.createElement('span'); ripple.classList.add('ripple'); this.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 1000); }); form.addEventListener('submit', function(e) { e.preventDefault(); // Add loading state to button submitBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="animation: rotate 1s linear infinite;"><circle cx="12" cy="12" r="10" stroke-opacity="0.25"></circle><path d="M12 2a10 10 0 0 1 10 10"></path></svg>'; submitBtn.disabled = true; // Simulate form submission delay setTimeout(() => { // Hide form and show success message form.style.display = 'none'; successMessage.style.display = 'block'; // Create confetti effect createConfetti(); }, 1500); }); resetBtn.addEventListener('click', function() { form.reset(); form.style.display = 'block'; successMessage.style.display = 'none'; submitBtn.innerHTML = 'Subscribe & Make a Difference'; submitBtn.disabled = false; }); // Create confetti animation function createConfetti() { const container = document.querySelector('.container'); const colors = ['#3FAB6D', '#FF7D54', '#5EC88A', '#FFA183']; for (let i = 0; i < 50; i++) { const confetti = document.createElement('div'); confetti.classList.add('confetti'); confetti.style.left = Math.random() * 100 + '%'; confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; confetti.style.width = Math.random() * 10 + 5 + 'px'; confetti.style.height = Math.random() * 10 + 5 + 'px'; confetti.style.opacity = Math.random() + 0.5; confetti.style.animation = `confetti-fall ${Math.random() * 3 + 2}s linear forwards`; confetti.style.animationDelay = Math.random() * 2 + 's'; container.appendChild(confetti); // Remove confetti elements after animation setTimeout(() => { confetti.remove(); }, 5000); } } // Add animation to the form inputs on focus const formControls = document.querySelectorAll('.form-control'); formControls.forEach(input => { input.addEventListener('focus', function() { this.parentElement.classList.add('focused'); }); input.addEventListener('blur', function() { this.parentElement.classList.remove('focused'); }); }); // Style animation for keyframe document.head.insertAdjacentHTML('beforeend', ` <style> @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .focused .focus-border { opacity: 1; width: calc(100% - 2px); } </style> `); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>TasteBuds Food Blog Subscription</title> <style> @import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Caveat:wght@400;700&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary: #ff6b6b; --secondary: #4ecdc4; --accent: #ffe66d; --text: #2d334a; --light: #f7f7f7; --success: #6bde8a; } body { font-family: 'Quicksand', sans-serif; background-color: var(--light); color: var(--text); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff6b6b' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); } .container { max-width: 600px; width: 100%; background-color: white; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); position: relative; } .header { background-color: var(--primary); padding: 30px; text-align: center; position: relative; overflow: hidden; } .header h1 { color: white; font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; position: relative; z-index: 2; } .header p { color: rgba(255, 255, 255, 0.9); font-size: 1rem; max-width: 80%; margin: 0 auto; position: relative; z-index: 2; } .hand-drawn { font-family: 'Caveat', cursive; font-weight: 700; } .form-container { padding: 30px; position: relative; } .form-group { margin-bottom: 25px; position: relative; } .form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: var(--text); transition: all 0.3s ease; } .form-control { width: 100%; padding: 15px; border: 2px solid #e0e0e0; border-radius: 10px; font-family: 'Quicksand', sans-serif; font-size: 1rem; transition: all 0.3s ease; background-color: white; } .form-control:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2); transform: translateY(-3px); } .checkbox-group { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; } .checkbox-container { display: flex; align-items: center; position: relative; cursor: pointer; user-select: none; background-color: #f7f7f7; padding: 8px 15px; border-radius: 20px; transition: all 0.3s ease; } .checkbox-container:hover { background-color: #f0f0f0; transform: translateY(-2px); } .checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } .checkbox-container .checkmark { display: inline-block; position: relative; height: 20px; width: 20px; background-color: white; border: 2px solid #e0e0e0; border-radius: 4px; margin-right: 8px; transition: all 0.2s ease; } .checkbox-container input:checked ~ .checkmark { background-color: var(--secondary); border-color: var(--secondary); } .checkbox-container .checkmark:after { content: ""; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); } .checkbox-container input:checked ~ .checkmark:after { display: block; } .btn { display: inline-block; background-color: var(--primary); color: white; font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 1.1rem; padding: 15px 30px; border: none; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; z-index: 1; box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3); } .btn:hover { transform: translateY(-5px); box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4); } .btn:before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: all 0.6s ease; z-index: -1; } .btn:hover:before { left: 100%; } .icon { margin-right: 10px; display: inline-block; vertical-align: middle; } .submit-container { text-align: center; position: relative; margin-top: 10px; } .food-icon { position: absolute; width: 40px; height: 40px; opacity: 0.8; z-index: 1; } .pizza { top: -20px; right: 20px; transform: rotate(15deg); } .avocado { bottom: 10px; left: 15px; transform: rotate(-10deg); } .donut { top: 50%; right: 10px; transform: rotate(5deg); } .success-message { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; z-index: 10; padding: 20px; text-align: center; } .success-message.show { opacity: 1; pointer-events: auto; } .success-icon { font-size: 4rem; color: var(--success); margin-bottom: 20px; animation: bounce 1s ease infinite; } .success-title { font-size: 1.8rem; color: var(--text); margin-bottom: 15px; } .success-text { font-size: 1rem; color: #666; max-width: 80%; margin-bottom: 30px; } .pattern { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0.1; background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E"); } .floating { animation: floating 3s ease-in-out infinite; } .floating-delayed { animation: floating 3s ease-in-out 1s infinite; } @keyframes floating { 0% { transform: translateY(0px) rotate(0deg); } 50% { transform: translateY(-10px) rotate(5deg); } 100% { transform: translateY(0px) rotate(0deg); } } @keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-20px); } 60% { transform: translateY(-10px); } } @media (max-width: 600px) { .header h1 { font-size: 2rem; } .form-container { padding: 20px; } .checkbox-group { flex-direction: column; gap: 10px; } .checkbox-container { width: 100%; } } .food-illustrations { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; pointer-events: none; } .pasta-illustration { position: absolute; top: 10px; right: 20px; width: 60px; height: 60px; opacity: 0.5; transform: rotate(15deg); } .taco-illustration { position: absolute; bottom: 20px; left: 10px; width: 50px; height: 50px; opacity: 0.5; transform: rotate(-10deg); } </style> </head> <body> <div class="container"> <div class="header"> <div class="pattern"></div> <div class="food-illustrations"> <svg class="pasta-illustration floating" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> <path fill="#FFE066" d="M12,32c0,0,5-8,20-8s20,8,20,8S47,40,32,40S12,32,12,32z"/> <path fill="#FFE066" d="M12,24c0,0,5-8,20-8s20,8,20,8"/> <path fill="#FFE066" d="M12,40c0,0,5,8,20,8s20-8,20-8"/> <path fill="#FFFFFF" stroke="#2D334A" stroke-width="2" stroke-linecap="round" d="M12,32c0,0,5-8,20-8s20,8,20,8S47,40,32,40S12,32,12,32z M12,24c0,0,5-8,20-8s20,8,20,8 M12,40c0,0,5,8,20,8s20-8,20-8"/> </svg> <svg class="taco-illustration floating-delayed" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> <path fill="#FFE066" d="M10,24c0-8,10-12,22-12s22,4,22,12c0,20-10,28-22,28S10,44,10,24z"/> <path fill="#FF6B6B" d="M16,24c0,0,2,8,8,12c6,4,12,4,16,0c4-4,8-12,8-12"/> <path fill="#4ECDC4" d="M18,30c0,0,3,3,7,3s7-3,7-3"/> <path fill="#FFFFFF" stroke="#2D334A" stroke-width="2" stroke-linecap="round" d="M10,24c0-8,10-12,22-12s22,4,22,12c0,20-10,28-22,28S10,44,10,24z M16,24c0,0,2,8,8,12c6,4,12,4,16,0c4-4,8-12,8-12 M18,30c0,0,3,3,7,3s7-3,7-3"/> </svg> </div> <h1>Taste<span class="hand-drawn">Buds</span></h1> <p>Join our foodie community for weekly recipes, cooking tips, and culinary adventures!</p> </div> <div class="form-container"> <svg class="food-icon pizza floating" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg"> <path fill="#FFE066" stroke="#2D334A" stroke-width="1.5" d="M5,25 L25,5 L45,25 C45,35 35,45 25,45 C15,45 5,35 5,25 Z"></path> <path fill="#FF6B6B" stroke="#2D334A" stroke-width="1" d="M15,15 C16,14 17.5,14.5 18,15 C18.5,15.5 18,17 17,18 C16,19 14.5,18.5 14,18 C13.5,17.5 14,16 15,15 Z"></path> <path fill="#FF6B6B" stroke="#2D334A" stroke-width="1" d="M30,20 C31,19 32.5,19.5 33,20 C33.5,20.5 33,22 32,23 C31,24 29.5,23.5 29,23 C28.5,22.5 29,21 30,20 Z"></path> <path fill="#FF6B6B" stroke="#2D334A" stroke-width="1" d="M20,30 C21,29 22.5,29.5 23,30 C23.5,30.5 23,32 22,33 C21,34 19.5,33.5 19,33 C18.5,32.5 19,31 20,30 Z"></path> </svg> <svg class="food-icon avocado floating-delayed" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="25" cy="25" rx="15" ry="20" fill="#4ECDC4" stroke="#2D334A" stroke-width="1.5"></ellipse> <circle cx="25" cy="25" r="5" fill="#6b4e24" stroke="#2D334A" stroke-width="1"></circle> </svg> <svg class="food-icon donut floating" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg"> <circle cx="25" cy="25" r="15" fill="#FF6B6B" stroke="#2D334A" stroke-width="1.5"></circle> <circle cx="25" cy="25" r="5" fill="white" stroke="#2D334A" stroke-width="1"></circle> <path fill="#FFE066" d="M25,10 Q30,15 35,15 Q30,20 30,25 Q25,30 20,25 Q20,20 15,15 Q20,15 25,10"></path> </svg> <form id="subscription-form"> <div class="form-group"> <label for="name">Your Name</label> <input type="text" id="name" class="form-control" placeholder="Jamie Oliver" required> </div> <div class="form-group"> <label for="email">Email Address</label> <input type="email" id="email" class="form-control" placeholder="[email protected]" required> </div> <div class="form-group"> <label>What dishes are you most interested in?</label> <div class="checkbox-group"> <label class="checkbox-container"> <input type="checkbox" name="interests" value="quick-meals"> <span class="checkmark"></span> Quick Meals </label> <label class="checkbox-container"> <input type="checkbox" name="interests" value="desserts"> <span class="checkmark"></span> Desserts </label> <label class="checkbox-container"> <input type="checkbox" name="interests" value="vegetarian"> <span class="checkmark"></span> Vegetarian </label> <label class="checkbox-container"> <input type="checkbox" name="interests" value="international"> <span class="checkmark"></span> International </label> </div> </div> <div class="submit-container"> <button type="submit" class="btn"> <svg class="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 16L16 12L12 8" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 12H16" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Join the Kitchen! </button> </div> </form> <div class="success-message" id="success-message"> <div class="success-icon">๐ณ</div> <h2 class="success-title">Welcome to the <span class="hand-drawn">TasteBuds</span> family!</h2> <p class="success-text">We've sent a welcome email with your first exclusive recipe. Check your inbox and get ready to start your culinary journey!</p> <button class="btn" id="reset-btn"> <svg class="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M23 4L17 10M17 4L23 10" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M1 20L7 14M7 20L1 14" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Back to form </button> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById('subscription-form'); const successMessage = document.getElementById('success-message'); const resetBtn = document.getElementById('reset-btn'); // Form submission form.addEventListener('submit', function(e) { e.preventDefault(); // Form validation const name = document.getElementById('name').value; const email = document.getElementById('email').value; if (!name || !email) { return; } // Show success message with animation successMessage.classList.add('show'); // Confetti effect createConfetti(); }); // Reset form resetBtn.addEventListener('click', function() { successMessage.classList.remove('show'); form.reset(); }); // Focus effects on form fields const formControls = document.querySelectorAll('.form-control'); formControls.forEach(control => { control.addEventListener('focus', function() { this.parentElement.querySelector('label').style.color = 'var(--secondary)'; }); control.addEventListener('blur', function() { this.parentElement.querySelector('label').style.color = 'var(--text)'; }); }); // Confetti animation function createConfetti() { const container = document.querySelector('.container'); for (let i = 0; i < 50; i++) { const confetti = document.createElement('div'); const colors = ['#ff6b6b', '#4ecdc4', '#ffe66d', '#2d334a']; confetti.style.position = 'absolute'; confetti.style.width = Math.random() * 10 + 5 + 'px'; confetti.style.height = Math.random() * 5 + 5 + 'px'; confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; confetti.style.borderRadius = '50%'; confetti.style.zIndex = '100'; confetti.style.top = '50%'; confetti.style.left = '50%'; confetti.style.opacity = Math.random() + 0.5; container.appendChild(confetti); const angle = Math.random() * Math.PI * 2; const velocity = 50 + Math.random() * 50; const tx = Math.cos(angle) * velocity; const ty = Math.sin(angle) * velocity; confetti.animate([ { transform: 'translate(-50%, -50%) scale(0)', opacity: 1 }, { transform: `translate(calc(-50% + ${tx}px), calc(-50% + ${ty}px)) scale(1)`, opacity: 0 } ], { duration: 1000 + Math.random() * 1000, easing: 'cubic-bezier(0.215, 0.61, 0.355, 1)', fill: 'forwards' }); // Remove confetti after animation setTimeout(() => { confetti.remove(); }, 2000); } } // Make checkbox containers interactive const checkboxContainers = document.querySelectorAll('.checkbox-container'); checkboxContainers.forEach(container => { container.addEventListener('click', function() { const checkbox = this.querySelector('input[type="checkbox"]'); checkbox.checked = !checkbox.checked; // Add a little animation when checked if (checkbox.checked) { this.style.backgroundColor = 'rgba(78, 205, 196, 0.1)'; this.style.borderColor = 'var(--secondary)'; } else { this.style.backgroundColor = '#f7f7f7'; this.style.borderColor = '#e0e0e0'; } }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NexusFlux AI - Enterprise Portal</title> <style> @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); :root { --primary: #00F5FF; --primary-dark: #00C8D0; --secondary: #FF00C7; --secondary-dark: #C800A0; --dark: #080F20; --darker: #040810; --light: #F0F2F5; --gray: #A0A0B0; --success: #00FF9D; --error: #FF3370; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; } body { background-color: var(--dark); color: var(--light); display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow-x: hidden; padding: 20px; } .container { width: 100%; max-width: 660px; min-height: 660px; position: relative; overflow: hidden; border-radius: 16px; background: linear-gradient(145deg, var(--darker), var(--dark)); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; } .container::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient( circle at center, rgba(0, 245, 255, 0.03) 0%, rgba(0, 245, 255, 0) 70% ); z-index: 0; pointer-events: none; } .grid-pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px); background-size: 20px 20px; z-index: 1; pointer-events: none; } .content { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; } .header { margin-bottom: 30px; } .logo { font-weight: 700; font-size: 32px; margin-bottom: 20px; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; } .beta-tag { background: rgba(255, 0, 199, 0.15); color: var(--secondary); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 12px; margin-left: 10px; position: relative; top: -5px; } h1 { font-size: 28px; font-weight: 700; margin-bottom: 10px; } p { color: var(--gray); font-size: 16px; line-height: 1.6; margin-bottom: 20px; } form { display: flex; flex-direction: column; gap: 24px; width: 100%; } .form-group { position: relative; } label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--light); } input { width: 100%; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 15px 20px; font-size: 16px; color: var(--light); transition: all 0.3s ease; } input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.2); } .form-group.error input { border-color: var(--error); animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; } .error-message { color: var(--error); font-size: 13px; margin-top: 8px; display: none; transform: translateY(-10px); opacity: 0; transition: all 0.3s ease; } .form-group.error .error-message { display: block; transform: translateY(0); opacity: 1; } button { background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%); border: none; color: var(--dark); font-weight: 600; padding: 16px 24px; border-radius: 8px; cursor: pointer; font-size: 16px; box-shadow: 0 4px 20px rgba(0, 245, 255, 0.3); transition: all 0.3s ease; position: relative; overflow: hidden; } button:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 245, 255, 0.4); } button:active { transform: translateY(1px); } button::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); animation: shine 3s infinite; } .checkbox-group { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; } .checkbox-wrapper { position: relative; } .checkbox-wrapper input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } .checkbox { display: inline-block; width: 20px; height: 20px; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; position: relative; cursor: pointer; transition: all 0.2s ease; } .checkbox-wrapper input:checked ~ .checkbox { background-color: var(--primary); border-color: var(--primary); } .checkbox::after { content: ''; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid var(--dark); border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; transition: all 0.2s ease; } .checkbox-wrapper input:checked ~ .checkbox::after { opacity: 1; } .checkbox-label { font-size: 14px; color: var(--gray); cursor: pointer; user-select: none; } .checkbox-label a { color: var(--primary); text-decoration: none; transition: all 0.2s ease; } .checkbox-label a:hover { text-decoration: underline; color: var(--primary-dark); } .footer { margin-top: 40px; text-align: center; font-size: 14px; color: var(--gray); } .footer a { color: var(--primary); text-decoration: none; } .footer a:hover { text-decoration: underline; } .success-message { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--dark); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 10; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; } .success-message.active { opacity: 1; pointer-events: all; } .success-icon { font-size: 80px; margin-bottom: 20px; background: linear-gradient(to right, var(--primary), var(--success)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pulse 2s infinite; } .pulse { margin-top: 20px; width: 50px; height: 50px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 rgba(0, 245, 255, 0.4); animation: pulse 2s infinite; } .floating-shapes { position: absolute; width: 100%; height: 100%; top: 0; left: 0; overflow: hidden; pointer-events: none; z-index: 1; } .shape { position: absolute; background: linear-gradient(145deg, var(--primary), var(--secondary)); border-radius: 50%; filter: blur(5px); opacity: 0.05; animation: float 20s infinite linear; } .shape:nth-child(1) { width: 150px; height: 150px; top: -75px; left: -75px; animation-duration: 35s; } .shape:nth-child(2) { width: 100px; height: 100px; bottom: -50px; right: 10%; animation-duration: 25s; animation-delay: -5s; } .shape:nth-child(3) { width: 70px; height: 70px; top: 20%; right: -35px; animation-duration: 30s; animation-delay: -10s; } @keyframes float { 0% { transform: rotate(0deg) translate(0, 0) scale(1); } 33% { transform: rotate(120deg) translate(10px, 20px) scale(1.1); } 66% { transform: rotate(240deg) translate(-10px, 10px) scale(0.9); } 100% { transform: rotate(360deg) translate(0, 0) scale(1); } } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 245, 255, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(0, 245, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 245, 255, 0); } } @keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-3px); } 40%, 60% { transform: translateX(3px); } } @keyframes shine { 0% { left: -100%; } 20% { left: 100%; } 100% { left: 100%; } } @media (max-width: 600px) { .container { padding: 30px 20px; } h1 { font-size: 24px; } .logo { font-size: 28px; } button { padding: 14px 20px; } } </style> </head> <body> <div class="container"> <div class="grid-pattern"></div> <div class="floating-shapes"> <div class="shape"></div> <div class="shape"></div> <div class="shape"></div> </div> <div class="content"> <div class="header"> <div class="logo">NexusFlux<span class="beta-tag">BETA</span></div> <h1>Join our AI-powered enterprise suite</h1> <p>Get early access to our quantum-enabled neural processing platform. Limited spots available for tech-forward companies ready to leverage next-gen AI capabilities.</p> </div> <form id="signup-form"> <div class="form-group" id="name-group"> <label for="name">Full Name</label> <input type="text" id="name" placeholder="Jane Doe" autocomplete="name"> <div class="error-message">Please enter your full name</div> </div> <div class="form-group" id="company-group"> <label for="company">Company Name</label> <input type="text" id="company" placeholder="Quantum Technologies Inc." autocomplete="organization"> <div class="error-message">Please enter your company name</div> </div> <div class="form-group" id="email-group"> <label for="email">Work Email</label> <input type="email" id="email" placeholder="[email protected]" autocomplete="email"> <div class="error-message">Please enter a valid work email address</div> </div> <div class="checkbox-group"> <label class="checkbox-wrapper"> <input type="checkbox" id="terms"> <span class="checkbox"></span> </label> <span class="checkbox-label">I agree to receive product updates and accept the <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a></span> </div> <button type="submit" id="submit-btn">Request Early Access</button> </form> <div class="footer"> Already have an account? <a href="#">Sign in to dashboard</a> </div> <div class="success-message" id="success-message"> <div class="success-icon">โ</div> <h1>Access Request Received!</h1> <p>Our team will review your application and contact you within 48 hours with your access credentials and onboarding details.</p> <div class="pulse"></div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById('signup-form'); const nameGroup = document.getElementById('name-group'); const companyGroup = document.getElementById('company-group'); const emailGroup = document.getElementById('email-group'); const termsCheckbox = document.getElementById('terms'); const successMessage = document.getElementById('success-message'); // Add hover effect for inputs const inputs = document.querySelectorAll('input[type="text"], input[type="email"]'); inputs.forEach(input => { input.addEventListener('focus', function() { this.style.boxShadow = `0 0 15px rgba(0, 245, 255, 0.2), 0 0 0 3px rgba(0, 245, 255, 0.1)`; }); input.addEventListener('blur', function() { this.style.boxShadow = 'none'; }); }); // Form validation and submission form.addEventListener('submit', function(e) { e.preventDefault(); let isValid = true; // Validate name const name = document.getElementById('name').value.trim(); if (name === '') { nameGroup.classList.add('error'); isValid = false; } else { nameGroup.classList.remove('error'); } // Validate company const company = document.getElementById('company').value.trim(); if (company === '') { companyGroup.classList.add('error'); isValid = false; } else { companyGroup.classList.remove('error'); } // Validate email const email = document.getElementById('email').value.trim(); const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (email === '' || !emailRegex.test(email)) { emailGroup.classList.add('error'); document.getElementById('email-group').querySelector('.error-message').textContent = email === '' ? 'Please enter your email address' : 'Please enter a valid email address'; isValid = false; } else { // Check if it's potentially a personal email const personalDomains = ['gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com', 'aol.com', 'icloud.com']; const domain = email.split('@')[1].toLowerCase(); if (personalDomains.includes(domain)) { emailGroup.classList.add('error'); document.getElementById('email-group').querySelector('.error-message').textContent = 'Please use your work email address'; isValid = false; } else { emailGroup.classList.remove('error'); } } // Validate terms if (!termsCheckbox.checked) { termsCheckbox.parentElement.style.animation = 'shake 0.5s cubic-bezier(.36,.07,.19,.97) both'; setTimeout(() => { termsCheckbox.parentElement.style.animation = ''; }, 500); isValid = false; } // If form is valid, show success message if (isValid) { // Button animation on submit const submitBtn = document.getElementById('submit-btn'); submitBtn.innerHTML = 'Processing...'; submitBtn.disabled = true; // Simulate processing time setTimeout(() => { // Show success message successMessage.classList.add('active'); // Reset form after 5 seconds setTimeout(() => { form.reset(); submitBtn.innerHTML = 'Request Early Access'; submitBtn.disabled = false; successMessage.classList.remove('active'); }, 5000); }, 1500); } }); // Clear error state on input const allInputs = document.querySelectorAll('input'); allInputs.forEach(input => { input.addEventListener('input', function() { const formGroup = this.closest('.form-group'); if (formGroup) { formGroup.classList.remove('error'); } }); }); // Create subtle mouse movement effect for the shapes document.addEventListener('mousemove', function(e) { const shapes = document.querySelectorAll('.shape'); const mouseX = e.clientX / window.innerWidth; const mouseY = e.clientY / window.innerHeight; shapes.forEach((shape, index) => { const offsetX = (mouseX - 0.5) * (index + 1) * 10; const offsetY = (mouseY - 0.5) * (index + 1) * 10; shape.style.transform = `translate(${offsetX}px, ${offsetY}px)`; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>FitPulse Subscription</title> <style> @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } body { background-color: #f8f9fa; display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; } .container { width: 100%; max-width: 650px; padding: 20px; position: relative; } .form-container { background: white; border-radius: 20px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); padding: 30px; position: relative; overflow: hidden; transform-style: preserve-3d; perspective: 1000px; } .form-container::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(45deg, #FF416C, #FF4B2B, #FFC371, #FF9068, #FC466B); animation: gradient-rotate 15s ease infinite; z-index: -1; opacity: 0.1; border-radius: 40%; } @keyframes gradient-rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .header { text-align: center; margin-bottom: 30px; } .header h1 { font-weight: 800; font-size: 2.2rem; margin-bottom: 5px; background: linear-gradient(90deg, #FF416C, #FF4B2B); -webkit-background-clip: text; background-clip: text; color: transparent; } .header p { color: #6c757d; font-size: 1rem; margin-bottom: 10px; } .step-indicators { display: flex; justify-content: center; margin-bottom: 25px; } .step { width: 12px; height: 12px; margin: 0 5px; border-radius: 50%; background: #e9ecef; position: relative; transition: all 0.3s ease; } .step.active { background: linear-gradient(90deg, #FF416C, #FF4B2B); transform: scale(1.2); } .step.completed { background: linear-gradient(90deg, #4CAF50, #8BC34A); } .form-steps { position: relative; height: 330px; } .form-step { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; transform: translateX(50px); transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); pointer-events: none; visibility: hidden; } .form-step.active { opacity: 1; transform: translateX(0); pointer-events: all; visibility: visible; } .form-group { margin-bottom: 20px; position: relative; } .form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; font-size: 0.95rem; transition: all 0.3s ease; } .form-group input, .form-group select { width: 100%; padding: 15px; border: 2px solid #e9ecef; border-radius: 12px; font-size: 0.95rem; transition: all 0.3s ease; background: #f8f9fa; } .form-group input:focus, .form-group select:focus { border-color: #FF416C; box-shadow: 0 0 0 3px rgba(255, 65, 108, 0.2); outline: none; } .plan-options { display: flex; gap: 15px; margin-bottom: 20px; } .plan-option { flex: 1; border: 2px solid #e9ecef; border-radius: 12px; padding: 18px; cursor: pointer; transition: all 0.3s ease; text-align: center; position: relative; overflow: hidden; } .plan-option:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); } .plan-option.selected { border-color: #FF416C; background: linear-gradient(135deg, rgba(255, 65, 108, 0.1), rgba(255, 75, 43, 0.1)); } .plan-option h3 { font-size: 1.1rem; margin-bottom: 5px; color: #333; } .plan-option .price { font-size: 1.5rem; font-weight: 700; color: #FF416C; margin-bottom: 5px; } .plan-option .save-badge { position: absolute; top: 0; right: 0; background: linear-gradient(90deg, #FF416C, #FF4B2B); color: white; font-size: 0.7rem; padding: 4px 8px; border-radius: 0 8px 0 8px; font-weight: 600; } .plan-option .duration { font-size: 0.85rem; color: #6c757d; } .custom-checkbox { display: flex; align-items: flex-start; margin-bottom: 15px; cursor: pointer; } .custom-checkbox .checkbox { width: 22px; height: 22px; min-width: 22px; border: 2px solid #e9ecef; border-radius: 5px; margin-right: 10px; position: relative; transition: all 0.2s ease; } .custom-checkbox input { display: none; } .custom-checkbox input:checked ~ .checkbox { background: linear-gradient(90deg, #FF416C, #FF4B2B); border-color: transparent; } .custom-checkbox input:checked ~ .checkbox::after { content: 'โ'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 0.9rem; } .custom-checkbox .label { font-size: 0.9rem; color: #6c757d; line-height: 1.4; } .btn-container { display: flex; justify-content: space-between; margin-top: 25px; } .btn { padding: 14px 30px; border-radius: 12px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.3s ease; border: none; display: flex; align-items: center; justify-content: center; } .btn-primary { background: linear-gradient(90deg, #FF416C, #FF4B2B); color: white; box-shadow: 0 5px 15px rgba(255, 65, 108, 0.3); } .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 65, 108, 0.4); } .btn-secondary { background: #f1f3f5; color: #495057; } .btn-secondary:hover { background: #e9ecef; } .progress-bar-container { position: relative; height: 8px; background-color: #f1f3f5; border-radius: 10px; margin-bottom: 30px; overflow: hidden; } .progress-bar { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, #FF416C, #FF4B2B); border-radius: 10px; width: 0; transition: width 0.4s ease; } .confetti { position: absolute; width: 10px; height: 10px; background-color: #FFC107; border-radius: 0; animation: confetti-fall 4s ease-in-out forwards; opacity: 0; z-index: 10; } @keyframes confetti-fall { 0% { transform: translateY(-100px) rotate(0deg); opacity: 1; } 100% { transform: translateY(500px) rotate(360deg); opacity: 0; } } .fitness-goal-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 20px; } .fitness-goal-card { border: 2px solid #e9ecef; border-radius: 12px; padding: 15px; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; text-align: center; } .fitness-goal-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); } .fitness-goal-card.selected { border-color: #FF416C; background: linear-gradient(135deg, rgba(255, 65, 108, 0.1), rgba(255, 75, 43, 0.1)); } .fitness-goal-card .icon { width: 50px; height: 50px; background: linear-gradient(135deg, #f8f9fa, #e9ecef); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; font-size: 1.5rem; color: #FF416C; } .fitness-goal-card.selected .icon { background: linear-gradient(90deg, #FF416C, #FF4B2B); color: white; } .fitness-goal-card h4 { font-size: 0.9rem; color: #333; margin-bottom: 5px; } .success-step { text-align: center; padding: 20px 0; } .success-icon { width: 100px; height: 100px; background: linear-gradient(135deg, rgba(255, 65, 108, 0.2), rgba(255, 75, 43, 0.2)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 3rem; color: #FF416C; position: relative; overflow: hidden; } .success-icon::before { content: 'โ'; position: relative; z-index: 1; } .success-icon::after { content: ''; position: absolute; width: 0; height: 0; background: linear-gradient(90deg, #FF416C, #FF4B2B); border-radius: 50%; opacity: 0; transform: scale(0); transition: all 0.5s ease; } .success-icon.animate::after { width: 100%; height: 100%; opacity: 1; transform: scale(1); } .success-icon.animate { color: white; } .pulse-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(90deg, #FF416C, #FF4B2B); opacity: 0; transform: scale(0.8); animation: pulse 2s ease-out infinite; } @keyframes pulse { 0% { transform: scale(0.8); opacity: 0.3; } 100% { transform: scale(1.5); opacity: 0; } } .subscription-info { background: linear-gradient(135deg, #f8f9fa, #e9ecef); border-radius: 12px; padding: 20px; margin-top: 25px; } .subscription-info h3 { font-size: 1.1rem; color: #333; margin-bottom: 15px; text-align: center; } .info-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; } .info-row .label { color: #6c757d; } .info-row .value { color: #333; font-weight: 600; } .total-row { border-top: 1px dashed #ced4da; padding-top: 10px; margin-top: 10px; font-weight: 700; color: #333; } .total-row .value { color: #FF416C; } #fitness-level-slider { -webkit-appearance: none; width: 100%; height: 10px; border-radius: 5px; background: #e9ecef; outline: none; margin: 15px 0; } #fitness-level-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 25px; height: 25px; border-radius: 50%; background: linear-gradient(90deg, #FF416C, #FF4B2B); cursor: pointer; box-shadow: 0 2px 8px rgba(255, 65, 108, 0.3); transition: all 0.2s ease; } #fitness-level-slider::-webkit-slider-thumb:hover { transform: scale(1.1); } .slider-labels { display: flex; justify-content: space-between; margin-top: 5px; color: #6c757d; font-size: 0.8rem; } .fitness-level-display { text-align: center; font-weight: 700; font-size: 1.2rem; color: #FF416C; margin: 10px 0; } @media (max-width: 600px) { .container { padding: 10px; } .form-container { padding: 20px; } .header h1 { font-size: 1.8rem; } .plan-options, .fitness-goal-cards { grid-template-columns: 1fr; } .btn { padding: 12px 20px; font-size: 0.9rem; } .form-steps { height: 380px; } .plan-options { flex-direction: column; } } /* Animation for form fields */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .form-group { animation: fadeIn 0.4s ease forwards; } .form-group:nth-child(1) { animation-delay: 0.1s; } .form-group:nth-child(2) { animation-delay: 0.2s; } .form-group:nth-child(3) { animation-delay: 0.3s; } /* Heartbeat animation for active elements */ @keyframes heartbeat { 0% { transform: scale(1); } 14% { transform: scale(1.1); } 28% { transform: scale(1); } 42% { transform: scale(1.1); } 70% { transform: scale(1); } } .btn-primary:active { animation: heartbeat 0.8s ease-in-out; } </style> </head> <body> <div class="container"> <div class="form-container"> <div class="header"> <h1>FitPulse Premium</h1> <p>Elevate your fitness journey with personalized workouts, nutrition tracking, and expert guidance.</p> </div> <div class="progress-bar-container"> <div class="progress-bar" id="progress-bar"></div> </div> <div class="step-indicators"> <div class="step active" data-step="1"></div> <div class="step" data-step="2"></div> <div class="step" data-step="3"></div> <div class="step" data-step="4"></div> </div> <div class="form-steps"> <!-- Step 1: Basic Info --> <div class="form-step active" id="step1"> <div class="form-group"> <label for="name">Full Name</label> <input type="text" id="name" placeholder="Your full name"> </div> <div class="form-group"> <label for="email">Email Address</label> <input type="email" id="email" placeholder="[email protected]"> </div> <div class="form-group"> <label for="fitness-level">Your Fitness Level</label> <input type="range" id="fitness-level-slider" min="1" max="5" value="3"> <div class="fitness-level-display">Intermediate</div> <div class="slider-labels"> <span>Beginner</span> <span>Advanced</span> </div> </div> <div class="btn-container"> <div></div> <button class="btn btn-primary" id="next-1">Continue</button> </div> </div> <!-- Step 2: Fitness Goals --> <div class="form-step" id="step2"> <h3 style="margin-bottom: 15px; color: #333;">What are your fitness goals?</h3> <div class="fitness-goal-cards"> <div class="fitness-goal-card" data-goal="weight-loss"> <div class="icon">๐ฅ</div> <h4>Weight Loss</h4> </div> <div class="fitness-goal-card" data-goal="muscle-gain"> <div class="icon">๐ช</div> <h4>Muscle Gain</h4> </div> <div class="fitness-goal-card" data-goal="endurance"> <div class="icon">๐</div> <h4>Endurance</h4> </div> <div class="fitness-goal-card" data-goal="flexibility"> <div class="icon">๐ง</div> <h4>Flexibility</h4> </div> </div> <div class="form-group"> <label for="workout-days">How many days can you work out per week?</label> <select id="workout-days"> <option value="2-3">2-3 days (Recommended for beginners)</option> <option value="3-4">3-4 days (Balanced approach)</option> <option value="4-5">4-5 days (Intermediate level)</option> <option value="5-6">5-6 days (Advanced level)</option> </select> </div> <div class="btn-container"> <button class="btn btn-secondary" id="prev-2">Back</button> <button class="btn btn-primary" id="next-2">Continue</button> </div> </div> <!-- Step 3: Select Plan --> <div class="form-step" id="step3"> <h3 style="margin-bottom: 15px; color: #333;">Choose your subscription plan</h3> <div class="plan-options"> <div class="plan-option" data-plan="monthly"> <h3>Monthly</h3> <div class="price">$14.99</div> <div class="duration">per month</div> </div> <div class="plan-option" data-plan="quarterly"> <h3>Quarterly</h3> <div class="price">$35.99</div> <div class="duration">per 3 months</div> <div class="save-badge">Save 20%</div> </div> <div class="plan-option" data-plan="annual"> <h3>Annual</h3> <div class="price">$119.99</div> <div class="duration">per year</div> <div class="save-badge">Save 35%</div> </div> </div> <label class="custom-checkbox"> <input type="checkbox" id="nutrition-addon"> <div class="checkbox"></div> <div class="label">Add personalized nutrition plan (+$6.99/month)</div> </label> <label class="custom-checkbox"> <input type="checkbox" id="coach-addon"> <div class="checkbox"></div> <div class="label">Add monthly coach consultation (+$19.99/month)</div> </label> <div class="btn-container"> <button class="btn btn-secondary" id="prev-3">Back</button> <button class="btn btn-primary" id="next-3">Continue</button> </div> </div> <!-- Step 4: Confirmation --> <div class="form-step" id="step4"> <h3 style="margin-bottom: 15px; color: #333;">Review your subscription</h3> <div class="subscription-info"> <div class="info-row"> <div class="label">Plan:</div> <div class="value" id="selected-plan">Annual ($119.99)</div> </div> <div class="info-row"> <div class="label">Fitness Goal:</div> <div class="value" id="selected-goal">Weight Loss</div> </div> <div class="info-row" id="nutrition-row" style="display: none;"> <div class="label">Nutrition Plan:</div> <div class="value">$6.99/month</div> </div> <div class="info-row" id="coach-row" style="display: none;"> <div class="label">Coach Consultation:</div> <div class="value">$19.99/month</div> </div> <div class="info-row total-row"> <div class="label">Total:</div> <div class="value" id="total-price">$119.99</div> </div> </div> <div class="btn-container"> <button class="btn btn-secondary" id="prev-4">Back</button> <button class="btn btn-primary" id="submit-btn">Start Your Transformation</button> </div> </div> <!-- Success Message --> <div class="form-step" id="success-step"> <div class="success-step"> <div class="success-icon"> <div class="pulse-ring"></div> </div> <h2 style="margin-bottom: 15px; color: #333;">You're all set!</h2> <p style="margin-bottom: 20px; color: #6c757d;">Your FitPulse Premium account is activated. Get ready to transform your fitness journey!</p> <p style="font-weight: 600; color: #FF416C;">Check your email for your personalized workout plan.</p> </div> </div> </div> </div> </div> <script> // DOM Elements const progressBar = document.getElementById('progress-bar'); const steps = document.querySelectorAll('.step'); const formSteps = document.querySelectorAll('.form-step'); const fitnessLevelSlider = document.getElementById('fitness-level-slider'); const fitnessLevelDisplay = document.querySelector('.fitness-level-display'); const fitnessGoalCards = document.querySelectorAll('.fitness-goal-card'); const planOptions = document.querySelectorAll('.plan-option'); const nutritionAddon = document.getElementById('nutrition-addon'); const coachAddon = document.getElementById('coach-addon'); const nutritionRow = document.getElementById('nutrition-row'); const coachRow = document.getElementById('coach-row'); const selectedPlan = document.getElementById('selected-plan'); const selectedGoal = document.getElementById('selected-goal'); const totalPrice = document.getElementById('total-price'); const successIcon = document.querySelector('.success-icon'); // Navigation buttons const next1Btn = document.getElementById('next-1'); const next2Btn = document.getElementById('next-2'); const next3Btn = document.getElementById('next-3'); const prev2Btn = document.getElementById('prev-2'); const prev3Btn = document.getElementById('prev-3'); const prev4Btn = document.getElementById('prev-4'); const submitBtn = document.getElementById('submit-btn'); // Current step tracker let currentStep = 1; // Selected data let selectedFitnessGoal = null; let selectedPlanOption = null; let basePrice = 119.99; // Default to annual plan let planDisplayText = "Annual ($119.99)"; // Update progress bar function updateProgressBar() { const progress = ((currentStep - 1) / 3) * 100; progressBar.style.width = `${progress}%`; } // Update step indicator function updateStepIndicator() { steps.forEach(step => { const stepNum = parseInt(step.dataset.step); step.classList.remove('active', 'completed'); if (stepNum < currentStep) { step.classList.add('completed'); } else if (stepNum === currentStep) { step.classList.add('active'); } }); } // Show current step function showStep(stepNumber) { formSteps.forEach(step => { step.classList.remove('active'); }); document.getElementById(`step${stepNumber}`).classList.add('active'); currentStep = stepNumber; updateProgressBar(); updateStepIndicator(); } // Create confetti effect function createConfetti() { const container = document.querySelector('.form-container'); const colors = ['#FF416C', '#FF4B2B', '#FFC371', '#4CAF50', '#2196F3', '#9C27B0']; for (let i = 0; i < 50; i++) { const confetti = document.createElement('div'); confetti.className = 'confetti'; confetti.style.left = Math.random() * 100 + '%'; confetti.style.animationDuration = (Math.random() * 3 + 2) + 's'; confetti.style.animationDelay = (Math.random() * 0.5) + 's'; confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; confetti.style.width = (Math.random() * 10 + 5) + 'px'; confetti.style.height = (Math.random() * 10 + 5) + 'px'; confetti.style.transform = `rotate(${Math.random() * 360}deg)`; // Random shapes const shape = Math.floor(Math.random() * 3); if (shape === 0) { confetti.style.borderRadius = '50%'; } else if (shape === 1) { confetti.style.borderRadius = '0'; } else { confetti.style.width = '8px'; confetti.style.height = '8px'; confetti.style.borderRadius = '0'; confetti.style.transform = 'rotate(45deg)'; } container.appendChild(confetti); // Remove after animation completes setTimeout(() => { confetti.remove(); }, 5000); } } // Calculate total price function calculateTotal() { let total = basePrice; if (nutritionAddon.checked) { // For simplicity, calculate additional cost based on plan if (selectedPlanOption === 'monthly') { total += 6.99; } else if (selectedPlanOption === 'quarterly') { total += 6.99 * 3; } else if (selectedPlanOption === 'annual') { total += 6.99 * 12; } nutritionRow.style.display = 'flex'; } else { nutritionRow.style.display = 'none'; } if (coachAddon.checked) { // For simplicity, calculate additional cost based on plan if (selectedPlanOption === 'monthly') { total += 19.99; } else if (selectedPlanOption === 'quarterly') { total += 19.99 * 3; } else if (selectedPlanOption === 'annual') { total += 19.99 * 12; } coachRow.style.display = 'flex'; } else { coachRow.style.display = 'none'; } totalPrice.textContent = `$${total.toFixed(2)}`; } // Event listeners fitnessLevelSlider.addEventListener('input', function() { const level = this.value; let levelText = ''; switch(level) { case '1': levelText = 'Beginner'; break; case '2': levelText = 'Novice'; break; case '3': levelText = 'Intermediate'; break; case '4': levelText = 'Advanced'; break; case '5': levelText = 'Elite'; break; } fitnessLevelDisplay.textContent = levelText; }); fitnessGoalCards.forEach(card => { card.addEventListener('click', function() { fitnessGoalCards.forEach(c => c.classList.remove('selected')); this.classList.add('selected'); selectedFitnessGoal = this.dataset.goal; // Update the summary switch(selectedFitnessGoal) { case 'weight-loss': selectedGoal.textContent = 'Weight Loss'; break; case 'muscle-gain': selectedGoal.textContent = 'Muscle Gain'; break; case 'endurance': selectedGoal.textContent = 'Endurance'; break; case 'flexibility': selectedGoal.textContent = 'Flexibility'; break; } }); }); planOptions.forEach(option => { option.addEventListener('click', function() { planOptions.forEach(o => o.classList.remove('selected')); this.classList.add('selected'); selectedPlanOption = this.dataset.plan; // Update base price based on plan switch(selectedPlanOption) { case 'monthly': basePrice = 14.99; planDisplayText = 'Monthly ($14.99)'; break; case 'quarterly': basePrice = 35.99; planDisplayText = 'Quarterly ($35.99)'; break; case 'annual': basePrice = 119.99; planDisplayText = 'Annual ($119.99)'; break; } // Update the summary selectedPlan.textContent = planDisplayText; calculateTotal(); }); }); nutritionAddon.addEventListener('change', calculateTotal); coachAddon.addEventListener('change', calculateTotal); // Navigation button handlers next1Btn.addEventListener('click', () => { const nameInput = document.getElementById('name'); const emailInput = document.getElementById('email'); if (nameInput.value.trim() === '' || emailInput.value.trim() === '') { if (nameInput.value.trim() === '') { nameInput.style.borderColor = '#FF416C'; nameInput.animate([ { transform: 'translateX(-5px)' }, { transform: 'translateX(5px)' }, { transform: 'translateX(-5px)' }, { transform: 'translateX(5px)' }, { transform: 'translateX(0)' } ], { duration: 300 }); } if (emailInput.value.trim() === '') { emailInput.style.borderColor = '#FF416C'; emailInput.animate([ { transform: 'translateX(-5px)' }, { transform: 'translateX(5px)' }, { transform: 'translateX(-5px)' }, { transform: 'translateX(5px)' }, { transform: 'translateX(0)' } ], { duration: 300 }); } return; } nameInput.style.borderColor = '#e9ecef'; emailInput.style.borderColor = '#e9ecef'; showStep(2); }); next2Btn.addEventListener('click', () => { if (!selectedFitnessGoal) { fitnessGoalCards.forEach(card => { card.animate([ { transform: 'translateY(-5px)' }, { transform: 'translateY(5px)' }, { transform: 'translateY(0)' } ], { duration: 300 }); }); return; } showStep(3); }); next3Btn.addEventListener('click', () => { if (!selectedPlanOption) { planOptions.forEach(option => { option.animate([ { transform: 'translateY(-5px)' }, { transform: 'translateY(5px)' }, { transform: 'translateY(0)' } ], { duration: 300 }); }); return; } showStep(4); }); prev2Btn.addEventListener('click', () => { showStep(1); }); prev3Btn.addEventListener('click', () => { showStep(2); }); prev4Btn.addEventListener('click', () => { showStep(3); }); submitBtn.addEventListener('click', () => { // Show success animation formSteps.forEach(step => { step.classList.remove('active'); }); document.getElementById('success-step').classList.add('active'); progressBar.style.width = '100%'; // Animate
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Wanderlust Subscription</title> <style> /* Base Styles */ :root { --primary: #ff7e5f; --primary-dark: #e45a4f; --secondary: #feb47b; --dark: #2c3e50; --light: #f9f9f9; --success: #2ecc71; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body, html { width: 100%; height: 100%; overflow-x: hidden; background-color: var(--light); color: var(--dark); } .container { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; } /* Parallax Background Layers */ .parallax-container { position: absolute; width: 100%; height: 100%; overflow: hidden; top: 0; left: 0; z-index: -1; } .parallax-layer { position: absolute; width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 0.1s ease-out; } #layer1 { background-image: url('https://images.unsplash.com/photo-1518548419970-58e3b4079ab2?q=80&w=2000'); filter: brightness(0.8); } #layer2 { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320" preserveAspectRatio="none"><path fill="rgba(255,126,95,0.1)" d="M0,288L60,266.7C120,245,240,203,360,197.3C480,192,600,224,720,229.3C840,235,960,213,1080,208C1200,203,1320,213,1380,218.7L1440,224L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path></svg>'); background-size: cover; background-position: bottom; opacity: 0.8; } #layer3 { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320" preserveAspectRatio="none"><path fill="rgba(254,180,123,0.2)" d="M0,224L60,224C120,224,240,224,360,192C480,160,600,96,720,96C840,96,960,160,1080,186.7C1200,213,1320,203,1380,197.3L1440,192L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path></svg>'); background-size: cover; background-position: bottom; opacity: 0.7; } /* Content Styles */ .content { width: 85%; max-width: 600px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); border-radius: 15px; padding: 40px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); transform: translateY(0); transition: transform 0.4s ease, box-shadow 0.4s ease; position: relative; z-index: 5; } .content:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25); } .logo { display: flex; align-items: center; justify-content: center; margin-bottom: 25px; } .logo svg { height: 35px; width: auto; margin-right: 10px; } .logo h1 { font-size: 28px; background: linear-gradient(45deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 1px; } h2 { text-align: center; margin-bottom: 20px; font-size: 24px; color: var(--dark); font-weight: 600; } p { text-align: center; margin-bottom: 25px; line-height: 1.6; color: #555; } .benefits { display: flex; justify-content: space-between; margin-bottom: 25px; flex-wrap: wrap; } .benefit { flex: 1; min-width: 100px; padding: 15px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; transition: transform 0.3s ease; } .benefit:hover { transform: translateY(-5px); } .benefit-icon { background: linear-gradient(45deg, var(--primary), var(--secondary)); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; color: white; } .benefit span { font-size: 14px; font-weight: 500; } form { display: flex; flex-direction: column; } .form-group { position: relative; margin-bottom: 20px; } input { width: 100%; padding: 15px; background: rgba(255, 255, 255, 0.8); border: 2px solid #ddd; border-radius: 8px; outline: none; font-size: 16px; transition: all 0.3s ease; } input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(255, 126, 95, 0.2); } label { position: absolute; left: 15px; top: 15px; font-size: 16px; color: #888; transition: all 0.3s ease; pointer-events: none; } input:focus ~ label, input:not(:placeholder-shown) ~ label { top: -10px; left: 10px; font-size: 12px; background: white; padding: 0 6px; color: var(--primary); } button { background: linear-gradient(45deg, var(--primary), var(--secondary)); color: white; border: none; padding: 15px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4); position: relative; overflow: hidden; } button:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(255, 126, 95, 0.5); } button:active { transform: translateY(1px); } button::after { content: ''; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; background: rgba(255, 255, 255, 0.5); opacity: 0; border-radius: 100%; transform: scale(1); transition: all 0.7s; } button:active::after { transform: scale(80); opacity: 0; transition: 0s; } .privacy { font-size: 12px; text-align: center; margin-top: 20px; color: #888; } /* Success Message Styles */ .success-message { display: none; text-align: center; padding: 30px 0; } .success-icon { font-size: 60px; color: var(--success); margin-bottom: 20px; } /* Mobile Styles */ @media (max-width: 600px) { .content { width: 95%; padding: 30px 20px; } .benefits { flex-direction: column; align-items: center; } .benefit { margin-bottom: 15px; } h2 { font-size: 20px; } .logo h1 { font-size: 24px; } } /* Floating Elements */ .floating-element { position: absolute; z-index: 2; opacity: 0.7; animation: float 8s ease-in-out infinite; filter: blur(2px); } .cloud1 { width: 100px; height: 50px; top: 15%; left: 10%; animation-duration: 12s; } .cloud2 { width: 70px; height: 40px; top: 25%; right: 15%; animation-duration: 15s; animation-delay: 2s; } .cloud3 { width: 90px; height: 45px; bottom: 20%; right: 10%; animation-duration: 10s; animation-delay: 1s; } @keyframes float { 0% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-15px) translateX(10px); } 100% { transform: translateY(0) translateX(0); } } /* Avatar with animation */ .avatar-container { position: absolute; bottom: 40px; right: 40px; z-index: 10; transition: all 0.3s ease; } .avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(45deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); cursor: pointer; transition: all 0.3s ease; } .avatar:hover { transform: scale(1.1); } .avatar svg { width: 30px; height: 30px; fill: white; } .avatar-tooltip { position: absolute; width: 180px; bottom: 75px; right: 0; background: white; padding: 12px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); opacity: 0; transform: translateY(10px); transition: all 0.3s ease; pointer-events: none; } .avatar-container:hover .avatar-tooltip { opacity: 1; transform: translateY(0); } .avatar-tooltip:after { content: ''; position: absolute; bottom: -8px; right: 25px; width: 15px; height: 15px; background: white; transform: rotate(45deg); } .avatar-tooltip p { margin: 0; font-size: 12px; line-height: 1.4; text-align: left; } @media (max-width: 600px) { .avatar-container { bottom: 20px; right: 20px; } } </style> </head> <body> <div class="container"> <!-- Parallax background --> <div class="parallax-container"> <div class="parallax-layer" id="layer1"></div> <div class="parallax-layer" id="layer2"></div> <div class="parallax-layer" id="layer3"></div> </div> <!-- Floating elements --> <div class="floating-element cloud1"> <svg viewBox="0 0 100 50" xmlns="http://www.w3.org/2000/svg"> <path d="M10,35 C5,35 0,30 0,25 C0,15 10,15 15,20 C15,10 25,5 35,15 C40,5 60,5 65,15 C75,5 90,10 90,25 C90,35 80,35 75,30 C70,40 50,45 40,35 C35,45 20,45 10,35 Z" fill="white" opacity="0.9"></path> </svg> </div> <div class="floating-element cloud2"> <svg viewBox="0 0 70 40" xmlns="http://www.w3.org/2000/svg"> <path d="M10,30 C5,30 0,25 0,20 C0,10 10,10 15,15 C15,5 25,0 35,10 C40,0 60,5 65,15 C70,25 60,30 55,25 C50,35 30,40 20,30 C15,40 15,35 10,30 Z" fill="white" opacity="0.9"></path> </svg> </div> <div class="floating-element cloud3"> <svg viewBox="0 0 90 45" xmlns="http://www.w3.org/2000/svg"> <path d="M10,35 C5,35 0,30 0,25 C0,15 10,15 15,20 C15,10 25,5 35,15 C40,5 60,5 65,15 C75,5 90,10 90,25 C90,35 80,35 75,30 C70,40 50,45 40,35 C35,45 20,45 10,35 Z" fill="white" opacity="0.9"></path> </svg> </div> <!-- Main content --> <div class="content"> <div class="form-content"> <div class="logo"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#ff7e5f" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"></path> </svg> <h1>WanderList</h1> </div> <h2>Unlock Exclusive Travel Experiences</h2> <p>Join our community of adventure seekers and receive personalized travel recommendations, hidden gem locations, and members-only discounts to destinations worldwide.</p> <div class="benefits"> <div class="benefit"> <div class="benefit-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path> <circle cx="12" cy="10" r="3"></circle> </svg> </div> <span>Secret Spots</span> </div> <div class="benefit"> <div class="benefit-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path> </svg> </div> <span>Local Favorites</span> </div> <div class="benefit"> <div class="benefit-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="20 6 9 17 4 12"></polyline> </svg> </div> <span>Early Access</span> </div> </div> <form id="subscribe-form"> <div class="form-group"> <input type="text" id="name" placeholder=" " required autocomplete="off"> <label for="name">Full Name</label> </div> <div class="form-group"> <input type="email" id="email" placeholder=" " required autocomplete="off"> <label for="email">Email Address</label> </div> <button type="submit" id="submit-btn">Get My Travel Inspirations</button> </form> <p class="privacy">We respect your privacy. Unsubscribe anytime with one click.</p> </div> <div class="success-message" id="success-message"> <div class="success-icon">โ</div> <h2>You're all set for adventure!</h2> <p>Your first travel inspiration will arrive shortly. Meanwhile, start dreaming of your next journey.</p> </div> </div> <!-- Avatar helper --> <div class="avatar-container"> <div class="avatar"> <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"> <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path> </svg> </div> <div class="avatar-tooltip"> <p>Need help planning your trip? Chat with our travel experts anytime!</p> </div> </div> </div> <script> // Parallax effect document.addEventListener('mousemove', function(e) { const layers = document.querySelectorAll('.parallax-layer'); const mouseX = e.clientX; const mouseY = e.clientY; const windowWidth = window.innerWidth; const windowHeight = window.innerHeight; layers.forEach((layer, index) => { const depth = (index + 1) * 0.05; const moveX = (mouseX - windowWidth / 2) * depth; const moveY = (mouseY - windowHeight / 2) * depth; layer.style.transform = `translate3d(${moveX}px, ${moveY}px, 0)`; }); }); // Form submission handling document.getElementById('subscribe-form').addEventListener('submit', function(e) { e.preventDefault(); // Simulate form submission const submitBtn = document.getElementById('submit-btn'); const formContent = document.querySelector('.form-content'); const successMessage = document.getElementById('success-message'); submitBtn.innerHTML = 'Processing...'; submitBtn.disabled = true; setTimeout(() => { formContent.style.display = 'none'; successMessage.style.display = 'block'; }, 1500); }); // Input animations for mobile touch const inputs = document.querySelectorAll('input'); inputs.forEach(input => { input.addEventListener('focus', function() { this.parentElement.classList.add('focused'); }); input.addEventListener('blur', function() { this.parentElement.classList.remove('focused'); }); }); // Initialize touch events for mobile parallax document.addEventListener('touchmove', function(e) { if (e.touches.length === 1) { const touch = e.touches[0]; const layers = document.querySelectorAll('.parallax-layer'); const touchX = touch.clientX; const touchY = touch.clientY; const windowWidth = window.innerWidth; const windowHeight = window.innerHeight; layers.forEach((layer, index) => { const depth = (index + 1) * 0.02; // Reduced effect for mobile const moveX = (touchX - windowWidth / 2) * depth; const moveY = (touchY - windowHeight / 2) * depth; layer.style.transform = `translate3d(${moveX}px, ${moveY}px, 0)`; }); } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>SkillSphere - Educational Platform Signup</title> <style> :root { --primary: #4361ee; --primary-dark: #3a56d4; --secondary: #ff6b6b; --accent: #7209b7; --light: #f8f9fa; --dark: #2b2d42; --success: #06d6a0; --error: #ef476f; --neutral: #ced4da; --neutral-dark: #adb5bd; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: var(--light); color: var(--dark); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background-image: radial-gradient(var(--neutral) 1px, transparent 1px); background-size: 24px 24px; } .container { width: 100%; max-width: 600px; background-color: white; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); overflow: hidden; position: relative; } .progress-bar { height: 4px; background-color: var(--neutral); width: 100%; position: relative; } .progress-fill { position: absolute; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%); transition: width 0.4s ease; } .form-header { padding: 30px 40px 20px; text-align: center; } .form-header h1 { font-size: 28px; margin-bottom: 10px; color: var(--dark); font-weight: 700; } .form-header p { color: var(--neutral-dark); font-size: 16px; line-height: 1.5; } .badge { display: inline-block; background-color: var(--primary); color: white; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 30px; margin-bottom: 15px; transform: translateY(0); animation: float 3s ease-in-out infinite; } @keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0px); } } .form-content { padding: 0 40px 40px; } .form-group { margin-bottom: 24px; position: relative; } .form-control { width: 100%; padding: 16px; border: 2px solid var(--neutral); border-radius: 10px; font-size: 16px; outline: none; transition: all 0.3s ease; } .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2); } .form-label { position: absolute; left: 16px; top: 16px; color: var(--neutral-dark); pointer-events: none; transition: all 0.3s ease; } .form-control:focus ~ .form-label, .form-control.has-value ~ .form-label { top: -10px; left: 10px; font-size: 12px; background-color: white; padding: 0 6px; color: var(--primary); font-weight: 600; } .password-toggle { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--neutral-dark); cursor: pointer; user-select: none; font-size: 20px; } .error-message { position: absolute; bottom: -20px; left: 0; color: var(--error); font-size: 12px; opacity: 0; transform: translateY(-5px); transition: all 0.3s ease; } .error-message.show { opacity: 1; transform: translateY(0); } .form-control.error { border-color: var(--error); } .form-control.valid { border-color: var(--success); } .form-checkbox { display: flex; align-items: center; margin-bottom: 20px; } .form-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } .checkmark { height: 24px; width: 24px; background-color: white; border: 2px solid var(--neutral); border-radius: 6px; margin-right: 12px; position: relative; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease; } .form-checkbox input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); } .checkmark:after { content: ''; position: absolute; display: none; left: 9px; top: 5px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); } .form-checkbox input:checked ~ .checkmark:after { display: block; } .form-checkbox label { color: var(--dark); font-size: 14px; user-select: none; } .form-checkbox a { color: var(--primary); text-decoration: none; font-weight: 600; } .form-checkbox a:hover { text-decoration: underline; } .btn { display: block; width: 100%; padding: 16px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .btn-primary { background-color: var(--primary); color: white; } .btn-primary:hover { background-color: var(--primary-dark); } .btn-primary:active { transform: scale(0.98); } .btn .ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.8s linear; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } .form-footer { text-align: center; margin-top: 20px; color: var(--neutral-dark); font-size: 14px; } .form-footer a { color: var(--primary); text-decoration: none; font-weight: 600; } .form-footer a:hover { text-decoration: underline; } .course-tag { display: inline-block; background-color: rgba(67, 97, 238, 0.1); color: var(--primary); border-radius: 30px; padding: 6px 12px; font-size: 12px; font-weight: 600; margin-right: 8px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease; } .course-tag:hover { background-color: rgba(67, 97, 238, 0.2); } .course-tag.selected { background-color: var(--primary); color: white; } .course-tags { margin-bottom: 10px; } .form-step { display: none; } .form-step.active { display: block; animation: fadeIn 0.5s forwards; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .step-buttons { display: flex; justify-content: space-between; margin-top: 30px; } .step-buttons .btn { width: 48%; } .btn-secondary { background-color: var(--light); color: var(--dark); border: 2px solid var(--neutral); } .btn-secondary:hover { background-color: var(--neutral); } .success-message { text-align: center; padding: 40px; } .success-message .icon { width: 80px; height: 80px; background-color: var(--success); color: white; border-radius: 50%; font-size: 40px; line-height: 80px; margin: 0 auto 20px; } .success-message h2 { font-size: 24px; margin-bottom: 15px; color: var(--dark); } .success-message p { color: var(--neutral-dark); margin-bottom: 30px; } @media (max-width: 600px) { .form-header, .form-content { padding-left: 20px; padding-right: 20px; } } /* Email Suggestions Dropdown */ .email-suggestions { position: absolute; width: 100%; background: white; border-radius: 0 0 10px 10px; border: 2px solid var(--neutral); border-top: none; z-index: 10; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; } .email-suggestions.show { max-height: 200px; border-color: var(--primary); } .email-suggestion { padding: 12px 16px; cursor: pointer; transition: background 0.2s; } .email-suggestion:hover { background-color: rgba(67, 97, 238, 0.1); } /* Strength meter */ .strength-meter { height: 4px; width: 100%; background: var(--neutral); margin-top: 10px; border-radius: 2px; position: relative; } .strength-meter-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease, background-color 0.3s ease; width: 0; } .strength-text { font-size: 12px; margin-top: 6px; text-align: right; font-weight: 600; transition: color 0.3s ease; } /* Confetti animation */ .confetti-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: 100; } .confetti { position: absolute; width: 10px; height: 10px; background-color: #ff6b6b; opacity: 0; } </style> </head> <body> <div class="container"> <div class="progress-bar"> <div class="progress-fill" id="progressFill"></div> </div> <form id="signupForm" novalidate> <!-- Step 1: Basic Info --> <div class="form-step active" id="step1"> <div class="form-header"> <span class="badge">SkillSphere</span> <h1>Join our learning community</h1> <p>Create your account to access over 5,000+ expert-led courses in tech, design, and business.</p> </div> <div class="form-content"> <div class="form-group"> <input type="text" class="form-control" id="fullName" required> <label for="fullName" class="form-label">Full Name</label> <div class="error-message">Please enter your full name</div> </div> <div class="form-group"> <input type="email" class="form-control" id="email" required> <label for="email" class="form-label">Email Address</label> <div class="error-message">Please enter a valid email address</div> <div class="email-suggestions" id="emailSuggestions"></div> </div> <div class="form-group"> <input type="password" class="form-control" id="password" required> <label for="password" class="form-label">Password</label> <span class="password-toggle" id="passwordToggle">๐๏ธ</span> <div class="error-message">Password must be at least 8 characters</div> <div class="strength-meter"> <div class="strength-meter-fill" id="strengthMeter"></div> </div> <div class="strength-text" id="strengthText"></div> </div> <div class="form-checkbox"> <input type="checkbox" id="termsAgreement" required> <span class="checkmark"></span> <label for="termsAgreement">I agree to the <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a></label> </div> <button type="button" class="btn btn-primary" id="nextBtn">Continue</button> <div class="form-footer"> Already have an account? <a href="#">Sign in</a> </div> </div> </div> <!-- Step 2: Learning Preferences --> <div class="form-step" id="step2"> <div class="form-header"> <span class="badge">Almost there!</span> <h1>What do you want to learn?</h1> <p>Help us tailor your learning experience by selecting your areas of interest.</p> </div> <div class="form-content"> <p style="margin-bottom: 15px; font-weight: 600;">Select your interests (choose at least one):</p> <div class="course-tags" id="courseTags"> <span class="course-tag" data-value="web-dev">Web Development</span> <span class="course-tag" data-value="data-science">Data Science</span> <span class="course-tag" data-value="ui-design">UI/UX Design</span> <span class="course-tag" data-value="ai-ml">AI & Machine Learning</span> <span class="course-tag" data-value="business">Business</span> <span class="course-tag" data-value="marketing">Digital Marketing</span> </div> <div class="form-group"> <input type="text" class="form-control" id="experience"> <label for="experience" class="form-label">Your current experience level</label> </div> <div class="form-group"> <input type="text" class="form-control" id="goals"> <label for="goals" class="form-label">What do you hope to achieve?</label> </div> <div class="step-buttons"> <button type="button" class="btn btn-secondary" id="prevBtn">Back</button> <button type="button" class="btn btn-primary" id="completeBtn">Complete Sign Up</button> </div> </div> </div> <!-- Success Message --> <div class="form-step" id="successStep"> <div class="success-message"> <div class="icon">โ</div> <h2>Welcome to SkillSphere!</h2> <p>Your account has been created successfully. Get ready to start your learning journey with us.</p> <button type="button" class="btn btn-primary" id="exploreBtn">Explore Courses</button> </div> </div> </form> <div class="confetti-container" id="confettiContainer"></div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Form elements const form = document.getElementById('signupForm'); const fullNameInput = document.getElementById('fullName'); const emailInput = document.getElementById('email'); const passwordInput = document.getElementById('password'); const passwordToggle = document.getElementById('passwordToggle'); const termsCheckbox = document.getElementById('termsAgreement'); const nextBtn = document.getElementById('nextBtn'); const prevBtn = document.getElementById('prevBtn'); const completeBtn = document.getElementById('completeBtn'); const exploreBtn = document.getElementById('exploreBtn'); const courseTags = document.querySelectorAll('.course-tag'); // Progress and steps const step1 = document.getElementById('step1'); const step2 = document.getElementById('step2'); const successStep = document.getElementById('successStep'); const progressFill = document.getElementById('progressFill'); // Password strength elements const strengthMeter = document.getElementById('strengthMeter'); const strengthText = document.getElementById('strengthText'); // Email suggestions const emailSuggestions = document.getElementById('emailSuggestions'); const domains = ['gmail.com', 'outlook.com', 'yahoo.com', 'hotmail.com', 'icloud.com']; // Confetti container const confettiContainer = document.getElementById('confettiContainer'); // Initialize progress progressFill.style.width = '0%'; // Form control focus and blur handlers document.querySelectorAll('.form-control').forEach(input => { // Add focus event input.addEventListener('focus', () => { input.parentElement.querySelector('.form-label').classList.add('focused'); }); // Add blur event input.addEventListener('blur', () => { if (input.value.trim() === '') { input.classList.remove('has-value'); } else { input.classList.add('has-value'); } }); // Check initial value if (input.value.trim() !== '') { input.classList.add('has-value'); } // Input event input.addEventListener('input', () => { if (input.value.trim() !== '') { input.classList.add('has-value'); } else { input.classList.remove('has-value'); } // Hide error message on input const errorMessage = input.parentElement.querySelector('.error-message'); if (errorMessage) { errorMessage.classList.remove('show'); input.classList.remove('error'); } }); }); // Password toggle passwordToggle.addEventListener('click', () => { if (passwordInput.type === 'password') { passwordInput.type = 'text'; passwordToggle.textContent = '๐๏ธโ๐จ๏ธ'; } else { passwordInput.type = 'password'; passwordToggle.textContent = '๐๏ธ'; } }); // Password strength meter passwordInput.addEventListener('input', () => { const value = passwordInput.value; let strength = 0; if (value.length >= 8) strength += 1; if (value.match(/[a-z]/) && value.match(/[A-Z]/)) strength += 1; if (value.match(/\d/)) strength += 1; if (value.match(/[^a-zA-Z\d]/)) strength += 1; switch (strength) { case 0: strengthMeter.style.width = '0%'; strengthMeter.style.backgroundColor = '#ef476f'; strengthText.textContent = ''; break; case 1: strengthMeter.style.width = '25%'; strengthMeter.style.backgroundColor = '#ef476f'; strengthText.textContent = 'Weak'; strengthText.style.color = '#ef476f'; break; case 2: strengthMeter.style.width = '50%'; strengthMeter.style.backgroundColor = '#ffd166'; strengthText.textContent = 'Fair'; strengthText.style.color = '#ffd166'; break; case 3: strengthMeter.style.width = '75%'; strengthMeter.style.backgroundColor = '#06d6a0'; strengthText.textContent = 'Good'; strengthText.style.color = '#06d6a0'; break; case 4: strengthMeter.style.width = '100%'; strengthMeter.style.backgroundColor = '#06d6a0'; strengthText.textContent = 'Strong'; strengthText.style.color = '#06d6a0'; break; } }); // Email suggestions emailInput.addEventListener('input', () => { const email = emailInput.value.trim(); const atIndex = email.indexOf('@'); if (atIndex === -1 && email.length > 0) { // Clear previous suggestions emailSuggestions.innerHTML = ''; // Create suggestions domains.forEach(domain => { const suggestion = document.createElement('div'); suggestion.className = 'email-suggestion'; suggestion.textContent = `${email}@${domain}`; suggestion.addEventListener('click', () => { emailInput.value = suggestion.textContent; emailInput.classList.add('has-value'); emailSuggestions.innerHTML = ''; emailSuggestions.classList.remove('show'); }); emailSuggestions.appendChild(suggestion); }); emailSuggestions.classList.add('show'); } else { emailSuggestions.innerHTML = ''; emailSuggestions.classList.remove('show'); } }); // Course tags selection courseTags.forEach(tag => { tag.addEventListener('click', () => { tag.classList.toggle('selected'); }); }); // Button ripple effect document.querySelectorAll('.btn').forEach(button => { button.addEventListener('click', function(e) { const x = e.clientX - e.target.getBoundingClientRect().left; const y = e.clientY - e.target.getBoundingClientRect().top; const ripple = document.createElement('span'); ripple.className = 'ripple'; ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; this.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 800); }); }); // Form validation function validateStep1() { let isValid = true; // Validate full name if (fullNameInput.value.trim() === '') { showError(fullNameInput, 'Please enter your full name'); isValid = false; } // Validate email const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailRegex.test(emailInput.value.trim())) { showError(emailInput, 'Please enter a valid email address'); isValid = false; } // Validate password if (passwordInput.value.length < 8) { showError(passwordInput, 'Password must be at least 8 characters'); isValid = false; } // Validate terms agreement if (!termsCheckbox.checked) { const label = termsCheckbox.nextElementSibling.nextElementSibling; label.style.color = '#ef476f'; isValid = false; termsCheckbox.addEventListener('change', () => { if (termsCheckbox.checked) { label.style.color = ''; } }); } return isValid; } function validateStep2() { let isValid = true; // Check if at least one course tag is selected const selectedTags = document.querySelectorAll('.course-tag.selected'); if (selectedTags.length === 0) { document.getElementById('courseTags').style.border = '1px solid #ef476f'; document.getElementById('courseTags').style.borderRadius = '10px'; document.getElementById('courseTags').style.padding = '10px'; isValid = false; // Remove error styling when a tag is selected courseTags.forEach(tag => { tag.addEventListener('click', () => { if (document.querySelectorAll('.course-tag.selected').length > 0) { document.getElementById('courseTags').style.border = 'none'; document.getElementById('courseTags').style.padding = '0'; } }); }); } return isValid; } function showError(input, message) { const errorMessage = input.parentElement.querySelector('.error-message'); errorMessage.textContent = message; errorMessage.classList.add('show'); input.classList.add('error'); // Highlight field input.focus(); } // Step navigation nextBtn.addEventListener('click', () => { if (validateStep1()) { step1.classList.remove('active'); step2.classList.add('active'); progressFill.style.width = '50%'; } }); prevBtn.addEventListener('click', () => { step2.classList.remove('active'); step1.classList.add('active'); progressFill.style.width = '0%'; }); completeBtn.addEventListener('click', () => { if (validateStep2()) { step2.classList.remove('active'); successStep.classList.add('active'); progressFill.style.width = '100%'; // Create confetti effect createConfetti(); } }); exploreBtn.addEventListener('click', () => { // Reset form for demo purposes form.reset(); successStep.classList.remove('active'); step1.classList.add('active'); progressFill.style.width = '0%'; document.querySelectorAll('.form-control').forEach(input => { input.classList.remove('has-value'); }); document.querySelectorAll('.course-tag').forEach(tag => { tag.classList.remove('selected'); }); strengthMeter.style.width = '0%'; strengthText.textContent = ''; }); // Create confetti animation function createConfetti() { const colors = ['#4361ee', '#ff6b6b', '#06d6a0', '#7209b7', '#ffd166']; const totalConfetti = 150; for (let i = 0; i < totalConfetti; i++) { const confetti = document.createElement('div'); confetti.className = 'confetti'; confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; confetti.style.left = Math.random() * 100 + '%'; confetti.style.top = -10 + 'px'; confetti.style.width = Math.random() * 10 + 5 + 'px'; confetti.style.height = Math.random() * 10 + 5 + 'px'; confetti.style.opacity = Math.random() + 0.5; confetti.style.transform = 'rotate(' + Math.random() * 360 + 'deg)'; confettiContainer.appendChild(confetti); // Animate confetti const animation = confetti.animate( [ { transform: 'translate3d(0, 0, 0) rotate(0deg)', opacity: 1 }, { transform: 'translate3d(' + (Math.random() * 300 - 150) + 'px, ' + (Math.random() * 500 + 500) + 'px, 0) rotate(' + Math.random() * 360 + 'deg)', opacity: 0 } ], { duration: Math.random() * 2000 + 2000, easing: 'cubic-bezier(0.25, 1, 0.5, 1)', fill: 'forwards' } ); animation.onfinish = () => confetti.remove(); } } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>StreamPulse Subscription</title> <style> :root { --primary: #8c53ff; --secondary: #ff3e78; --tertiary: #00d9ff; --background: #121212; --card-bg: #1e1e1e; --text: #ffffff; --success: #4caf50; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; transition: all 0.3s ease; } body { background: var(--background); color: var(--text); height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; } .container { width: 100%; max-width: 460px; padding: 20px; position: relative; z-index: 1; } .background-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; } .shape { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.15; animation: float 8s infinite ease-in-out; } .shape-1 { width: 300px; height: 300px; background: var(--primary); top: -100px; left: -100px; animation-delay: 0s; } .shape-2 { width: 250px; height: 250px; background: var(--secondary); bottom: -70px; right: -70px; animation-delay: 2s; } .shape-3 { width: 200px; height: 200px; background: var(--tertiary); bottom: 100px; left: -50px; animation-delay: 4s; } @keyframes float { 0% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(5deg); } 100% { transform: translateY(0) rotate(0deg); } } .card { background: var(--card-bg); border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); overflow: hidden; backdrop-filter: blur(10px); position: relative; transform-style: preserve-3d; perspective: 1000px; } .card-header { padding: 30px 30px 20px; text-align: center; position: relative; } .card-header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 5px; background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; } .card-header p { color: rgba(255, 255, 255, 0.7); margin-bottom: 10px; font-size: 1rem; line-height: 1.5; } .card-header .badge { display: inline-block; background: rgba(140, 83, 255, 0.2); color: var(--primary); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 15px; } .plans { display: flex; justify-content: space-around; margin: 20px 0; padding: 0 20px; } .plan { text-align: center; cursor: pointer; width: 30%; padding: 12px 0; border-radius: 12px; position: relative; overflow: hidden; } .plan:hover { transform: translateY(-3px); } .plan.selected { background: rgba(140, 83, 255, 0.15); outline: 2px solid var(--primary); } .plan-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 5px; } .plan-price { font-size: 1.1rem; font-weight: 800; } .plan-price span { font-size: 0.8rem; font-weight: 400; opacity: 0.7; } .plan-features { font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); margin-top: 5px; } .form-container { padding: 25px 30px 30px; } .form-group { margin-bottom: 20px; position: relative; } .form-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; font-weight: 600; color: rgba(255, 255, 255, 0.9); } .input-wrapper { position: relative; } input, select { width: 100%; padding: 15px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: var(--text); font-size: 1rem; outline: none; } input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(140, 83, 255, 0.2); } input::placeholder { color: rgba(255, 255, 255, 0.3); } .icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.5); font-size: 1.2rem; } button { width: 100%; padding: 16px; border-radius: 12px; border: none; background: linear-gradient(90deg, var(--primary), var(--secondary)); color: white; font-size: 1rem; font-weight: 700; cursor: pointer; margin-top: 5px; position: relative; overflow: hidden; transform-style: preserve-3d; } button:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(140, 83, 255, 0.3); } button:active { transform: translateY(1px); } button .button-content { display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; } button .button-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary), var(--primary)); background-size: 300% 100%; animation: gradientMove 6s linear infinite; transition: all 0.3s ease; } @keyframes gradientMove { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } } .checkbox-container { display: flex; align-items: flex-start; margin: 15px 0; } .custom-checkbox { width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.3); display: flex; align-items: center; justify-content: center; margin-right: 10px; flex-shrink: 0; cursor: pointer; } .custom-checkbox.checked { background: var(--primary); border-color: var(--primary); } .custom-checkbox.checked::after { content: 'โ'; color: white; font-size: 12px; font-weight: bold; } .checkbox-label { font-size: 0.85rem; line-height: 1.4; color: rgba(255, 255, 255, 0.7); } .checkbox-label a { color: var(--primary); text-decoration: none; } .checkbox-label a:hover { text-decoration: underline; } .success-message { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--card-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; z-index: 2; transform: translateY(100%); opacity: 0; transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .success-message.active { transform: translateY(0); opacity: 1; } .success-icon { width: 80px; height: 80px; background: rgba(76, 175, 80, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; position: relative; overflow: hidden; } .success-icon::before { content: "โ"; font-size: 40px; color: var(--success); } .success-icon::after { content: ""; position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--success); animation: success-pulse 2s infinite; } @keyframes success-pulse { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } } .success-message h2 { font-size: 1.8rem; margin-bottom: 15px; background: linear-gradient(90deg, var(--primary), var(--tertiary)); -webkit-background-clip: text; background-clip: text; color: transparent; } .success-message p { color: rgba(255, 255, 255, 0.7); margin-bottom: 25px; font-size: 0.95rem; line-height: 1.5; } .back-button { background: transparent; border: 2px solid var(--primary); color: var(--primary); padding: 12px 25px; font-size: 0.9rem; width: auto; } .features-list { display: flex; flex-wrap: wrap; margin: 5px 0 15px; padding: 0 20px; } .feature-item { width: 50%; padding: 8px 0; display: flex; align-items: center; font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); } .feature-icon { margin-right: 8px; color: var(--secondary); font-size: 0.8rem; } .footer-text { text-align: center; font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); margin-top: 15px; } .loading { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(30, 30, 30, 0.8); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 3; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; } .loading.active { opacity: 1; pointer-events: all; } .spinner { width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.1); border-radius: 50%; border-top-color: var(--primary); animation: spin 1s ease-in-out infinite; } @keyframes spin { to { transform: rotate(360deg); } } @media (max-width: 480px) { .container { padding: 10px; } .card-header { padding: 25px 20px 15px; } .card-header h1 { font-size: 1.8rem; } .form-container { padding: 20px; } .feature-item { width: 100%; padding: 6px 0; } .plans { flex-direction: column; align-items: center; } .plan { width: 80%; margin-bottom: 15px; } } /* Animation flares */ @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } .pulse-animation { animation: pulse 1.5s infinite; } .input-error { border-color: #ff3e78 !important; animation: shake 0.5s; } @keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } } /* Particles effect */ .particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; } .particle { position: absolute; width: 4px; height: 4px; border-radius: 50%; opacity: 0; animation: particleAnimation 6s infinite ease-out; } @keyframes particleAnimation { 0% { opacity: 0; transform: translateY(0) rotate(0deg); } 10% { opacity: 1; } 90% { opacity: 0.5; } 100% { opacity: 0; transform: translateY(-800%) rotate(360deg); } } </style> </head> <body> <div class="background-shapes"> <div class="shape shape-1"></div> <div class="shape shape-2"></div> <div class="shape shape-3"></div> </div> <div class="particles" id="particles"></div> <div class="container"> <div class="card"> <div class="card-header"> <div class="badge">PREMIUM ACCESS</div> <h1>StreamPulse</h1> <p>Unlimited entertainment at your fingertips. Movies, shows, gaming, and more.</p> </div> <div class="features-list"> <div class="feature-item"> <span class="feature-icon">โฆ</span> Ad-free streaming </div> <div class="feature-item"> <span class="feature-icon">โฆ</span> 4K Ultra HD </div> <div class="feature-item"> <span class="feature-icon">โฆ</span> Offline downloads </div> <div class="feature-item"> <span class="feature-icon">โฆ</span> Multi-device access </div> </div> <div class="plans"> <div class="plan" data-price="9.99" data-period="monthly"> <div class="plan-name">Basic</div> <div class="plan-price">$9.99<span>/mo</span></div> <div class="plan-features">1 device</div> </div> <div class="plan selected pulse-animation" data-price="14.99" data-period="monthly"> <div class="plan-name">Pro</div> <div class="plan-price">$14.99<span>/mo</span></div> <div class="plan-features">4 devices</div> </div> <div class="plan" data-price="19.99" data-period="monthly"> <div class="plan-name">Family</div> <div class="plan-price">$19.99<span>/mo</span></div> <div class="plan-features">6 devices</div> </div> </div> <div class="form-container"> <div class="form-group"> <label for="fullname">Full Name</label> <div class="input-wrapper"> <input type="text" id="fullname" placeholder="Enter your name" required> </div> </div> <div class="form-group"> <label for="email">Email Address</label> <div class="input-wrapper"> <input type="email" id="email" placeholder="[email protected]" required> </div> </div> <div class="checkbox-container"> <div class="custom-checkbox" id="terms-checkbox"></div> <div class="checkbox-label"> I agree to the <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a> </div> </div> <button id="subscribe-btn"> <div class="button-bg"></div> <div class="button-content"> <span>Start My Free Trial</span> </div> </button> <div class="footer-text">No credit card required for 7-day trial</div> </div> <div class="loading"> <div class="spinner"></div> </div> <div class="success-message"> <div class="success-icon"></div> <h2>Welcome Aboard!</h2> <p>Your StreamPulse subscription has been activated. Get ready for endless entertainment and exclusive content!</p> <button class="back-button" id="back-button">Return to Form</button> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Plan selection const plans = document.querySelectorAll('.plan'); plans.forEach(plan => { plan.addEventListener('click', function() { plans.forEach(p => { p.classList.remove('selected', 'pulse-animation'); }); this.classList.add('selected'); this.classList.add('pulse-animation'); // Update button text with selected plan const price = this.getAttribute('data-price'); const period = this.getAttribute('data-period'); document.querySelector('#subscribe-btn .button-content span').textContent = `Start My Free Trial ยท $${price}/${period === 'monthly' ? 'mo' : 'yr'}`; }); }); // Terms checkbox const termsCheckbox = document.getElementById('terms-checkbox'); termsCheckbox.addEventListener('click', function() { this.classList.toggle('checked'); }); // Form submission const subscribeBtn = document.getElementById('subscribe-btn'); const loadingIndicator = document.querySelector('.loading'); const successMessage = document.querySelector('.success-message'); const backButton = document.getElementById('back-button'); const emailInput = document.getElementById('email'); const nameInput = document.getElementById('fullname'); subscribeBtn.addEventListener('click', function(e) { e.preventDefault(); // Form validation let isValid = true; if (!nameInput.value.trim()) { nameInput.classList.add('input-error'); isValid = false; } else { nameInput.classList.remove('input-error'); } if (!emailInput.value.trim() || !validateEmail(emailInput.value)) { emailInput.classList.add('input-error'); isValid = false; } else { emailInput.classList.remove('input-error'); } if (!termsCheckbox.classList.contains('checked')) { termsCheckbox.classList.add('input-error'); isValid = false; } else { termsCheckbox.classList.remove('input-error'); } if (isValid) { // Show loading animation loadingIndicator.classList.add('active'); // Simulate API call setTimeout(() => { loadingIndicator.classList.remove('active'); successMessage.classList.add('active'); // Particle explosion effect on success createSuccessParticles(); }, 1500); } }); backButton.addEventListener('click', function() { successMessage.classList.remove('active'); // Reset form nameInput.value = ''; emailInput.value = ''; termsCheckbox.classList.remove('checked'); }); function validateEmail(email) { const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(String(email).toLowerCase()); } // Particles background createParticles(); // Focus effects for inputs const inputs = document.querySelectorAll('input'); inputs.forEach(input => { input.addEventListener('focus', function() { this.parentElement.classList.add('focused'); }); input.addEventListener('blur', function() { this.parentElement.classList.remove('focused'); }); // Clear error state on input input.addEventListener('input', function() { this.classList.remove('input-error'); }); }); }); // Create floating particles function createParticles() { const particlesContainer = document.getElementById('particles'); const colors = ['#8c53ff', '#ff3e78', '#00d9ff']; for (let i = 0; i < 20; i++) { const particle = document.createElement('div'); particle.classList.add('particle'); const size = Math.random() * 4 + 2; const color = colors[Math.floor(Math.random() * colors.length)]; particle.style.width = `${size}px`; particle.style.height = `${size}px`; particle.style.background = color; particle.style.left = `${Math.random() * 100}%`; particle.style.top = `${Math.random() * 100}%`; particle.style.animationDelay = `${Math.random() * 5}s`; particle.style.animationDuration = `${Math.random() * 10 + 10}s`; particlesContainer.appendChild(particle); } } // Create success particles animation function createSuccessParticles() { const particlesContainer = document.getElementById('particles'); const colors = ['#8c53ff', '#ff3e78', '#00d9ff', '#4caf50']; // Clear existing particles particlesContainer.innerHTML = ''; // Create explosion particles for (let i = 0; i < 50; i++) { const particle = document.createElement('div'); particle.classList.add('particle'); const size = Math.random() * 6 + 3; const color = colors[Math.floor(Math.random() * colors.length)]; particle.style.width = `${size}px`; particle.style.height = `${size}px`; particle.style.background = color; particle.style.left = '50%'; particle.style.top = '50%'; particle.style.animationDelay = `${Math.random() * 0.2}s`; particle.style.animationDuration = `${Math.random() * 2 + 1}s`; particlesContainer.appendChild(particle); } } </script> </body> </html>