Radio buttons are a staple in user interface design, offering a simple way for users to make a single selection from a set of options. Their straightforward functionality makes them an essential component in forms, surveys, and settings menus.
In this article, we will explore 10 radio button examples that showcase various design approaches and use cases. From basic implementations to more creative and interactive designs, these examples will inspire you to enhance your own UI projects.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Designing your own radio buttons has never been easier with Subframe. Its drag-and-drop interface and intuitive, responsive canvas ensure you create pixel-perfect UI every time. Loved by designers and developers alike, Subframe makes the design process seamless and efficient.
Start for free and experience the difference 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 interfaces, including stunning radio buttons, in minutes. Its drag-and-drop editor ensures efficiency and precision.
Don't wait! Start for free and begin designing immediately. Experience the seamless and intuitive design process that Subframe offers.
<html> <head> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: #f5f9ff; display: flex; justify-content: center; align-items: center; min-height: 700px; padding: 20px; overflow-x: hidden; } .container { width: 100%; max-width: 650px; background-color: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 44, 122, 0.08); padding: 30px; position: relative; overflow: hidden; } .container::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, #3a7bd5, #5cb1ff); } h1 { color: #1a5b9a; font-size: 24px; margin-bottom: 5px; font-weight: 600; } .subheading { color: #6c7a8e; font-size: 15px; margin-bottom: 25px; } .step-indicator { display: flex; justify-content: space-between; margin-bottom: 30px; position: relative; } .step-indicator::before { content: ''; position: absolute; height: 2px; background-color: #e1e9f5; width: 100%; top: 14px; z-index: 1; } .step { width: 30px; height: 30px; border-radius: 50%; background-color: #e1e9f5; display: flex; justify-content: center; align-items: center; color: #7b8a9e; font-weight: bold; position: relative; z-index: 2; transition: all 0.3s ease; } .step.active { background-color: #3a7bd5; color: white; box-shadow: 0 0 0 5px rgba(58, 123, 213, 0.2); } .form-section { margin-bottom: 25px; } .form-title { color: #1a5b9a; font-size: 18px; margin-bottom: 15px; font-weight: 600; display: flex; align-items: center; } .form-title svg { margin-right: 10px; } .radio-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; margin-bottom: 20px; } .radio-option { position: relative; cursor: pointer; } .radio-option input { position: absolute; opacity: 0; cursor: pointer; } .radio-option label { display: flex; align-items: center; padding: 15px; background-color: #f5f9ff; border: 2px solid #e1e9f5; border-radius: 8px; transition: all 0.3s ease; color: #4a5568; font-weight: 500; } .radio-option input:checked + label { border-color: #3a7bd5; background-color: #ebf4ff; color: #1a5b9a; box-shadow: 0 3px 10px rgba(58, 123, 213, 0.15); } .radio-option input:focus + label { outline: 2px solid #3a7bd5; outline-offset: 2px; } .radio-option:hover label { border-color: #bbd3f2; background-color: #edf2fa; } .radio-checkmark { position: relative; height: 22px; width: 22px; min-width: 22px; background-color: white; border: 2px solid #d0dbe9; border-radius: 50%; margin-right: 12px; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; } .radio-option input:checked + label .radio-checkmark { border-color: #3a7bd5; background-color: #3a7bd5; } .radio-checkmark::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background-color: white; transform: scale(0); transition: transform 0.2s ease; } .radio-option input:checked + label .radio-checkmark::after { transform: scale(1); } .button-group { display: flex; justify-content: space-between; margin-top: 30px; } button { padding: 12px 24px; border-radius: 6px; font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; } .back-btn { border: none; background-color: #ebf4ff; color: #3a7bd5; } .back-btn:hover { background-color: #d9e8ff; } .back-btn svg { margin-right: 8px; } .next-btn { border: none; background-color: #3a7bd5; color: white; box-shadow: 0 4px 10px rgba(58, 123, 213, 0.2); } .next-btn:hover { background-color: #2d67b6; box-shadow: 0 6px 15px rgba(58, 123, 213, 0.25); } .next-btn svg { margin-left: 8px; } .tooltip { position: absolute; background: #2d3748; color: white; padding: 8px 12px; border-radius: 6px; font-size: 13px; z-index: 10; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); pointer-events: none; width: max-content; max-width: 250px; } .tooltip::after { content: ''; position: absolute; top: -5px; left: 20px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #2d3748; } .info-icon { margin-left: 8px; cursor: pointer; color: #a0b0c5; transition: color 0.3s ease; position: relative; } .info-icon:hover { color: #3a7bd5; } .info-icon:hover .tooltip { opacity: 1; visibility: visible; transform: translateY(0); } /* Responsive adjustments */ @media (max-width: 600px) { .container { padding: 20px; } h1 { font-size: 20px; } .radio-group { grid-template-columns: 1fr; } .button-group { flex-direction: column; gap: 15px; } button { width: 100%; } } /* Pulse animation for active radio options */ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(58, 123, 213, 0.5); } 70% { box-shadow: 0 0 0 10px rgba(58, 123, 213, 0); } 100% { box-shadow: 0 0 0 0 rgba(58, 123, 213, 0); } } .radio-option input:checked + label { animation: pulse 1.5s 1; } /* Progress indicator animation */ .progress-bar { position: absolute; top: 14px; left: 0; height: 2px; background: linear-gradient(90deg, #3a7bd5, #5cb1ff); width: 33.33%; z-index: 2; transition: width 0.5s ease; } </style> </head> <body> <div class="container"> <h1>Patient Health Assessment</h1> <p class="subheading">Please answer these questions about your current health status</p> <div class="step-indicator"> <div class="progress-bar"></div> <div class="step active">1</div> <div class="step">2</div> <div class="step">3</div> </div> <div class="form-section"> <h2 class="form-title"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8.5 5.5C8.5 7.43 10.07 9 12 9C13.93 9 15.5 7.43 15.5 5.5C15.5 3.57 13.93 2 12 2C10.07 2 8.5 3.57 8.5 5.5Z" fill="#3a7bd5"/> <path d="M10.5 13H13.5C16.52 13 19 15.48 19 18.5V20C19 20.55 18.55 21 18 21H6C5.45 21 5 20.55 5 20V18.5C5 15.48 7.48 13 10.5 13Z" fill="#3a7bd5"/> </svg> Current Health Status <span class="info-icon"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" fill="currentColor"/> </svg> <span class="tooltip">This information helps us properly assess your current health needs</span> </span> </h2> <div class="radio-group"> <div class="radio-option"> <input type="radio" id="health-excellent" name="health-status" value="excellent"> <label for="health-excellent"> <span class="radio-checkmark"></span> Excellent </label> </div> <div class="radio-option"> <input type="radio" id="health-good" name="health-status" value="good"> <label for="health-good"> <span class="radio-checkmark"></span> Good </label> </div> <div class="radio-option"> <input type="radio" id="health-fair" name="health-status" value="fair"> <label for="health-fair"> <span class="radio-checkmark"></span> Fair </label> </div> <div class="radio-option"> <input type="radio" id="health-poor" name="health-status" value="poor"> <label for="health-poor"> <span class="radio-checkmark"></span> Poor </label> </div> </div> </div> <div class="form-section"> <h2 class="form-title"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM8 17C7.45 17 7 16.55 7 16V11C7 10.45 7.45 10 8 10C8.55 10 9 10.45 9 11V16C9 16.55 8.55 17 8 17ZM12 17C11.45 17 11 16.55 11 16V8C11 7.45 11.45 7 12 7C12.55 7 13 7.45 13 8V16C13 16.55 12.55 17 12 17ZM16 17C15.45 17 15 16.55 15 16V14C15 13.45 15.45 13 16 13C16.55 13 17 13.45 17 14V16C17 16.55 16.55 17 16 17Z" fill="#3a7bd5"/> </svg> Recent Symptoms <span class="info-icon"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" fill="currentColor"/> </svg> <span class="tooltip">Select any symptoms you've experienced in the past 14 days</span> </span> </h2> <div class="radio-group"> <div class="radio-option"> <input type="radio" id="symptoms-none" name="recent-symptoms" value="none"> <label for="symptoms-none"> <span class="radio-checkmark"></span> No Symptoms </label> </div> <div class="radio-option"> <input type="radio" id="symptoms-mild" name="recent-symptoms" value="mild"> <label for="symptoms-mild"> <span class="radio-checkmark"></span> Mild Symptoms </label> </div> <div class="radio-option"> <input type="radio" id="symptoms-moderate" name="recent-symptoms" value="moderate"> <label for="symptoms-moderate"> <span class="radio-checkmark"></span> Moderate Symptoms </label> </div> <div class="radio-option"> <input type="radio" id="symptoms-severe" name="recent-symptoms" value="severe"> <label for="symptoms-severe"> <span class="radio-checkmark"></span> Severe Symptoms </label> </div> </div> </div> <div class="form-section"> <h2 class="form-title"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H14.82C14.4 1.84 13.3 1 12 1C10.7 1 9.6 1.84 9.18 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM12 3C12.55 3 13 3.45 13 4C13 4.55 12.55 5 12 5C11.45 5 11 4.55 11 4C11 3.45 11.45 3 12 3ZM7 7H17V9H7V7ZM7 11H17V13H7V11ZM7 15H14V17H7V15Z" fill="#3a7bd5"/> </svg> Medical History Access <span class="info-icon"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" fill="currentColor"/> </svg> <span class="tooltip">Select which records you'd like us to access to provide better care</span> </span> </h2> <div class="radio-group"> <div class="radio-option"> <input type="radio" id="records-full" name="medical-records" value="full"> <label for="records-full"> <span class="radio-checkmark"></span> Full Access </label> </div> <div class="radio-option"> <input type="radio" id="records-limited" name="medical-records" value="limited"> <label for="records-limited"> <span class="radio-checkmark"></span> Limited Access </label> </div> <div class="radio-option"> <input type="radio" id="records-minimal" name="medical-records" value="minimal"> <label for="records-minimal"> <span class="radio-checkmark"></span> Minimal Access </label> </div> <div class="radio-option"> <input type="radio" id="records-none" name="medical-records" value="none"> <label for="records-none"> <span class="radio-checkmark"></span> No Access </label> </div> </div> </div> <div class="button-group"> <button class="back-btn"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z" fill="currentColor"/> </svg> Back </button> <button class="next-btn"> Continue <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 4L10.59 5.41L16.17 11H4V13H16.17L10.59 18.59L12 20L20 12L12 4Z" fill="currentColor"/> </svg> </button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Handle radio selection with animation const radioOptions = document.querySelectorAll('.radio-option input'); radioOptions.forEach(radio => { radio.addEventListener('change', function() { // Find parent group and add animation to the selected option const parentGroup = this.closest('.radio-group'); const allOptions = parentGroup.querySelectorAll('.radio-option input'); allOptions.forEach(option => { const label = option.nextElementSibling; if (option.checked) { label.style.transform = 'scale(1.02)'; setTimeout(() => { label.style.transform = 'scale(1)'; }, 200); } }); }); }); // Button interactions const nextBtn = document.querySelector('.next-btn'); const backBtn = document.querySelector('.back-btn'); const steps = document.querySelectorAll('.step'); const progressBar = document.querySelector('.progress-bar'); let currentStep = 1; nextBtn.addEventListener('click', function() { if (currentStep < 3) { currentStep++; updateStepIndicator(); } // Check if all sections have a selection checkFormCompletion(); }); backBtn.addEventListener('click', function() { if (currentStep > 1) { currentStep--; updateStepIndicator(); } }); function updateStepIndicator() { steps.forEach((step, index) => { if (index + 1 <= currentStep) { step.classList.add('active'); } else { step.classList.remove('active'); } }); // Update progress bar progressBar.style.width = `${(currentStep / 3) * 100}%`; // Update button text based on step if (currentStep === 3) { nextBtn.textContent = 'Submit'; nextBtn.innerHTML = 'Submit <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z" fill="currentColor"/></svg>'; } else { nextBtn.innerHTML = 'Continue <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4L10.59 5.41L16.17 11H4V13H16.17L10.59 18.59L12 20L20 12L12 4Z" fill="currentColor"/></svg>'; } } function checkFormCompletion() { const formSections = document.querySelectorAll('.form-section'); let allSectionsComplete = true; formSections.forEach(section => { const radioGroup = section.querySelector('.radio-group'); const radios = radioGroup.querySelectorAll('input[type="radio"]'); const isAnyChecked = Array.from(radios).some(radio => radio.checked); if (!isAnyChecked) { allSectionsComplete = false; } }); if (allSectionsComplete) { nextBtn.classList.add('complete'); } else { nextBtn.classList.remove('complete'); } } // Add keyboard navigation for accessibility radioOptions.forEach(radio => { radio.addEventListener('keydown', function(e) { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this.checked = true; // Trigger change event const event = new Event('change'); this.dispatchEvent(event); } }); }); // Add focus outline effect for accessibility document.querySelectorAll('button, input').forEach(el => { el.addEventListener('focus', function() { this.style.outline = '2px solid #3a7bd5'; this.style.outlineOffset = '2px'; }); el.addEventListener('blur', function() { this.style.outline = 'none'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary: #5038bc; --secondary: #f3f1ff; --text-dark: #2c2c2c; --text-light: #767676; --success: #34d399; --border-radius: 12px; --box-shadow: 0 4px 20px rgba(80, 56, 188, 0.1); --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { background-color: #ffffff; color: var(--text-dark); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; } .checkout-container { width: 100%; max-width: 680px; background-color: #ffffff; border-radius: var(--border-radius); box-shadow: var(--box-shadow); padding: 32px; position: relative; overflow: hidden; } h1 { font-weight: 700; font-size: 24px; margin-bottom: 12px; color: var(--text-dark); } .order-summary { display: flex; justify-content: space-between; background-color: #f8f8f8; border-radius: var(--border-radius); padding: 16px; margin-bottom: 28px; } .order-details { display: flex; align-items: center; } .order-image { width: 60px; height: 60px; background-color: var(--secondary); border-radius: 8px; margin-right: 16px; overflow: hidden; display: flex; justify-content: center; align-items: center; } .order-image img { max-width: 80%; max-height: 80%; } .order-text { font-size: 14px; line-height: 1.4; } .order-name { font-weight: 600; color: var(--text-dark); } .order-price { font-weight: 700; font-size: 18px; color: var(--text-dark); } .shipping-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; } .shipping-options { display: grid; grid-gap: 14px; } .shipping-option { position: relative; background-color: white; border: 2px solid #e9e9e9; border-radius: var(--border-radius); padding: 16px; cursor: pointer; transition: var(--transition); overflow: hidden; } .shipping-option:hover { border-color: #d9d9d9; } .shipping-option.selected { border-color: var(--primary); background-color: var(--secondary); } .shipping-option input { position: absolute; opacity: 0; cursor: pointer; } .shipping-option .radio-custom { position: absolute; top: 18px; right: 18px; height: 22px; width: 22px; background-color: white; border: 2px solid #e0e0e0; border-radius: 50%; transition: var(--transition); } .shipping-option.selected .radio-custom { border-color: var(--primary); } .shipping-option.selected .radio-custom:after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; border-radius: 50%; background-color: var(--primary); animation: radioGrow 0.3s forwards; } @keyframes radioGrow { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } } .shipping-details { display: flex; justify-content: space-between; align-items: flex-start; } .shipping-info { flex: 1; } .shipping-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; color: var(--text-dark); } .shipping-description { font-size: 14px; color: var(--text-light); margin-bottom: 8px; } .shipping-time { display: inline-block; font-size: 12px; font-weight: 600; color: var(--primary); background-color: rgba(80, 56, 188, 0.1); padding: 4px 10px; border-radius: 50px; } .shipping-price { font-weight: 700; font-size: 18px; color: var(--text-dark); white-space: nowrap; margin-left: 16px; } .shipping-price.free { color: var(--success); } .shipping-animation { position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background-color: rgba(80, 56, 188, 0.05); transform: scale(0); opacity: 0; z-index: -1; transition: transform 0.5s ease-out, opacity 0.5s ease-out; } .shipping-option.selected .shipping-animation { transform: scale(5); opacity: 1; } .shipping-icon { margin-right: 8px; font-size: 15px; } .continue-btn { display: block; width: 100%; background-color: var(--primary); color: white; border: none; padding: 16px; border-radius: var(--border-radius); font-weight: 600; font-size: 16px; margin-top: 28px; cursor: pointer; transition: var(--transition); } .continue-btn:hover { background-color: #4230a4; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(80, 56, 188, 0.15); } .continue-btn:active { transform: translateY(0); } .save-text { display: block; text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-light); } .save-text strong { color: var(--success); font-weight: 600; } @media (max-width: 580px) { .checkout-container { padding: 24px 20px; } .shipping-details { flex-direction: column; } .shipping-price { margin-left: 0; margin-top: 8px; } .order-image { width: 50px; height: 50px; } } </style> </head> <body> <div class="checkout-container"> <h1>Complete Your Purchase</h1> <div class="order-summary"> <div class="order-details"> <div class="order-image"> <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIHZpZXdCb3g9IjAgMCA1MCA1MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMjUgNDMuNzVDMzUuMzU1IDQzLjc1IDQzLjc1IDM1LjM1NSA0My43NSAyNUM0My43NSAxNC42NDUgMzUuMzU1IDYuMjUgMjUgNi4yNUMxNC42NDUgNi4yNSA2LjI1IDE0LjY0NSA2LjI1IDI1QzYuMjUgMzUuMzU1IDE0LjY0NSA0My43NSAyNSA0My43NVoiIGZpbGw9IiM1MDM4QkMiLz48cGF0aCBkPSJNMjMuNDM3NSAzMS4yNUgxNy44MTI1QzE3LjI2MDQgMzEuMjUgMTYuODc1IDMwLjg2NDYgMTYuODc1IDMwLjMxMjVDMTYuODc1IDI5Ljc2MDQgMTcuMjYwNCAyOS4zNzUgMTcuODEyNSAyOS4zNzVIMjEuNTYyNVYxOC43NUgxNy44MTI1QzE3LjI2MDQgMTguNzUgMTYuODc1IDE4LjM2NDYgMTYuODc1IDE3LjgxMjVDMTYuODc1IDE3LjI2MDQgMTcuMjYwNCAxNi44NzUgMTcuODEyNSAxNi44NzVIMjMuNDM3NUMyMy45ODk2IDE2Ljg3NSAyNC4zNzUgMTcuMjYwNCAyNC4zNzUgMTcuODEyNVYyOS4zNzVIMjYuODc1QzI3LjQyNzEgMjkuMzc1IDI3LjgxMjUgMjkuNzYwNCAyNy44MTI1IDMwLjMxMjVDMjcuODEyNSAzMC44NjQ2IDI3LjQyNzEgMzEuMjUgMjYuODc1IDMxLjI1SDIzLjQzNzVaIiBmaWxsPSJ3aGl0ZSIvPjxwYXRoIGQ9Ik0zMy40Mzc1IDMxLjI1QzMxLjIyOTIgMzEuMjUgMjkuMzc1IDI5LjM5NTggMjkuMzc1IDI3LjE4NzVDMjkuMzc1IDI0Ljk3OTIgMzEuMjI5MiAyMy4xMjUgMzMuNDM3NSAyMy4xMjVDMzUuNjQ1OCAyMy4xMjUgMzcuNSAyNC45NzkyIDM3LjUgMjcuMTg3NUMzNy41IDI5LjM5NTggMzUuNjQ1OCAzMS4yNSAzMy40Mzc1IDMxLjI1Wk0zMy40Mzc1IDI1QzMyLjI3MDggMjUgMzEuMjUgMjYuMDIwOCAzMS4yNSAyNy4xODc1QzMxLjI1IDI4LjM1NDIgMzIuMjcwOCAyOS4zNzUgMzMuNDM3NSAyOS4zNzVDMzQuNjA0MiAyOS4zNzUgMzUuNjI1IDI4LjM1NDIgMzUuNjI1IDI3LjE4NzVDMzUuNjI1IDI2LjAyMDggMzQuNjA0MiAyNSAzMy40Mzc1IDI1WiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=" alt="Product"> </div> <div class="order-text"> <div class="order-name">Noise-Cancelling Headphones</div> <div class="order-sku">SKU: HD-5038-BC</div> </div> </div> <div class="order-price">$198.99</div> </div> <div class="shipping-title">Select Shipping Method</div> <div class="shipping-options"> <label class="shipping-option" id="option1"> <input type="radio" name="shipping" value="standard"> <div class="radio-custom"></div> <div class="shipping-animation"></div> <div class="shipping-details"> <div class="shipping-info"> <div class="shipping-name">Standard Shipping</div> <div class="shipping-description">Delivered in recyclable packaging</div> <div class="shipping-time"><span class="shipping-icon">📦</span>3-5 business days</div> </div> <div class="shipping-price">$5.99</div> </div> </label> <label class="shipping-option" id="option2"> <input type="radio" name="shipping" value="express"> <div class="radio-custom"></div> <div class="shipping-animation"></div> <div class="shipping-details"> <div class="shipping-info"> <div class="shipping-name">Express Shipping</div> <div class="shipping-description">Prioritized handling & tracking</div> <div class="shipping-time"><span class="shipping-icon">⚡</span>1-2 business days</div> </div> <div class="shipping-price">$12.99</div> </div> </label> <label class="shipping-option" id="option3"> <input type="radio" name="shipping" value="premium"> <div class="radio-custom"></div> <div class="shipping-animation"></div> <div class="shipping-details"> <div class="shipping-info"> <div class="shipping-name">Premium Delivery</div> <div class="shipping-description">White-glove service with setup assistance</div> <div class="shipping-time"><span class="shipping-icon">🎁</span>Next day delivery</div> </div> <div class="shipping-price">$19.99</div> </div> </label> <label class="shipping-option" id="option4"> <input type="radio" name="shipping" value="free"> <div class="radio-custom"></div> <div class="shipping-animation"></div> <div class="shipping-details"> <div class="shipping-info"> <div class="shipping-name">Customer Loyalty Free Shipping</div> <div class="shipping-description">For orders above $150 with a member account</div> <div class="shipping-time"><span class="shipping-icon">✨</span>4-7 business days</div> </div> <div class="shipping-price free">FREE</div> </div> </label> </div> <button class="continue-btn">Continue to Payment</button> <span class="save-text">You qualify for <strong>free shipping</strong> with your purchase!</span> </div> <script> document.addEventListener('DOMContentLoaded', function() { const options = document.querySelectorAll('.shipping-option'); // Auto-select the free shipping option on load const freeOption = document.querySelector('input[value="free"]'); if (freeOption) { freeOption.checked = true; freeOption.closest('.shipping-option').classList.add('selected'); } options.forEach(option => { option.addEventListener('click', function() { // Remove selected class from all options options.forEach(opt => { opt.classList.remove('selected'); }); // Add selected class to clicked option this.classList.add('selected'); // Create ripple effect const animation = this.querySelector('.shipping-animation'); animation.style.transition = 'none'; animation.style.transform = 'scale(0)'; animation.style.opacity = '0'; // Trigger reflow void animation.offsetWidth; // Add transition back and animate animation.style.transition = 'transform 0.5s ease-out, opacity 0.5s ease-out'; animation.style.transform = 'scale(5)'; animation.style.opacity = '1'; // Check the radio button const radio = this.querySelector('input[type="radio"]'); radio.checked = true; }); }); // Prevent form submission document.querySelector('.continue-btn').addEventListener('click', function(e) { e.preventDefault(); // Add a subtle "click" feedback this.style.transform = 'scale(0.98)'; setTimeout(() => { this.style.transform = ''; }, 150); // Show which option was selected (for demo purposes) const selectedOption = document.querySelector('input[name="shipping"]:checked'); if (selectedOption) { const shippingName = selectedOption.closest('.shipping-option').querySelector('.shipping-name').textContent; console.log('Selected shipping method:', shippingName); } }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Adventure Awaits Booking</title> <style> :root { --primary-gradient: linear-gradient(135deg, #FF9D6C 0%, #FF5E62 100%); --secondary-gradient: linear-gradient(135deg, #6CACFF 0%, #8C64FF 100%); --neutral-light: #F8F9FA; --neutral-dark: #343A40; --success: #20E3B2; --shadow: 0 8px 16px rgba(0, 0, 0, 0.1); --animation-timing: 0.3s; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: var(--neutral-light); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; overflow-x: hidden; } .booking-container { width: 100%; max-width: 680px; background: white; border-radius: 24px; padding: 30px; box-shadow: var(--shadow); overflow: hidden; position: relative; z-index: 1; } .booking-container::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 8px; background: var(--primary-gradient); z-index: 0; } h1 { font-size: 28px; color: var(--neutral-dark); margin-bottom: 10px; font-weight: 700; } .tagline { color: #6C757D; margin-bottom: 30px; font-size: 16px; } .selection-container { display: flex; flex-direction: column; gap: 25px; margin-bottom: 30px; } .option-group { border-radius: 16px; overflow: hidden; } .option-group-title { font-size: 18px; font-weight: 600; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; } .icon { width: 24px; height: 24px; display: inline-flex; justify-content: center; align-items: center; } .radio-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; } .radio-option { position: relative; height: 120px; cursor: pointer; border-radius: 16px; overflow: hidden; transition: transform var(--animation-timing), box-shadow var(--animation-timing); } .radio-option:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); } .radio-option input { position: absolute; opacity: 0; width: 0; height: 0; } .radio-content { position: relative; height: 100%; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 15px; background: var(--neutral-light); border: 2px solid transparent; border-radius: 16px; transition: all var(--animation-timing); overflow: hidden; text-align: center; } .flight-option .radio-content { background: rgba(255, 94, 98, 0.1); } .hotel-option .radio-content { background: rgba(108, 172, 255, 0.1); } .radio-option input:checked + .radio-content { border-width: 3px; transform: scale(1.03); } .flight-option input:checked + .radio-content { border-color: #FF5E62; box-shadow: 0 0 15px rgba(255, 94, 98, 0.3); } .hotel-option input:checked + .radio-content { border-color: #6CACFF; box-shadow: 0 0 15px rgba(108, 172, 255, 0.3); } .radio-content::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: -1; opacity: 0; transition: opacity var(--animation-timing); } .flight-option .radio-content::before { background: var(--primary-gradient); } .hotel-option .radio-content::before { background: var(--secondary-gradient); } .radio-option input:checked + .radio-content::before { opacity: 0.08; } .option-icon { margin-bottom: 10px; font-size: 32px; transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); color: var(--neutral-dark); } .flight-option .option-icon { color: #FF5E62; } .hotel-option .option-icon { color: #6CACFF; } .radio-option:hover .option-icon, .radio-option input:checked + .radio-content .option-icon { transform: scale(1.2); } .option-title { font-weight: 600; font-size: 16px; margin-bottom: 4px; color: var(--neutral-dark); } .option-desc { font-size: 12px; color: #6C757D; } .checkmark { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; display: flex; justify-content: center; align-items: center; opacity: 0; transform: scale(0); transition: all var(--animation-timing); } .flight-option .checkmark { background: #FF5E62; } .hotel-option .checkmark { background: #6CACFF; } .radio-option input:checked + .radio-content .checkmark { opacity: 1; transform: scale(1); } .checkmark::after { content: ''; width: 6px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; } .search-action { display: flex; margin-top: 20px; } .search-btn { padding: 14px 28px; background: var(--primary-gradient); color: white; border: none; border-radius: 12px; font-weight: 600; font-size: 16px; cursor: pointer; transition: all var(--animation-timing); flex-grow: 1; display: flex; justify-content: center; align-items: center; gap: 8px; position: relative; overflow: hidden; box-shadow: 0 4px 10px rgba(255, 94, 98, 0.3); } .search-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(255, 94, 98, 0.4); } .search-btn::after { content: ""; position: absolute; width: 100%; height: 100%; top: 0; left: -100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: 0.4s; } .search-btn:hover::after { left: 100%; } .trip-details { margin-top: 30px; padding: 20px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 157, 108, 0.1) 0%, rgba(140, 100, 255, 0.1) 100%); display: none; animation: fadeIn 0.5s ease-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .detail-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--neutral-dark); } .detail-content { font-size: 14px; color: #6C757D; line-height: 1.5; } .destination-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .destination-badge { padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; transition: all var(--animation-timing); cursor: pointer; } .destination-badge:hover { transform: translateY(-2px); } .flight-badge { background: rgba(255, 94, 98, 0.1); color: #FF5E62; border: 1px solid rgba(255, 94, 98, 0.3); } .hotel-badge { background: rgba(108, 172, 255, 0.1); color: #6CACFF; border: 1px solid rgba(108, 172, 255, 0.3); } .trip-image { width: 100%; height: 120px; background-size: cover; background-position: center; border-radius: 12px; margin-top: 15px; position: relative; overflow: hidden; transition: transform var(--animation-timing); } .trip-image:hover { transform: scale(1.03); } .flight-image { background-image: url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80'); } .hotel-image { background-image: url('https://images.unsplash.com/photo-1566073771259-6a8506099945?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80'); } /* Responsive adjustments */ @media (max-width: 600px) { .booking-container { padding: 20px; border-radius: 16px; } h1 { font-size: 24px; } .radio-options { grid-template-columns: 1fr; } .radio-option { height: 100px; } .search-btn { padding: 12px 20px; font-size: 14px; } } /* Animation for floating effect */ @keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } } .animated-float { animation: float 3s ease-in-out infinite; } /* Pulse animation for indicators */ @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } } .pulse { animation: pulse 2s infinite; } /* Custom toggle switch styling */ .toggle-container { display: flex; align-items: center; gap: 10px; margin-top: 20px; } .toggle-label { font-size: 14px; color: #6C757D; } .toggle { position: relative; display: inline-block; width: 50px; height: 24px; } .toggle input { opacity: 0; width: 0; height: 0; } .toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; } .toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .toggle-slider { background: var(--primary-gradient); } input:checked + .toggle-slider:before { transform: translateX(26px); } /* Special animation for price guarantee badge */ .price-guarantee { position: absolute; top: 20px; right: 30px; background: var(--success); color: white; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; z-index: 10; box-shadow: 0 2px 5px rgba(32, 227, 178, 0.3); display: flex; align-items: center; gap: 4px; } .rotating { display: inline-block; animation: rotate 3s linear infinite; } @keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> </head> <body> <div class="booking-container"> <div class="price-guarantee"> <span class="rotating">⭐</span> Best Price Guarantee </div> <h1>Adventure Awaits You</h1> <p class="tagline">Choose your travel style and unlock unforgettable journeys</p> <div class="selection-container"> <div class="option-group"> <h3 class="option-group-title"> <span class="icon">🌎</span> What are you booking today? </h3> <div class="radio-options"> <label class="radio-option flight-option"> <input type="radio" name="booking-type" value="flight" checked> <div class="radio-content animated-float"> <div class="option-icon">✈️</div> <div class="option-title">Flight</div> <div class="option-desc">Soar to new heights</div> <div class="checkmark"></div> </div> </label> <label class="radio-option hotel-option"> <input type="radio" name="booking-type" value="hotel"> <div class="radio-content animated-float"> <div class="option-icon">🏨</div> <div class="option-title">Hotel</div> <div class="option-desc">Dreamy stays await</div> <div class="checkmark"></div> </div> </label> <label class="radio-option flight-option"> <input type="radio" name="booking-type" value="flight+hotel"> <div class="radio-content animated-float"> <div class="option-icon">🧳</div> <div class="option-title">Package</div> <div class="option-desc">Best value combo</div> <div class="checkmark"></div> </div> </label> </div> </div> <div class="option-group"> <h3 class="option-group-title"> <span class="icon">🔍</span> Travel style preference </h3> <div class="radio-options"> <label class="radio-option flight-option"> <input type="radio" name="travel-style" value="adventure"> <div class="radio-content animated-float"> <div class="option-icon">🏔️</div> <div class="option-title">Adventure</div> <div class="option-desc">Thrill-seeking</div> <div class="checkmark"></div> </div> </label> <label class="radio-option hotel-option"> <input type="radio" name="travel-style" value="relaxation" checked> <div class="radio-content animated-float"> <div class="option-icon">🏝️</div> <div class="option-title">Relaxation</div> <div class="option-desc">Peaceful retreats</div> <div class="checkmark"></div> </div> </label> <label class="radio-option flight-option"> <input type="radio" name="travel-style" value="cultural"> <div class="radio-content animated-float"> <div class="option-icon">🏛️</div> <div class="option-title">Cultural</div> <div class="option-desc">History & arts</div> <div class="checkmark"></div> </div> </label> </div> </div> </div> <div class="toggle-container"> <span class="toggle-label">Flexible dates</span> <label class="toggle"> <input type="checkbox" id="flexible-dates"> <span class="toggle-slider"></span> </label> <span class="toggle-label">Show eco-friendly options</span> <label class="toggle"> <input type="checkbox" id="eco-friendly"> <span class="toggle-slider"></span> </label> </div> <div class="search-action"> <button class="search-btn" id="search-btn"> <span>Find Your Adventure</span> <span class="pulse">🔍</span> </button> </div> <div class="trip-details" id="flight-details"> <div class="detail-title">Popular Flight Destinations</div> <div class="detail-content">Explore trending flight routes with special discounts for early bookings. Save up to 30% when booking 60 days in advance.</div> <div class="destination-badges"> <div class="destination-badge flight-badge">Bali 🏝️</div> <div class="destination-badge flight-badge">Tokyo 🗼</div> <div class="destination-badge flight-badge">Paris 🗼</div> <div class="destination-badge flight-badge">New York 🗽</div> <div class="destination-badge flight-badge">Cape Town 🏔️</div> </div> <div class="trip-image flight-image"></div> </div> <div class="trip-details" id="hotel-details"> <div class="detail-title">Trending Hotel Experiences</div> <div class="detail-content">Discover unique stays from beachfront villas to mountain retreats. Members get exclusive perks like free upgrades and late checkout.</div> <div class="destination-badges"> <div class="destination-badge hotel-badge">Maldives 🏝️</div> <div class="destination-badge hotel-badge">Swiss Alps 🏔️</div> <div class="destination-badge hotel-badge">Santorini 🏛️</div> <div class="destination-badge hotel-badge">Kyoto 🌸</div> <div class="destination-badge hotel-badge">Tulum 🌴</div> </div> <div class="trip-image hotel-image"></div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const bookingTypeInputs = document.querySelectorAll('input[name="booking-type"]'); const searchBtn = document.getElementById('search-btn'); const flightDetails = document.getElementById('flight-details'); const hotelDetails = document.getElementById('hotel-details'); // Initially show the flight details flightDetails.style.display = 'block'; // Show appropriate details based on selected booking type bookingTypeInputs.forEach(input => { input.addEventListener('change', function() { if (this.value === 'hotel') { flightDetails.style.display = 'none'; hotelDetails.style.display = 'block'; searchBtn.style.background = 'var(--secondary-gradient)'; searchBtn.style.boxShadow = '0 4px 10px rgba(108, 172, 255, 0.3)'; } else { flightDetails.style.display = 'block'; hotelDetails.style.display = 'none'; searchBtn.style.background = 'var(--primary-gradient)'; searchBtn.style.boxShadow = '0 4px 10px rgba(255, 94, 98, 0.3)'; } }); }); // Add click event for search button searchBtn.addEventListener('click', function(e) { e.preventDefault(); // Get the selected booking type let selectedBookingType; bookingTypeInputs.forEach(input => { if (input.checked) { selectedBookingType = input.value; } }); // Get the selected travel style let selectedTravelStyle; const travelStyleInputs = document.querySelectorAll('input[name="travel-style"]'); travelStyleInputs.forEach(input => { if (input.checked) { selectedTravelStyle = input.value; } }); // Get toggle states const flexibleDates = document.getElementById('flexible-dates').checked; const ecoFriendly = document.getElementById('eco-friendly').checked; // Show a loading effect on the button const originalText = this.innerHTML; this.innerHTML = '<span>Searching...</span> <span class="rotating">🔄</span>'; // Simulate search (replace with actual search logic) setTimeout(() => { this.innerHTML = originalText; // Animate the appropriate details section if (selectedBookingType === 'hotel') { hotelDetails.style.display = 'none'; setTimeout(() => { hotelDetails.style.display = 'block'; }, 10); } else { flightDetails.style.display = 'none'; setTimeout(() => { flightDetails.style.display = 'block'; }, 10); } // Scroll to the details section const detailsSection = selectedBookingType === 'hotel' ? hotelDetails : flightDetails; detailsSection.scrollIntoView({ behavior: 'smooth' }); }, 1000); }); // Add interactive effects for destination badges const destinationBadges = document.querySelectorAll('.destination-badge'); destinationBadges.forEach(badge => { badge.addEventListener('click', function() { // Reset all badges destinationBadges.forEach(b => { b.style.transform = ''; b.style.boxShadow = ''; }); // Highlight selected badge this.style.transform = 'scale(1.1)'; if (this.classList.contains('flight-badge')) { this.style.boxShadow = '0 3px 10px rgba(255, 94, 98, 0.3)'; } else { this.style.boxShadow = '0 3px 10px rgba(108, 172, 255, 0.3)'; } }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Academic Course Selection</title> <style> @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Source+Serif+Pro:wght@300;400;600&display=swap'); :root { --primary: #2c3e50; --accent: #8e44ad; --light-accent: #e9d8f2; --bg: #f9f7f4; --border: #d1c7bc; --text: #333; --success: #27ae60; --warning: #e67e22; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Source Serif Pro', Georgia, serif; background-color: var(--bg); color: var(--text); line-height: 1.6; padding: 2rem; display: flex; justify-content: center; align-items: center; min-height: 700px; max-width: 700px; margin: 0 auto; } .selection-container { background: white; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); padding: 2rem; width: 100%; position: relative; overflow: hidden; } h1 { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.8rem; margin-bottom: 1.5rem; color: var(--primary); position: relative; line-height: 1.2; } h1::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60px; height: 3px; background-color: var(--accent); } p.intro { margin-bottom: 2rem; font-size: 0.95rem; color: #555; } fieldset { border: none; margin-bottom: 2rem; } legend { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.2rem; margin-bottom: 1rem; width: 100%; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); color: var(--primary); } .radio-group { display: flex; flex-direction: column; gap: 0.8rem; } .radio-option { display: flex; align-items: flex-start; cursor: pointer; transition: transform 0.2s ease; padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid transparent; } .radio-option:hover { background-color: var(--light-accent); transform: translateX(5px); border-color: var(--border); } .radio-input { position: absolute; opacity: 0; cursor: pointer; } .radio-custom { position: relative; display: inline-block; width: 20px; height: 20px; margin-right: 12px; margin-top: 3px; border: 2px solid var(--primary); border-radius: 50%; flex-shrink: 0; } .radio-custom::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); width: 10px; height: 10px; background-color: var(--accent); border-radius: 50%; transition: transform 0.2s ease; } .radio-input:checked + .radio-custom::after { transform: translate(-50%, -50%) scale(1); } .radio-input:focus + .radio-custom { box-shadow: 0 0 0 3px var(--light-accent); outline: none; } .radio-label { display: flex; flex-direction: column; padding-top: 1px; } .course-title { font-weight: 600; margin-bottom: 0.2rem; } .course-details { font-size: 0.85rem; color: #666; } .course-meta { font-size: 0.8rem; color: #888; margin-top: 0.3rem; display: flex; gap: 1rem; } .submit-container { display: flex; justify-content: space-between; align-items: center; } .button { font-family: 'Source Serif Pro', Georgia, serif; background-color: var(--primary); color: white; border: none; padding: 0.8rem 1.5rem; font-size: 1rem; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; font-weight: 600; } .button:hover { background-color: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(142, 68, 173, 0.2); } .button:active { transform: translateY(0); } .selected-count { font-size: 0.9rem; font-style: italic; color: #666; } .success-message { position: absolute; top: 1rem; right: -300px; background-color: var(--success); color: white; padding: 1rem; border-radius: 6px; transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); max-width: 250px; } .success-message.show { right: 1rem; } .academic-seal { position: absolute; top: 15px; right: 15px; width: 60px; height: 60px; opacity: 0.07; } .recommended-tag { position: absolute; top: 0; right: 0; background-color: var(--warning); color: white; font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 0 0 0 4px; transform: translateY(-100%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; } .radio-option.recommended:hover .recommended-tag { transform: translateY(0); opacity: 1; } @media (max-width: 500px) { body { padding: 1rem; } .selection-container { padding: 1.5rem; } h1 { font-size: 1.5rem; } .submit-container { flex-direction: column; gap: 1rem; align-items: flex-start; } .button { width: 100%; } } /* Loading animation */ .loading { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: white; animation: spin 1s ease-in-out infinite; margin-left: 10px; display: none; } .button.is-loading .loading { display: inline-block; } @keyframes spin { to { transform: rotate(360deg); } } /* Checkmark animation for selected courses */ .checkmark { position: absolute; top: 50%; right: 20px; transform: translateY(-50%) scale(0); width: 20px; height: 20px; background: var(--success); border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease; } .checkmark::before { content: ''; width: 6px; height: 10px; border-right: 2px solid white; border-bottom: 2px solid white; transform: rotate(45deg) translate(-1px, -1px); } .radio-option.selected .checkmark { transform: translateY(-50%) scale(1); opacity: 1; } /* Background pattern */ .pattern { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 20px 20px; opacity: 0.3; pointer-events: none; z-index: -1; } </style> </head> <body> <div class="selection-container"> <div class="pattern"></div> <svg class="academic-seal" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <circle cx="50" cy="50" r="45" fill="none" stroke="#000" stroke-width="2"/> <circle cx="50" cy="50" r="40" fill="none" stroke="#000" stroke-width="1"/> <circle cx="50" cy="50" r="35" fill="none" stroke="#000" stroke-width="0.5"/> <path d="M50 20 L50 80 M20 50 L80 50" stroke="#000" stroke-width="1"/> <path d="M30 30 L70 70 M30 70 L70 30" stroke="#000" stroke-width="1"/> <circle cx="50" cy="50" r="10" fill="none" stroke="#000" stroke-width="1"/> <text x="50" y="54" text-anchor="middle" font-size="7">ACADEMIA</text> </svg> <h1>Academic Course Registration</h1> <p class="intro">Select your desired courses for the Fall 2023 semester. You may choose up to three courses from the offerings below. Each course represents 4 credit hours unless otherwise noted.</p> <form id="course-selection-form"> <fieldset> <legend>Humanities</legend> <div class="radio-group"> <label class="radio-option" data-credits="4" data-capacity="15/30"> <input type="checkbox" name="humanities" value="HUM301" class="radio-input"> <span class="radio-custom"></span> <div class="radio-label"> <span class="course-title">HUM301: Philosophy of Aesthetics</span> <span class="course-details">Examines theories of beauty and artistic expression from classical antiquity to contemporary discourse.</span> <div class="course-meta"> <span>Prof. Eleanor Harrington</span> <span>Tu/Th 10:00-11:30</span> </div> </div> <div class="checkmark"></div> </label> <label class="radio-option recommended" data-credits="4" data-capacity="8/25"> <input type="checkbox" name="humanities" value="HUM415" class="radio-input"> <span class="radio-custom"></span> <div class="radio-label"> <span class="course-title">HUM415: Medieval Literature & Thought</span> <span class="course-details">Explores philosophical and literary developments in Europe from 500-1400 CE, with emphasis on theological discourse.</span> <div class="course-meta"> <span>Dr. Thomas Blackwood</span> <span>MWF 13:15-14:30</span> </div> </div> <div class="recommended-tag">Recommended</div> <div class="checkmark"></div> </label> </div> </fieldset> <fieldset> <legend>Social Sciences</legend> <div class="radio-group"> <label class="radio-option recommended" data-credits="4" data-capacity="22/40"> <input type="checkbox" name="social" value="SOC355" class="radio-input"> <span class="radio-custom"></span> <div class="radio-label"> <span class="course-title">SOC355: Quantitative Research Methods</span> <span class="course-details">Instruction in statistical analysis, survey design, and data interpretation for social scientific inquiry.</span> <div class="course-meta"> <span>Prof. Jian Zhang</span> <span>Tu/Th 14:45-16:15</span> </div> </div> <div class="recommended-tag">Recommended</div> <div class="checkmark"></div> </label> <label class="radio-option" data-credits="4" data-capacity="16/35"> <input type="checkbox" name="social" value="PSY320" class="radio-input"> <span class="radio-custom"></span> <div class="radio-label"> <span class="course-title">PSY320: Cognitive Psychology</span> <span class="course-details">Examines memory, perception, problem-solving, and the cognitive foundations of behavior.</span> <div class="course-meta"> <span>Dr. Rebecca Saunders</span> <span>MWF 9:30-10:45</span> </div> </div> <div class="checkmark"></div> </label> </div> </fieldset> <fieldset> <legend>Natural Sciences</legend> <div class="radio-group"> <label class="radio-option" data-credits="5" data-capacity="12/24"> <input type="checkbox" name="sciences" value="BIO330" class="radio-input"> <span class="radio-custom"></span> <div class="radio-label"> <span class="course-title">BIO330: Molecular Genetics</span> <span class="course-details">Advanced study of DNA structure, gene expression, and genetic engineering. Includes laboratory component (5 credits).</span> <div class="course-meta"> <span>Prof. Marcus Velazquez</span> <span>MWF 15:00-16:30</span> </div> </div> <div class="checkmark"></div> </label> <label class="radio-option" data-credits="4" data-capacity="18/30"> <input type="checkbox" name="sciences" value="PHYS275" class="radio-input"> <span class="radio-custom"></span> <div class="radio-label"> <span class="course-title">PHYS275: Quantum Mechanics</span> <span class="course-details">Introduction to wave functions, uncertainty principle, and fundamental quantum systems.</span> <div class="course-meta"> <span>Dr. Amelia Chen</span> <span>Tu/Th 11:45-13:15</span> </div> </div> <div class="checkmark"></div> </label> </div> </fieldset> <div class="submit-container"> <span class="selected-count">No courses selected (0 credits)</span> <button type="submit" class="button" id="submit-btn"> Register Courses <span class="loading"></span> </button> </div> </form> <div class="success-message" id="success-message"> Your course registration has been processed. Please check your student portal for confirmation. </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById('course-selection-form'); const options = document.querySelectorAll('.radio-option'); const selectedCount = document.querySelector('.selected-count'); const submitBtn = document.getElementById('submit-btn'); const successMessage = document.getElementById('success-message'); let selectedCourses = 0; let totalCredits = 0; // Handle checkbox changes options.forEach(option => { const checkbox = option.querySelector('.radio-input'); checkbox.addEventListener('change', function() { const credits = parseInt(option.dataset.credits, 10); if (this.checked) { if (selectedCourses >= 3) { this.checked = false; // Provide tactile feedback on max selection option.style.animation = 'shake 0.5s cubic-bezier(.36,.07,.19,.97) both'; option.addEventListener('animationend', () => { option.style.animation = ''; }, {once: true}); return; } selectedCourses++; totalCredits += credits; option.classList.add('selected'); // Add a subtle animation to show selection option.style.backgroundColor = var('--light-accent'); setTimeout(() => { option.style.backgroundColor = ''; }, 300); } else { selectedCourses--; totalCredits -= credits; option.classList.remove('selected'); } updateSelectedCount(); }); // Aesthetic enhancement - make the whole label clickable with proper tactile feedback option.addEventListener('click', function(e) { // Prevent double-triggering when clicking directly on checkbox if (e.target !== checkbox) { checkbox.checked = !checkbox.checked; // Manually trigger change event const event = new Event('change'); checkbox.dispatchEvent(event); } }); }); // Update the selected count display function updateSelectedCount() { selectedCount.textContent = `${selectedCourses} course${selectedCourses !== 1 ? 's' : ''} selected (${totalCredits} credits)`; } // Handle form submission form.addEventListener('submit', function(e) { e.preventDefault(); if (selectedCourses === 0) { // Visual feedback for no selection selectedCount.style.color = '#e74c3c'; setTimeout(() => { selectedCount.style.color = ''; }, 1000); return; } // Show loading state submitBtn.classList.add('is-loading'); submitBtn.disabled = true; // Simulate processing setTimeout(() => { submitBtn.classList.remove('is-loading'); // Show success message successMessage.classList.add('show'); // Reset form after delay setTimeout(() => { successMessage.classList.remove('show'); // Reset selections options.forEach(option => { const checkbox = option.querySelector('.radio-input'); if (checkbox.checked) { checkbox.checked = false; option.classList.remove('selected'); } }); selectedCourses = 0; totalCredits = 0; updateSelectedCount(); submitBtn.disabled = false; }, 3000); }, 1500); }); // Add keyboard accessibility options.forEach(option => { option.addEventListener('keydown', function(e) { // Space or Enter key if (e.keyCode === 32 || e.keyCode === 13) { e.preventDefault(); const checkbox = option.querySelector('.radio-input'); checkbox.checked = !checkbox.checked; // Manually trigger change event const event = new Event('change'); checkbox.dispatchEvent(event); } }); // Make the option focusable option.setAttribute('tabindex', '0'); // Show recommended tag on focus too option.addEventListener('focus', function() { if (option.classList.contains('recommended')) { option.querySelector('.recommended-tag').style.transform = 'translateY(0)'; option.querySelector('.recommended-tag').style.opacity = '1'; } }); option.addEventListener('blur', function() { if (option.classList.contains('recommended')) { option.querySelector('.recommended-tag').style.transform = ''; option.querySelector('.recommended-tag').style.opacity = ''; } }); }); // Add CSS variable helper (since inline styles sometimes need this) function var(name) { return getComputedStyle(document.documentElement).getPropertyValue(name); } // Animation for shake effect when max courses reached const style = document.createElement('style'); style.textContent = ` @keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } } `; 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>Financial Dashboard - Portfolio Filter</title> <style> :root { --bg-dark: #121824; --bg-card: #1c2433; --accent-blue: #00e6ff; --accent-purple: #7d3cff; --accent-green: #0aff8c; --text-primary: #ffffff; --text-secondary: #8b97af; --border-dark: #2b3649; --shadow-glow: 0 0 15px rgba(0, 230, 255, 0.4); --chart-up: #0aff8c; --chart-down: #ff3c5f; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; } body { background-color: var(--bg-dark); color: var(--text-primary); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 100vh; padding: 20px; overflow-x: hidden; } .dashboard-container { width: 100%; max-width: 700px; display: flex; flex-direction: column; gap: 20px; } .header { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 10px; } .header h1 { font-size: 1.5rem; font-weight: 600; background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.02em; margin-bottom: 5px; } .header .date { font-size: 0.85rem; color: var(--text-secondary); } .chip { background-color: rgba(125, 60, 255, 0.15); color: var(--accent-purple); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 500; } .filter-section { background-color: var(--bg-card); border-radius: 12px; padding: 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); border: 1px solid var(--border-dark); position: relative; overflow: hidden; } .filter-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple)); } .filter-title { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; } .filter-title svg { width: 16px; height: 16px; opacity: 0.7; } .radio-group { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; } .radio-button { position: relative; margin: 0; } .radio-button input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } .radio-button label { display: flex; align-items: center; justify-content: center; padding: 10px 16px; font-size: 0.9rem; color: var(--text-secondary); background-color: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-dark); border-radius: 8px; cursor: pointer; transition: all 0.2s ease; user-select: none; min-width: 100px; text-align: center; } .radio-button input:checked + label { background-color: rgba(0, 230, 255, 0.1); color: var(--accent-blue); border-color: var(--accent-blue); box-shadow: var(--shadow-glow); } .radio-button label:hover { background-color: rgba(255, 255, 255, 0.07); } .radio-button input:disabled + label { opacity: 0.5; cursor: not-allowed; background-color: rgba(255, 255, 255, 0.02); } .data-view { background-color: var(--bg-card); border-radius: 12px; padding: 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); border: 1px solid var(--border-dark); min-height: 300px; position: relative; overflow: hidden; } .chart-container { width: 100%; height: 220px; margin-top: 20px; position: relative; } .chart { width: 100%; height: 100%; display: none; opacity: 0; transform: translateY(10px); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); } .chart.active { display: block; opacity: 1; transform: translateY(0); } .chart-line { fill: none; stroke-width: 2; stroke-linecap: round; } .chart-area { opacity: 0.1; } .view-title { font-size: 1.1rem; margin-bottom: 5px; font-weight: 500; } .view-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 15px; } .metrics { display: flex; gap: 15px; margin-top: 25px; } .metric { background-color: rgba(255, 255, 255, 0.03); border-radius: 8px; padding: 12px; flex: 1; border: 1px solid var(--border-dark); transition: all 0.3s ease; } .metric:hover { background-color: rgba(255, 255, 255, 0.07); transform: translateY(-2px); } .metric-title { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 5px; } .metric-value { font-size: 1.25rem; font-weight: 600; display: flex; align-items: center; gap: 8px; } .change { font-size: 0.8rem; font-weight: 500; display: flex; align-items: center; gap: 4px; } .change.up { color: var(--chart-up); } .change.down { color: var(--chart-down); } .skeleton { background: linear-gradient(90deg, var(--bg-card), rgba(40, 49, 70, 0.5), var(--bg-card)); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 4px; height: 16px; margin-bottom: 8px; } @keyframes skeleton-loading { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } .loading { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; position: absolute; top: 0; left: 0; background-color: rgba(28, 36, 51, 0.9); opacity: 0; visibility: hidden; transition: all 0.3s ease; } .loading.active { opacity: 1; visibility: visible; } .loader { width: 40px; height: 40px; border: 3px solid rgba(0, 230, 255, 0.3); border-radius: 50%; border-top-color: var(--accent-blue); animation: spin 1s infinite linear; } @keyframes spin { to { transform: rotate(360deg); } } .neon-glow { position: absolute; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(rgba(125, 60, 255, 0.4), transparent 70%); filter: blur(20px); opacity: 0.5; top: -50px; right: -50px; z-index: 0; } .time-selector { display: flex; gap: 10px; margin-top: 10px; } .time-button { padding: 6px 12px; background-color: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-dark); border-radius: 6px; color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; transition: all 0.2s ease; } .time-button:hover { background-color: rgba(255, 255, 255, 0.07); } .time-button.active { background-color: rgba(125, 60, 255, 0.1); color: var(--accent-purple); border-color: var(--accent-purple); } @media (max-width: 600px) { .radio-group { gap: 8px; } .radio-button label { padding: 8px 12px; font-size: 0.8rem; min-width: auto; } .metrics { flex-direction: column; gap: 10px; } .header h1 { font-size: 1.3rem; } } </style> </head> <body> <div class="dashboard-container"> <div class="header"> <div> <h1>Portfolio Analytics</h1> <div class="date">October 19, 2023</div> </div> <div class="chip">Q3 Results</div> </div> <div class="filter-section"> <div class="neon-glow"></div> <div class="filter-title"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z" /> </svg> Data View Selection </div> <div class="radio-group" id="filters"> <div class="radio-button"> <input type="radio" id="asset-allocation" name="filter" value="asset-allocation" checked> <label for="asset-allocation">Asset Allocation</label> </div> <div class="radio-button"> <input type="radio" id="performance" name="filter" value="performance"> <label for="performance">Performance</label> </div> <div class="radio-button"> <input type="radio" id="risk-analysis" name="filter" value="risk-analysis"> <label for="risk-analysis">Risk Analysis</label> </div> <div class="radio-button"> <input type="radio" id="income" name="filter" value="income"> <label for="income">Income Report</label> </div> <div class="radio-button"> <input type="radio" id="historical" name="filter" value="historical" disabled> <label for="historical">Historical Data</label> </div> </div> <div class="time-selector"> <button class="time-button active" data-time="1M">1M</button> <button class="time-button" data-time="3M">3M</button> <button class="time-button" data-time="6M">6M</button> <button class="time-button" data-time="YTD">YTD</button> <button class="time-button" data-time="1Y">1Y</button> <button class="time-button" data-time="ALL">ALL</button> </div> </div> <div class="data-view"> <div class="view-content asset-allocation active"> <h2 class="view-title">Asset Allocation</h2> <div class="view-subtitle">Portfolio distribution across asset classes</div> <div class="chart-container"> <svg class="chart active" id="asset-chart" viewBox="0 0 600 220" preserveAspectRatio="none"> <!-- Pie chart for asset allocation --> <g transform="translate(300, 110)"> <path d="M0,-100 A100,100 0 0,1 86.6,-50 L0,0 Z" fill="#00e6ff" /> <path d="M86.6,-50 A100,100 0 0,1 86.6,50 L0,0 Z" fill="#7d3cff" /> <path d="M86.6,50 A100,100 0 0,1 0,100 L0,0 Z" fill="#0aff8c" /> <path d="M0,100 A100,100 0 0,1 -86.6,50 L0,0 Z" fill="#ff3c5f" /> <path d="M-86.6,50 A100,100 0 0,1 -86.6,-50 L0,0 Z" fill="#ffb03a" /> <path d="M-86.6,-50 A100,100 0 0,1 0,-100 L0,0 Z" fill="#3d6cff" /> </g> <g transform="translate(460, 110)" class="legend"> <rect x="0" y="-60" width="12" height="12" fill="#00e6ff" /> <text x="20" y="-50" fill="#8b97af" font-size="12">Stocks (34%)</text> <rect x="0" y="-35" width="12" height="12" fill="#7d3cff" /> <text x="20" y="-25" fill="#8b97af" font-size="12">Bonds (22%)</text> <rect x="0" y="-10" width="12" height="12" fill="#0aff8c" /> <text x="20" y="0" fill="#8b97af" font-size="12">ETFs (16%)</text> <rect x="0" y="15" width="12" height="12" fill="#ff3c5f" /> <text x="20" y="25" fill="#8b97af" font-size="12">Crypto (12%)</text> <rect x="0" y="40" width="12" height="12" fill="#ffb03a" /> <text x="20" y="50" fill="#8b97af" font-size="12">Real Estate (9%)</text> <rect x="0" y="65" width="12" height="12" fill="#3d6cff" /> <text x="20" y="75" fill="#8b97af" font-size="12">Cash (7%)</text> </g> </svg> </div> <div class="metrics"> <div class="metric"> <div class="metric-title">Total Value</div> <div class="metric-value">$246,819</div> </div> <div class="metric"> <div class="metric-title">Stocks/Bonds Ratio</div> <div class="metric-value">1.55</div> </div> <div class="metric"> <div class="metric-title">Diversification Score</div> <div class="metric-value">7.8/10</div> </div> </div> </div> <div class="view-content performance"> <h2 class="view-title">Performance Overview</h2> <div class="view-subtitle">Key metrics and growth over time</div> <div class="chart-container"> <svg class="chart" id="performance-chart" viewBox="0 0 600 220" preserveAspectRatio="none"> <!-- Grid lines --> <line x1="40" y1="20" x2="40" y2="180" stroke="#2b3649" stroke-width="1" /> <line x1="40" y1="180" x2="580" y2="180" stroke="#2b3649" stroke-width="1" /> <line x1="40" y1="60" x2="580" y2="60" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> <line x1="40" y1="100" x2="580" y2="100" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> <line x1="40" y1="140" x2="580" y2="140" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> <!-- Labels --> <text x="30" y="20" text-anchor="end" fill="#8b97af" font-size="10">+20%</text> <text x="30" y="60" text-anchor="end" fill="#8b97af" font-size="10">+15%</text> <text x="30" y="100" text-anchor="end" fill="#8b97af" font-size="10">+10%</text> <text x="30" y="140" text-anchor="end" fill="#8b97af" font-size="10">+5%</text> <text x="30" y="180" text-anchor="end" fill="#8b97af" font-size="10">0%</text> <text x="40" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Apr</text> <text x="150" y="195" text-anchor="middle" fill="#8b97af" font-size="10">May</text> <text x="260" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Jun</text> <text x="370" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Jul</text> <text x="480" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Aug</text> <text x="580" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Sep</text> <!-- Portfolio Performance Line --> <path class="chart-area" d="M40,150 L150,140 L260,100 L370,70 L480,60 L580,40 L580,180 L40,180 Z" fill="url(#portfolioGradient)" /> <path class="chart-line" d="M40,150 L150,140 L260,100 L370,70 L480,60 L580,40" stroke="#00e6ff" /> <!-- Market Benchmark Line --> <path class="chart-line" d="M40,160 L150,150 L260,130 L370,110 L480,100 L580,90" stroke="#7d3cff" stroke-dasharray="4" /> <!-- Gradients --> <defs> <linearGradient id="portfolioGradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" stop-color="#00e6ff" stop-opacity="0.4" /> <stop offset="100%" stop-color="#00e6ff" stop-opacity="0" /> </linearGradient> </defs> <!-- Legend --> <rect x="450" y="20" width="12" height="2" fill="#00e6ff" /> <text x="470" y="24" fill="#8b97af" font-size="10">Your Portfolio</text> <rect x="450" y="35" width="12" height="2" fill="#7d3cff" /> <text x="470" y="39" fill="#8b97af" font-size="10">S&P 500</text> </svg> </div> <div class="metrics"> <div class="metric"> <div class="metric-title">Q3 Return</div> <div class="metric-value">+16.4% <span class="change up">↑4.2%</span></div> </div> <div class="metric"> <div class="metric-title">Annualized Return</div> <div class="metric-value">12.7%</div> </div> <div class="metric"> <div class="metric-title">Alpha (vs S&P 500)</div> <div class="metric-value">+3.8%</div> </div> </div> </div> <div class="view-content risk-analysis"> <h2 class="view-title">Risk Assessment</h2> <div class="view-subtitle">Portfolio volatility and drawdown metrics</div> <div class="chart-container"> <svg class="chart" id="risk-chart" viewBox="0 0 600 220" preserveAspectRatio="none"> <!-- Grid lines --> <line x1="40" y1="20" x2="40" y2="180" stroke="#2b3649" stroke-width="1" /> <line x1="40" y1="180" x2="580" y2="180" stroke="#2b3649" stroke-width="1" /> <!-- Labels --> <text x="30" y="30" text-anchor="end" fill="#8b97af" font-size="10">High</text> <text x="30" y="105" text-anchor="end" fill="#8b97af" font-size="10">Med</text> <text x="30" y="180" text-anchor="end" fill="#8b97af" font-size="10">Low</text> <!-- Risk blocks with tooltips --> <g> <rect x="70" y="40" width="100" height="50" fill="#ff3c5f" fill-opacity="0.6" rx="4" /> <text x="120" y="75" text-anchor="middle" fill="#ffffff" font-size="12" font-weight="bold">Crypto</text> <text x="120" y="92" text-anchor="middle" fill="#ffffff" font-size="10">Beta: 1.85</text> </g> <g> <rect x="190" y="100" width="100" height="50" fill="#00e6ff" fill-opacity="0.6" rx="4" /> <text x="240" y="135" text-anchor="middle" fill="#ffffff" font-size="12" font-weight="bold">Stocks</text> <text x="240" y="152" text-anchor="middle" fill="#ffffff" font-size="10">Beta: 1.05</text> </g> <g> <rect x="310" y="60" width="100" height="50" fill="#ffb03a" fill-opacity="0.6" rx="4" /> <text x="360" y="95" text-anchor="middle" fill="#ffffff" font-size="12" font-weight="bold">Real Estate</text> <text x="360" y="112" text-anchor="middle" fill="#ffffff" font-size="10">Beta: 1.25</text> </g> <g> <rect x="430" y="140" width="100" height="30" fill="#7d3cff" fill-opacity="0.6" rx="4" /> <text x="480" y="160" text-anchor="middle" fill="#ffffff" font-size="12" font-weight="bold">Bonds</text> <text x="480" y="175" text-anchor="middle" fill="#ffffff" font-size="10">Beta: 0.25</text> </g> </svg> </div> <div class="metrics"> <div class="metric"> <div class="metric-title">Portfolio Beta</div> <div class="metric-value">1.12 <span class="change down">↓0.08</span></div> </div> <div class="metric"> <div class="metric-title">Volatility (30D)</div> <div class="metric-value">14.3%</div> </div> <div class="metric"> <div class="metric-title">Max Drawdown</div> <div class="metric-value">-8.4%</div> </div> </div> </div> <div class="view-content income"> <h2 class="view-title">Income Analysis</h2> <div class="view-subtitle">Dividend and yield performance</div> <div class="chart-container"> <svg class="chart" id="income-chart" viewBox="0 0 600 220" preserveAspectRatio="none"> <!-- Bar chart for income --> <g class="grid"> <line x1="50" y1="180" x2="550" y2="180" stroke="#2b3649" stroke-width="1" /> <line x1="50" y1="150" x2="550" y2="150" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> <line x1="50" y1="120" x2="550" y2="120" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> <line x1="50" y1="90" x2="550" y2="90" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> <line x1="50" y1="60" x2="550" y2="60" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> <line x1="50" y1="30" x2="550" y2="30" stroke="#2b3649" stroke-width="0.5" stroke-dasharray="4" /> </g> <!-- Labels --> <text x="40" y="185" text-anchor="end" fill="#8b97af" font-size="10">$0</text> <text x="40" y="155" text-anchor="end" fill="#8b97af" font-size="10">$500</text> <text x="40" y="125" text-anchor="end" fill="#8b97af" font-size="10">$1000</text> <text x="40" y="95" text-anchor="end" fill="#8b97af" font-size="10">$1500</text> <text x="40" y="65" text-anchor="end" fill="#8b97af" font-size="10">$2000</text> <text x="40" y="35" text-anchor="end" fill="#8b97af" font-size="10">$2500</text> <!-- Bars --> <g class="bar-group"> <!-- April --> <rect x="80" y="140" width="30" height="40" fill="#0aff8c" rx="4" /> <text x="95" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Apr</text> <text x="95" y="135" text-anchor="middle" fill="white" font-size="10">$592</text> <!-- May --> <rect x="160" y="125" width="30" height="55" fill="#0aff8c" rx="4" /> <text x="175" y="195" text-anchor="middle" fill="#8b97af" font-size="10">May</text> <text x="175" y="120" text-anchor="middle" fill="white" font-size="10">$764</text> <!-- June --> <rect x="240" y="110" width="30" height="70" fill="#0aff8c" rx="4" /> <text x="255" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Jun</text> <text x="255" y="105" text-anchor="middle" fill="white" font-size="10">$986</text> <!-- July --> <rect x="320" y="80" width="30" height="100" fill="#0aff8c" rx="4" /> <text x="335" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Jul</text> <text x="335" y="75" text-anchor="middle" fill="white" font-size="10">$1,425</text> <!-- August --> <rect x="400" y="60" width="30" height="120" fill="#0aff8c" rx="4" /> <text x="415" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Aug</text> <text x="415" y="55" text-anchor="middle" fill="white" font-size="10">$1,712</text> <!-- September --> <rect x="480" y="40" width="30" height="140" fill="#0aff8c" rx="4" /> <text x="495" y="195" text-anchor="middle" fill="#8b97af" font-size="10">Sep</text> <text x="495" y="35" text-anchor="middle" fill="white" font-size="10">$1,979</text> </g> </svg> </div> <div class="metrics"> <div class="metric"> <div class="metric-title">Total Income (Q3)</div> <div class="metric-value">$7,458 <span class="change up">↑23.4%</span></div> </div> <div class="metric"> <div class="metric-title">Dividend Yield</div> <div class="metric-value">3.1%</div> </div> <div class="metric"> <div class="metric-title">Monthly Avg</div> <div class="metric-value">$1,243</div> </div> </div> </div> <div class="view-content historical"> <h2 class="view-title">Historical Data</h2> <div class="view-subtitle">Long-term performance trends</div> <div class="chart-container"> <!-- Only showing a skeleton since this is disabled --> <div class="skeleton" style="width: 100%; height: 30px; margin-top: 20px;"></div> <div class="skeleton" style="width: 90%; height: 30px; margin-top: 10px;"></div> <div class="skeleton" style="width: 95%; height: 30px; margin-top: 10px;"></div> <div class="skeleton" style="width: 85%; height: 30px; margin-top: 10px;"></div> <div class="skeleton" style="width: 100%; height: 30px; margin-top: 10px;"></div> </div> </div> <div class="loading" id="loading-indicator"> <div class="loader"></div> <div>Loading data...</div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const radioButtons = document.querySelectorAll('input[name="filter"]'); const viewContents = document.querySelectorAll('.view-content'); const loadingIndicator = document.getElementById('loading-indicator'); const timeButtons = document.querySelectorAll('.time-button'); // Handle radio button changes radioButtons.forEach(radio => { radio.addEventListener('change', function() { if (this.disabled) return; const selectedValue = this.value; // Show loading indicator loadingIndicator.classList.add('active'); // Simulate data loading setTimeout(() => { // Hide all content first viewContents.forEach(content => { content.classList.remove('active'); // Hide charts within each content const charts = content.querySelectorAll('.chart'); charts.forEach(chart => chart.classList.remove('active')); }); // Show selected content const selectedContent = document.querySelector(`.view-content.${selectedValue}`); selectedContent.classList.add('active'); // Show charts within selected content with a slight delay for animation setTimeout(() => { const charts = selectedContent.querySelectorAll('.chart'); charts.forEach(chart => chart.classList.add('active')); }, 100); // Hide loading indicator loadingIndicator.classList.remove('active'); }, 800); }); }); // Time period selector timeButtons.forEach(button => { button.addEventListener('click', function() { timeButtons.forEach(btn => btn.classList.remove('active')); this.classList.add('active'); // Show loading indicator loadingIndicator.classList.add('active'); // Simulate data change setTimeout(() => { loadingIndicator.classList.remove('active'); }, 600); }); }); // Hover effects for chart elements const charts = document.querySelectorAll('.chart'); charts.forEach(chart => { const interactiveElements = chart.querySelectorAll('rect:not(.skeleton), path.chart-line'); interactiveElements.forEach(element => { element.addEventListener('mouseenter', function() { this.style.opacity = '0.8'; this.style.transform = 'scale(1.02)'; this.style.transition = 'all 0.3s ease'; }); element.addEventListener('mouseleave', function() { this.style.opacity = '1'; this.style.transform = 'scale(1)'; }); }); }); // Initialize the first view document.querySelector('input[name="filter"]:checked').dispatchEvent(new Event('change')); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Pulse - Music Streaming</title> <style> @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap'); :root { --primary: #6200EA; --secondary: #03DAC6; --tertiary: #FF0166; --background: #121212; --surface: #1E1E1E; --text: #E1E1E1; --subtext: #B0B0B0; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; transition: all 0.3s ease; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: var(--background); color: var(--text); overflow-x: hidden; } .app-container { width: 100%; max-width: 700px; height: 700px; padding: 2rem; display: flex; flex-direction: column; position: relative; overflow: hidden; } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; z-index: 2; } .app-title { font-size: 1.8rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.5rem; } .app-title span { color: var(--tertiary); } .background-waves { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.05; pointer-events: none; } .background-wave { position: absolute; border-radius: 40%; animation: wave 15s infinite linear; } .wave1 { width: 800px; height: 800px; background: var(--primary); top: -400px; left: -200px; } .wave2 { width: 700px; height: 700px; background: var(--secondary); bottom: -300px; right: -200px; animation-delay: -5s; } .wave3 { width: 500px; height: 500px; background: var(--tertiary); bottom: -250px; left: -150px; animation-delay: -8s; } @keyframes wave { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .playlist-container { flex: 1; display: flex; flex-direction: column; gap: 1.2rem; z-index: 2; max-height: 550px; overflow-y: auto; padding-right: 0.5rem; scrollbar-width: thin; scrollbar-color: var(--primary) transparent; } .playlist-container::-webkit-scrollbar { width: 6px; } .playlist-container::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; } .playlist-container::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; } .section-title { font-size: 1.4rem; font-weight: 600; margin-top: 0.5rem; margin-bottom: 0.8rem; color: var(--text); display: flex; align-items: center; gap: 0.5rem; } .playlist-label { position: relative; display: block; background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 1.2rem; cursor: pointer; overflow: hidden; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } .playlist-radio { position: absolute; opacity: 0; } .playlist-card { display: flex; align-items: center; gap: 1.2rem; } .playlist-image { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); transform: scale(1); transition: transform 0.3s ease; } .playlist-info { flex: 1; } .playlist-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text); } .playlist-subtitle { font-size: 0.9rem; color: var(--subtext); margin-bottom: 0.6rem; } .playlist-stats { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--subtext); } .playlist-stat { display: flex; align-items: center; gap: 0.3rem; } .color-indicator { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5rem; } .indigo { background-color: var(--primary); } .teal { background-color: var(--secondary); } .pink { background-color: var(--tertiary); } .playlist-radio:checked + .playlist-card .playlist-image { transform: scale(1.05); } .playlist-label::before { content: ''; position: absolute; inset: 0; border-radius: 12px; padding: 2px; background: linear-gradient( 45deg, transparent 50%, rgba(255, 255, 255, 0.03) 50% ); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; } .playlist-label:hover::before { opacity: 1; } .playlist-indicator { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); flex-shrink: 0; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; overflow: hidden; } .indicator-circle { width: 0%; height: 0%; border-radius: 50%; background: var(--primary); transition: all 0.3s cubic-bezier(0.17, 0.67, 0.83, 0.67); } .playlist-radio:checked ~ .playlist-indicator { border-color: var(--primary); } .playlist-radio:checked ~ .playlist-indicator .indicator-circle { width: 100%; height: 100%; } .vibe-indigo .playlist-radio:checked ~ .playlist-indicator { border-color: var(--primary); } .vibe-indigo .playlist-radio:checked ~ .playlist-indicator .indicator-circle { background: var(--primary); } .vibe-teal .playlist-radio:checked ~ .playlist-indicator { border-color: var(--secondary); } .vibe-teal .playlist-radio:checked ~ .playlist-indicator .indicator-circle { background: var(--secondary); } .vibe-pink .playlist-radio:checked ~ .playlist-indicator { border-color: var(--tertiary); } .vibe-pink .playlist-radio:checked ~ .playlist-indicator .indicator-circle { background: var(--tertiary); } .playlist-label { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease; } .playlist-radio:checked + .playlist-card { animation: pulse 0.5s ease-in-out; } .vibe-indigo.playlist-label:hover { background: rgba(98, 0, 234, 0.1); } .vibe-teal.playlist-label:hover { background: rgba(3, 218, 198, 0.1); } .vibe-pink.playlist-label:hover { background: rgba(255, 1, 102, 0.1); } .vibe-indigo .playlist-radio:checked ~ .playlist-card .playlist-title { color: var(--primary); } .vibe-teal .playlist-radio:checked ~ .playlist-card .playlist-title { color: var(--secondary); } .vibe-pink .playlist-radio:checked ~ .playlist-card .playlist-title { color: var(--tertiary); } .audio-visualizer { display: flex; align-items: center; height: 15px; gap: 2px; margin-left: auto; opacity: 0; transition: opacity 0.5s ease; } .visualizer-bar { width: 3px; height: 100%; background: currentColor; border-radius: 6px; transform: scaleY(0.3); animation: sound-wave 0.8s infinite ease alternate; } .visualizer-bar:nth-child(2) { animation-delay: 0.1s; } .visualizer-bar:nth-child(3) { animation-delay: 0.2s; } .visualizer-bar:nth-child(4) { animation-delay: 0.3s; } .visualizer-bar:nth-child(5) { animation-delay: 0.4s; } .playlist-radio:checked ~ .audio-visualizer { opacity: 1; } .vibe-indigo .playlist-radio:checked ~ .audio-visualizer { color: var(--primary); } .vibe-teal .playlist-radio:checked ~ .audio-visualizer { color: var(--secondary); } .vibe-pink .playlist-radio:checked ~ .audio-visualizer { color: var(--tertiary); } @keyframes sound-wave { 0% { transform: scaleY(0.3); } 100% { transform: scaleY(1); } } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } } .now-playing { background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 1rem; margin-top: 1.5rem; display: flex; align-items: center; gap: 1rem; z-index: 2; transition: all 0.3s ease; opacity: 0; transform: translateY(20px); height: 0; overflow: hidden; padding: 0; } .now-playing.active { opacity: 1; transform: translateY(0); height: auto; padding: 1rem; } .now-playing-image { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; } .now-playing-info { flex: 1; } .now-playing-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; } .now-playing-artist { font-size: 0.8rem; color: var(--subtext); } .player-controls { display: flex; align-items: center; gap: 0.5rem; } .control-btn { background: none; border: none; color: var(--text); font-size: 1.2rem; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s ease; } .control-btn:hover { background: rgba(255, 255, 255, 0.1); } .play-btn { background: rgba(255, 255, 255, 0.1); width: 45px; height: 45px; border-radius: 50%; } .play-btn:hover { background: var(--primary); } @media (max-width: 600px) { .app-container { padding: 1.5rem; } .playlist-card { gap: 0.8rem; } .playlist-image { width: 50px; height: 50px; } .playlist-title { font-size: 1rem; } .playlist-subtitle { font-size: 0.8rem; } .playlist-stats { font-size: 0.7rem; flex-wrap: wrap; } } /* Icon Styles */ .icon { display: inline-block; width: 24px; height: 24px; stroke-width: 0; stroke: currentColor; fill: currentColor; flex-shrink: 0; } .icon-sm { width: 18px; height: 18px; } .icon-xs { width: 16px; height: 16px; } .logo { width: 28px; height: 28px; background: linear-gradient(45deg, var(--tertiary), var(--primary)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 8px; } .logo::before { content: ''; width: 10px; height: 10px; background: var(--background); border-radius: 50%; } </style> </head> <body> <div class="app-container"> <div class="background-waves"> <div class="background-wave wave1"></div> <div class="background-wave wave2"></div> <div class="background-wave wave3"></div> </div> <div class="header"> <h1 class="app-title"> <div class="logo"></div> Pulse<span>.</span> </h1> <svg class="icon" viewBox="0 0 24 24"> <path d="M12 15.5A3.5 3.5 0 0 1 8.5 12 3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97 0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1 0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z"></path> </svg> </div> <h2 class="section-title"> <svg class="icon" viewBox="0 0 24 24"> <path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-3 5h-2v5.37c0 1.27-.9 2.44-2.16 2.6-1.69.23-3.11-1.25-2.8-2.95.2-1.1 1.18-1.95 2.3-2.02.63-.04 1.2.16 1.66.51V5h3v2zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z"></path> </svg> Select Your Vibe </h2> <div class="playlist-container"> <label class="playlist-label vibe-indigo"> <input type="radio" name="playlist" class="playlist-radio" data-title="Late Night Beats" data-artist="Pulse Electronica" data-image="https://images.unsplash.com/photo-1614149162883-504ce4d13909?q=80&w=2874&auto=format&fit=crop"> <div class="playlist-card"> <img src="https://images.unsplash.com/photo-1614149162883-504ce4d13909?q=80&w=2874&auto=format&fit=crop" alt="Late Night Beats" class="playlist-image"> <div class="playlist-info"> <h3 class="playlist-title"><span class="color-indicator indigo"></span>Late Night Beats</h3> <p class="playlist-subtitle">Chill electronic vibes for focused work or relaxation</p> <div class="playlist-stats"> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6zm-2 16c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path> </svg> 42 tracks </span> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1.5-4.5l6-4.5-6-4.5v9z"></path> </svg> 3:45:20 </span> </div> </div> </div> <div class="playlist-indicator"> <div class="indicator-circle"></div> </div> <div class="audio-visualizer"> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> </div> </label> <label class="playlist-label vibe-teal"> <input type="radio" name="playlist" class="playlist-radio" data-title="Morning Energy" data-artist="Sunshine Collective" data-image="https://images.unsplash.com/photo-1514525253161-7a46d19cd819?q=80&w=2874&auto=format&fit=crop"> <div class="playlist-card"> <img src="https://images.unsplash.com/photo-1514525253161-7a46d19cd819?q=80&w=2874&auto=format&fit=crop" alt="Morning Energy" class="playlist-image"> <div class="playlist-info"> <h3 class="playlist-title"><span class="color-indicator teal"></span>Morning Energy</h3> <p class="playlist-subtitle">Upbeat tunes to kickstart your day with positive vibes</p> <div class="playlist-stats"> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6zm-2 16c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path> </svg> 38 tracks </span> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1.5-4.5l6-4.5-6-4.5v9z"></path> </svg> 2:15:33 </span> </div> </div> </div> <div class="playlist-indicator"> <div class="indicator-circle"></div> </div> <div class="audio-visualizer"> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> </div> </label> <label class="playlist-label vibe-pink"> <input type="radio" name="playlist" class="playlist-radio" data-title="Workout Intensity" data-artist="Fitness Mix" data-image="https://images.unsplash.com/photo-1517836357463-d25dfeac3438?q=80&w=2940&auto=format&fit=crop"> <div class="playlist-card"> <img src="https://images.unsplash.com/photo-1517836357463-d25dfeac3438?q=80&w=2940&auto=format&fit=crop" alt="Workout Intensity" class="playlist-image"> <div class="playlist-info"> <h3 class="playlist-title"><span class="color-indicator pink"></span>Workout Intensity</h3> <p class="playlist-subtitle">High-energy beats to power your workout sessions</p> <div class="playlist-stats"> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6zm-2 16c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path> </svg> 45 tracks </span> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1.5-4.5l6-4.5-6-4.5v9z"></path> </svg> 2:50:15 </span> </div> </div> </div> <div class="playlist-indicator"> <div class="indicator-circle"></div> </div> <div class="audio-visualizer"> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> </div> </label> <label class="playlist-label vibe-indigo"> <input type="radio" name="playlist" class="playlist-radio" data-title="Jazz Lounge" data-artist="Smooth Collective" data-image="https://images.unsplash.com/photo-1511735111819-9a3f7709049c?q=80&w=3387&auto=format&fit=crop"> <div class="playlist-card"> <img src="https://images.unsplash.com/photo-1511735111819-9a3f7709049c?q=80&w=3387&auto=format&fit=crop" alt="Jazz Lounge" class="playlist-image"> <div class="playlist-info"> <h3 class="playlist-title"><span class="color-indicator indigo"></span>Jazz Lounge</h3> <p class="playlist-subtitle">Smooth jazz classics for a sophisticated atmosphere</p> <div class="playlist-stats"> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6zm-2 16c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path> </svg> 33 tracks </span> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1.5-4.5l6-4.5-6-4.5v9z"></path> </svg> 4:10:45 </span> </div> </div> </div> <div class="playlist-indicator"> <div class="indicator-circle"></div> </div> <div class="audio-visualizer"> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> </div> </label> <label class="playlist-label vibe-teal"> <input type="radio" name="playlist" class="playlist-radio" data-title="Focus Flow" data-artist="Deep Concentration" data-image="https://images.unsplash.com/photo-1470225620780-dba8ba36b745?q=80&w=2940&auto=format&fit=crop"> <div class="playlist-card"> <img src="https://images.unsplash.com/photo-1470225620780-dba8ba36b745?q=80&w=2940&auto=format&fit=crop" alt="Focus Flow" class="playlist-image"> <div class="playlist-info"> <h3 class="playlist-title"><span class="color-indicator teal"></span>Focus Flow</h3> <p class="playlist-subtitle">Instrumental tracks to enhance concentration and productivity</p> <div class="playlist-stats"> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6zm-2 16c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path> </svg> 28 tracks </span> <span class="playlist-stat"> <svg class="icon icon-xs" viewBox="0 0 24 24"> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1.5-4.5l6-4.5-6-4.5v9z"></path> </svg> 5:20:10 </span> </div> </div> </div> <div class="playlist-indicator"> <div class="indicator-circle"></div> </div> <div class="audio-visualizer"> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> <div class="visualizer-bar"></div> </div> </label> </div> <div class="now-playing" id="nowPlaying"> <img id="nowPlayingImage" src="" alt="Now Playing" class="now-playing-image"> <div class="now-playing-info"> <h3 class="now-playing-title" id="nowPlayingTitle"></h3> <p class="now-playing-artist" id="nowPlayingArtist"></p> </div> <div class="player-controls"> <button class="control-btn"> <svg class="icon" viewBox="0 0 24 24"> <path d="M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zm3.66 6.82l5.77 4.07c.66.47 1.58-.01 1.58-.82V7.93c0-.81-.91-1.28-1.58-.82l-5.77 4.07c-.57.4-.57 1.24 0 1.64z"></path> </svg> </button> <button class="control-btn play-btn"> <svg class="icon" viewBox="0 0 24 24"> <path d="M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"></path> </svg> </button> <button class="control-btn"> <svg class="icon" viewBox="0 0 24 24"> <path d="M7.58 16.89l5.77-4.07c.56-.4.56-1.24 0-1.63L7.58 7.11C6.91 6.65 6 7.12 6 7.93v8.14c0 .81.91 1.28 1.58.82zM16 7c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1s-1-.45-1-1V8c0-.55.45-1 1-1z"></path> </svg> </button> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const radios = document.querySelectorAll('.playlist-radio'); const nowPlaying = document.getElementById('nowPlaying'); const nowPlayingTitle = document.getElementById('nowPlayingTitle'); const nowPlayingArtist = document.getElementById('nowPlayingArtist'); const nowPlayingImage = document.getElementById('nowPlayingImage'); // Add click sound effect function playSound() { const context = new (window.AudioContext || window.webkitAudioContext)(); const oscillator = context.createOscillator(); const gain = context.createGain(); oscillator.connect(gain); gain.connect(context.destination); oscillator.type = 'sine'; oscillator.frequency.value = 440; gain.gain.value = 0.1; oscillator.start(); gain.gain.exponentialRampToValueAtTime(0.001, context.currentTime + 0.3); oscillator.stop(context.currentTime + 0.3); } // Add selecting effect radios.forEach(radio => { radio.addEventListener('change', function() { if (this.checked) { try { playSound(); } catch(e) { console.log('Audio context could not be created'); } // Set now playing info const title = this.dataset.title; const artist = this.dataset.artist; const image = this.dataset.image; nowPlayingTitle.textContent = title; nowPlayingArtist.textContent = artist; nowPlayingImage.src = image; nowPlaying.classList.add('active'); // Add micro-animation for selection const label = this.closest('.playlist-label'); label.style.transform = 'scale(1.03)'; setTimeout(() => { label.style.transform = 'scale(1)'; },
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Privacy Settings</title> <style> :root { --primary: #6C63FF; --secondary: #FF6B8B; --tertiary: #45CAFF; --quaternary: #FFD166; --background: #f9f7fe; --text: #2d2d42; --success: #4CAF50; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: var(--background); color: var(--text); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; } .container { width: 100%; max-width: 550px; background: white; border-radius: 24px; padding: 40px; box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); transform: translateY(0); transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; position: relative; } .container:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(50, 50, 93, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1); } h1 { font-size: 28px; margin-bottom: 10px; color: var(--text); position: relative; display: inline-block; } h1::after { content: ''; position: absolute; width: 40%; height: 4px; background: var(--secondary); bottom: -8px; left: 0; border-radius: 2px; } p.description { margin-bottom: 30px; color: rgba(45, 45, 66, 0.8); line-height: 1.6; font-size: 16px; } .privacy-level { margin-bottom: 40px; } .privacy-level h2 { font-size: 20px; margin-bottom: 20px; display: flex; align-items: center; color: var(--text); } .privacy-level h2 svg { margin-right: 10px; } .radio-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 20px; } .radio-option { position: relative; cursor: pointer; height: 100%; } .radio-option input { position: absolute; opacity: 0; cursor: pointer; } .radio-option .radio-design { display: flex; flex-direction: column; padding: 16px; border-radius: 16px; background: white; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; height: 100%; border: 2px solid transparent; } .option-posts .radio-design { border-left: 4px solid var(--primary); } .option-profile .radio-design { border-left: 4px solid var(--secondary); } .option-messages .radio-design { border-left: 4px solid var(--tertiary); } .option-activity .radio-design { border-left: 4px solid var(--quaternary); } .radio-option:hover .radio-design { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); } .radio-option input:checked + .radio-design { border: 2px solid var(--primary); background: rgba(108, 99, 255, 0.05); } .option-posts input:checked + .radio-design { border-color: var(--primary); } .option-profile input:checked + .radio-design { border-color: var(--secondary); } .option-messages input:checked + .radio-design { border-color: var(--tertiary); } .option-activity input:checked + .radio-design { border-color: var(--quaternary); } .radio-title { display: flex; align-items: center; margin-bottom: 8px; } .radio-title h3 { font-size: 16px; margin-left: 12px; color: var(--text); } .radio-description { font-size: 14px; color: rgba(45, 45, 66, 0.7); line-height: 1.4; margin-left: 32px; } .radio-icon { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); display: flex; justify-content: center; align-items: center; color: white; transition: transform 0.3s ease; } .option-posts .radio-icon { background: var(--primary); } .option-profile .radio-icon { background: var(--secondary); } .option-messages .radio-icon { background: var(--tertiary); } .option-activity .radio-icon { background: var(--quaternary); } .radio-option:hover .radio-icon { animation: pulse 1s infinite; } @keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(108, 99, 255, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 99, 255, 0); } } .option-posts:hover .radio-icon { animation: pulse-primary 1s infinite; } .option-profile:hover .radio-icon { animation: pulse-secondary 1s infinite; } .option-messages:hover .radio-icon { animation: pulse-tertiary 1s infinite; } .option-activity:hover .radio-icon { animation: pulse-quaternary 1s infinite; } @keyframes pulse-primary { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(108, 99, 255, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 99, 255, 0); } } @keyframes pulse-secondary { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 139, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 107, 139, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 139, 0); } } @keyframes pulse-tertiary { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(69, 202, 255, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(69, 202, 255, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(69, 202, 255, 0); } } @keyframes pulse-quaternary { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 209, 102, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 209, 102, 0); } } button { background: var(--primary); color: white; border: none; padding: 12px 24px; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3); display: block; width: 100%; margin-top: 10px; } button:hover { background: #5a52e5; box-shadow: 0 6px 15px rgba(108, 99, 255, 0.4); transform: translateY(-2px); } button:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3); } .success-message { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: var(--success); color: white; padding: 16px 24px; border-radius: 12px; font-weight: 500; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); display: flex; align-items: center; transition: bottom 0.5s ease; z-index: 100; } .success-message.show { bottom: 30px; } .success-message svg { margin-right: 12px; } .privacy-emoji { font-size: 22px; margin-right: 10px; } .bubble { position: absolute; border-radius: 50%; opacity: 0.8; z-index: -1; } .bubble-1 { width: 100px; height: 100px; background: linear-gradient(135deg, var(--primary) 0%, transparent 70%); top: -30px; left: -30px; } .bubble-2 { width: 60px; height: 60px; background: linear-gradient(135deg, var(--secondary) 0%, transparent 70%); bottom: 30px; right: 30px; } .bubble-3 { width: 40px; height: 40px; background: linear-gradient(135deg, var(--tertiary) 0%, transparent 70%); top: 50px; right: 10px; } @media (max-width: 580px) { .container { padding: 30px 20px; } h1 { font-size: 24px; } .radio-container { grid-template-columns: 1fr; } } </style> </head> <body> <div class="container"> <div class="bubble bubble-1"></div> <div class="bubble bubble-2"></div> <div class="bubble bubble-3"></div> <h1>Privacy Playground</h1> <p class="description">Customize who sees what on your social timeline. Your content, your rules – make your online space feel just right!</p> <div class="privacy-level"> <h2> <span class="privacy-emoji">🔐</span> Who can see your posts? </h2> <div class="radio-container"> <label class="radio-option option-posts"> <input type="radio" name="posts-privacy" value="public" checked> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="white"/> </svg> </div> <h3>Public</h3> </div> <p class="radio-description">Anyone on or off SocialVibe can see your posts and profile.</p> </div> </label> <label class="radio-option option-posts"> <input type="radio" name="posts-privacy" value="friends"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 11C17.66 11 18.99 9.66 18.99 8C18.99 6.34 17.66 5 16 5C14.34 5 13 6.34 13 8C13 9.66 14.34 11 16 11ZM8 11C9.66 11 10.99 9.66 10.99 8C10.99 6.34 9.66 5 8 5C6.34 5 5 6.34 5 8C5 9.66 6.34 11 8 11ZM8 13C5.67 13 1 14.17 1 16.5V19H15V16.5C15 14.17 10.33 13 8 13ZM16 13C15.71 13 15.38 13.02 15.03 13.05C16.19 13.89 17 15.02 17 16.5V19H23V16.5C23 14.17 18.33 13 16 13Z" fill="white"/> </svg> </div> <h3>Friends Only</h3> </div> <p class="radio-description">Only people you've connected with can see what you post.</p> </div> </label> <label class="radio-option option-posts"> <input type="radio" name="posts-privacy" value="private"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 17C13.1 17 14 16.1 14 15C14 13.9 13.1 13 12 13C10.9 13 10 13.9 10 15C10 16.1 10.9 17 12 17ZM18 8H17V6C17 3.24 14.76 1 12 1C9.24 1 7 3.24 7 6V8H6C4.9 8 4 8.9 4 10V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V10C20 8.9 19.1 8 18 8ZM8.9 6C8.9 4.29 10.29 2.9 12 2.9C13.71 2.9 15.1 4.29 15.1 6V8H8.9V6ZM18 20H6V10H18V20Z" fill="white"/> </svg> </div> <h3>Private</h3> </div> <p class="radio-description">Only you can see your posts. Perfect for personal thoughts.</p> </div> </label> </div> </div> <div class="privacy-level"> <h2> <span class="privacy-emoji">👤</span> Who can see your profile info? </h2> <div class="radio-container"> <label class="radio-option option-profile"> <input type="radio" name="profile-privacy" value="public" checked> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="white"/> </svg> </div> <h3>Anyone</h3> </div> <p class="radio-description">Your full profile is visible to everyone on SocialVibe.</p> </div> </label> <label class="radio-option option-profile"> <input type="radio" name="profile-privacy" value="limited"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 5C13.66 5 15 6.34 15 8C15 9.66 13.66 11 12 11C10.34 11 9 9.66 9 8C9 6.34 10.34 5 12 5ZM12 19.2C9.5 19.2 7.29 17.92 6 15.98C6.03 13.99 10 12.9 12 12.9C13.99 12.9 17.97 13.99 18 15.98C16.71 17.92 14.5 19.2 12 19.2Z" fill="white"/> </svg> </div> <h3>Basic Info Only</h3> </div> <p class="radio-description">Only your name and profile photo are visible to non-friends.</p> </div> </label> <label class="radio-option option-profile"> <input type="radio" name="profile-privacy" value="friends"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 11C17.66 11 18.99 9.66 18.99 8C18.99 6.34 17.66 5 16 5C14.34 5 13 6.34 13 8C13 9.66 14.34 11 16 11ZM8 11C9.66 11 10.99 9.66 10.99 8C10.99 6.34 9.66 5 8 5C6.34 5 5 6.34 5 8C5 9.66 6.34 11 8 11ZM8 13C5.67 13 1 14.17 1 16.5V19H15V16.5C15 14.17 10.33 13 8 13ZM16 13C15.71 13 15.38 13.02 15.03 13.05C16.19 13.89 17 15.02 17 16.5V19H23V16.5C23 14.17 18.33 13 16 13Z" fill="white"/> </svg> </div> <h3>Friends Only</h3> </div> <p class="radio-description">Your profile details are only visible to people you connect with.</p> </div> </label> </div> </div> <div class="privacy-level"> <h2> <span class="privacy-emoji">💬</span> Who can message you? </h2> <div class="radio-container"> <label class="radio-option option-messages"> <input type="radio" name="message-privacy" value="anyone" checked> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M20 2H4C2.9 2 2.01 2.9 2.01 4L2 22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM6 9H18V11H6V9ZM14 14H6V12H14V14ZM18 8H6V6H18V8Z" fill="white"/> </svg> </div> <h3>Anyone</h3> </div> <p class="radio-description">Open inbox! Anyone on SocialVibe can send you messages.</p> </div> </label> <label class="radio-option option-messages"> <input type="radio" name="message-privacy" value="friends"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 11C17.66 11 18.99 9.66 18.99 8C18.99 6.34 17.66 5 16 5C14.34 5 13 6.34 13 8C13 9.66 14.34 11 16 11ZM8 11C9.66 11 10.99 9.66 10.99 8C10.99 6.34 9.66 5 8 5C6.34 5 5 6.34 5 8C5 9.66 6.34 11 8 11ZM8 13C5.67 13 1 14.17 1 16.5V19H15V16.5C15 14.17 10.33 13 8 13ZM16 13C15.71 13 15.38 13.02 15.03 13.05C16.19 13.89 17 15.02 17 16.5V19H23V16.5C23 14.17 18.33 13 16 13Z" fill="white"/> </svg> </div> <h3>Friends Only</h3> </div> <p class="radio-description">Only people you're connected with can message you directly.</p> </div> </label> <label class="radio-option option-messages"> <input type="radio" name="message-privacy" value="none"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM4 12C4 7.58 7.58 4 12 4C13.85 4 15.55 4.63 16.9 5.69L5.69 16.9C4.63 15.55 4 13.85 4 12ZM12 20C10.15 20 8.45 19.37 7.1 18.31L18.31 7.1C19.37 8.45 20 10.15 20 12C20 16.42 16.42 20 12 20Z" fill="white"/> </svg> </div> <h3>Messages Off</h3> </div> <p class="radio-description">Nobody can send you direct messages (comments still allowed).</p> </div> </label> </div> </div> <div class="privacy-level"> <h2> <span class="privacy-emoji">👀</span> Who can see your activity? </h2> <div class="radio-container"> <label class="radio-option option-activity"> <input type="radio" name="activity-privacy" value="everyone" checked> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z" fill="white"/> </svg> </div> <h3>Visible to All</h3> </div> <p class="radio-description">Everyone can see your likes, comments, and active status.</p> </div> </label> <label class="radio-option option-activity"> <input type="radio" name="activity-privacy" value="friends"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 11C17.66 11 18.99 9.66 18.99 8C18.99 6.34 17.66 5 16 5C14.34 5 13 6.34 13 8C13 9.66 14.34 11 16 11ZM8 11C9.66 11 10.99 9.66 10.99 8C10.99 6.34 9.66 5 8 5C6.34 5 5 6.34 5 8C5 9.66 6.34 11 8 11ZM8 13C5.67 13 1 14.17 1 16.5V19H15V16.5C15 14.17 10.33 13 8 13ZM16 13C15.71 13 15.38 13.02 15.03 13.05C16.19 13.89 17 15.02 17 16.5V19H23V16.5C23 14.17 18.33 13 16 13Z" fill="white"/> </svg> </div> <h3>Friends Only</h3> </div> <p class="radio-description">Only your connections can see your activity and status.</p> </div> </label> <label class="radio-option option-activity"> <input type="radio" name="activity-privacy" value="hidden"> <div class="radio-design"> <div class="radio-title"> <div class="radio-icon"> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 7C14.76 7 17 9.24 17 12C17 12.65 16.87 13.26 16.64 13.83L19.56 16.75C21.07 15.49 22.26 13.86 22.99 12C21.26 7.61 16.99 4.5 11.99 4.5C10.59 4.5 9.25 4.75 8.01 5.2L10.17 7.36C10.74 7.13 11.35 7 12 7ZM2 4.27L4.28 6.55L4.74 7.01C3.08 8.3 1.78 10.02 1 12C2.73 16.39 7 19.5 12 19.5C13.55 19.5 15.03 19.2 16.38 18.66L16.8 19.08L19.73 22L21 20.73L3.27 3L2 4.27ZM7.53 9.8L9.08 11.35C9.03 11.56 9 11.78 9 12C9 13.66 10.34 15 12 15C12.22 15 12.44 14.97 12.65 14.92L14.2 16.47C13.53 16.8 12.79 17 12 17C9.24 17 7 14.76 7 12C7 11.21 7.2 10.47 7.53 9.8ZM11.84 9.02L14.99 12.17L15.01 12.01C15.01 10.35 13.67 9.01 12.01 9.01L11.84 9.02Z" fill="white"/> </svg> </div> <h3>Ghost Mode</h3> </div> <p class="radio-description">Nobody can see when you're online or what you interact with.</p> </div> </label> </div> </div> <button id="save-settings">Save My Privacy Settings</button> </div> <div class="success-message" id="success-message"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z" fill="white"/> </svg> Your privacy settings have been updated successfully! </div> <script> document.addEventListener('DOMContentLoaded', function() { const saveButton = document.getElementById('save-settings'); const successMessage = document.getElementById('success-message'); saveButton.addEventListener('click', function() { // Get all selected privacy options const postsPrivacy = document.querySelector('input[name="posts-privacy"]:checked').value; const profilePrivacy = document.querySelector('input[name="profile-privacy"]:checked').value; const messagePrivacy = document.querySelector('input[name="message-privacy"]:checked').value; const activityPrivacy = document.querySelector('input[name="activity-privacy"]:checked').value; // In a real app, you would send this data to a server console.log({ posts: postsPrivacy, profile: profilePrivacy, messages: messagePrivacy, activity: activityPrivacy }); // Show success message successMessage.classList.add('show'); // Hide success message after 3 seconds setTimeout(function() { successMessage.classList.remove('show'); }, 3000); }); // Make radio options more interactive const radioOptions = document.querySelectorAll('.radio-option'); radioOptions.forEach(option => { option.addEventListener('mouseenter', function() { const icon = this.querySelector('.radio-icon'); icon.style.transform = 'scale(1.1)'; }); option.addEventListener('mouseleave', function() { const icon = this.querySelector('.radio-icon'); icon.style.transform = 'scale(1)'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { background-color: #f0f4f8; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; perspective: 1000px; } .survey-container { background: #ffffff; width: 100%; max-width: 600px; border-radius: 20px; padding: 40px; box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); position: relative; overflow: hidden; transform-style: preserve-3d; transition: transform 0.5s ease, box-shadow 0.5s ease; } .survey-container:hover { box-shadow: 0 20px 40px rgba(50, 50, 93, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1); transform: translateY(-5px) rotateX(2deg); } .survey-container::after { content: ""; position: absolute; top: 0; right: 0; height: 10px; width: 100%; background: linear-gradient(90deg, #4776E6, #8E54E9); border-radius: 10px 10px 0 0; } h1 { color: #1a237e; margin-bottom: 30px; font-size: 28px; font-weight: 700; position: relative; } h1::after { content: ""; position: absolute; bottom: -10px; left: 0; width: 60px; height: 4px; background: linear-gradient(90deg, #4776E6, #8E54E9); border-radius: 4px; } p.survey-intro { color: #546e7a; margin-bottom: 30px; font-size: 16px; line-height: 1.6; } .questions-container { display: flex; flex-direction: column; gap: 35px; } .question { margin-bottom: 10px; } .question-title { font-weight: 600; margin-bottom: 15px; color: #263238; font-size: 18px; display: flex; align-items: center; } .question-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: linear-gradient(135deg, #4776E6, #8E54E9); color: white; border-radius: 50%; margin-right: 12px; font-size: 14px; font-weight: 600; } .radio-group { display: flex; flex-direction: column; gap: 12px; } .radio-option { position: relative; padding-left: 42px; cursor: pointer; display: flex; align-items: center; min-height: 28px; transition: transform 0.3s ease; } .radio-option:hover { transform: translateX(5px); } .radio-option input { position: absolute; opacity: 0; cursor: pointer; } .checkmark { position: absolute; top: 0; left: 0; height: 28px; width: 28px; background-color: #f5f5f5; border: 2px solid #e0e0e0; border-radius: 50%; transition: all 0.3s ease; } .radio-option:hover input ~ .checkmark { background-color: #e0e0e0; box-shadow: 0 0 0 5px rgba(71, 118, 230, 0.1); } .radio-option input:checked ~ .checkmark { background-color: white; border-color: #4776E6; box-shadow: 0 0 0 2px rgba(71, 118, 230, 0.2); } .checkmark:after { content: ""; position: absolute; display: none; top: 50%; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #4776E6, #8E54E9); transform: translate(-50%, -50%) scale(0); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .radio-option input:checked ~ .checkmark:after { display: block; transform: translate(-50%, -50%) scale(1); } .radio-option-text { color: #37474f; font-size: 16px; transition: color 0.3s ease; } .radio-option input:checked ~ .radio-option-text { color: #1a237e; font-weight: 500; } .submit-btn { margin-top: 40px; background: linear-gradient(135deg, #4776E6, #8E54E9); color: white; border: none; border-radius: 50px; padding: 14px 30px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08); display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } .submit-btn::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%); transform: translateX(-100%); transition: transform 0.8s ease; } .submit-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08); } .submit-btn:hover::after { transform: translateX(100%); } .submit-btn:active { transform: translateY(1px); } .confirmation { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: #4CAF50; color: white; padding: 15px 25px; border-radius: 8px; font-weight: 500; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); z-index: 1000; opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease; } .confirmation.show { transform: translateX(-50%) translateY(0); opacity: 1; } .progress-container { width: 100%; height: 6px; background: #e0e0e0; margin-bottom: 30px; border-radius: 3px; overflow: hidden; } .progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #4776E6, #8E54E9); transition: width 0.8s ease-in-out; border-radius: 3px; } @media (max-width: 600px) { .survey-container { padding: 25px; border-radius: 15px; } h1 { font-size: 22px; } .question-title { font-size: 16px; } .radio-option-text { font-size: 14px; } .submit-btn { padding: 12px 24px; font-size: 14px; } } </style> </head> <body> <div class="confirmation" id="confirmation">Your response has been recorded. Thank you!</div> <div class="survey-container"> <h1>Remote Work Experience Survey</h1> <p class="survey-intro">We're gathering insights on how remote work has affected productivity and well-being. Your feedback will help shape better work policies. This survey takes about 2 minutes to complete.</p> <div class="progress-container"> <div class="progress-bar" id="progress-bar"></div> </div> <div class="questions-container"> <div class="question"> <div class="question-title"> <span class="question-number">1</span> How many days per week do you currently work remotely? </div> <div class="radio-group"> <label class="radio-option"> <input type="radio" name="remote_days" value="0"> <span class="checkmark"></span> <span class="radio-option-text">0 days (fully in-office)</span> </label> <label class="radio-option"> <input type="radio" name="remote_days" value="1-2"> <span class="checkmark"></span> <span class="radio-option-text">1-2 days</span> </label> <label class="radio-option"> <input type="radio" name="remote_days" value="3-4"> <span class="checkmark"></span> <span class="radio-option-text">3-4 days</span> </label> <label class="radio-option"> <input type="radio" name="remote_days" value="5"> <span class="checkmark"></span> <span class="radio-option-text">5 days (fully remote)</span> </label> </div> </div> <div class="question"> <div class="question-title"> <span class="question-number">2</span> How has remote work affected your productivity? </div> <div class="radio-group"> <label class="radio-option"> <input type="radio" name="productivity" value="much_worse"> <span class="checkmark"></span> <span class="radio-option-text">Significantly decreased</span> </label> <label class="radio-option"> <input type="radio" name="productivity" value="worse"> <span class="checkmark"></span> <span class="radio-option-text">Somewhat decreased</span> </label> <label class="radio-option"> <input type="radio" name="productivity" value="same"> <span class="checkmark"></span> <span class="radio-option-text">No change</span> </label> <label class="radio-option"> <input type="radio" name="productivity" value="better"> <span class="checkmark"></span> <span class="radio-option-text">Somewhat increased</span> </label> <label class="radio-option"> <input type="radio" name="productivity" value="much_better"> <span class="checkmark"></span> <span class="radio-option-text">Significantly increased</span> </label> </div> </div> <div class="question"> <div class="question-title"> <span class="question-number">3</span> What's your preferred work arrangement going forward? </div> <div class="radio-group"> <label class="radio-option"> <input type="radio" name="preference" value="full_office"> <span class="checkmark"></span> <span class="radio-option-text">100% in-office</span> </label> <label class="radio-option"> <input type="radio" name="preference" value="mostly_office"> <span class="checkmark"></span> <span class="radio-option-text">Mostly in-office with some remote days</span> </label> <label class="radio-option"> <input type="radio" name="preference" value="hybrid"> <span class="checkmark"></span> <span class="radio-option-text">50/50 hybrid model</span> </label> <label class="radio-option"> <input type="radio" name="preference" value="mostly_remote"> <span class="checkmark"></span> <span class="radio-option-text">Mostly remote with occasional office days</span> </label> <label class="radio-option"> <input type="radio" name="preference" value="full_remote"> <span class="checkmark"></span> <span class="radio-option-text">100% remote</span> </label> </div> </div> </div> <button class="submit-btn" id="submit-btn">Submit Feedback</button> </div> <script> document.addEventListener('DOMContentLoaded', function() { const radioInputs = document.querySelectorAll('input[type="radio"]'); const submitBtn = document.getElementById('submit-btn'); const confirmation = document.getElementById('confirmation'); const progressBar = document.getElementById('progress-bar'); // Track progress let answered = { 'remote_days': false, 'productivity': false, 'preference': false }; // Update progress when radio buttons are clicked radioInputs.forEach(input => { input.addEventListener('change', function() { // Play selection sound const audio = new Audio('data:audio/mp3;base64,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
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HabiTech Smart Control</title> <style> :root { --primary: #1a1a2e; --secondary: #16213e; --accent: #0f3460; --active: #4cc9f0; --inactive: #8d99ae; --hover: #3a86ff; --success: #2ecc71; --warning: #ff9f1c; --danger: #e63946; --text-primary: #ffffff; --text-secondary: #ecf0f1; --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background: var(--primary); color: var(--text-primary); height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; } .container { width: 100%; max-width: 700px; height: 100%; max-height: 700px; padding: 1.5rem; display: flex; flex-direction: column; position: relative; overflow: hidden; } .background-effect { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.1; background: radial-gradient(circle at 10% 20%, var(--accent) 0%, var(--primary) 90%); } .grid-pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(var(--secondary) 1px, transparent 1px), linear-gradient(90deg, var(--secondary) 1px, transparent 1px); background-size: 30px 30px; opacity: 0.05; z-index: -1; } header { margin-bottom: 1.5rem; position: relative; } h1 { font-size: 1.8rem; font-weight: 600; letter-spacing: 1px; margin-bottom: 0.5rem; background: linear-gradient(to right, var(--text-primary), var(--active)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .subtitle { font-size: 0.9rem; color: var(--text-secondary); opacity: 0.7; line-height: 1.4; } .device-time { position: absolute; right: 0; top: 0; font-size: 0.85rem; color: var(--active); padding: 0.5rem; border-radius: 8px; background-color: rgba(15, 52, 96, 0.3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); } .device-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; } .device-card { background: var(--secondary); border-radius: 12px; padding: 1.2rem; transition: var(--transition); position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); } .device-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); } .device-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(15, 52, 96, 0.5) 0%, rgba(15, 52, 96, 0) 70%); z-index: 0; } .device-icon { font-size: 1.8rem; margin-bottom: 0.8rem; position: relative; z-index: 1; } .device-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; position: relative; z-index: 1; } .device-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; z-index: 1; } .radio-container { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; width: 100%; } .radio-container input[type="radio"] { display: none; } .radio-container label { padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: var(--transition); background-color: rgba(15, 52, 96, 0.5); display: flex; align-items: center; justify-content: center; flex: 1; min-width: 60px; text-align: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .radio-container label:hover { background-color: var(--hover); transform: scale(1.05); } /* Status-specific styling */ .radio-container input[type="radio"]:checked + label.on-label { background-color: var(--success); box-shadow: 0 0 10px var(--success); } .radio-container input[type="radio"]:checked + label.off-label { background-color: var(--danger); box-shadow: 0 0 10px var(--danger); } .radio-container input[type="radio"]:checked + label.away-label { background-color: var(--warning); box-shadow: 0 0 10px var(--warning); } .radio-container input[type="radio"]:checked + label.auto-label { background-color: var(--active); box-shadow: 0 0 10px var(--active); } .radio-container input[type="radio"]:checked + label { transform: scale(1.1); font-weight: 500; } .device-info { font-size: 0.8rem; color: var(--text-secondary); opacity: 0.7; margin-top: 1rem; line-height: 1.4; } .device-stats { display: flex; gap: 1rem; margin-top: 1rem; } .stat { display: flex; flex-direction: column; align-items: center; font-size: 0.8rem; } .stat-value { font-size: 1.1rem; font-weight: 600; color: var(--active); } .quick-scenes { margin-top: auto; } .scene-title { font-size: 1rem; margin-bottom: 1rem; font-weight: 500; color: var(--text-secondary); } .scenes-container { display: flex; gap: 0.8rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: thin; scrollbar-color: var(--accent) var(--primary); } .scenes-container::-webkit-scrollbar { height: 4px; } .scenes-container::-webkit-scrollbar-track { background: var(--primary); } .scenes-container::-webkit-scrollbar-thumb { background-color: var(--accent); border-radius: 20px; } .scene-card { min-width: 120px; padding: 0.8rem; border-radius: 10px; background-color: rgba(15, 52, 96, 0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; } .scene-card:hover { transform: scale(1.05); background-color: var(--accent); } .scene-card.active { background-color: var(--active); box-shadow: 0 0 15px var(--active); } .scene-icon { font-size: 1.5rem; margin-bottom: 0.5rem; } .scene-name { font-size: 0.8rem; text-align: center; } .pulse { position: absolute; width: 10px; height: 10px; border-radius: 50%; background-color: var(--active); top: 10px; right: 10px; animation: pulse 2s infinite; } @keyframes pulse { 0% { transform: scale(0.8); opacity: 0.8; box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.7); } 70% { transform: scale(1); opacity: 0; box-shadow: 0 0 0 10px rgba(76, 201, 240, 0); } 100% { transform: scale(0.8); opacity: 0; } } .device-notification { position: absolute; bottom: 0; left: 0; right: 0; background-color: var(--accent); padding: 1rem; transform: translateY(100%); transition: transform 0.3s ease; border-top-left-radius: 12px; border-top-right-radius: 12px; z-index: 10; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); display: flex; align-items: center; justify-content: space-between; } .device-notification.show { transform: translateY(0); } .notif-text { font-size: 0.9rem; } .notif-close { background: none; border: none; color: var(--text-primary); cursor: pointer; font-size: 1rem; } /* Custom device icons */ .icon-lights::before { content: '💡'; } .icon-thermostat::before { content: '🌡️'; } .icon-security::before { content: '🔒'; } .icon-away::before { content: '🏠'; } .icon-movie::before { content: '🎬'; } .icon-sleep::before { content: '🌙'; } .icon-energy::before { content: '⚡'; } /* Media Queries */ @media (max-width: 600px) { .device-sections { grid-template-columns: 1fr; gap: 1rem; } h1 { font-size: 1.5rem; } .device-time { position: static; margin-top: 0.5rem; display: inline-block; } .scene-card { min-width: 100px; } } /* Keyframe animations */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .fade-in { animation: fadeIn 0.5s ease forwards; } .fade-in-1 { animation-delay: 0.1s; } .fade-in-2 { animation-delay: 0.2s; } .fade-in-3 { animation-delay: 0.3s; } .fade-in-4 { animation-delay: 0.4s; } </style> </head> <body> <div class="container"> <div class="background-effect"></div> <div class="grid-pattern"></div> <header> <h1>HabiTech Smart Control</h1> <p class="subtitle">Control your connected home ecosystem with intuitive precision</p> <div class="device-time" id="device-time">00:00</div> </header> <div class="device-sections"> <div class="device-card fade-in fade-in-1"> <div class="device-icon icon-lights"></div> <h3 class="device-name">Smart Lighting</h3> <div class="device-status"> <div class="radio-container"> <input type="radio" id="lights-on" name="lights" value="on"> <label for="lights-on" class="on-label">ON</label> <input type="radio" id="lights-off" name="lights" value="off" checked> <label for="lights-off" class="off-label">OFF</label> <input type="radio" id="lights-auto" name="lights" value="auto"> <label for="lights-auto" class="auto-label">AUTO</label> </div> </div> <p class="device-info">Last activity: Motion detected in Living Room (2m ago)</p> </div> <div class="device-card fade-in fade-in-2"> <div class="device-icon icon-thermostat"></div> <h3 class="device-name">Climate Control</h3> <div class="device-status"> <div class="radio-container"> <input type="radio" id="climate-on" name="climate" value="on" checked> <label for="climate-on" class="on-label">ON</label> <input type="radio" id="climate-off" name="climate" value="off"> <label for="climate-off" class="off-label">OFF</label> <input type="radio" id="climate-auto" name="climate" value="auto"> <label for="climate-auto" class="auto-label">AUTO</label> </div> </div> <div class="device-stats"> <div class="stat"> <span class="stat-value">21°C</span> <span>Current</span> </div> <div class="stat"> <span class="stat-value">22°C</span> <span>Target</span> </div> <div class="stat"> <span class="stat-value">42%</span> <span>Humidity</span> </div> </div> </div> <div class="device-card fade-in fade-in-3"> <div class="device-icon icon-security"></div> <h3 class="device-name">Security System</h3> <div class="device-status"> <div class="radio-container"> <input type="radio" id="security-on" name="security" value="on"> <label for="security-on" class="on-label">ARMED</label> <input type="radio" id="security-off" name="security" value="off" checked> <label for="security-off" class="off-label">DISARMED</label> <input type="radio" id="security-away" name="security" value="away"> <label for="security-away" class="away-label">AWAY</label> </div> </div> <p class="device-info">All sensors operational. Front door last opened: 1h ago</p> </div> <div class="device-card fade-in fade-in-4"> <div class="pulse"></div> <div class="device-icon icon-energy"></div> <h3 class="device-name">Energy Management</h3> <div class="device-status"> <div class="radio-container"> <input type="radio" id="energy-normal" name="energy" value="normal"> <label for="energy-normal" class="on-label">NORMAL</label> <input type="radio" id="energy-eco" name="energy" value="eco" checked> <label for="energy-eco" class="auto-label">ECO</label> <input type="radio" id="energy-away" name="energy" value="away"> <label for="energy-away" class="away-label">AWAY</label> </div> </div> <div class="device-stats"> <div class="stat"> <span class="stat-value">2.4kW</span> <span>Current</span> </div> <div class="stat"> <span class="stat-value">18%</span> <span>Savings</span> </div> </div> </div> </div> <div class="quick-scenes"> <h3 class="scene-title">Quick Scenes</h3> <div class="scenes-container"> <div class="scene-card" data-scene="home"> <div class="scene-icon icon-away"></div> <span class="scene-name">I'm Home</span> </div> <div class="scene-card" data-scene="away"> <div class="scene-icon icon-away"></div> <span class="scene-name">Away Mode</span> </div> <div class="scene-card" data-scene="movie"> <div class="scene-icon icon-movie"></div> <span class="scene-name">Movie Night</span> </div> <div class="scene-card" data-scene="sleep"> <div class="scene-icon icon-sleep"></div> <span class="scene-name">Bedtime</span> </div> <div class="scene-card" data-scene="energy"> <div class="scene-icon icon-energy"></div> <span class="scene-name">Eco Saver</span> </div> </div> </div> <div class="device-notification" id="notification"> <span class="notif-text">Device status updated successfully</span> <button class="notif-close" id="close-notif">×</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { // Update time function updateTime() { const now = new Date(); const timeElement = document.getElementById('device-time'); timeElement.textContent = now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}); } updateTime(); setInterval(updateTime, 60000); // Radio button change handlers const radioButtons = document.querySelectorAll('input[type="radio"]'); const notification = document.getElementById('notification'); const closeNotifButton = document.getElementById('close-notif'); radioButtons.forEach(radio => { radio.addEventListener('change', function() { if (this.checked) { const deviceType = this.name; const status = this.value; const notifText = document.querySelector('.notif-text'); let deviceName; switch(deviceType) { case 'lights': deviceName = 'Smart Lighting'; break; case 'climate': deviceName = 'Climate Control'; break; case 'security': deviceName = 'Security System'; break; case 'energy': deviceName = 'Energy Management'; break; default: deviceName = 'Device'; } let statusText; switch(status) { case 'on': statusText = deviceType === 'security' ? 'ARMED' : 'ON'; break; case 'off': statusText = deviceType === 'security' ? 'DISARMED' : 'OFF'; break; case 'auto': statusText = 'AUTO MODE'; break; case 'away': statusText = 'AWAY MODE'; break; case 'eco': statusText = 'ECO MODE'; break; case 'normal': statusText = 'NORMAL MODE'; break; default: statusText = status.toUpperCase(); } notifText.textContent = `${deviceName} set to ${statusText}`; notification.classList.add('show'); // Add a subtle animation to the clicked device card const parentCard = this.closest('.device-card'); parentCard.style.transition = 'transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28)'; parentCard.style.transform = 'scale(1.02)'; setTimeout(() => { parentCard.style.transform = ''; }, 300); // Auto hide notification after 3 seconds setTimeout(() => { notification.classList.remove('show'); }, 3000); } }); }); // Close notification button closeNotifButton.addEventListener('click', () => { notification.classList.remove('show'); }); // Scene activation const sceneCards = document.querySelectorAll('.scene-card'); sceneCards.forEach(card => { card.addEventListener('click', function() { // Remove active class from all scene cards sceneCards.forEach(c => c.classList.remove('active')); // Add active class to clicked card this.classList.add('active'); const sceneName = this.getAttribute('data-scene'); const notifText = document.querySelector('.notif-text'); // Set appropriate device states based on scene switch(sceneName) { case 'home': document.getElementById('lights-on').checked = true; document.getElementById('climate-on').checked = true; document.getElementById('security-off').checked = true; document.getElementById('energy-normal').checked = true; notifText.textContent = "Welcome Home scene activated"; break; case 'away': document.getElementById('lights-off').checked = true; document.getElementById('climate-auto').checked = true; document.getElementById('security-away').checked = true; document.getElementById('energy-away').checked = true; notifText.textContent = "Away Mode activated - your home is secured"; break; case 'movie': document.getElementById('lights-on').checked = true; document.getElementById('climate-on').checked = true; document.getElementById('security-on').checked = true; document.getElementById('energy-eco').checked = true; notifText.textContent = "Movie Night scene activated - dimming lights"; break; case 'sleep': document.getElementById('lights-off').checked = true; document.getElementById('climate-auto').checked = true; document.getElementById('security-on').checked = true; document.getElementById('energy-eco').checked = true; notifText.textContent = "Bedtime scene activated - sleep well"; break; case 'energy': document.getElementById('lights-auto').checked = true; document.getElementById('climate-auto').checked = true; document.getElementById('security-on').checked = true; document.getElementById('energy-eco').checked = true; notifText.textContent = "Eco Saver mode activated - optimizing energy usage"; break; } notification.classList.add('show'); // Auto hide notification after 3 seconds setTimeout(() => { notification.classList.remove('show'); }, 3000); }); }); // Interactive hover effects for device cards const deviceCards = document.querySelectorAll('.device-card'); deviceCards.forEach(card => { card.addEventListener('mousemove', (e) => { const rect = card.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; // Create a subtle highlight effect card.style.background = `radial-gradient(circle at ${x}px ${y}px, rgba(76, 201, 240, 0.15), var(--secondary) 70%)`; }); card.addEventListener('mouseleave', () => { card.style.background = 'var(--secondary)'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Event Scheduling Options</title> <style> :root { --primary: #ff3e6c; --secondary: #5b3aff; --accent: #00c8b4; --dark: #182747; --light: #f8f9ff; --success: #0aca97; --warning: #ffb100; } * { 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; overflow-x: hidden; } .container { width: 100%; max-width: 660px; background: white; border-radius: 24px; box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1); padding: 30px; position: relative; overflow: hidden; } .container::before { content: ''; position: absolute; width: 200px; height: 200px; background: var(--primary); opacity: 0.05; border-radius: 50%; top: -100px; left: -100px; } .container::after { content: ''; position: absolute; width: 150px; height: 150px; background: var(--secondary); opacity: 0.05; border-radius: 50%; bottom: -50px; right: -50px; } h1 { font-size: 28px; margin-bottom: 8px; color: var(--dark); position: relative; display: inline-block; } h1::after { content: ''; position: absolute; height: 6px; width: 40%; background: var(--primary); bottom: -8px; left: 0; border-radius: 4px; } p.description { margin-bottom: 30px; color: #555; font-size: 16px; line-height: 1.6; } .schedule-options { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 30px; } .radio-container { position: relative; cursor: pointer; transition: all 0.3s ease; } .radio-option { display: flex; align-items: center; padding: 20px; border-radius: 14px; border: 2px solid rgba(0, 0, 0, 0.08); background: white; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); position: relative; overflow: hidden; } input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; } .radio-option:hover { border-color: rgba(91, 58, 255, 0.3); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(91, 58, 255, 0.1); } input[type="radio"]:checked + .radio-option { border-color: var(--secondary); background-color: rgba(91, 58, 255, 0.03); transform: scale(1.02); box-shadow: 0 10px 25px rgba(91, 58, 255, 0.2); } .radio-marker { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ddd; margin-right: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; flex-shrink: 0; } input[type="radio"]:checked + .radio-option .radio-marker { border-color: var(--secondary); background: var(--secondary); box-shadow: 0 0 0 2px rgba(91, 58, 255, 0.2); } input[type="radio"]:checked + .radio-option .radio-marker::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: white; animation: pulse 0.4s ease-out; } .radio-content { flex: 1; } .option-title { font-weight: 600; font-size: 18px; margin-bottom: 4px; color: var(--dark); display: flex; align-items: center; } .option-description { font-size: 14px; color: #777; line-height: 1.4; } .tag { font-size: 12px; padding: 4px 10px; border-radius: 20px; margin-left: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; } .tag-popular { background-color: rgba(255, 62, 108, 0.1); color: var(--primary); } .tag-new { background-color: rgba(0, 200, 180, 0.1); color: var(--accent); } .schedule-icon { margin-right: 16px; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .icon-single { background: rgba(255, 62, 108, 0.1); color: var(--primary); } .icon-recurring { background: rgba(91, 58, 255, 0.1); color: var(--secondary); } .icon-custom { background: rgba(0, 200, 180, 0.1); color: var(--accent); } .icon-flexible { background: rgba(255, 177, 0, 0.1); color: var(--warning); } .action-btn { background-color: var(--secondary); color: white; border: none; padding: 16px 28px; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: block; width: 100%; position: relative; overflow: hidden; } .action-btn:hover { background-color: #4a30d9; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(91, 58, 255, 0.2); } .action-btn:active { transform: translateY(0); } .action-btn::after { content: ''; position: absolute; width: 50px; height: 50px; top: -10px; right: -10px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; transform: scale(0); transition: transform 0.5s; } .action-btn:hover::after { transform: scale(5); } .selection-summary { margin-top: 20px; padding: 16px; border-radius: 14px; background-color: var(--light); display: none; opacity: 0; transform: translateY(20px); transition: all 0.4s ease; } .selection-summary.active { display: block; opacity: 1; transform: translateY(0); } .summary-title { font-weight: 600; margin-bottom: 10px; color: var(--dark); display: flex; align-items: center; } .summary-title svg { margin-right: 8px; color: var(--success); } .summary-details { font-size: 14px; color: #666; padding-left: 24px; } .confetti { position: absolute; width: 10px; height: 10px; opacity: 0; pointer-events: none; } @keyframes pulse { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } } @keyframes confettiFall { 0% { opacity: 1; transform: translateY(0) rotate(0deg); } 100% { opacity: 0; transform: translateY(100px) rotate(720deg); } } @media (max-width: 600px) { .container { padding: 20px; border-radius: 20px; } h1 { font-size: 24px; } .radio-option { padding: 16px; } .option-title { font-size: 16px; } .option-description { font-size: 13px; } .schedule-icon { width: 36px; height: 36px; } .action-btn { padding: 14px 20px; } } </style> </head> <body> <div class="container"> <h1>Schedule Your Event</h1> <p class="description">Choose the scheduling option that best fits your event needs. Each option offers different flexibility for your attendees.</p> <div class="schedule-options"> <label class="radio-container"> <input type="radio" name="schedule" value="single" checked> <div class="radio-option"> <div class="radio-marker"></div> <div class="schedule-icon icon-single"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect> <line x1="16" y1="2" x2="16" y2="6"></line> <line x1="8" y1="2" x2="8" y2="6"></line> <line x1="3" y1="10" x2="21" y2="10"></line> <path d="M8 14h.01"></path> <path d="M12 14h.01"></path> <path d="M16 14h.01"></path> <path d="M8 18h.01"></path> <path d="M12 18h.01"></path> <path d="M16 18h.01"></path> </svg> </div> <div class="radio-content"> <div class="option-title">One-time Event <span class="tag tag-popular">Popular</span></div> <div class="option-description">Set a specific date and time for your event. Perfect for conferences, webinars, or one-day workshops.</div> </div> </div> </label> <label class="radio-container"> <input type="radio" name="schedule" value="recurring"> <div class="radio-option"> <div class="radio-marker"></div> <div class="schedule-icon icon-recurring"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M17 2.1l4 4-4 4"></path> <path d="M3 12.2v-2a4 4 0 0 1 4-4h12.8M7 21.9l-4-4 4-4"></path> <path d="M21 11.8v2a4 4 0 0 1-4 4H4.2"></path> </svg> </div> <div class="radio-content"> <div class="option-title">Recurring Series</div> <div class="option-description">Schedule events that repeat daily, weekly, or monthly. Ideal for courses, regular meetups, or training sessions.</div> </div> </div> </label> <label class="radio-container"> <input type="radio" name="schedule" value="custom"> <div class="radio-option"> <div class="radio-marker"></div> <div class="schedule-icon icon-custom"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 20h9"></path> <path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path> </svg> </div> <div class="radio-content"> <div class="option-title">Custom Schedule <span class="tag tag-new">New</span></div> <div class="option-description">Create a personalized event schedule with multiple dates that don't follow a pattern. Great for event series with irregular timings.</div> </div> </div> </label> <label class="radio-container"> <input type="radio" name="schedule" value="flexible"> <div class="radio-option"> <div class="radio-marker"></div> <div class="schedule-icon icon-flexible"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> </div> <div class="radio-content"> <div class="option-title">Flexible Time Slots</div> <div class="option-description">Offer multiple time options for attendees to choose from. Ideal for appointments, consultations, or events with limited capacity.</div> </div> </div> </label> </div> <button class="action-btn" id="continue-btn">Continue to Scheduling Details</button> <div class="selection-summary" id="selection-summary"> <div class="summary-title"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path> <polyline points="22 4 12 14.01 9 11.01"></polyline> </svg> <span>Selection confirmed</span> </div> <div class="summary-details" id="summary-text"> You've selected the One-time Event option. Now you can proceed to set the specific date and time details. </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const radioOptions = document.querySelectorAll('input[name="schedule"]'); const continueBtn = document.getElementById('continue-btn'); const selectionSummary = document.getElementById('selection-summary'); const summaryText = document.getElementById('summary-text'); // Update summary text based on selected option function updateSummaryText(value) { const summaryMessages = { 'single': "You've selected the One-time Event option. Now you can proceed to set the specific date and time details.", 'recurring': "You've selected the Recurring Series option. Next, you'll define the frequency and duration of your event series.", 'custom': "You've selected the Custom Schedule option. You can now create your unique event timeline with multiple dates.", 'flexible': "You've selected the Flexible Time Slots option. You can now set up multiple time options for your attendees to choose from." }; summaryText.textContent = summaryMessages[value]; } // Handle radio button changes radioOptions.forEach(option => { option.addEventListener('change', function() { updateSummaryText(this.value); }); }); // Create confetti effect function createConfetti() { const colors = ['#ff3e6c', '#5b3aff', '#00c8b4', '#ffb100']; const container = document.querySelector('.container'); for (let i = 0; i < 30; i++) { const confetti = document.createElement('div'); confetti.className = 'confetti'; // Random styling confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; confetti.style.left = Math.random() * 100 + '%'; confetti.style.top = '-10px'; confetti.style.width = Math.random() * 10 + 5 + 'px'; confetti.style.height = Math.random() * 10 + 5 + 'px'; confetti.style.opacity = '1'; confetti.style.transform = `rotate(${Math.random() * 360}deg)`; confetti.style.borderRadius = Math.random() > 0.5 ? '50%' : '0'; // Animation confetti.style.animation = `confettiFall ${Math.random() * 3 + 2}s forwards`; confetti.style.animationDelay = Math.random() * 0.5 + 's'; container.appendChild(confetti); // Remove after animation setTimeout(() => { confetti.remove(); }, 5000); } } // Handle continue button click continueBtn.addEventListener('click', function() { const selectedValue = document.querySelector('input[name="schedule"]:checked').value; updateSummaryText(selectedValue); // Show summary with animation selectionSummary.classList.add('active'); // Create confetti effect createConfetti(); // Button animation this.innerText = "✓ Selection Confirmed"; this.style.backgroundColor = "#0aca97"; setTimeout(() => { this.innerText = "Continue to Scheduling Details"; this.style.backgroundColor = ""; }, 2000); }); // Add ripple effect to buttons function createRipple(event) { const button = event.currentTarget; const circle = document.createElement("span"); const diameter = Math.max(button.clientWidth, button.clientHeight); const radius = diameter / 2; circle.style.width = circle.style.height = `${diameter}px`; circle.style.left = `${event.clientX - button.getBoundingClientRect().left - radius}px`; circle.style.top = `${event.clientY - button.getBoundingClientRect().top - radius}px`; circle.classList.add("ripple"); const ripple = button.getElementsByClassName("ripple")[0]; if (ripple) { ripple.remove(); } button.appendChild(circle); } continueBtn.addEventListener("click", createRipple); }); </script> </body> </html>