Designing a user interface that stands out often comes down to the details, and corners play a crucial role in defining the aesthetics and usability of your application. In this article, we explore ten corner examples that can elevate your UI design.
From sharp edges to smooth curves, each corner style offers unique benefits and can significantly impact the user experience. Let's dive into these examples to see how you can incorporate them into your next project.
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
Subframe's drag-and-drop interface and intuitive, responsive canvas make it effortless to design pixel-perfect UI every time. Loved by designers and developers alike, Subframe ensures your corners—and entire UI—are stunning and functional.
Start for free and elevate your design game 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 transform your UI design process? With Subframe, you can create pixel-perfect interfaces effortlessly and efficiently. Our drag-and-drop editor and beautifully crafted components make designing a breeze.
Don't wait—start for free and begin creating stunning UIs immediately. Elevate your design game with Subframe today!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Analytics Dashboard</title> <style> :root { --primary-color: #3a4a5c; --secondary-color: #5a8db8; --accent-color: #6db1ff; --background-color: #f5f7fa; --card-background: #ffffff; --text-primary: #2c3e50; --text-secondary: #5c6b7a; --success-color: #4caf93; --warning-color: #ff9f43; --danger-color: #ea5455; --card-radius: 16px; --shadow: 0 8px 16px rgba(58, 74, 92, 0.08); --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, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } body { background-color: var(--background-color); color: var(--text-primary); padding: 20px; width: 100%; height: 100vh; overflow-x: hidden; } .dashboard-container { max-width: 100%; margin: 0 auto; } .dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .logo { font-size: 22px; font-weight: 700; color: var(--primary-color); display: flex; align-items: center; gap: 8px; } .logo-icon { background: linear-gradient(135deg, var(--secondary-color), var(--accent-color)); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; } .user-profile { display: flex; align-items: center; gap: 10px; } .user-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #5a8db8, #6db1ff); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; font-size: 16px; } .summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; } .card { background: var(--card-background); border-radius: var(--card-radius); padding: 20px; box-shadow: var(--shadow); transition: var(--transition); position: relative; overflow: hidden; cursor: pointer; } .card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(58, 74, 92, 0.12); } .card:hover::after { opacity: 1; } .card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(106, 176, 255, 0.05) 0%, rgba(90, 141, 184, 0.05) 100%); border-radius: var(--card-radius); opacity: 0; transition: var(--transition); pointer-events: none; } .card-accent { position: absolute; top: 0; left: 0; width: 4px; height: 40px; border-radius: 0 2px 2px 0; } .card-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; } .card-value { font-size: 24px; font-weight: 700; margin-bottom: 8px; } .card-trend { display: flex; align-items: center; gap: 5px; font-size: 14px; } .trend-up { color: var(--success-color); } .trend-down { color: var(--danger-color); } .data-section { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; } .chart-container { background: var(--card-background); border-radius: var(--card-radius); padding: 20px; box-shadow: var(--shadow); transition: var(--transition); position: relative; overflow: hidden; } .chart-container:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(58, 74, 92, 0.12); } .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .chart-title { font-size: 18px; font-weight: 600; } .chart-legend { display: flex; gap: 15px; } .legend-item { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text-secondary); } .legend-color { width: 12px; height: 12px; border-radius: 3px; } .chart-canvas { width: 100%; height: 250px; margin-top: 10px; } .activity-list { background: var(--card-background); border-radius: var(--card-radius); padding: 20px; box-shadow: var(--shadow); transition: var(--transition); } .activity-list:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(58, 74, 92, 0.12); } .activity-header { font-size: 18px; font-weight: 600; margin-bottom: 20px; } .activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(92, 107, 122, 0.1); } .activity-item:last-child { border-bottom: none; } .activity-icon { width: 36px; height: 36px; border-radius: 50%; background-color: rgba(106, 176, 255, 0.1); display: flex; align-items: center; justify-content: center; color: var(--accent-color); font-size: 16px; } .activity-content { flex: 1; } .activity-text { font-size: 14px; margin-bottom: 4px; } .activity-text span { font-weight: 600; } .activity-time { font-size: 12px; color: var(--text-secondary); } .filters { display: flex; gap: 10px; margin-top: 5px; } .filter-btn { border: 1px solid rgba(92, 107, 122, 0.2); border-radius: 20px; padding: 6px 12px; font-size: 12px; background: white; cursor: pointer; transition: var(--transition); } .filter-btn:hover { border-color: var(--accent-color); color: var(--accent-color); } .filter-btn.active { background: var(--accent-color); color: white; border-color: var(--accent-color); } .conversion-card { display: flex; flex-direction: column; background: var(--card-background); border-radius: var(--card-radius); padding: 20px; box-shadow: var(--shadow); transition: var(--transition); height: 100%; } .conversion-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(58, 74, 92, 0.12); } .conversion-header { font-size: 18px; font-weight: 600; margin-bottom: 20px; } .funnel { flex: 1; display: flex; flex-direction: column; gap: 15px; justify-content: center; } .funnel-stage { width: 100%; position: relative; min-height: 40px; } .funnel-bar { height: 40px; background: linear-gradient(90deg, var(--secondary-color), var(--accent-color)); border-radius: 8px; position: relative; transition: width 1s cubic-bezier(0.25, 0.8, 0.25, 1); } .funnel-stage:nth-child(2) .funnel-bar { width: 75%; } .funnel-stage:nth-child(3) .funnel-bar { width: 60%; } .funnel-stage:nth-child(4) .funnel-bar { width: 35%; } .funnel-label { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: white; font-weight: 600; font-size: 14px; z-index: 1; } .funnel-value { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); color: white; font-weight: 600; font-size: 14px; z-index: 1; } @media screen and (max-width: 700px) { .data-section { grid-template-columns: 1fr; } .summary-cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } .card-value { font-size: 20px; } .chart-header { flex-direction: column; align-items: flex-start; gap: 10px; } } @media screen and (max-width: 500px) { .user-profile .user-name { display: none; } } /* Animation for data loading */ @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } } .loading .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 2; animation: pulse 1.5s infinite; border-radius: var(--card-radius); } .switch-toggle { display: flex; align-items: center; gap: 8px; } .switch { position: relative; display: inline-block; width: 46px; height: 24px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(92, 107, 122, 0.2); transition: var(--transition); border-radius: 34px; } .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: var(--transition); border-radius: 50%; } input:checked + .slider { background-color: var(--accent-color); } input:checked + .slider:before { transform: translateX(22px); } .toggle-label { font-size: 14px; color: var(--text-secondary); } </style> </head> <body> <div class="dashboard-container"> <div class="dashboard-header"> <div class="logo"> <div class="logo-icon">D</div> DataPulse </div> <div class="user-profile"> <label class="switch"> <input type="checkbox" id="theme-toggle"> <span class="slider"></span> </label> <div class="user-avatar">JD</div> <div class="user-name">James Diaz</div> </div> </div> <div class="summary-cards"> <div class="card" id="card-1"> <div class="card-accent" style="background-color: var(--accent-color);"></div> <h3 class="card-title">ACTIVE USERS</h3> <div class="card-value">4,287</div> <div class="card-trend trend-up"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 14L12 9L17 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> 12.8% vs last week </div> </div> <div class="card" id="card-2"> <div class="card-accent" style="background-color: var(--success-color);"></div> <h3 class="card-title">CONVERSION RATE</h3> <div class="card-value">6.2%</div> <div class="card-trend trend-up"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 14L12 9L17 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> 2.1% vs last week </div> </div> <div class="card" id="card-3"> <div class="card-accent" style="background-color: var(--warning-color);"></div> <h3 class="card-title">AVG SESSION DURATION</h3> <div class="card-value">3m 42s</div> <div class="card-trend trend-down"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 10L12 15L17 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> 0.5% vs last week </div> </div> <div class="card" id="card-4"> <div class="card-accent" style="background-color: var(--danger-color);"></div> <h3 class="card-title">BOUNCE RATE</h3> <div class="card-value">32.4%</div> <div class="card-trend trend-up"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 14L12 9L17 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> 3.4% vs last week </div> </div> </div> <div class="data-section"> <div class="chart-container"> <div class="chart-header"> <div class="chart-title">User Engagement Trends</div> <div class="filters"> <button class="filter-btn active" data-period="7d">7 Days</button> <button class="filter-btn" data-period="30d">30 Days</button> <button class="filter-btn" data-period="90d">90 Days</button> </div> </div> <div class="chart-legend"> <div class="legend-item"> <div class="legend-color" style="background-color: var(--accent-color);"></div> New Users </div> <div class="legend-item"> <div class="legend-color" style="background-color: var(--secondary-color);"></div> Returning Users </div> </div> <canvas id="engagementChart" class="chart-canvas"></canvas> </div> <div class="conversion-card"> <div class="conversion-header">Conversion Funnel</div> <div class="funnel"> <div class="funnel-stage"> <div class="funnel-bar" style="width: 100%"> <div class="funnel-label">Page Views</div> <div class="funnel-value">15,240</div> </div> </div> <div class="funnel-stage"> <div class="funnel-bar"> <div class="funnel-label">Signups</div> <div class="funnel-value">11,430</div> </div> </div> <div class="funnel-stage"> <div class="funnel-bar"> <div class="funnel-label">Product Views</div> <div class="funnel-value">9,144</div> </div> </div> <div class="funnel-stage"> <div class="funnel-bar"> <div class="funnel-label">Purchases</div> <div class="funnel-value">5,334</div> </div> </div> </div> </div> </div> <div class="activity-list"> <div class="activity-header">Recent Activities</div> <div class="activity-item"> <div class="activity-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <div class="activity-content"> <div class="activity-text"><span>New Feature Adopted:</span> 23% of users have started using the new dashboard filter system</div> <div class="activity-time">2 hours ago</div> </div> </div> <div class="activity-item"> <div class="activity-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2"/> <path d="M12 6V12L16 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <div class="activity-content"> <div class="activity-text"><span>Traffic Spike:</span> Mobile users increased by 34% in the past hour</div> <div class="activity-time">4 hours ago</div> </div> </div> <div class="activity-item"> <div class="activity-icon"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13 2L3 14H12L11 22L21 10H12L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <div class="activity-content"> <div class="activity-text"><span>Performance Alert:</span> API response times improved by 42% after last deployment</div> <div class="activity-time">Yesterday</div> </div> </div> </div> </div> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> document.addEventListener('DOMContentLoaded', function() { // Initialize chart const ctx = document.getElementById('engagementChart').getContext('2d'); const gradientFill1 = ctx.createLinearGradient(0, 0, 0, 280); gradientFill1.addColorStop(0, 'rgba(109, 177, 255, 0.3)'); gradientFill1.addColorStop(1, 'rgba(109, 177, 255, 0.0)'); const gradientFill2 = ctx.createLinearGradient(0, 0, 0, 280); gradientFill2.addColorStop(0, 'rgba(90, 141, 184, 0.3)'); gradientFill2.addColorStop(1, 'rgba(90, 141, 184, 0.0)'); const chart = new Chart(ctx, { type: 'line', data: { labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], datasets: [ { label: 'New Users', data: [1200, 1900, 1600, 2500, 2200, 2800, 3100], borderColor: '#6db1ff', backgroundColor: gradientFill1, tension: 0.4, fill: true, pointBackgroundColor: '#6db1ff', pointBorderColor: '#fff', pointBorderWidth: 2, pointRadius: 4, pointHoverRadius: 6 }, { label: 'Returning Users', data: [1800, 1300, 1500, 1200, 1600, 1700, 2000], borderColor: '#5a8db8', backgroundColor: gradientFill2, tension: 0.4, fill: true, pointBackgroundColor: '#5a8db8', pointBorderColor: '#fff', pointBorderWidth: 2, pointRadius: 4, pointHoverRadius: 6 } ] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false }, tooltip: { backgroundColor: 'rgba(255, 255, 255, 0.95)', titleColor: '#2c3e50', bodyColor: '#2c3e50', borderColor: 'rgba(90, 141, 184, 0.2)', borderWidth: 1, cornerRadius: 10, displayColors: false, padding: 10, usePointStyle: true } }, scales: { x: { grid: { display: false }, ticks: { color: '#5c6b7a' } }, y: { grid: { borderDash: [5, 5], color: 'rgba(90, 141, 184, 0.1)' }, ticks: { color: '#5c6b7a' }, beginAtZero: true } }, interaction: { mode: 'index', intersect: false } } }); // Time period filter functionality const filterButtons = document.querySelectorAll('.filter-btn'); filterButtons.forEach(button => { button.addEventListener('click', function() { // Remove active class from all buttons filterButtons.forEach(btn => btn.classList.remove('active')); // Add active class to clicked button this.classList.add('active'); // Get the time period from the data attribute const period = this.getAttribute('data-period'); // Update chart data based on period if (period === '7d') { chart.data.labels = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']; chart.data.datasets[0].data = [1200, 1900, 1600, 2500, 2200, 2800, 3100]; chart.data.datasets[1].data = [1800, 1300, 1500, 1200, 1600, 1700, 2000]; } else if (period === '30d') { chart.data.labels = ['Week 1', 'Week 2', 'Week 3', 'Week 4']; chart.data.datasets[0].data = [8500, 11200, 9800, 13600]; chart.data.datasets[1].data = [7200, 6900, 8100, 9500]; } else if (period === '90d') { chart.data.labels = ['Jan', 'Feb', 'Mar']; chart.data.datasets[0].data = [32000, 36500, 40200]; chart.data.datasets[1].data = [28500, 30100, 33800]; } chart.update(); }); }); // Animation on cards const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('mouseenter', function() { this.style.transform = 'translateY(-8px)'; this.style.boxShadow = '0 15px 30px rgba(58, 74, 92, 0.15)'; }); card.addEventListener('mouseleave', function() { this.style.transform = 'translateY(-5px)'; this.style.boxShadow = '0 12px 24px rgba(58, 74, 92, 0.12)'; }); }); // Theme toggle functionality const themeToggle = document.getElementById('theme-toggle'); themeToggle.addEventListener('change', function() { if (this.checked) { document.documentElement.style.setProperty('--background-color', '#1a2130'); document.documentElement.style.setProperty('--card-background', '#242e3f'); document.documentElement.style.setProperty('--text-primary', '#e4e9f0'); document.documentElement.style.setProperty('--text-secondary', '#a2adc0'); document.documentElement.style.setProperty('--shadow', '0 8px 16px rgba(0, 0, 0, 0.25)'); // Update chart theme chart.options.scales.x.ticks.color = '#a2adc0'; chart.options.scales.y.ticks.color = '#a2adc0'; chart.options.scales.y.grid.color = 'rgba(90, 141, 184, 0.1)'; chart.update(); } else { document.documentElement.style.setProperty('--background-color', '#f5f7fa'); document.documentElement.style.setProperty('--card-background', '#ffffff'); document.documentElement.style.setProperty('--text-primary', '#2c3e50'); document.documentElement.style.setProperty('--text-secondary', '#5c6b7a'); document.documentElement.style.setProperty('--shadow', '0 8px 16px rgba(58, 74, 92, 0.08)'); // Update chart theme chart.options.scales.x.ticks.color = '#5c6b7a'; chart.options.scales.y.ticks.color = '#5c6b7a'; chart.options.scales.y.grid.color = 'rgba(90, 141, 184, 0.1)'; chart.update(); } }); // Simulate data loading for a smoother experience setTimeout(function() { document.querySelector('.dashboard-container').classList.remove('loading'); // Animate the funnel bars for a nicer entrance const funnelBars = document.querySelectorAll('.funnel-bar'); funnelBars.forEach(bar => { const originalWidth = bar.style.width; bar.style.width = '0'; setTimeout(() => { bar.style.width = originalWidth; }, 200); }); }, 500); }); </script> </body> </html>
<html> <head> <title>RoundTouch App Interface</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; } :root { --primary: #FF5B79; --secondary: #4E60FF; --tertiary: #44D7B6; --light: #F8F9FC; --dark: #2A3254; --text: #525978; --shadow: rgba(42, 50, 84, 0.15); --rounded-lg: 28px; --rounded-md: 18px; --shadow-transition: 120ms cubic-bezier(0.34, 1.56, 0.64, 1); } body { background-color: #F0F2F9; height: 700px; width: 700px; display: flex; justify-content: center; align-items: center; overflow: hidden; } .app-container { position: relative; width: 340px; height: 680px; background-color: white; border-radius: 32px; box-shadow: 0 15px 40px var(--shadow); overflow: hidden; transform: scale(0.95); opacity: 0; animation: app-intro 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; } @keyframes app-intro { to { transform: scale(1); opacity: 1; } } .header { position: absolute; top: 0; left: 0; right: 0; height: 100px; background-color: var(--light); border-radius: 0 0 var(--rounded-lg) var(--rounded-lg); padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; z-index: 10; box-shadow: 0 6px 20px rgba(42, 50, 84, 0.05); } .header h1 { font-size: 26px; color: var(--dark); margin-bottom: 6px; } .header p { font-size: 14px; color: var(--text); } .content { height: 100%; padding: 120px 20px 100px; overflow-y: auto; } .content::-webkit-scrollbar { width: 6px; } .content::-webkit-scrollbar-thumb { background-color: rgba(74, 85, 104, 0.3); border-radius: 6px; } .cards-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; } .card { background-color: white; border-radius: var(--rounded-md); padding: 18px; box-shadow: 0 5px 15px rgba(42, 50, 84, 0.08); display: flex; flex-direction: column; align-items: center; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; position: relative; overflow: hidden; } .card:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(42, 50, 84, 0.06); } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%); opacity: 0; transform: scale(0.5); transition: opacity 0.4s ease, transform 0.4s ease; pointer-events: none; } .card:active::before { opacity: 1; transform: scale(2); } .card i { font-size: 32px; margin-bottom: 12px; } .card h3 { font-size: 14px; color: var(--dark); margin-bottom: 4px; text-align: center; } .card p { font-size: 12px; color: var(--text); text-align: center; } .color-primary i { color: var(--primary); } .color-secondary i { color: var(--secondary); } .color-tertiary i { color: var(--tertiary); } .color-dark i { color: var(--dark); } .section-title { font-size: 18px; color: var(--dark); margin: 24px 0 14px; } .item-list { margin-bottom: 24px; } .list-item { background-color: white; border-radius: var(--rounded-md); padding: 16px; box-shadow: 0 5px 15px rgba(42, 50, 84, 0.08); margin-bottom: 12px; display: flex; align-items: center; transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; } .list-item:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(42, 50, 84, 0.06); } .list-item-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-right: 14px; flex-shrink: 0; } .list-item-icon i { font-size: 20px; color: white; } .icon-bg-primary { background-color: var(--primary); } .icon-bg-secondary { background-color: var(--secondary); } .icon-bg-tertiary { background-color: var(--tertiary); } .list-item-content h3 { font-size: 15px; color: var(--dark); margin-bottom: 4px; } .list-item-content p { font-size: 13px; color: var(--text); } .footer { position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background-color: var(--light); border-radius: var(--rounded-lg) var(--rounded-lg) 0 0; display: flex; justify-content: space-around; align-items: center; padding: 0 14px; z-index: 10; box-shadow: 0 -6px 20px rgba(42, 50, 84, 0.05); } .nav-button { width: 60px; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 16px; transition: var(--shadow-transition); cursor: pointer; } .nav-button i { font-size: 20px; color: var(--text); margin-bottom: 4px; transition: color 0.2s ease; } .nav-button span { font-size: 11px; color: var(--text); transition: color 0.2s ease; } .nav-button:active { background-color: white; box-shadow: 0 6px 15px rgba(42, 50, 84, 0.15); } .nav-button:active i, .nav-button:active span { color: var(--secondary); } .nav-button.active { background-color: white; box-shadow: 0 6px 15px rgba(42, 50, 84, 0.15); } .nav-button.active i, .nav-button.active span { color: var(--secondary); } .action-button { position: absolute; bottom: 64px; right: 24px; width: 60px; height: 60px; background-color: var(--secondary); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(78, 96, 255, 0.3); cursor: pointer; z-index: 20; transform: translateY(0); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease; } .action-button:active { transform: translateY(4px); box-shadow: 0 4px 12px rgba(78, 96, 255, 0.2); } .action-button i { font-size: 24px; color: white; } /* Custom ripple animation */ .ripple { position: absolute; background: rgba(255, 255, 255, 0.4); border-radius: 50%; transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } @keyframes ripple { to { transform: scale(2.5); opacity: 0; } } /* Wave animation for header */ .wave-decoration { position: absolute; top: 45px; right: -20px; width: 140px; height: 140px; opacity: 0.07; pointer-events: none; background: var(--secondary); border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; animation: morph 15s linear infinite; } @keyframes morph { 0% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; } 25% { border-radius: 58% 42% 30% 70% / 55% 55% 45% 45%; } 50% { border-radius: 50% 50% 60% 40% / 40% 60% 40% 60%; } 75% { border-radius: 35% 65% 50% 50% / 60% 40% 60% 40%; } 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; } } /* Pull to refresh indicator */ .pull-indicator { position: absolute; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; justify-content: center; transform: translateY(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; z-index: 5; } .pull-spinner { width: 24px; height: 24px; border: 3px solid rgba(78, 96, 255, 0.2); border-top-color: var(--secondary); border-radius: 50%; opacity: 0; transition: opacity 0.3s ease; } .pull-active .pull-spinner { opacity: 1; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } </style> </head> <body> <div class="app-container"> <div class="header"> <div class="wave-decoration"></div> <h1>RoundTouch</h1> <p>Your touch-optimized dashboard</p> </div> <div class="content" id="content"> <div class="pull-indicator"> <div class="pull-spinner"></div> </div> <div class="section-title">Quick Actions</div> <div class="cards-container"> <div class="card color-primary"> <i class="fas fa-palette"></i> <h3>UI Themes</h3> <p>Customize app</p> </div> <div class="card color-secondary"> <i class="fas fa-chart-line"></i> <h3>Analytics</h3> <p>View stats</p> </div> <div class="card color-tertiary"> <i class="fas fa-bell"></i> <h3>Notifications</h3> <p>5 new alerts</p> </div> <div class="card color-dark"> <i class="fas fa-cog"></i> <h3>Settings</h3> <p>App preferences</p> </div> </div> <div class="section-title">Recent Projects</div> <div class="item-list"> <div class="list-item"> <div class="list-item-icon icon-bg-primary"> <i class="fas fa-mobile-alt"></i> </div> <div class="list-item-content"> <h3>Rounded Corner System</h3> <p>UI component library for touch devices</p> </div> </div> <div class="list-item"> <div class="list-item-icon icon-bg-secondary"> <i class="fas fa-layer-group"></i> </div> <div class="list-item-content"> <h3>Touch Shadows</h3> <p>Reactive shadow transitions for taps</p> </div> </div> <div class="list-item"> <div class="list-item-icon icon-bg-tertiary"> <i class="fas fa-paint-brush"></i> </div> <div class="list-item-content"> <h3>Vibrant Palette</h3> <p>Flat design color system</p> </div> </div> </div> <div class="section-title">Interface Tips</div> <div class="item-list"> <div class="list-item"> <div class="list-item-icon icon-bg-secondary"> <i class="fas fa-hand-pointer"></i> </div> <div class="list-item-content"> <h3>Optimized Touch Targets</h3> <p>Tap the action button to see shadow effects</p> </div> </div> <div class="list-item"> <div class="list-item-icon icon-bg-primary"> <i class="fas fa-arrows-alt"></i> </div> <div class="list-item-content"> <h3>Pull to Refresh</h3> <p>Try pulling down the content area</p> </div> </div> </div> </div> <div class="footer"> <div class="nav-button active"> <i class="fas fa-home"></i> <span>Home</span> </div> <div class="nav-button"> <i class="fas fa-search"></i> <span>Search</span> </div> <div class="nav-button"> <i class="fas fa-user"></i> <span>Profile</span> </div> <div class="nav-button"> <i class="fas fa-folder"></i> <span>Projects</span> </div> </div> <div class="action-button"> <i class="fas fa-plus"></i> </div> </div> <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> <script> document.addEventListener('DOMContentLoaded', function() { // Touch ripple effect function createRipple(event) { const button = event.currentTarget; const circle = document.createElement('span'); const diameter = Math.max(button.clientWidth, button.clientHeight); const radius = diameter / 2; const rect = button.getBoundingClientRect(); circle.style.width = circle.style.height = `${diameter}px`; circle.style.left = `${event.clientX - rect.left - radius}px`; circle.style.top = `${event.clientY - rect.top - radius}px`; circle.classList.add('ripple'); const ripple = button.getElementsByClassName('ripple')[0]; if (ripple) { ripple.remove(); } button.appendChild(circle); } // Add ripple to all interactive elements const buttons = document.querySelectorAll('.card, .list-item, .nav-button, .action-button'); buttons.forEach(button => { button.addEventListener('mousedown', createRipple); button.addEventListener('touchstart', e => { const touch = e.touches[0]; const mouseEvent = new MouseEvent('mousedown', { clientX: touch.clientX, clientY: touch.clientY }); button.dispatchEvent(mouseEvent); }, { passive: true }); }); // Nav buttons functionality const navButtons = document.querySelectorAll('.nav-button'); navButtons.forEach(button => { button.addEventListener('click', () => { navButtons.forEach(btn => btn.classList.remove('active')); button.classList.add('active'); }); }); // Pull to refresh functionality const content = document.getElementById('content'); const pullIndicator = document.querySelector('.pull-indicator'); let startY = 0; let isPulling = false; content.addEventListener('touchstart', e => { if (content.scrollTop === 0) { startY = e.touches[0].clientY; isPulling = true; } }, { passive: true }); content.addEventListener('touchmove', e => { if (!isPulling) return; const currentY = e.touches[0].clientY; const difference = currentY - startY; if (difference > 0) { pullIndicator.style.transform = `translateY(${Math.min(difference * 0.5, 60)}px)`; if (difference > 80) { pullIndicator.classList.add('pull-active'); } else { pullIndicator.classList.remove('pull-active'); } // Prevent normal scroll if (e.cancelable) { e.preventDefault(); } } }, { passive: false }); content.addEventListener('touchend', e => { if (!isPulling) return; const pullDistance = parseInt(pullIndicator.style.transform.replace('translateY(', '').replace('px)', '')) || 0; if (pullDistance > 60) { // Simulate refresh setTimeout(() => { pullIndicator.classList.remove('pull-active'); pullIndicator.style.transform = 'translateY(-100%)'; // Add some fake "new content" animation const firstCard = document.querySelector('.card'); if (firstCard) { firstCard.style.animation = 'none'; setTimeout(() => { firstCard.style.animation = 'app-intro 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards'; }, 10); } }, 1000); } else { pullIndicator.style.transform = 'translateY(-100%)'; } isPulling = false; }, { passive: true }); // Action button animation const actionButton = document.querySelector('.action-button'); actionButton.addEventListener('click', () => { actionButton.classList.add('clicked'); setTimeout(() => { actionButton.classList.remove('clicked'); }, 300); }); }); </script> </body> </html>
<html> <head> <style> :root { --neon-primary: #00f3ff; --neon-secondary: #ff00ff; --neon-tertiary: #00ff8e; --bg-dark: #0a0a15; --bg-darker: #05050a; --radius-min: 0px; --radius-max: 15px; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Courier New', monospace; } body { background-color: var(--bg-dark); display: flex; justify-content: center; align-items: center; min-height: 100vh; color: white; overflow: hidden; perspective: 1000px; } .hud-container { position: relative; width: 650px; height: 650px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 20px; transform-style: preserve-3d; animation: float 5s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: translateY(0) rotateX(2deg); } 50% { transform: translateY(-10px) rotateX(-2deg); } } .hud-card { background-color: rgba(10, 10, 25, 0.7); border: 1px solid rgba(0, 243, 255, 0.3); position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; backdrop-filter: blur(5px); } .hud-card:before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(0, 243, 255, 0.1) 0%, rgba(255, 0, 255, 0.05) 25%, transparent 50%); opacity: 0; transition: opacity 0.3s; pointer-events: none; } .hud-card:hover:before { opacity: 1; } .corner { position: absolute; width: 25px; height: 25px; transition: all 0.3s ease; } .corner-tl { top: 0; left: 0; border-top: 2px solid var(--corner-color, var(--neon-primary)); border-left: 2px solid var(--corner-color, var(--neon-primary)); border-top-left-radius: var(--corner-radius, var(--radius-min)); } .corner-tr { top: 0; right: 0; border-top: 2px solid var(--corner-color, var(--neon-primary)); border-right: 2px solid var(--corner-color, var(--neon-primary)); border-top-right-radius: var(--corner-radius, var(--radius-min)); } .corner-br { bottom: 0; right: 0; border-bottom: 2px solid var(--corner-color, var(--neon-primary)); border-right: 2px solid var(--corner-color, var(--neon-primary)); border-bottom-right-radius: var(--corner-radius, var(--radius-min)); } .corner-bl { bottom: 0; left: 0; border-bottom: 2px solid var(--corner-color, var(--neon-primary)); border-left: 2px solid var(--corner-color, var(--neon-primary)); border-bottom-left-radius: var(--corner-radius, var(--radius-min)); } .hud-card:hover .corner { --corner-radius: var(--radius-max); width: 35px; height: 35px; box-shadow: 0 0 10px var(--corner-color, var(--neon-primary)); } .hud-card-content { padding: 20px; height: 100%; display: flex; flex-direction: column; justify-content: center; z-index: 2; position: relative; } .card-title { font-size: 1.5rem; margin-bottom: 12px; text-shadow: 0 0 5px currentColor; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; } .card-stats { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; } .stat-bar { height: 8px; width: 100%; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; position: relative; } .stat-fill { height: 100%; background: linear-gradient(90deg, var(--fill-color, var(--neon-primary)), transparent); width: var(--fill-width, 50%); position: relative; transition: width 0.5s ease-out; } .stat-fill::after { content: ''; position: absolute; top: 0; right: 0; height: 100%; width: 5px; background: var(--fill-color, var(--neon-primary)); box-shadow: 0 0 10px var(--fill-color, var(--neon-primary)); } .stat-label { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 2px; } .card-button { background: transparent; border: 1px solid var(--button-color, var(--neon-primary)); color: var(--button-color, var(--neon-primary)); padding: 8px 15px; margin-top: 15px; font-size: 0.9rem; cursor: pointer; transition: all 0.3s; border-radius: var(--radius-min); text-transform: uppercase; letter-spacing: 1px; align-self: flex-start; position: relative; overflow: hidden; } .card-button::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.5s; } .card-button:hover { background-color: rgba(0, 243, 255, 0.1); box-shadow: 0 0 10px var(--button-color, var(--neon-primary)); border-radius: var(--radius-max); } .card-button:hover::before { left: 100%; } /* Card specific styling */ #inventory { --corner-color: var(--neon-primary); --button-color: var(--neon-primary); } #skills { --corner-color: var(--neon-secondary); --button-color: var(--neon-secondary); } #combat { --corner-color: var(--neon-tertiary); --button-color: var(--neon-tertiary); } #map { --corner-color: #ffcc00; --button-color: #ffcc00; } .card-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; } .item { aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; position: relative; cursor: pointer; background: rgba(0, 0, 0, 0.3); transition: all 0.2s; } .item:hover { transform: translateY(-2px); box-shadow: 0 0 15px var(--corner-color); } .item::after { content: attr(data-count); position: absolute; bottom: 2px; right: 4px; font-size: 0.7rem; background: rgba(0, 0, 0, 0.6); padding: 1px 4px; border-radius: 2px; } .pixelated { font-family: 'Press Start 2P', 'Courier New', monospace; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8em; } .map-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: 2px; height: 180px; margin: 10px 0; } .map-cell { background-color: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); position: relative; transition: all 0.2s; } .map-cell:hover { background-color: rgba(255, 204, 0, 0.2); } .map-cell.current { background-color: rgba(255, 204, 0, 0.4); border-color: #ffcc00; } .map-cell.visited { background-color: rgba(255, 255, 255, 0.1); } .combat-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; } .action { padding: 8px; font-size: 0.8rem; border: 1px solid rgba(0, 255, 142, 0.3); background: rgba(0, 0, 0, 0.2); text-align: center; cursor: pointer; transition: all 0.2s; } .action:hover { background: rgba(0, 255, 142, 0.2); box-shadow: 0 0 10px var(--neon-tertiary); } /* Glitch effect */ .glitch { position: relative; } .glitch::before, .glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; } .glitch::before { animation: glitch-effect 3s infinite; color: #ff00ff; z-index: -1; } .glitch::after { animation: glitch-effect 2s infinite reverse; color: #00f3ff; z-index: -2; } @keyframes glitch-effect { 0% { transform: translate(0); opacity: 0; } 20% { transform: translate(-5px, 5px); opacity: 0.3; } 40% { transform: translate(-5px, -5px); opacity: 0; } 60% { transform: translate(5px, 5px); opacity: 0.3; } 80% { transform: translate(5px, -5px); opacity: 0; } 100% { transform: translate(0); opacity: 0; } } /* Responsive */ @media (max-width: 700px) { .hud-container { width: 95%; height: auto; grid-template-columns: 1fr; grid-template-rows: repeat(4, auto); } .hud-card { min-height: 150px; } .card-title { font-size: 1.2rem; } } </style> </head> <body> <div class="hud-container"> <!-- Inventory Card --> <div id="inventory" class="hud-card"> <div class="corner corner-tl"></div> <div class="corner corner-tr"></div> <div class="corner corner-br"></div> <div class="corner corner-bl"></div> <div class="hud-card-content"> <h2 class="card-title glitch" data-text="INVENTORY">INVENTORY</h2> <div class="card-items"> <div class="item" data-count="3">🔋</div> <div class="item" data-count="1">💊</div> <div class="item" data-count="5">🔧</div> <div class="item" data-count="2">💾</div> <div class="item" data-count="8">🔗</div> <div class="item" data-count="4">🧪</div> </div> <div class="stat-label"> <span class="pixelated">Capacity</span> <span class="pixelated">14/20</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-width: 70%; --fill-color: var(--neon-primary);"></div> </div> <button class="card-button">Optimize</button> </div> </div> <!-- Skills Card --> <div id="skills" class="hud-card"> <div class="corner corner-tl"></div> <div class="corner corner-tr"></div> <div class="corner corner-br"></div> <div class="corner corner-bl"></div> <div class="hud-card-content"> <h2 class="card-title glitch" data-text="SKILLS">SKILLS</h2> <div class="card-stats"> <div> <div class="stat-label"> <span class="pixelated">Hacking</span> <span class="pixelated">68/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-width: 68%; --fill-color: var(--neon-secondary);"></div> </div> </div> <div> <div class="stat-label"> <span class="pixelated">Stealth</span> <span class="pixelated">42/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-width: 42%; --fill-color: var(--neon-secondary);"></div> </div> </div> <div> <div class="stat-label"> <span class="pixelated">Engineering</span> <span class="pixelated">85/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-width: 85%; --fill-color: var(--neon-secondary);"></div> </div> </div> <div> <div class="stat-label"> <span class="pixelated">Netrunning</span> <span class="pixelated">54/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-width: 54%; --fill-color: var(--neon-secondary);"></div> </div> </div> </div> <button class="card-button">Upgrade</button> </div> </div> <!-- Combat Card --> <div id="combat" class="hud-card"> <div class="corner corner-tl"></div> <div class="corner corner-tr"></div> <div class="corner corner-br"></div> <div class="corner corner-bl"></div> <div class="hud-card-content"> <h2 class="card-title glitch" data-text="COMBAT">COMBAT</h2> <div class="card-stats"> <div> <div class="stat-label"> <span class="pixelated">Health</span> <span class="pixelated">76/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-width: 76%; --fill-color: var(--neon-tertiary);"></div> </div> </div> <div> <div class="stat-label"> <span class="pixelated">Shield</span> <span class="pixelated">45/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-width: 45%; --fill-color: var(--neon-tertiary);"></div> </div> </div> </div> <div class="combat-actions"> <div class="action">Rapid Fire</div> <div class="action">EMP Blast</div> <div class="action">Stealth Mode</div> <div class="action">Turret Deploy</div> </div> <button class="card-button">Tactical</button> </div> </div> <!-- Map Card --> <div id="map" class="hud-card"> <div class="corner corner-tl"></div> <div class="corner corner-tr"></div> <div class="corner corner-br"></div> <div class="corner corner-bl"></div> <div class="hud-card-content"> <h2 class="card-title glitch" data-text="MAP">MAP</h2> <div class="map-grid" id="mapGrid"> <!-- Map cells will be generated by JS --> </div> <div class="stat-label"> <span class="pixelated">District:</span> <span class="pixelated">Neo-Chinatown</span> </div> <div class="stat-label"> <span class="pixelated">Threat Level:</span> <span class="pixelated">High</span> </div> <button class="card-button">Scan Area</button> </div> </div> </div> <script> // Initialize map grid const mapGrid = document.getElementById('mapGrid'); for (let i = 0; i < 25; i++) { const cell = document.createElement('div'); cell.className = 'map-cell'; // Mark some cells as visited or current for visual interest if (i === 12) { cell.classList.add('current'); } else if ([6, 7, 8, 11, 13, 16, 17, 18].includes(i)) { cell.classList.add('visited'); } mapGrid.appendChild(cell); } // Dynamic corner animation document.querySelectorAll('.hud-card').forEach(card => { // Mousemove effect for radial gradient card.addEventListener('mousemove', (e) => { const rect = card.getBoundingClientRect(); const x = ((e.clientX - rect.left) / rect.width) * 100; const y = ((e.clientY - rect.top) / rect.height) * 100; card.style.setProperty('--x', `${x}%`); card.style.setProperty('--y', `${y}%`); }); // Add glitch effect on click card.addEventListener('click', () => { const title = card.querySelector('.card-title'); title.style.animation = 'none'; void title.offsetWidth; // Trigger reflow title.style.animation = null; }); }); // Simulate stat bar changes document.querySelectorAll('.card-button').forEach(button => { button.addEventListener('click', (e) => { e.preventDefault(); const card = button.closest('.hud-card'); const statFills = card.querySelectorAll('.stat-fill'); statFills.forEach(fill => { const currentWidth = parseFloat(fill.style.getPropertyValue('--fill-width')); // Random adjustment between -10% and +15% const adjustment = Math.floor(Math.random() * 25) - 10; let newWidth = currentWidth + adjustment; // Clamp between 5% and 100% newWidth = Math.min(100, Math.max(5, newWidth)); fill.style.setProperty('--fill-width', `${newWidth}%`); // Update label if exists const statBar = fill.closest('.stat-bar'); const label = statBar.previousElementSibling?.querySelector('.pixelated:last-child'); if (label) { const maxValue = parseInt(label.textContent.split('/')[1]); const newValue = Math.round(newWidth * maxValue / 100); label.textContent = `${newValue}/${maxValue}`; } }); // Add pulse effect to button button.style.animation = 'none'; void button.offsetWidth; // Trigger reflow button.style.animation = 'pulse 0.5s'; }); }); // Interactive inventory items document.querySelectorAll('.item').forEach(item => { item.addEventListener('click', () => { const count = parseInt(item.getAttribute('data-count')); if (count > 0) { item.setAttribute('data-count', count - 1); // Update capacity display const capacityLabel = document.querySelector('#inventory .stat-label .pixelated:last-child'); if (capacityLabel) { const [current, max] = capacityLabel.textContent.split('/').map(Number); capacityLabel.textContent = `${current - 1}/${max}`; // Update capacity bar const capacityFill = document.querySelector('#inventory .stat-fill'); const newPercentage = (current - 1) / max * 100; capacityFill.style.setProperty('--fill-width', `${newPercentage}%`); } // Flash effect item.style.backgroundColor = 'rgba(0, 243, 255, 0.3)'; setTimeout(() => { item.style.backgroundColor = ''; }, 300); } }); }); // Combat actions effect document.querySelectorAll('.action').forEach(action => { action.addEventListener('click', () => { // Trigger a visual effect action.style.transform = 'scale(0.95)'; action.style.backgroundColor = 'rgba(0, 255, 142, 0.3)'; setTimeout(() => { action.style.transform = ''; action.style.backgroundColor = ''; }, 200); // Affect health or shield randomly const healthFill = document.querySelector('#combat .stat-fill:first-of-type'); const shieldFill = document.querySelector('#combat .stat-fill:last-of-type'); if (Math.random() > 0.5) { updateStat(healthFill, -5, 'Health'); } else { updateStat(shieldFill, -10, 'Shield'); } }); }); function updateStat(fillElement, change, statName) { const currentWidth = parseFloat(fillElement.style.getPropertyValue('--fill-width')); let newWidth = Math.max(0, Math.min(100, currentWidth + change)); fillElement.style.setProperty('--fill-width', `${newWidth}%`); // Update label const statBar = fillElement.closest('.stat-bar'); const label = statBar.previousElementSibling?.querySelector('.pixelated:last-child'); if (label) { const [, max] = label.textContent.split('/'); const newValue = Math.round(newWidth * parseInt(max) / 100); label.textContent = `${newValue}/${max}`; } } // Map interactivity document.querySelectorAll('.map-cell').forEach((cell, index) => { cell.addEventListener('click', () => { // Remove current class from all cells document.querySelectorAll('.map-cell.current').forEach(c => c.classList.remove('current')); // Add current to this cell cell.classList.add('current'); // Add to visited if not already cell.classList.add('visited'); // Update district and threat level const districtLabel = document.querySelector('#map .stat-label:first-of-type .pixelated:last-child'); const threatLabel = document.querySelector('#map .stat-label:last-of-type .pixelated:last-child'); const districts = ['Neo-Chinatown', 'Corp Plaza', 'Undercity', 'The Sprawl', 'Data Haven']; const threats = ['Low', 'Medium', 'High', 'Critical']; districtLabel.textContent = districts[Math.floor(index / 5)]; threatLabel.textContent = threats[Math.floor(Math.random() * threats.length)]; }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Corporate Card Design</title> <style> :root { --primary: #2c3e50; --secondary: #34495e; --accent: #3498db; --light: #ecf0f1; --dark: #2c3e50; --gray: #95a5a6; --card-radius: 8px; --hover-radius: 16px; --transition-speed: 0.3s; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Libre Baskerville', Georgia, serif; background-color: #f9f9f9; color: var(--dark); display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; line-height: 1.6; padding: 20px; overflow-x: hidden; } .container { max-width: 700px; width: 100%; padding: 20px; background-color: white; border-radius: 12px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05); } header { margin-bottom: 20px; text-align: center; } h1 { font-size: 28px; font-weight: 500; color: var(--primary); margin-bottom: 10px; } .subtitle { font-size: 15px; color: var(--gray); max-width: 500px; margin: 0 auto 30px; } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 25px; margin-bottom: 30px; } .card { background-color: white; border-radius: var(--card-radius); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); padding: 25px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: all var(--transition-speed) ease; border: 1px solid rgba(0, 0, 0, 0.08); cursor: pointer; height: 100%; } .card:hover { border-radius: var(--hover-radius); transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1); } .card:before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--accent), var(--primary)); opacity: 0; transition: opacity var(--transition-speed) ease; } .card:hover:before { opacity: 1; } .card-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background-color: rgba(52, 152, 219, 0.1); color: var(--accent); border-radius: 50%; margin-bottom: 20px; transition: transform var(--transition-speed) ease; } .card:hover .card-icon { transform: scale(1.1); } .card h3 { font-size: 18px; margin-bottom: 10px; font-weight: 500; color: var(--primary); } .card p { font-size: 14px; color: var(--gray); margin-bottom: 20px; flex-grow: 1; } .card-link { display: inline-flex; align-items: center; color: var(--accent); font-size: 14px; text-decoration: none; font-weight: 500; transition: transform var(--transition-speed) ease; } .card-link span { margin-left: 5px; transition: transform var(--transition-speed) ease; } .card:hover .card-link span { transform: translateX(3px); } .showcase { display: flex; margin-top: 30px; padding: 20px; background-color: rgba(236, 240, 241, 0.5); border-radius: 12px; overflow: hidden; position: relative; } .showcase-content { flex: 2; padding-right: 20px; } .showcase-title { font-size: 22px; margin-bottom: 10px; color: var(--primary); } .showcase-description { font-size: 14px; margin-bottom: 15px; color: var(--gray); } .btn { display: inline-block; padding: 10px 20px; background-color: var(--primary); color: white; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all var(--transition-speed) ease; text-decoration: none; } .btn:hover { background-color: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2); } .showcase-image { flex: 1; display: flex; align-items: center; justify-content: center; } .corner-demo { width: 120px; height: 120px; background-color: white; border-radius: var(--card-radius); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); transition: all var(--transition-speed) ease; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } .corner-demo:after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(44, 62, 80, 0.05) 100%); opacity: 0; transition: opacity var(--transition-speed) ease; } .corner-demo:hover { border-radius: var(--hover-radius); transform: rotate(5deg); } .corner-demo:hover:after { opacity: 1; } .corner-text { font-size: 12px; color: var(--primary); text-align: center; transition: all var(--transition-speed) ease; } .corner-demo:hover .corner-text { transform: scale(1.1); color: var(--accent); } .radius-controls { display: flex; align-items: center; margin-top: 20px; justify-content: center; } .radius-slider { width: 200px; margin: 0 15px; } .radius-value { font-size: 14px; color: var(--gray); width: 40px; text-align: center; } footer { margin-top: 30px; text-align: center; font-size: 12px; color: var(--gray); } @media (max-width: 767px) { .cards-container { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; } .card { padding: 15px; } .showcase { flex-direction: column; } .showcase-content { padding-right: 0; margin-bottom: 20px; } h1 { font-size: 24px; } .subtitle { font-size: 14px; } } </style> </head> <body> <div class="container"> <header> <h1>Elegant Card Design System</h1> <p class="subtitle">Crafted for corporate environments where sophistication meets functionality. Our rounded corner system adapts to your brand's identity.</p> </header> <div class="cards-container"> <div class="card"> <div class="card-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M20 6H4V16H20V6Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M4 10H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M9 16V19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M15 16V19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M6 19H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <h3>Digital Solutions</h3> <p>Enterprise software with intuitive interfaces that maintain brand consistency.</p> <a href="#" class="card-link">Learn more <span>→</span></a> </div> <div class="card"> <div class="card-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 16V12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 8H12.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <h3>Dashboard Analytics</h3> <p>Real-time insights with elegantly designed data visualization components.</p> <a href="#" class="card-link">Learn more <span>→</span></a> </div> <div class="card"> <div class="card-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M18 8H17C16.4477 8 16 8.44772 16 9V21C16 21.5523 16.4477 22 17 22H18C18.5523 22 19 21.5523 19 21V9C19 8.44772 18.5523 8 18 8Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 2H11C10.4477 2 10 2.44772 10 3V21C10 21.5523 10.4477 22 11 22H12C12.5523 22 13 21.5523 13 21V3C13 2.44772 12.5523 2 12 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M6 14H5C4.44772 14 4 14.4477 4 15V21C4 21.5523 4.44772 22 5 22H6C6.55228 22 7 21.5523 7 21V15C7 14.4477 6.55228 14 6 14Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <h3>Market Insights</h3> <p>Comprehensive reports presented with clean, professional UI components.</p> <a href="#" class="card-link">Learn more <span>→</span></a> </div> </div> <div class="showcase"> <div class="showcase-content"> <h3 class="showcase-title">Interactive Corner Radius</h3> <p class="showcase-description">Our design system's cornerstone feature is its adaptive radius technology. Adjust from subtle to prominent without compromising professionalism.</p> <a href="#" class="btn">Explore Design System</a> </div> <div class="showcase-image"> <div class="corner-demo"> <div class="corner-text">Hover to see effect</div> </div> </div> </div> <div class="radius-controls"> <div class="radius-value" id="radius-min">4px</div> <input type="range" min="4" max="20" value="8" class="radius-slider" id="radius-slider"> <div class="radius-value" id="radius-max">20px</div> </div> <footer> <p>© 2023 Enterprise Design Solutions — Crafting professional interfaces for global businesses</p> </footer> </div> <script> // Card corner radius animation const cards = document.querySelectorAll('.card'); const cornerDemo = document.querySelector('.corner-demo'); const radiusSlider = document.getElementById('radius-slider'); // Subtle entrance animation for cards cards.forEach((card, index) => { card.style.opacity = '0'; card.style.transform = 'translateY(20px)'; setTimeout(() => { card.style.transition = 'all 0.5s ease'; card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, 100 + (index * 100)); }); // Interactive radius slider radiusSlider.addEventListener('input', function() { const value = this.value; document.documentElement.style.setProperty('--card-radius', `${value}px`); document.documentElement.style.setProperty('--hover-radius', `${Math.min(value * 2, 28)}px`); }); // Enhanced hover effects cards.forEach(card => { card.addEventListener('mouseenter', function() { const icon = this.querySelector('.card-icon'); icon.style.transform = 'scale(1.1) rotate(5deg)'; }); card.addEventListener('mouseleave', function() { const icon = this.querySelector('.card-icon'); icon.style.transform = 'scale(1) rotate(0deg)'; }); }); // Demo corner animation with pulse effect let pulseInterval; cornerDemo.addEventListener('mouseenter', function() { pulseInterval = setInterval(() => { const currentRadius = getComputedStyle(document.documentElement).getPropertyValue('--hover-radius'); const radiusValue = parseInt(currentRadius); const pulseRadius = radiusValue + 4; cornerDemo.style.borderRadius = `${pulseRadius}px`; setTimeout(() => { cornerDemo.style.borderRadius = `${radiusValue}px`; }, 500); }, 1000); }); cornerDemo.addEventListener('mouseleave', function() { clearInterval(pulseInterval); cornerDemo.style.borderRadius = ''; }); // Prevent actual form submissions document.querySelectorAll('a').forEach(link => { link.addEventListener('click', function(e) { e.preventDefault(); // Add a subtle ripple effect on click const ripple = document.createElement('span'); ripple.classList.add('ripple'); this.appendChild(ripple); const rect = this.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); ripple.style.width = ripple.style.height = `${size}px`; ripple.style.left = `${e.clientX - rect.left - size / 2}px`; ripple.style.top = `${e.clientY - rect.top - size / 2}px`; setTimeout(() => { ripple.remove(); }, 600); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Quantum Flux | AI-Powered Cloud Solutions</title> <style> @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap'); :root { --primary: #3498ff; --primary-light: #e0f0ff; --primary-dark: #1a6cd6; --text: #202b3d; --text-light: #506580; --bg: #ffffff; --border-radius-sm: 8px; --border-radius-md: 16px; --border-radius-lg: 24px; --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Space Grotesk', sans-serif; background-color: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; max-width: 700px; margin: 0 auto; padding: 0; height: 100vh; position: relative; } header { display: flex; justify-content: space-between; align-items: center; padding: 2rem 1.5rem 1rem; } .logo { display: flex; align-items: center; gap: 0.75rem; } .logo-icon { width: 36px; height: 36px; background-color: var(--primary); border-radius: var(--border-radius-sm); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; transition: var(--transition); } .logo-text { font-weight: 700; font-size: 1.25rem; } .nav-toggle { width: 40px; height: 40px; background-color: var(--primary-light); border-radius: var(--border-radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; transition: var(--transition); } .nav-toggle:hover { background-color: var(--primary); } .nav-toggle span { display: block; width: 24px; height: 2px; background-color: var(--primary); position: relative; transition: var(--transition); } .nav-toggle:hover span { background-color: white; } .nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; width: 24px; height: 2px; background-color: var(--primary); transition: var(--transition); } .nav-toggle:hover span::before, .nav-toggle:hover span::after { background-color: white; } .nav-toggle span::before { transform: translateY(-8px); } .nav-toggle span::after { transform: translateY(8px); } .hero { padding: 1rem 1.5rem 2rem; position: relative; overflow: hidden; } .hero-content { max-width: 650px; margin: 0 auto; } h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1.5rem; transition: var(--transition); } .gradient-text { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .hero-desc { color: var(--text-light); font-size: 1.125rem; margin-bottom: 2rem; } .cta-group { display: flex; gap: 1rem; flex-wrap: wrap; } .btn { padding: 0.75rem 1.5rem; border-radius: var(--border-radius-sm); font-weight: 600; font-size: 1rem; cursor: pointer; transition: var(--transition); border: none; outline: none; display: flex; align-items: center; gap: 0.5rem; } .btn-primary { background-color: var(--primary); color: white; } .btn-primary:hover { background-color: var(--primary-dark); border-radius: var(--border-radius-md); transform: translateY(-2px); box-shadow: 0 8px 16px rgba(52, 152, 255, 0.2); } .btn-secondary { background-color: var(--primary-light); color: var(--primary); } .btn-secondary:hover { background-color: var(--primary); color: white; border-radius: var(--border-radius-md); transform: translateY(-2px); } .section { background-color: var(--primary-light); border-radius: var(--border-radius-lg); padding: 2rem; margin: 1.5rem; transition: var(--transition); position: relative; overflow: hidden; } .section:hover { border-radius: var(--border-radius-sm); transform: translateY(-4px); box-shadow: 0 10px 20px rgba(52, 152, 255, 0.15); } .section h2 { font-size: 1.5rem; margin-bottom: 1rem; position: relative; z-index: 2; } .section p { color: var(--text-light); margin-bottom: 1.5rem; position: relative; z-index: 2; } .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 2rem; } .feature-card { background-color: var(--bg); border-radius: var(--border-radius-md); padding: 1.5rem; transition: var(--transition); display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; } .feature-card:hover { border-radius: var(--border-radius-sm); transform: translateY(-4px); box-shadow: 0 8px 16px rgba(52, 152, 255, 0.1); } .feature-icon { width: 48px; height: 48px; background-color: var(--primary-light); border-radius: var(--border-radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; transition: var(--transition); } .feature-card:hover .feature-icon { background-color: var(--primary); color: white; border-radius: var(--border-radius-md); } .feature-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; } .feature-card p { color: var(--text-light); font-size: 0.875rem; margin-bottom: 1rem; } .feature-link { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.875rem; display: flex; align-items: center; gap: 0.25rem; margin-top: auto; transition: var(--transition); } .feature-link:hover { color: var(--primary-dark); gap: 0.5rem; } .notification { position: fixed; bottom: -100px; right: 20px; background-color: var(--primary); color: white; padding: 1rem; border-radius: var(--border-radius-md); max-width: 300px; box-shadow: 0 8px 16px rgba(52, 152, 255, 0.2); display: flex; align-items: center; gap: 0.75rem; transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); z-index: 1000; opacity: 0; } .notification.show { bottom: 20px; opacity: 1; } .notification-icon { width: 32px; height: 32px; background-color: rgba(255, 255, 255, 0.2); border-radius: var(--border-radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .notification-close { position: absolute; top: 0.5rem; right: 0.5rem; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: rgba(255, 255, 255, 0.7); transition: var(--transition); } .notification-close:hover { color: white; } .section-background { position: absolute; top: 0; right: 0; width: 150px; height: 150px; background: linear-gradient(45deg, transparent, rgba(52, 152, 255, 0.1)); z-index: 1; border-radius: 50%; transform: translate(30%, -30%); } .stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-top: 1.5rem; } .stat-item { background-color: white; border-radius: var(--border-radius-md); padding: 1rem; text-align: center; transition: var(--transition); } .stat-item:hover { border-radius: var(--border-radius-sm); transform: translateY(-4px); box-shadow: 0 8px 16px rgba(52, 152, 255, 0.1); } .stat-number { font-size: 1.75rem; font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; } .stat-label { font-size: 0.875rem; color: var(--text-light); } @media (max-width: 600px) { h1 { font-size: 2rem; } .cta-group { flex-direction: column; } .btn { width: 100%; justify-content: center; } .feature-grid { grid-template-columns: 1fr; } .stats-container { grid-template-columns: repeat(2, 1fr); } } .emoji { font-style: normal; } .blob { position: absolute; width: 200px; height: 200px; background: linear-gradient(45deg, var(--primary-light), rgba(52, 152, 255, 0.1)); border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; z-index: -1; animation: blobAnimation 15s ease-in-out infinite alternate; } .blob-1 { top: 10%; right: -50px; animation-delay: 0s; } .blob-2 { bottom: 10%; left: -50px; animation-delay: -5s; } @keyframes blobAnimation { 0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; } 25% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; } 50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; } 75% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; } 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; } } .particle { position: absolute; width: 8px; height: 8px; background-color: var(--primary-light); border-radius: 50%; z-index: -1; opacity: 0.6; pointer-events: none; } .cursor-follower { position: fixed; width: 40px; height: 40px; border-radius: 50%; background-color: rgba(52, 152, 255, 0.1); border: 1px solid var(--primary); pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, border-radius 0.3s; opacity: 0; } </style> </head> <body> <div class="cursor-follower"></div> <div class="blob blob-1"></div> <div class="blob blob-2"></div> <header> <div class="logo"> <div class="logo-icon">Q</div> <div class="logo-text">Quantum Flux</div> </div> <button class="nav-toggle"> <span></span> </button> </header> <main> <section class="hero"> <div class="hero-content"> <h1>Transform Your Business with <span class="gradient-text">AI-Powered Cloud Solutions</span></h1> <p class="hero-desc">Quantum Flux integrates machine learning algorithms with cloud infrastructure to provide predictive analytics that adapt to your business needs in real-time.</p> <div class="cta-group"> <button class="btn btn-primary" id="demo-btn"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8 5L15 12L8 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Request a demo </button> <button class="btn btn-secondary" id="learn-btn"> Learn how it works </button> </div> </div> </section> <section class="section"> <div class="section-background"></div> <h2>How Quantum Flux Works</h2> <p>Our platform uses advanced ML algorithms to process your data and provide actionable insights with 99.8% accuracy.</p> <div class="stats-container"> <div class="stat-item"> <div class="stat-number">99.8%</div> <div class="stat-label">Accuracy</div> </div> <div class="stat-item"> <div class="stat-number">78%</div> <div class="stat-label">Cost Reduction</div> </div> <div class="stat-item"> <div class="stat-number">3.2x</div> <div class="stat-label">ROI Increase</div> </div> </div> </section> <section class="section"> <div class="section-background"></div> <h2>Core Features</h2> <p>Discover how our platform can streamline your operations and drive growth.</p> <div class="feature-grid"> <div class="feature-card" id="feature-1"> <div class="feature-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M21 16V8.00002C20.9996 7.6493 20.9071 7.30483 20.7315 7.00119C20.556 6.69754 20.3037 6.44539 20 6.27002L13 2.27002C12.696 2.09449 12.3511 2.00208 12 2.00208C11.6489 2.00208 11.304 2.09449 11 2.27002L4 6.27002C3.69626 6.44539 3.44398 6.69754 3.26846 7.00119C3.09294 7.30483 3.00036 7.6493 3 8.00002V16C3.00036 16.3508 3.09294 16.6952 3.26846 16.9989C3.44398 17.3025 3.69626 17.5547 4 17.73L11 21.73C11.304 21.9056 11.6489 21.998 12 21.998C12.3511 21.998 12.696 21.9056 13 21.73L20 17.73C20.3037 17.5547 20.556 17.3025 20.7315 16.9989C20.9071 16.6952 20.9996 16.3508 21 16Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M7.5 4.21002L12 6.81002L16.5 4.21002" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M7.5 19.79V14.6L3 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M21 12L16.5 14.6V19.79" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M3.27002 6.96002L12 12.01L20.73 6.96002" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 22.08V12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <h3>Adaptive Neural Networks</h3> <p>Self-optimizing algorithms that adapt to your data patterns and business needs.</p> <a href="#" class="feature-link"> Learn more <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 5L19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </a> </div> <div class="feature-card" id="feature-2"> <div class="feature-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10 3H3V10H10V3Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M21 3H14V10H21V3Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M21 14H14V21H21V14Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M10 14H3V21H10V14Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <h3>Real-time Data Processing</h3> <p>Process and analyze terabytes of data with microsecond latency for instant insights.</p> <a href="#" class="feature-link"> Learn more <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 5L19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </a> </div> </div> </section> </main> <div class="notification" id="notification"> <div class="notification-icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 16V12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 8H12.01" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <div class="notification-content"> <strong>Demo request received!</strong> <p>Our team will contact you within 24 hours.</p> </div> <div class="notification-close" id="notification-close"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M18 6L6 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Notification functionality const notification = document.getElementById('notification'); const notificationClose = document.getElementById('notification-close'); const demoBtn = document.getElementById('demo-btn'); demoBtn.addEventListener('click', function() { notification.classList.add('show'); // Auto-hide notification after 5 seconds setTimeout(function() { notification.classList.remove('show'); }, 5000); // Create particles createParticles(demoBtn); }); notificationClose.addEventListener('click', function() { notification.classList.remove('show'); }); // Feature card interactions const featureCards = document.querySelectorAll('.feature-card'); featureCards.forEach(card => { card.addEventListener('mouseenter', function() { const icon = this.querySelector('.feature-icon'); icon.style.transform = 'scale(1.1) rotate(5deg)'; }); card.addEventListener('mouseleave', function() { const icon = this.querySelector('.feature-icon'); icon.style.transform = 'scale(1) rotate(0deg)'; }); card.addEventListener('click', function() { createParticles(card); }); }); // Learn button interaction const learnBtn = document.getElementById('learn-btn'); learnBtn.addEventListener('click', function() { const featuresSection = document.querySelector('.section:nth-of-type(2)'); featuresSection.scrollIntoView({ behavior: 'smooth' }); setTimeout(() => { featuresSection.style.backgroundColor = 'rgba(52, 152, 255, 0.2)'; setTimeout(() => { featuresSection.style.backgroundColor = 'var(--primary-light)'; }, 500); }, 800); }); // Function to create particles function createParticles(element) { const rect = element.getBoundingClientRect(); const centerX = rect.left + rect.width / 2; const centerY = rect.top + rect.height / 2; for (let i = 0; i < 10; i++) { const particle = document.createElement('div'); particle.classList.add('particle'); // Random position around the element const angle = Math.random() * Math.PI * 2; const distance = Math.random() * 30 + 20; const x = centerX + Math.cos(angle) * distance; const y = centerY + Math.sin(angle) * distance; particle.style.left = `${x}px`; particle.style.top = `${y}px`; // Random size const size = Math.random() * 6 + 4; particle.style.width = `${size}px`; particle.style.height = `${size}px`; // Add to body document.body.appendChild(particle); // Animate and remove const destinationX = x + (Math.random() - 0.5) * 100; const destinationY = y + (Math.random() - 0.5) * 100; const duration = Math.random() * 1000 + 500; particle.animate([ { opacity: 0.8, transform: 'scale(1)', left: `${x}px`, top: `${y}px` }, { opacity: 0, transform: 'scale(0)', left: `${destinationX}px`, top: `${destinationY}px` } ], { duration: duration, easing: 'cubic-bezier(0.4, 0, 0.2, 1)' }); setTimeout(() => { particle.remove(); }, duration); } } // Cursor follower const cursorFollower = document.querySelector('.cursor-follower'); document.addEventListener('mousemove', function(e) { cursorFollower.style.opacity = '1'; cursorFollower.style.left = `${e.clientX}px`; cursorFollower.style.top = `${e.clientY}px`; }); document.addEventListener('mouseout', function() { cursorFollower.style.opacity = '0'; }); // Change cursor follower on interactive elements const interactiveElements = document.querySelectorAll('button, .feature-card, a'); interactiveElements.forEach(element => { element.addEventListener('mouseenter', function() { cursorFollower.style.width = '60px'; cursorFollower.style.height = '60px'; cursorFollower.style.borderColor = 'var(--primary-dark)'; cursorFollower.style.backgroundColor = 'rgba(52, 152, 255, 0.15)'; }); element.addEventListener('mouseleave', function() { cursorFollower.style.width = '40px'; cursorFollower.style.height = '40px'; cursorFollower.style.borderColor = 'var(--primary)'; cursorFollower.style.backgroundColor = 'rgba(52, 152, 255, 0.1)'; }); }); // Mobile menu toggle const navToggle = document.querySelector('.nav-toggle'); navToggle.addEventListener('click', function() { const span = this.querySelector('span'); if (this.classList.contains('active')) { this.classList.remove('active'); span.style.transform = 'rotate(0deg)'; span.style.width = '24px'; span.style.backgroundColor = 'var(--primary)'; span.style.transform = 'rotate(0deg)'; span.style.width = '24px'; // Reset before and after elements span.style.setProperty('--before-rotate', 'translateY(-8px)'); span.style.setProperty('--after-rotate', 'translateY(8px)'); notification.classList.add('show'); notification.querySelector('.notification-content').innerHTML = '<strong>Menu closed!</strong><p>Main navigation is currently being updated.</p>'; setTimeout(function() { notification.classList.remove('show'); }, 3000); } else { this.classList.add('active'); span.style.transform = 'rotate(45deg)'; span.style.width = '24px'; span.style.backgroundColor = 'white'; // Update before and after elements span.style.setProperty('--before-rotate', 'rotate(90deg)'); span.style.setProperty('--after-rotate', 'rotate(90deg)'); notification.classList.add('show'); notification.querySelector('.notification-content').innerHTML = '<strong>Menu opened!</strong><p>Navigation is under development.</p>'; setTimeout(function() { notification.classList.remove('show'); }, 3000); } }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Interactive Map UI Corners</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } body { background-color: #f5f3f0; display: flex; justify-content: center; align-items: center; height: 700px; width: 700px; overflow: hidden; margin: 0 auto; } .map-container { width: 100%; height: 100%; position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); } .map { width: 100%; height: 100%; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="700" height="700" viewBox="0 0 700 700"><rect width="700" height="700" fill="%23e8e0d0"/><path d="M0 0 L700 0 L700 700 L0 700 Z" fill="none" stroke="%23c9bda8" stroke-width="1" stroke-dasharray="10,10"/><path d="M350 150 Q450 200, 500 300 T650 450" fill="none" stroke="%23a3917c" stroke-width="5"/><path d="M150 200 Q250 300, 350 350 T550 550" fill="none" stroke="%23a3917c" stroke-width="5"/><path d="M50 350 Q150 400, 250 450 T450 650" fill="none" stroke="%23a3917c" stroke-width="5"/><circle cx="250" cy="250" r="10" fill="%23756c5e"/><circle cx="450" cy="400" r="10" fill="%23756c5e"/><circle cx="300" cy="500" r="10" fill="%23756c5e"/></svg>'); position: relative; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .info-window { position: absolute; background-color: #fefefe; width: 280px; height: auto; padding: 20px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); opacity: 0; transform: translateY(20px) scale(0.95); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); overflow: hidden; z-index: 10; } .info-window.active { opacity: 1; transform: translateY(0) scale(1); } .info-window::before { content: ''; position: absolute; width: 40px; height: 40px; top: -20px; right: -20px; background-color: #dfd3c3; border-radius: 50%; z-index: -1; transition: transform 0.3s ease-out; } .info-window::after { content: ''; position: absolute; width: 40px; height: 40px; bottom: -20px; left: -20px; background-color: #dfd3c3; border-radius: 50%; z-index: -1; transition: transform 0.3s ease-out; } .info-window:hover::before, .info-window:hover::after { transform: scale(1.3); } .info-window-title { font-weight: 700; color: #3c3532; font-size: 18px; margin-bottom: 10px; position: relative; z-index: 1; } .info-window-content { color: #5d5550; font-size: 14px; line-height: 1.6; margin-bottom: 15px; position: relative; z-index: 1; } .info-window-button { display: inline-block; background-color: #a08f7c; color: white; padding: 8px 16px; border-radius: 30px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; border: none; position: relative; z-index: 1; margin-top: 5px; } .info-window-button:hover { background-color: #857263; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(160, 143, 124, 0.3); } .marker { position: absolute; width: 24px; height: 24px; background-color: #a08f7c; border-radius: 50%; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); transform: translate(-50%, -50%); cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 5; display: flex; justify-content: center; align-items: center; } .marker::after { content: ''; width: 8px; height: 8px; background-color: #f5f3f0; border-radius: 50%; transition: all 0.3s ease; } .marker:hover { transform: translate(-50%, -50%) scale(1.2); background-color: #7d6f5f; } .marker.active { background-color: #5d5550; transform: translate(-50%, -50%) scale(1.3); } .marker.active::after { background-color: #ffffff; } /* Controls */ .map-controls { position: absolute; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 10px; z-index: 20; } .map-control-btn { width: 40px; height: 40px; background-color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; user-select: none; font-weight: bold; color: #5d5550; } .map-control-btn:hover { background-color: #f9f5f0; transform: translateY(-2px); } .map-legend { position: absolute; top: 30px; left: 30px; background-color: white; border-radius: 8px; padding: 15px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); z-index: 20; max-width: 200px; } .legend-title { font-size: 14px; font-weight: 700; color: #3c3532; margin-bottom: 10px; } .legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .legend-color { width: 12px; height: 12px; border-radius: 50%; } .legend-text { font-size: 12px; color: #5d5550; } @media (max-width: 700px) { .info-window { width: 250px; } .map-legend { max-width: 150px; padding: 10px; } .legend-title { font-size: 12px; } .legend-text { font-size: 10px; } } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } .pulse { animation: pulse 1.5s infinite; } </style> </head> <body> <div class="map-container"> <div class="map" id="map"> <!-- Markers --> <div class="marker" style="top: 250px; left: 250px;" data-id="1"></div> <div class="marker" style="top: 400px; left: 450px;" data-id="2"></div> <div class="marker" style="top: 500px; left: 300px;" data-id="3"></div> <!-- Info Windows --> <div class="info-window" id="info-1" style="top: 150px; left: 280px;"> <h3 class="info-window-title">Greenleaf Trailhead</h3> <p class="info-window-content"> Access point to over 8 miles of hiking trails through mature oak forests. Features include stream crossings and a small waterfall viewpoint. Parking available for 12 vehicles. </p> <button class="info-window-button">View Trail Details</button> </div> <div class="info-window" id="info-2" style="top: 300px; left: 480px;"> <h3 class="info-window-title">Copper Lake Viewpoint</h3> <p class="info-window-content"> Panoramic vista overlooking Copper Lake and surrounding valley. Stone benches and informational panels about local wildlife. Wheelchair accessible via 0.3 mile paved path. </p> <button class="info-window-button">See Photos</button> </div> <div class="info-window" id="info-3" style="top: 400px; left: 330px;"> <h3 class="info-window-title">Cedar Creek Campground</h3> <p class="info-window-content"> 15 tent sites and 8 RV hookups along Cedar Creek. Amenities include fire rings, picnic tables, and composting toilets. Reservations required May through September. </p> <button class="info-window-button">Check Availability</button> </div> </div> <!-- Map Controls --> <div class="map-controls"> <div class="map-control-btn" id="zoom-in">+</div> <div class="map-control-btn" id="zoom-out">-</div> <div class="map-control-btn" id="reset">↺</div> </div> <!-- Map Legend --> <div class="map-legend"> <div class="legend-title">Terrain Features</div> <div class="legend-item"> <div class="legend-color" style="background-color: #a3917c;"></div> <div class="legend-text">Hiking Trails</div> </div> <div class="legend-item"> <div class="legend-color" style="background-color: #756c5e;"></div> <div class="legend-text">Points of Interest</div> </div> <div class="legend-item"> <div class="legend-color" style="background-color: #e8e0d0;"></div> <div class="legend-text">Open Area</div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Map zoom variables let scale = 1; const map = document.getElementById('map'); let isDragging = false; let startX, startY, startLeft, startTop; // Markers and info windows const markers = document.querySelectorAll('.marker'); const infoWindows = document.querySelectorAll('.info-window'); // Zoom controls const zoomIn = document.getElementById('zoom-in'); const zoomOut = document.getElementById('zoom-out'); const reset = document.getElementById('reset'); // Handle marker clicks markers.forEach(marker => { marker.addEventListener('click', function() { const markerId = this.getAttribute('data-id'); const infoWindow = document.getElementById(`info-${markerId}`); // Hide all info windows and deactivate markers infoWindows.forEach(window => window.classList.remove('active')); markers.forEach(m => m.classList.remove('active')); // Show selected info window and activate marker infoWindow.classList.add('active'); this.classList.add('active'); }); }); // Close info window when clicking elsewhere on map map.addEventListener('click', function(e) { if (!e.target.closest('.info-window') && !e.target.closest('.marker')) { infoWindows.forEach(window => window.classList.remove('active')); markers.forEach(marker => marker.classList.remove('active')); } }); // Prevent closing when clicking inside info window infoWindows.forEach(window => { window.addEventListener('click', function(e) { e.stopPropagation(); }); }); // Info window buttons const buttons = document.querySelectorAll('.info-window-button'); buttons.forEach(button => { button.addEventListener('click', function(e) { e.preventDefault(); e.stopPropagation(); // Add pulse animation this.classList.add('pulse'); // Remove pulse animation after it completes setTimeout(() => { this.classList.remove('pulse'); }, 1500); }); }); // Zoom controls zoomIn.addEventListener('click', function() { if (scale < 2) { scale += 0.1; map.style.transform = `scale(${scale})`; } }); zoomOut.addEventListener('click', function() { if (scale > 0.5) { scale -= 0.1; map.style.transform = `scale(${scale})`; } }); reset.addEventListener('click', function() { scale = 1; map.style.transform = `scale(${scale})`; map.style.left = '0px'; map.style.top = '0px'; }); // Map dragging map.addEventListener('mousedown', function(e) { if (e.target.closest('.marker') || e.target.closest('.info-window')) { return; } isDragging = true; startX = e.clientX; startY = e.clientY; startLeft = parseInt(map.style.left || 0); startTop = parseInt(map.style.top || 0); document.body.style.cursor = 'grabbing'; }); document.addEventListener('mousemove', function(e) { if (!isDragging) return; const dx = e.clientX - startX; const dy = e.clientY - startY; map.style.left = `${startLeft + dx}px`; map.style.top = `${startTop + dy}px`; }); document.addEventListener('mouseup', function() { isDragging = false; document.body.style.cursor = 'default'; }); // Create an initial marker pulse effect setTimeout(() => { markers[0].classList.add('pulse'); setTimeout(() => { markers[0].classList.remove('pulse'); }, 3000); }, 1000); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root { --primary: #94d2bd; --secondary: #e9c46a; --tertiary: #f4a261; --accent: #e76f51; --dark: #264653; --light: #f8f9fa; --border-radius: 24px; --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', system-ui, -apple-system, BlinkMacSystemFont, sans-serif; } body { background-color: #f8f9fa; display: flex; justify-content: center; align-items: center; min-height: 700px; width: 100%; overflow-x: hidden; color: var(--dark); } .app-container { width: 100%; max-width: 700px; height: 700px; background-color: white; border-radius: var(--border-radius); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); overflow: hidden; display: flex; flex-direction: column; position: relative; } .header { padding: 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0, 0, 0, 0.05); } .header h1 { font-size: 1.5rem; font-weight: 600; color: var(--dark); } .user-info { display: flex; align-items: center; gap: 12px; } .user-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: var(--primary); display: flex; justify-content: center; align-items: center; color: white; font-weight: 600; cursor: pointer; transition: var(--transition); } .user-avatar:hover { transform: scale(1.05); } .main-content { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; } .greeting { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; } .date { color: #6c757d; font-size: 1rem; } .card { background-color: white; border-radius: var(--border-radius); padding: 24px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); transition: var(--transition); } .card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); } .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; } .stat-card { background-color: var(--light); border-radius: var(--border-radius); padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; } .stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: var(--border-radius); transition: var(--transition); z-index: 0; opacity: 0; } .stat-card:hover::before { opacity: 0.1; } .stat-card.steps::before { background-color: var(--primary); } .stat-card.water::before { background-color: var(--secondary); } .stat-card.calories::before { background-color: var(--tertiary); } .stat-card.sleep::before { background-color: var(--accent); } .stat-card .icon { width: 48px; height: 48px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-bottom: 12px; position: relative; z-index: 1; } .stat-card.steps .icon { background-color: var(--primary); } .stat-card.water .icon { background-color: var(--secondary); } .stat-card.calories .icon { background-color: var(--tertiary); } .stat-card.sleep .icon { background-color: var(--accent); } .stat-card .value { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1; } .stat-card .label { color: #6c757d; font-size: 0.9rem; position: relative; z-index: 1; } .chart-container { background-color: var(--light); border-radius: var(--border-radius); padding: 24px; height: 250px; position: relative; } .chart-title { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; } .chart-title h3 { font-size: 1.1rem; font-weight: 600; } .chart-toggle { display: flex; gap: 12px; } .chart-toggle-btn { border: none; background: none; padding: 6px 12px; border-radius: 16px; font-size: 0.9rem; cursor: pointer; transition: var(--transition); color: #6c757d; } .chart-toggle-btn.active { background-color: var(--primary); color: white; } .chart { height: 180px; display: flex; align-items: flex-end; gap: 8px; position: relative; } .chart-bar { flex: 1; background-color: rgba(148, 210, 189, 0.2); border-radius: 12px 12px 0 0; position: relative; transition: var(--transition); cursor: pointer; min-height: 20px; } .chart-bar:hover { background-color: rgba(148, 210, 189, 0.4); } .chart-bar-fill { position: absolute; bottom: 0; left: 0; width: 100%; background-color: var(--primary); border-radius: 12px 12px 0 0; transition: height 1s cubic-bezier(0.2, 0.8, 0.2, 1); } .chart-bar-label { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: 0.8rem; color: #6c757d; white-space: nowrap; } .pulse-effect { animation: pulse 1.2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } } .bottom-nav { display: flex; justify-content: space-around; padding: 16px 0; background-color: white; border-top: 1px solid rgba(0, 0, 0, 0.05); } .nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: #6c757d; transition: var(--transition); cursor: pointer; padding: 8px 16px; border-radius: 16px; } .nav-item.active { color: var(--primary); } .nav-item:hover { background-color: rgba(148, 210, 189, 0.1); } .nav-icon { font-size: 1.5rem; } .nav-label { font-size: 0.8rem; } .add-button { position: absolute; bottom: 80px; right: 24px; width: 56px; height: 56px; border-radius: 28px; background-color: var(--primary); color: white; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; box-shadow: 0 4px 12px rgba(148, 210, 189, 0.4); cursor: pointer; transition: var(--transition); z-index: 10; } .add-button:hover { transform: scale(1.1); box-shadow: 0 6px 16px rgba(148, 210, 189, 0.5); } @media (max-width: 500px) { .stats-grid { grid-template-columns: 1fr; } .greeting { font-size: 1.5rem; } .header h1 { font-size: 1.2rem; } } .tooltip { position: absolute; background-color: var(--dark); color: white; padding: 8px 12px; border-radius: 8px; font-size: 0.9rem; pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 100; white-space: nowrap; } /* Custom scrollbar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #7ebcaa; } </style> </head> <body> <div class="app-container"> <div class="header"> <h1>VitalFlow</h1> <div class="user-info"> <div class="user-avatar" id="user-avatar">JD</div> </div> </div> <div class="main-content"> <div> <h2 class="greeting">Hi, Jordan!</h2> <p class="date" id="current-date">Monday, May 17</p> </div> <div class="stats-grid"> <div class="stat-card steps" id="steps-card"> <div class="icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5.5 20C5.5 20 8 16 12 16C16 16 18.5 20 18.5 20" stroke="white" stroke-width="2" stroke-linecap="round" /> <path d="M5.5 4C5.5 4 8 8 12 8C16 8 18.5 4 18.5 4" stroke="white" stroke-width="2" stroke-linecap="round" /> </svg> </div> <div class="value">8,437</div> <div class="label">Daily Steps</div> </div> <div class="stat-card water" id="water-card"> <div class="icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2L6 11V21H18V11L12 2Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="value">1.8 L</div> <div class="label">Water Intake</div> </div> <div class="stat-card calories" id="calories-card"> <div class="icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C16.4183 22 20 18.4183 20 14C20 9.58172 16.4183 2 12 2C7.58172 2 4 9.58172 4 14C4 18.4183 7.58172 22 12 22Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="value">1,845</div> <div class="label">Calories Burned</div> </div> <div class="stat-card sleep" id="sleep-card"> <div class="icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z" fill="white" /> <path d="M12 12L16 8" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L8 8" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="value">7h 12m</div> <div class="label">Sleep Duration</div> </div> </div> <div class="chart-container"> <div class="chart-title"> <h3>Activity Trend</h3> <div class="chart-toggle"> <button class="chart-toggle-btn active" id="week-btn">Week</button> <button class="chart-toggle-btn" id="month-btn">Month</button> </div> </div> <div class="chart" id="activity-chart"> <!-- Chart bars will be added dynamically --> </div> </div> </div> <div class="add-button" id="add-button">+</div> <div class="bottom-nav"> <div class="nav-item active"> <div class="nav-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M3 9L12 2L21 9V20C21 20.5304 20.7893 21.0391 20.4142 21.4142C20.0391 21.7893 19.5304 22 19 22H5C4.46957 22 3.96086 21.7893 3.58579 21.4142C3.21071 21.0391 3 20.5304 3 20V9Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="nav-label">Home</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9 11L12 14L22 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M21 12V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="nav-label">Activity</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M15 9H9V15H15V9Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="nav-label">Insights</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M19.4 15C19.2669 15.3016 19.2272 15.6362 19.286 15.9606C19.3448 16.285 19.4995 16.5843 19.73 16.82L19.79 16.88C19.976 17.0657 20.1235 17.2863 20.2241 17.5291C20.3248 17.7719 20.3766 18.0322 20.3766 18.295C20.3766 18.5578 20.3248 18.8181 20.2241 19.0609C20.1235 19.3037 19.976 19.5243 19.79 19.71C19.6043 19.896 19.3837 20.0435 19.1409 20.1441C18.8981 20.2448 18.6378 20.2966 18.375 20.2966C18.1122 20.2966 17.8519 20.2448 17.6091 20.1441C17.3663 20.0435 17.1457 19.896 16.96 19.71L16.9 19.65C16.6643 19.4195 16.365 19.2648 16.0406 19.206C15.7162 19.1472 15.3816 19.1869 15.08 19.32C14.7842 19.4468 14.532 19.6572 14.3543 19.9255C14.1766 20.1938 14.0813 20.5082 14.08 20.83V21C14.08 21.5304 13.8693 22.0391 13.4942 22.4142C13.1191 22.7893 12.6104 23 12.08 23C11.5496 23 11.0409 22.7893 10.6658 22.4142C10.2907 22.0391 10.08 21.5304 10.08 21V20.91C10.0723 20.579 9.96512 20.258 9.77251 19.9887C9.5799 19.7194 9.31074 19.5143 9 19.4C8.69838 19.2669 8.36381 19.2272 8.03941 19.286C7.71502 19.3448 7.41568 19.4995 7.18 19.73L7.12 19.79C6.93425 19.976 6.71368 20.1235 6.47088 20.2241C6.22808 20.3248 5.96783 20.3766 5.705 20.3766C5.44217 20.3766 5.18192 20.3248 4.93912 20.2241C4.69632 20.1235 4.47575 19.976 4.29 19.79C4.10405 19.6043 3.95653 19.3837 3.85588 19.1409C3.75523 18.8981 3.70343 18.6378 3.70343 18.375C3.70343 18.1122 3.75523 17.8519 3.85588 17.6091C3.95653 17.3663 4.10405 17.1457 4.29 16.96L4.35 16.9C4.58054 16.6643 4.73519 16.365 4.794 16.0406C4.85282 15.7162 4.81312 15.3816 4.68 15.08C4.55324 14.7842 4.34276 14.532 4.07447 14.3543C3.80618 14.1766 3.49179 14.0813 3.17 14.08H3C2.46957 14.08 1.96086 13.8693 1.58579 13.4942C1.21071 13.1191 1 12.6104 1 12.08C1 11.5496 1.21071 11.0409 1.58579 10.6658C1.96086 10.2907 2.46957 10.08 3 10.08H3.09C3.42099 10.0723 3.742 9.96512 4.0113 9.77251C4.28059 9.5799 4.48572 9.31074 4.6 9C4.73312 8.69838 4.77282 8.36381 4.714 8.03941C4.65519 7.71502 4.50054 7.41568 4.27 7.18L4.21 7.12C4.02405 6.93425 3.87653 6.71368 3.77588 6.47088C3.67523 6.22808 3.62343 5.96783 3.62343 5.705C3.62343 5.44217 3.67523 5.18192 3.77588 4.93912C3.87653 4.69632 4.02405 4.47575 4.21 4.29C4.39575 4.10405 4.61632 3.95653 4.85912 3.85588C5.10192 3.75523 5.36217 3.70343 5.625 3.70343C5.88783 3.70343 6.14808 3.75523 6.39088 3.85588C6.63368 3.95653 6.85425 4.10405 7.04 4.29L7.1 4.35C7.33568 4.58054 7.63502 4.73519 7.95941 4.794C8.28381 4.85282 8.61838 4.81312 8.92 4.68H9C9.29577 4.55324 9.54802 4.34276 9.72569 4.07447C9.90337 3.80618 9.99872 3.49179 10 3.17V3C10 2.46957 10.2107 1.96086 10.5858 1.58579C10.9609 1.21071 11.4696 1 12 1C12.5304 1 13.0391 1.21071 13.4142 1.58579C13.7893 1.96086 14 2.46957 14 3V3.09C14.0013 3.41179 14.0966 3.72618 14.2743 3.99447C14.452 4.26276 14.7042 4.47324 15 4.6C15.3016 4.73312 15.6362 4.77282 15.9606 4.714C16.285 4.65519 16.5843 4.50054 16.82 4.27L16.88 4.21C17.0657 4.02405 17.2863 3.87653 17.5291 3.77588C17.7719 3.67523 18.0322 3.62343 18.295 3.62343C18.5578 3.62343 18.8181 3.67523 19.0609 3.77588C19.3037 3.87653 19.5243 4.02405 19.71 4.21C19.896 4.39575 20.0435 4.61632 20.1441 4.85912C20.2448 5.10192 20.2966 5.36217 20.2966 5.625C20.2966 5.88783 20.2448 6.14808 20.1441 6.39088C20.0435 6.63368 19.896 6.85425 19.71 7.04L19.65 7.1C19.4195 7.33568 19.2648 7.63502 19.206 7.95941C19.1472 8.28381 19.1869 8.61838 19.32 8.92V9C19.4468 9.29577 19.6572 9.54802 19.9255 9.72569C20.1938 9.90337 20.5082 9.99872 20.83 10H21C21.5304 10 22.0391 10.2107 22.4142 10.5858C22.7893 10.9609 23 11.4696 23 12C23 12.5304 22.7893 13.0391 22.4142 13.4142C22.0391 13.7893 21.5304 14 21 14H20.91C20.5882 14.0013 20.2738 14.0966 20.0055 14.2743C19.7372 14.452 19.5268 14.7042 19.4 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </div> <div class="nav-label">Settings</div> </div> </div> </div> <div class="tooltip" id="tooltip"></div> <script> document.addEventListener('DOMContentLoaded', function() { // Set current date const now = new Date(); const options = { weekday: 'long', month: 'long', day: 'numeric' }; document.getElementById('current-date').textContent = now.toLocaleDateString('en-US', options); // Chart data - weekly const weeklyData = [ { day: 'Mon', steps: 7200, label: 'Mon' }, { day: 'Tue', steps: 8600, label: 'Tue' }, { day: 'Wed', steps: 7800, label: 'Wed' }, { day: 'Thu', steps: 9200, label: 'Thu' }, { day: 'Fri', steps: 8437, label: 'Today' }, { day: 'Sat', steps: 0, label: 'Sat' }, { day: 'Sun', steps: 0, label: 'Sun' } ]; // Chart data - monthly const monthlyData = [ { day: 'Week 1', steps: 7800, label: 'W1' }, { day: 'Week 2', steps: 8200, label: 'W2' }, { day: 'Week 3', steps: 9100, label: 'W3' }, { day: 'Week 4', steps: 8400, label: 'W4' } ]; // Initialize chart with weekly data renderChart(weeklyData); // Toggle between weekly and monthly view document.getElementById('week-btn').addEventListener('click', function() { document.getElementById('week-btn').classList.add('active'); document.getElementById('month-btn').classList.remove('active'); renderChart(weeklyData); }); document.getElementById('month-btn').addEventListener('click', function() { document.getElementById('month-btn').classList.add('active'); document.getElementById('week-btn').classList.remove('active'); renderChart(monthlyData); }); // Render chart function function renderChart(data) { const chartContainer = document.getElementById('activity-chart'); chartContainer.innerHTML = ''; const maxSteps = Math.max(...data.map(item => item.steps)); data.forEach(item => { const barHeight = item.steps > 0 ? (item.steps / maxSteps) * 100 : 10; const barDiv = document.createElement('div'); barDiv.className = 'chart-bar'; const fillDiv = document.createElement('div'); fillDiv.className = 'chart-bar-fill'; fillDiv.style.height = '0%'; const labelDiv = document.createElement('div'); labelDiv.className = 'chart-bar-label'; labelDiv.textContent = item.label; barDiv.appendChild(fillDiv); barDiv.appendChild(labelDiv); chartContainer.appendChild(barDiv); // Add data attribute for tooltip barDiv.setAttribute('data-steps', item.steps.toLocaleString()); barDiv.setAttribute('data-day', item.day); // Animate bar height after a small delay setTimeout(() => { fillDiv.style.height = `${barHeight}%`; }, 100); // Add hover event for tooltip barDiv.addEventListener('mouseenter', function(e) { showTooltip(e, `${item.day}: ${item.steps.toLocaleString()} steps`); }); barDiv.addEventListener('mousemove', function(e) { moveTooltip(e); }); barDiv.addEventListener('mouseleave', function() { hideTooltip(); }); }); } // Stat card interaction const statCards = document.querySelectorAll('.stat-card'); statCards.forEach(card => { card.addEventListener('click', function() { // Add pulse effect const icon = this.querySelector('.icon'); icon.classList.add('pulse-effect'); // Show appropriate message based on the card let message = ''; if (this.classList.contains('steps')) { message = 'Daily Goal: 10,000 steps'; } else if (this.classList.contains('water')) { message = 'Daily Goal: 2.5L water'; } else if (this.classList.contains('calories')) { message = 'Daily Goal: 2,200 calories'; } else if (this.classList.contains('sleep')) { message = 'Sleep Goal: 8 hours'; } // Show tooltip with the message showTooltip(event, message); // Remove pulse effect and hide tooltip after a delay setTimeout(() => { icon.classList.remove('pulse-effect'); hideTooltip(); }, 2000); }); }); // Add button interaction const addButton = document.getElementById('add-button'); addButton.addEventListener('click', function() { showTooltip(event, 'Add new activity'); setTimeout(hideTooltip, 2000); }); // Tooltip functionality const tooltip = document.getElementById('tooltip'); function showTooltip(e, text) { tooltip.textContent = text; tooltip.style.opacity = '1'; moveTooltip(e); } function moveTooltip(e) { const x = e.clientX; const y = e.clientY; // Position the tooltip, ensuring it stays in viewport tooltip.style.left = `${Math.min(x, window.innerWidth - tooltip.offsetWidth - 20)}px`; tooltip.style.top = `${Math.min(y - 40, window.innerHeight - tooltip.offsetHeight - 20)}px`; } function hideTooltip() { tooltip.style.opacity = '0'; } // Nav item interaction const navItems = document.querySelectorAll('.nav-item'); navItems.forEach(item => { item.addEventListener('click', function() { navItems.forEach(navItem => navItem.classList.remove('active')); this.classList.add('active'); }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Educational Portal Content Corners</title> <style> :root { --primary: #4e54c8; --secondary: #8f94fb; --accent: #ff7e5f; --light: #f9f9ff; --dark: #333344; --success: #42d392; --warning: #ffbe3d; --error: #ff5252; --card-radius: 12px; --card-radius-hover: 20px; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', 'Roboto', sans-serif; } body { background: linear-gradient(135deg, var(--light), #e4e5ff); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 100vh; padding: 2rem 1rem; overflow-x: hidden; } .container { max-width: 700px; width: 100%; margin: 0 auto; } header { text-align: center; margin-bottom: 2rem; position: relative; } h1 { color: var(--dark); font-size: 2rem; margin-bottom: 0.5rem; position: relative; display: inline-block; } h1::after { content: ''; position: absolute; bottom: -8px; left: 10%; width: 80%; height: 4px; background: linear-gradient(to right, var(--primary), var(--secondary)); border-radius: 2px; } .subheading { color: var(--dark); opacity: 0.8; font-size: 1rem; margin-bottom: 1rem; } .filters { display: flex; justify-content: center; gap: 0.8rem; margin-bottom: 2rem; flex-wrap: wrap; } .filter-btn { background-color: white; color: var(--dark); border: none; padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; font-size: 0.9rem; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .filter-btn:hover { background-color: var(--light); transform: translateY(-2px); } .filter-btn.active { background: linear-gradient(to right, var(--primary), var(--secondary)); color: white; } .modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; padding: 0.5rem; } .module-card { background: white; border-radius: var(--card-radius); overflow: hidden; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; cursor: pointer; } .module-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); border-radius: var(--card-radius-hover); } .module-card:hover .card-img { transform: scale(1.05); } .card-img-container { height: 160px; overflow: hidden; border-top-left-radius: var(--card-radius); border-top-right-radius: var(--card-radius); transition: all 0.4s ease; } .module-card:hover .card-img-container { border-top-left-radius: var(--card-radius-hover); border-top-right-radius: var(--card-radius-hover); } .card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; } .card-content { padding: 1.2rem; } .card-level { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 0.8rem; display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; } .level-beginner { background-color: rgba(66, 211, 146, 0.2); color: var(--success); } .level-intermediate { background-color: rgba(255, 190, 61, 0.2); color: var(--warning); } .level-advanced { background-color: rgba(255, 82, 82, 0.2); color: var(--error); } .card-title { font-size: 1.2rem; font-weight: 600; color: var(--dark); margin-bottom: 0.6rem; } .card-description { color: var(--dark); opacity: 0.7; font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; } .card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; } .card-duration { display: flex; align-items: center; gap: 0.4rem; color: var(--dark); opacity: 0.8; } .card-duration i { font-size: 1rem; } .card-progress { height: 5px; width: 100%; background-color: #f0f0f0; border-radius: 3px; margin-top: 1rem; overflow: hidden; } .progress-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; background: linear-gradient(to right, var(--primary), var(--secondary)); width: 0; } .lesson-count { color: var(--dark); opacity: 0.8; } .pulse { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background-color: var(--accent); box-shadow: 0 0 0 0 rgba(255, 126, 95, 0.7); animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1); } .new-badge { position: absolute; top: 10px; right: 10px; background: var(--accent); color: white; font-size: 0.7rem; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 600; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } @keyframes pulse { to { box-shadow: 0 0 0 12px rgba(255, 126, 95, 0); } } .empty-state { text-align: center; padding: 2rem; display: none; width: 100%; } .empty-state img { width: 150px; margin-bottom: 1rem; opacity: 0.7; } .empty-state p { color: var(--dark); opacity: 0.7; } /* Loading shimmer effect */ @keyframes shimmer { 0% { background-position: -468px 0; } 100% { background-position: 468px 0; } } .shimmer { background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%); background-size: 800px 104px; animation: shimmer 2s infinite linear; border-radius: var(--card-radius); } /* Mobile responsiveness */ @media (max-width: 600px) { h1 { font-size: 1.6rem; } .modules-grid { grid-template-columns: 1fr; } .filter-btn { font-size: 0.8rem; padding: 0.4rem 0.8rem; } } /* Dark mode transition */ .dark-mode-toggle { position: absolute; top: 0; right: 0; background: transparent; border: none; color: var(--dark); font-size: 1.2rem; cursor: pointer; padding: 0.5rem; transition: all 0.3s ease; } .dark-mode-toggle:hover { transform: rotate(30deg); } .dark-mode { background: linear-gradient(135deg, #2a2a3a, #1a1a2a); } .dark-mode h1, .dark-mode .subheading, .dark-mode .card-title { color: var(--light); } .dark-mode .module-card { background: #2d2d3d; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); } .dark-mode .card-description, .dark-mode .card-duration, .dark-mode .lesson-count { color: var(--light); opacity: 0.7; } .dark-mode .filter-btn { background-color: #2d2d3d; color: var(--light); } .dark-mode .empty-state p { color: var(--light); } /* Tooltip */ .tooltip { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); background-color: var(--dark); color: white; padding: 0.5rem 1rem; border-radius: 5px; font-size: 0.8rem; opacity: 0; visibility: hidden; transition: all 0.3s ease; pointer-events: none; z-index: 10; white-space: nowrap; } .tooltip::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border-width: 0 6px 6px 6px; border-style: solid; border-color: transparent transparent var(--dark) transparent; } .module-card:hover .tooltip { opacity: 1; visibility: visible; bottom: -50px; } </style> </head> <body> <div class="container"> <header> <button class="dark-mode-toggle" id="darkModeToggle"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 2V4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 20V22" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M4.93 4.93L6.34 6.34" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M17.66 17.66L19.07 19.07" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M2 12H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M20 12H22" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M6.34 17.66L4.93 19.07" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M19.07 4.93L17.66 6.34" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <h1>LearnSphere</h1> <p class="subheading">Discover modules tailored to your learning path</p> <div class="filters"> <button class="filter-btn active" data-filter="all">All Modules</button> <button class="filter-btn" data-filter="beginner">Beginner</button> <button class="filter-btn" data-filter="intermediate">Intermediate</button> <button class="filter-btn" data-filter="advanced">Advanced</button> </div> </header> <div class="modules-grid" id="modulesGrid"> <!-- Module cards will be populated here by JS --> </div> <div class="empty-state" id="emptyState"> <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMiAyMkM2LjQ3NyAyMiAyIDE3LjUyMyAyIDEyQzIgNi40NzcgNi40NzcgMiAxMiAyQzE3LjUyMyAyIDIyIDYuNDc3IDIyIDEyQzIyIDE3LjUyMyAxNy41MjMgMjIgMTIgMjJaTTEyIDIwQzE2LjQxOCAyMCAyMCAxNi40MTggMjAgMTJDMjAgNy41ODIgMTYuNDE4IDQgMTIgNEM3LjU4MiA0IDQgNy41ODIgNCAxMkM0IDE2LjQxOCA3LjU4MiAyMCAxMiAyMFpNMTIgMTdDMTEuNzM1IDE3IDExLjQ4IDE2LjkgMTEuMjkzIDE2LjcwN0MxMS4xMDYgMTYuNTEgMTEgMTYuMjU1IDExIDE2QzExIDE1Ljc0NSAxMS4xMDYgMTUuNDkgMTEuMjkzIDE1LjI5M0MxMS40OCAxNS4xIDE3My43MzUgMTUgMTIgMTVDMTIuMjY1IDE1IDEyLjUyIDE1LjEgMTIuNzA3IDE1LjI5M0MxMi44OSAxNS40OSBDMTMgMTUuNzQ1IDEzIDE2QzEzIDE2LjI1NSAxMi44OSAxNi41MSAxMi43MDcgMTYuNzA3QzEyLjUyIDE2LjkgMTIuMjY1IDE3IDEyIDE3Wk0xMiAxM0MxMS43MzUgMTMgMTEuNDggMTIuODk0IDExLjI5MyAxMi43MDdDMTEuMTA2IDEyLjUyIDExIDEyLjI2NSAxMSAxMlY4QzExIDcuNzM1IDExLjEwNiA3LjQ4IDExLjI5MyA3LjI5M0MxMS40OCA3LjEwNiAxMS43MzUgNyAxMiA3QzEyLjI2NSA3IDEyLjUyIDcuMTA2IDEyLjcwNyA3LjI5M0MxMi44OSA3LjQ4IDEzIDcuNzM1IDEzIDhWMTJDMTMgMTIuMjY1IDEyLjg5IDEyLjUyIDEyLjcwNyAxMi43MDdDMTIuNTIgMTIuODk0IDEyLjI2NSAxMyAxMiAxM1oiIGZpbGw9IiM4Zjk0ZmIiLz48L3N2Zz4=" alt="No modules found"> <p>No modules match your selection. Try a different filter.</p> </div> </div> <script> // Module data const modules = [ { id: 1, title: "Data Science Foundations", description: "Learn the fundamentals of data analytics, visualization, and basic statistics for informed decision making.", level: "beginner", duration: "8 weeks", image: "https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", progress: 85, lessons: 32, isNew: false }, { id: 2, title: "UX Research Methods", description: "Discover effective user research techniques to create intuitive, user-centered digital experiences.", level: "intermediate", duration: "6 weeks", image: "https://images.unsplash.com/photo-1542744173-8e7e53415bb0?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", progress: 40, lessons: 24, isNew: true }, { id: 3, title: "Advanced Machine Learning", description: "Explore neural networks, deep learning algorithms, and their real-world applications in AI systems.", level: "advanced", duration: "12 weeks", image: "https://images.unsplash.com/photo-1555949963-ff9fe0c870eb?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", progress: 10, lessons: 48, isNew: false }, { id: 4, title: "Web Development Essentials", description: "Build responsive and accessible websites using modern HTML, CSS, and JavaScript techniques.", level: "beginner", duration: "7 weeks", image: "https://images.unsplash.com/photo-1593720213428-28a5b9e94613?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", progress: 65, lessons: 28, isNew: false }, { id: 5, title: "Digital Marketing Strategy", description: "Create data-driven marketing campaigns using SEO, content marketing, and social media analytics.", level: "intermediate", duration: "5 weeks", image: "https://images.unsplash.com/photo-1557838923-2985c318be48?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", progress: 20, lessons: 20, isNew: true }, { id: 6, title: "Cybersecurity Principles", description: "Learn threat detection, vulnerability assessment, and security protocols for digital systems.", level: "advanced", duration: "10 weeks", image: "https://images.unsplash.com/photo-1510511233900-1982d92bd835?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", progress: 5, lessons: 40, isNew: false } ]; // DOM elements const modulesGrid = document.getElementById('modulesGrid'); const filterButtons = document.querySelectorAll('.filter-btn'); const emptyState = document.getElementById('emptyState'); const darkModeToggle = document.getElementById('darkModeToggle'); // Create module cards function renderModules(filteredModules) { modulesGrid.innerHTML = ''; if (filteredModules.length === 0) { emptyState.style.display = 'block'; return; } emptyState.style.display = 'none'; filteredModules.forEach(module => { const card = document.createElement('div'); card.className = 'module-card'; card.setAttribute('data-level', module.level); const levelClass = `level-${module.level}`; card.innerHTML = ` <div class="card-img-container"> <img src="${module.image}" alt="${module.title}" class="card-img"> </div> <div class="card-content"> <span class="card-level ${levelClass}">${module.level}</span> <h3 class="card-title">${module.title}</h3> <p class="card-description">${module.description}</p> <div class="card-meta"> <div class="card-duration"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 6V12L16 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> ${module.duration} </div> <div class="lesson-count">${module.lessons} lessons</div> </div> <div class="card-progress"> <div class="progress-bar" style="width: ${module.progress}%"></div> </div> </div> ${module.isNew ? '<div class="new-badge">NEW</div>' : ''} <div class="tooltip">Click to start learning</div> `; // Add click event card.addEventListener('click', () => { // Simulate card selection feedback card.style.transform = 'scale(0.95)'; setTimeout(() => { card.style.transform = ''; }, 200); // Here you would normally navigate to the course, // but we'll just animate the progress bar const progressBar = card.querySelector('.progress-bar'); const currentProgress = parseInt(progressBar.style.width); const newProgress = Math.min(currentProgress + 5, 100); // Animate progress progressBar.style.width = '0%'; setTimeout(() => { progressBar.style.width = `${newProgress}%`; }, 50); }); modulesGrid.appendChild(card); }); // Animate cards entry const cards = document.querySelectorAll('.module-card'); cards.forEach((card, index) => { card.style.opacity = '0'; card.style.transform = 'translateY(20px)'; setTimeout(() => { card.style.transition = 'all 0.5s ease'; card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, index * 100); }); } // Filter modules function filterModules(filter) { let filteredModules = []; if (filter === 'all') { filteredModules = modules; } else { filteredModules = modules.filter(module => module.level === filter); } renderModules(filteredModules); } // Add event listeners to filter buttons filterButtons.forEach(button => { button.addEventListener('click', () => { // Remove active class from all buttons filterButtons.forEach(btn => btn.classList.remove('active')); // Add active class to clicked button button.classList.add('active'); // Filter modules filterModules(button.getAttribute('data-filter')); }); }); // Dark mode toggle darkModeToggle.addEventListener('click', () => { document.body.classList.toggle('dark-mode'); // Change icon based on mode if (document.body.classList.contains('dark-mode')) { darkModeToggle.innerHTML = ` <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> `; } else { darkModeToggle.innerHTML = ` <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 2V4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 20V22" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M4.93 4.93L6.34 6.34" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M17.66 17.66L19.07 19.07" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M2 12H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M20 12H22" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M6.34 17.66L4.93 19.07" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M19.07 4.93L17.66 6.34" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> `; } }); // Initial render renderModules(modules); // Add a loading shimmer effect for simulation window.addEventListener('load', () => { // Simulate loading state modulesGrid.innerHTML = ''; for (let i = 0; i < 6; i++) { const shimmerCard = document.createElement('div'); shimmerCard.className = 'module-card shimmer'; shimmerCard.style.height = '320px'; modulesGrid.appendChild(shimmerCard); } // Remove shimmer after 1 second setTimeout(() => { renderModules(modules); }, 1000); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>SecureFin - Financial Dashboard</title> <style> :root { --navy-primary: #1a2c42; --navy-secondary: #263b53; --navy-light: #304663; --silver-primary: #e6e9ed; --silver-secondary: #c4c9d1; --silver-dark: #a2a9b4; --success-color: #4caf7e; --warning-color: #f9a857; --error-color: #eb5757; --info-color: #5b9bd5; --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1); --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12); --border-radius-sm: 4px; --border-radius-md: 8px; --border-radius-lg: 12px; --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1); --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1); --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-main); } html, body { height: 100%; } body { background-color: var(--silver-primary); color: var(--navy-primary); display: flex; flex-direction: column; line-height: 1.5; overflow-x: hidden; } .app-container { max-width: 700px; width: 100%; height: 700px; margin: 0 auto; background-color: var(--silver-primary); border-radius: var(--border-radius-lg); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; } .header { background-color: var(--navy-primary); padding: 1.2rem 1.5rem; display: flex; justify-content: space-between; align-items: center; position: relative; } .logo { display: flex; align-items: center; gap: 0.8rem; color: white; font-weight: 700; font-size: 1.3rem; } .logo-icon { width: 28px; height: 28px; background-color: var(--silver-primary); border-radius: var(--border-radius-sm); display: flex; align-items: center; justify-content: center; } .logo-icon svg { width: 18px; height: 18px; color: var(--navy-primary); } .profile-button { width: 42px; height: 42px; background-color: var(--navy-light); border: 2px solid var(--silver-secondary); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform var(--transition-fast); overflow: hidden; } .profile-button:hover { transform: scale(1.1); } .content { padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem; } .account-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } .summary-card { background-color: white; border-radius: var(--border-radius-md); padding: 1.2rem; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--silver-secondary); transition: transform var(--transition-fast), box-shadow var(--transition-fast); } .summary-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } .summary-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background-color: var(--navy-primary); border-top-left-radius: var(--border-radius-md); border-bottom-left-radius: var(--border-radius-md); opacity: 0.9; } .balance-card::before { background-color: var(--info-color); } .savings-card::before { background-color: var(--success-color); } .card-label { font-size: 0.85rem; font-weight: 500; color: var(--silver-dark); margin-bottom: 0.3rem; } .card-value { font-size: 1.5rem; font-weight: 700; color: var(--navy-primary); } .recent-transactions { display: flex; flex-direction: column; gap: 0.8rem; background-color: white; border-radius: var(--border-radius-md); padding: 1.2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--silver-secondary); } .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; } .section-title { font-size: 1.1rem; font-weight: 600; color: var(--navy-primary); } .view-all { font-size: 0.85rem; color: var(--info-color); font-weight: 500; cursor: pointer; transition: opacity var(--transition-fast); } .view-all:hover { opacity: 0.8; text-decoration: underline; } .transaction-item { display: flex; align-items: center; padding: 0.8rem; border-radius: var(--border-radius-sm); transition: background-color var(--transition-fast); cursor: pointer; position: relative; } .transaction-item:hover { background-color: rgba(203, 213, 225, 0.2); } .transaction-icon { width: 42px; height: 42px; border-radius: var(--border-radius-sm); display: flex; align-items: center; justify-content: center; margin-right: 0.8rem; flex-shrink: 0; } .transaction-icon svg { width: 22px; height: 22px; color: white; } .transaction-details { flex: 1; } .transaction-name { font-weight: 600; font-size: 0.95rem; color: var(--navy-primary); margin-bottom: 0.2rem; } .transaction-date { font-size: 0.8rem; color: var(--silver-dark); } .transaction-amount { font-weight: 600; font-size: 1rem; } .amount-positive { color: var(--success-color); } .amount-negative { color: var(--error-color); } .divider { height: 1px; background-color: var(--silver-secondary); margin: 0.3rem 0; opacity: 0.5; } .quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; } .action-button { background-color: white; border: 1px solid var(--silver-secondary); border-radius: var(--border-radius-md); padding: 1rem 0.8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; cursor: pointer; transition: transform var(--transition-fast), box-shadow var(--transition-fast); } .action-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } .action-icon { width: 42px; height: 42px; border-radius: var(--border-radius-sm); background-color: var(--navy-light); display: flex; align-items: center; justify-content: center; margin-bottom: 0.3rem; } .action-icon svg { width: 22px; height: 22px; color: white; } .action-label { font-size: 0.85rem; font-weight: 600; color: var(--navy-primary); text-align: center; } .footer { background-color: var(--navy-primary); padding: 1rem; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-md); } .nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--silver-secondary); cursor: pointer; transition: color var(--transition-fast); padding: 0.3rem 0.8rem; } .nav-item.active { color: white; } .nav-item:hover:not(.active) { color: var(--silver-primary); } .nav-icon { margin-bottom: 0.3rem; } .nav-label { font-size: 0.75rem; font-weight: 500; } /* Modal styling */ .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); z-index: 100; align-items: center; justify-content: center; animation: fadeIn 0.3s forwards; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .modal { background-color: white; border-radius: var(--border-radius-md); width: 90%; max-width: 400px; box-shadow: var(--shadow-lg); overflow: hidden; animation: slideUp 0.4s forwards; } @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .modal-header { background-color: var(--navy-primary); padding: 1.2rem; display: flex; justify-content: space-between; align-items: center; color: white; } .modal-title { font-size: 1.1rem; font-weight: 600; } .modal-close { cursor: pointer; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.1); transition: background-color var(--transition-fast); } .modal-close:hover { background-color: rgba(255, 255, 255, 0.2); } .modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; } .form-group { display: flex; flex-direction: column; gap: 0.4rem; } .form-label { font-size: 0.9rem; font-weight: 500; color: var(--navy-primary); } .form-input { border: 2px solid var(--silver-secondary); border-radius: var(--border-radius-sm); padding: 0.8rem 1rem; font-size: 1rem; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); background-color: var(--silver-primary); color: var(--navy-primary); } .form-input:focus { outline: none; border-color: var(--navy-primary); box-shadow: 0 0 0 3px rgba(26, 44, 66, 0.2); animation: securePulse 0.4s; } @keyframes securePulse { 0% { box-shadow: 0 0 0 0 rgba(26, 44, 66, 0.3); } 70% { box-shadow: 0 0 0 5px rgba(26, 44, 66, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 44, 66, 0); } } .modal-footer { padding: 1rem 1.5rem; display: flex; justify-content: flex-end; gap: 1rem; border-top: 1px solid var(--silver-secondary); } .btn { padding: 0.8rem 1.2rem; border: none; border-radius: var(--border-radius-sm); font-weight: 600; cursor: pointer; transition: all var(--transition-fast); } .btn-secondary { background-color: var(--silver-primary); color: var(--navy-primary); } .btn-secondary:hover { background-color: var(--silver-secondary); } .btn-primary { background-color: var(--navy-primary); color: white; position: relative; overflow: hidden; } .btn-primary::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: all 0.6s; } .btn-primary:hover { background-color: var(--navy-secondary); } .btn-primary:hover::after { left: 100%; } /* SecurePlate - a unique security indicator */ .secure-plate { position: absolute; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; color: var(--silver-dark); opacity: 0.8; } .secure-pulse { width: 6px; height: 6px; background-color: var(--success-color); border-radius: 50%; animation: pulse 2s infinite; } @keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 126, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(76, 175, 126, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 126, 0); } } /* Utility classes */ .mt-2 { margin-top: 0.5rem; } /* Responsive Adjustments */ @media (max-width: 480px) { .account-summary { grid-template-columns: 1fr; } .quick-actions { grid-template-columns: 1fr 1fr; } .card-value { font-size: 1.3rem; } .nav-label { font-size: 0.7rem; } .action-button { padding: 0.8rem 0.6rem; } .action-icon { width: 36px; height: 36px; } .action-label { font-size: 0.75rem; } } </style> </head> <body> <div class="app-container"> <header class="header"> <div class="logo"> <div class="logo-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <path d="M12.0001 2C6.48812 2 2.00012 6.48 2.00012 12C2.00012 17.52 6.48812 22 12.0001 22C17.5121 22 22.0001 17.52 22.0001 12C22.0001 6.48 17.5121 2 12.0001 2ZM14.8201 17.32C14.6301 17.83 14.0301 18.08 13.5401 17.86L9.00012 15.82C8.85012 15.76 8.73012 15.64 8.67012 15.5C8.55012 15.24 8.60012 14.96 8.78012 14.76L13.4001 8.98C13.6001 8.74 14.0001 8.73 14.2201 8.95C14.4401 9.18 14.4501 9.54 14.2401 9.78L10.4201 14.51L13.8401 16.07C14.1301 16.21 14.4501 15.97 14.4301 15.66L14.0501 10.91C14.0301 10.59 14.2901 10.31 14.6101 10.33C14.9301 10.35 15.1801 10.63 15.1601 10.95L14.8201 17.32Z"/> </svg> </div> <span>SecureFin</span> </div> <div class="profile-button" id="profileBtn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="22" height="22"> <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 6C13.93 6 15.5 7.57 15.5 9.5C15.5 11.43 13.93 13 12 13C10.07 13 8.5 11.43 8.5 9.5C8.5 7.57 10.07 6 12 6ZM12 20C9.97 20 8.1 19.33 6.66 18.16C6.73 15.64 9.27 13.5 12 13.5C14.73 13.5 17.27 15.64 17.34 18.16C15.9 19.33 14.03 20 12 20Z"/> </svg> </div> </header> <main class="content"> <section class="account-summary"> <div class="summary-card balance-card"> <div class="card-label">Available Balance</div> <div class="card-value">$8,427.56</div> </div> <div class="summary-card savings-card"> <div class="card-label">Savings Goal</div> <div class="card-value">$15,000.00</div> <div class="mt-2" style="height: 3px; background-color: var(--silver-secondary); border-radius: 10px; overflow: hidden;"> <div style="width: 56%; height: 100%; background-color: var(--success-color);"></div> </div> </div> </section> <section class="recent-transactions"> <div class="section-header"> <div class="section-title">Recent Transactions</div> <div class="view-all">View All</div> </div> <div class="transaction-item"> <div class="transaction-icon" style="background-color: var(--info-color);"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <path d="M19 14V6C19 4.9 18.1 4 17 4H3C1.9 4 1 4.9 1 6V14C1 15.1 1.9 16 3 16H17C18.1 16 19 15.1 19 14ZM17 14H3V6H17V14ZM10 7C8.34 7 7 8.34 7 10C7 11.66 8.34 13 10 13C11.66 13 13 11.66 13 10C13 8.34 11.66 7 10 7ZM23 7V18C23 19.1 22.1 20 21 20H4C4 19 4 19.1 4 18H21V7C22.1 7 22 7 23 7Z"/> </svg> </div> <div class="transaction-details"> <div class="transaction-name">Paycheck Deposit</div> <div class="transaction-date">Oct 25, 2023</div> </div> <div class="transaction-amount amount-positive">+$3,245.68</div> </div> <div class="divider"></div> <div class="transaction-item"> <div class="transaction-icon" style="background-color: var(--navy-light);"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <path d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z"/> </svg> </div> <div class="transaction-details"> <div class="transaction-name">Emergency Fund Transfer</div> <div class="transaction-date">Oct 23, 2023</div> </div> <div class="transaction-amount amount-negative">-$500.00</div> </div> <div class="divider"></div> <div class="transaction-item"> <div class="transaction-icon" style="background-color: var(--warning-color);"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <path d="M7 18C5.9 18 5 18.9 5 20C5 21.1 5.9 22 7 22C8.1 22 9 21.1 9 20C9 18.9 8.1 18 7 18ZM17 18C15.9 18 15 18.9 15 20C15 21.1 15.9 22 17 22C18.1 22 19 21.1 19 20C19 18.9 18.1 18 17 18ZM7.17 14.75L7.2 14.63L8.1 13H15.55C16.3 13 16.96 12.59 17.3 11.97L21.16 4.96L19.42 4H19.41L18.31 6L15.55 11H8.53L8.4 10.73L6.16 6L5.21 4L4.27 2H1V4H3L6.6 11.59L5.25 14.04C5.09 14.32 5 14.65 5 15C5 16.1 5.9 17 7 17H19V15H7.42C7.29 15 7.17 14.89 7.17 14.75Z"/> </svg> </div> <div class="transaction-details"> <div class="transaction-name">Costco Wholesale</div> <div class="transaction-date">Oct 20, 2023</div> </div> <div class="transaction-amount amount-negative">-$142.87</div> </div> </section> <section class="quick-actions"> <div class="action-button" id="transferBtn"> <div class="action-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <path d="M19 14V6C19 4.9 18.1 4 17 4H3C1.9 4 1 4.9 1 6V14C1 15.1 1.9 16 3 16H17C18.1 16 19 15.1 19 14ZM10 13C8.34 13 7 11.66 7 10C7 8.34 8.34 7 10 7C11.66 7 13 8.34 13 10C13 11.66 11.66 13 10 13ZM8 10C8 11.1 8.9 12 10 12C11.1 12 12 11.1 12 10C12 8.9 11.1 8 10 8C8.9 8 8 8.9 8 10ZM21 6V18C21 19.1 20.1 20 19 20H6C6 19 6 19.1 6 18H19V6H21Z"/> </svg> </div> <div class="action-label">Transfer</div> </div> <div class="action-button"> <div class="action-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <path d="M3.00488 4V1H5.00488V4H8.00488V6H5.00488V9H3.00488V6H0.00488281V4H3.00488ZM6.00488 10V7H9.00488V4H16.0049L17.7349 6H21.0049C22.1049 6 23.0049 6.9 23.0049 8V20C23.0049 21.1 22.1049 22 21.0049 22H5.00488C3.90488 22 3.00488 21.1 3.00488 20V10H6.00488ZM13.0049 19C15.7649 19 18.0049 16.76 18.0049 14C18.0049 11.24 15.7649 9 13.0049 9C10.2449 9 8.00488 11.24 8.00488 14C8.00488 16.76 10.2449 19 13.0049 19ZM9.50488 14C9.50488 15.93 11.0749 17.5 13.0049 17.5C14.9349 17.5 16.5049 15.93 16.5049 14C16.5049 12.07 14.9349 10.5 13.0049 10.5C11.0749 10.5 9.50488 12.07 9.50488 14Z"/> </svg> </div> <div class="action-label">Deposit</div> </div> <div class="action-button"> <div class="action-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <path d="M4 20H19V21H4C3.45 21 3 20.55 3 20V5H4V20ZM21 2H8C7.45 2 7 2.45 7 3V17C7 17.55 7.45 18 8 18H21C21.55 18 22 17.55 22 17V3C22 2.45 21.55 2 21 2ZM20 10H9V13H20V10ZM20 14H9V16H20V14ZM20 4H9V9H20V4Z"/> </svg> </div> <div class="action-label">Statements</div> </div> </section> <div class="secure-plate"> <div class="secure-pulse"></div> <span>SecureConnect Active</span> </div> </main> <footer class="footer"> <div class="nav-item active"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="24" height="24"> <path d="M12 5.69L17 10.19V18H15V12H9V18H7V10.19L12 5.69ZM12 3L2 12H5V20H11V14H13V20H19V12H22L12 3Z"/> </svg> </div> <div class="nav-label">Home</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="24" height="24"> <path d="M11.8 10.9C9.53 10.31 8.8 9.7 8.8 8.75C8.8 7.66 9.81 6.9 11.5 6.9C13.28 6.9 13.94 7.75 14 9H16.21C16.14 7.28 15.09 5.7 13 5.19V3H10V5.16C8.06 5.58 6.5 6.84 6.5 8.77C6.5 11.08 8.41 12.23 11.2 12.9C13.7 13.5 14.2 14.38 14.2 15.31C14.2 16 13.71 17.1 11.5 17.1C9.44 17.1 8.63 16.18 8.5 15H6.32C6.44 17.19 8.08 18.42 10 18.83V21H13V18.85C14.95 18.48 16.5 17.35 16.5 15.3C16.5 12.46 14.07 11.49 11.8 10.9Z"/> </svg> </div> <div class="nav-label">Finances</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="24" height="24"> <path d="M13.5 8H12V13L16.28 15.54L17 14.33L13.5 12.25V8ZM13 3C8.03 3 4 7.03 4 12H1L4.96 16.03L9 12H6C6 8.13 9.13 5 13 5C16.87 5 20 8.13 20 12C20 15.87 16.87 19 13 19C11.07 19 9.32 18.21 8.06 16.94L6.64 18.36C8.27 19.99 10.51 21 13 21C17.97 21 22 16.97 22 12C22 7.03 17.97 3 13 3Z"/> </svg> </div> <div class="nav-label">History</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="24" height="24"> <path d="M19.14 12.94C19.18 12.64 19.2 12.33 19.2 12C19.2 11.67 19.18 11.36 19.13 11.06C21.09 10.66 23 8.98 23 6.99C23 4.99 21.1 3.32 19.13 2.92C18.07 1.14 16.2 0 14 0C11.8 0 9.93 1.14 8.87 2.92C6.9 3.32 5 4.99 5 6.99C5 8.98 6.9 10.66 8.87 11.06C8.82 11.36 8.8 11.67 8.8 12C8.8 12.33 8.82 12.64 8.86 12.94C6.9 13.34 5 15.01 5 17.01C5 19.01 6.9 20.68 8.87 21.08C9.93 22.86 11.8 24 14 24C16.2 24 18.07 22.86 19.13 21.08C21.1 20.68 23 19.01 23 17.01C23 15.01 21.09 13.34 19.14 12.94ZM14 2C15.17 2 16.18 2.85 16.68 4H11.32C11.82 2.85 12.83 2 14 2ZM14 6C15.17 6 16.18 6.85 16.68 8H11.32C11.82 6.85 12.83 6 14 6ZM14 22C12.83 22 11.82 21.15 11.32 20H16.68C16.18 21.15 15.17 22 14 22ZM14 18C12.83 18 11.82 17.15 11.32 16H16.68C16.18 17.15 15.17 18 14 18Z"/> </svg> </div> <div class="nav-label">Insights</div> </div> </footer> </div> <!-- Transfer Modal --> <div class="modal-overlay" id="transferModal"> <div class="modal"> <div class="modal-header"> <div class="modal-title">Secure Transfer</div> <div class="modal-close" id="closeModalBtn"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18" height="18"> <path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"/> </svg> </div> </div> <div class="modal-body"> <div class="form-group"> <label class="form-label" for="fromAccount">From Account</label> <select id="fromAccount" class="form-input"> <option value="checking">Primary Checking - $8,427.56</option> <option value="savings">High-Yield Savings - $12,345.89</option> <option value="investment">Investment Account - $24,680.32</option> </select> </div> <div class="form-group"> <label class="form-label" for="toAccount">To Account</label> <select id="toAccount" class="form-input"> <option value="">Select destination account</option> <option value="external">External Account</option>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Wanderlust Explorer - Travel Booking</title> <style> :root { --primary: #FF7B5A; --secondary: #8A4FFF; --accent: #FF458A; --light: #FFF6F0; --dark: #2D3047; --gradient-start: #FF7B5A; --gradient-mid: #FF458A; --gradient-end: #8A4FFF; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { width: 100%; height: 100vh; background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end)); background-size: 400% 400%; animation: gradient 15s ease infinite; color: var(--dark); display: flex; justify-content: center; align-items: center; overflow-x: hidden; } @keyframes gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .container { width: 100%; max-width: 680px; padding: 20px; perspective: 1000px; } .header { text-align: center; margin-bottom: 25px; color: white; position: relative; } .header h1 { font-size: 2.2rem; margin-bottom: 10px; font-weight: 800; letter-spacing: -0.5px; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .header p { font-size: 1rem; opacity: 0.9; max-width: 500px; margin: 0 auto; } .search-bar { display: flex; background: rgba(255, 255, 255, 0.95); border-radius: 30px; padding: 8px; margin-bottom: 30px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; transition: all 0.3s ease; } .search-bar:hover { box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); transform: translateY(-2px); } .search-bar input { flex: 1; border: none; background: transparent; padding: 12px 15px; font-size: 16px; outline: none; } .search-bar button { background: var(--gradient-mid); color: white; border: none; border-radius: 24px; padding: 10px 25px; cursor: pointer; font-weight: 600; transition: all 0.3s ease; } .search-bar button:hover { background: var(--accent); transform: scale(1.05); } .itinerary-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 10px; } .card { background: rgba(255, 255, 255, 0.95); border-radius: 30px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; transform-style: preserve-3d; backface-visibility: hidden; } .card:hover { transform: translateY(-10px) rotateX(5deg); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); } .card:hover .card-image img { transform: scale(1.1); } .card:hover::before { opacity: 1; transform: translate(-50%, -50%) scale(1); } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(255, 123, 90, 0.3), rgba(138, 79, 255, 0.3)); opacity: 0; z-index: 1; transition: opacity 0.3s ease; border-radius: 30px; } .card::after { content: ''; position: absolute; width: 100px; height: 100px; top: -10px; right: -10px; background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%); opacity: 0; transition: opacity 0.5s ease; pointer-events: none; z-index: 2; border-radius: 50%; } .card:hover::after { opacity: 0.7; animation: cornerGlow 2s infinite alternate; } @keyframes cornerGlow { 0% { transform: scale(0.8); opacity: 0.5; } 100% { transform: scale(1.2); opacity: 0.8; } } .card-image { height: 180px; overflow: hidden; position: relative; } .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .card-badge { position: absolute; top: 15px; left: 15px; background: var(--accent); color: white; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; z-index: 2; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); } .card-content { padding: 20px; position: relative; z-index: 2; } .card-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: var(--dark); } .card-details { display: flex; justify-content: space-between; margin: 10px 0; font-size: 14px; color: #555; } .card-details span { display: flex; align-items: center; } .card-details i { margin-right: 5px; color: var(--primary); } .price { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin: 15px 0; } .card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; } .book-btn { background: linear-gradient(45deg, var(--primary), var(--accent)); color: white; border: none; padding: 10px 20px; border-radius: 25px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(255, 69, 138, 0.3); } .book-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 69, 138, 0.4); } .save-btn { background: transparent; border: none; color: #888; display: flex; align-items: center; cursor: pointer; transition: all 0.3s ease; } .save-btn i { font-size: 1.2rem; margin-right: 5px; transition: all 0.3s ease; } .save-btn:hover { color: var(--accent); } .save-btn:hover i { transform: scale(1.2); color: var(--accent); } .save-btn.saved i { color: var(--accent); } .rating { display: flex; align-items: center; color: #FFB800; font-weight: 600; font-size: 14px; } .rating i { margin-right: 3px; } .tabs { display: flex; background: rgba(255, 255, 255, 0.2); border-radius: 20px; padding: 5px; margin-bottom: 30px; backdrop-filter: blur(5px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .tab { flex: 1; text-align: center; padding: 12px; color: white; font-weight: 600; border-radius: 15px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .tab.active { background: rgba(255, 255, 255, 0.9); color: var(--accent); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .tab span { position: relative; z-index: 1; } .tab .tab-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.1); transform: translateY(100%); transition: transform 0.3s ease; } .tab:hover .tab-hover { transform: translateY(0); } @media (max-width: 700px) { .header h1 { font-size: 1.8rem; } .header p { font-size: 0.9rem; } .search-bar { flex-direction: column; padding: 12px; border-radius: 20px; } .search-bar input { margin-bottom: 10px; padding: 10px; } .itinerary-cards { grid-template-columns: 1fr; } .tabs { overflow-x: auto; white-space: nowrap; margin-bottom: 20px; } .tab { padding: 10px 15px; font-size: 14px; } } /* Animated wave effect for the bottom of the page */ .wave-container { position: fixed; bottom: 0; left: 0; width: 100%; height: 100px; overflow: hidden; z-index: -1; } .wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' opacity='.25' fill='%23ffffff'%3E%3C/path%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' opacity='.5' fill='%23ffffff'%3E%3C/path%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E"); background-repeat: repeat-x; animation: wave 25s linear infinite; } .wave:nth-child(2) { bottom: -25px; animation: wave 30s linear infinite reverse; opacity: 0.7; } .wave:nth-child(3) { bottom: -50px; animation: wave 35s linear infinite; opacity: 0.5; } @keyframes wave { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } } </style> </head> <body> <div class="container"> <div class="header"> <h1>Wander Beyond</h1> <p>Discover journeys that transform you, at corners of the world waiting to be explored.</p> </div> <div class="tabs"> <div class="tab active"> <span>Flights</span> <div class="tab-hover"></div> </div> <div class="tab"> <span>Hotels</span> <div class="tab-hover"></div> </div> <div class="tab"> <span>Packages</span> <div class="tab-hover"></div> </div> <div class="tab"> <span>Experiences</span> <div class="tab-hover"></div> </div> </div> <div class="search-bar"> <input type="text" placeholder="Where would you like to go?"> <button id="search-btn">Explore</button> </div> <div class="itinerary-cards"> <div class="card"> <div class="card-badge">20% OFF</div> <div class="card-image"> <img src="https://images.unsplash.com/photo-1530521954074-e64f6810b32d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&q=80" alt="Santorini"> </div> <div class="card-content"> <h3 class="card-title">Santorini Sunset Escape</h3> <p>Experience the iconic blue domes and breathtaking caldera views.</p> <div class="card-details"> <span><i class="far fa-calendar"></i> 5 nights</span> <span class="rating"><i class="fas fa-star"></i> 4.8</span> </div> <div class="price">$1,249<span style="font-size: 14px; font-weight: normal; color: #666;"> /person</span></div> <div class="card-footer"> <button class="book-btn">Book Now</button> <button class="save-btn"><i class="far fa-heart"></i> Save</button> </div> </div> </div> <div class="card"> <div class="card-badge">HOT DEAL</div> <div class="card-image"> <img src="https://images.unsplash.com/photo-1535139262971-c51845709a48?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&q=80" alt="Bali"> </div> <div class="card-content"> <h3 class="card-title">Bali Tranquil Retreat</h3> <p>Immerse yourself in lush landscapes and ancient temples.</p> <div class="card-details"> <span><i class="far fa-calendar"></i> 7 nights</span> <span class="rating"><i class="fas fa-star"></i> 4.6</span> </div> <div class="price">$899<span style="font-size: 14px; font-weight: normal; color: #666;"> /person</span></div> <div class="card-footer"> <button class="book-btn">Book Now</button> <button class="save-btn"><i class="far fa-heart"></i> Save</button> </div> </div> </div> </div> </div> <div class="wave-container"> <div class="wave"></div> <div class="wave"></div> <div class="wave"></div> </div> <script> // Font Awesome Icons (Minimal needed set) document.head.innerHTML += ` <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> `; // Tab switching functionality const tabs = document.querySelectorAll('.tab'); tabs.forEach(tab => { tab.addEventListener('click', () => { tabs.forEach(t => t.classList.remove('active')); tab.classList.add('active'); }); }); // Save button functionality const saveButtons = document.querySelectorAll('.save-btn'); saveButtons.forEach(btn => { btn.addEventListener('click', function() { this.classList.toggle('saved'); const icon = this.querySelector('i'); if (this.classList.contains('saved')) { icon.classList.remove('far'); icon.classList.add('fas'); icon.style.color = '#FF458A'; // Add heart animation const heart = document.createElement('span'); heart.innerHTML = '❤️'; heart.style.position = 'absolute'; heart.style.fontSize = '20px'; heart.style.left = `${this.offsetLeft + 10}px`; heart.style.top = `${this.offsetTop}px`; heart.style.zIndex = '100'; heart.style.pointerEvents = 'none'; document.body.appendChild(heart); let startTime = null; function animateHeart(timestamp) { if (!startTime) startTime = timestamp; const progress = timestamp - startTime; heart.style.transform = `translateY(${-progress/20}px) scale(${1 + progress/500})`; heart.style.opacity = 1 - progress/700; if (progress < 700) { requestAnimationFrame(animateHeart); } else { document.body.removeChild(heart); } } requestAnimationFrame(animateHeart); } else { icon.classList.remove('fas'); icon.classList.add('far'); icon.style.color = ''; } }); }); // Search button animation and functionality const searchBtn = document.getElementById('search-btn'); searchBtn.addEventListener('click', function() { this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = 'scale(1)'; }, 100); // Simulate search const searchInput = document.querySelector('.search-bar input'); if (searchInput.value.trim()) { // Add a subtle "searching" animation this.innerHTML = '<i class="fas fa-sync fa-spin"></i>'; setTimeout(() => { this.innerHTML = 'Explore'; searchInput.value = ''; // Could add more card generation logic here }, 1500); } }); // Dynamic corner highlight effect on hover const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const highlight = this.querySelector('::after'); this.style.setProperty('--x', `${x}px`); this.style.setProperty('--y', `${y}px`); }); }); // Book now button effect const bookBtns = document.querySelectorAll('.book-btn'); bookBtns.forEach(btn => { btn.addEventListener('click', function() { this.style.transform = 'scale(0.95) translateY(-2px)'; setTimeout(() => { this.style.transform = ''; // Show booking confirmation (for demo purposes) this.innerHTML = 'Booked!'; this.style.background = '#4CAF50'; setTimeout(() => { this.innerHTML = 'Book Now'; this.style.background = ''; }, 2000); }, 150); }); }); </script> </body> </html>