Card layouts are a versatile and visually appealing way to organize content on a webpage. They offer a clean and structured format that enhances user experience.
In this article, we will explore ten exemplary card layout designs that can elevate your UI projects. Each example showcases unique features and design principles to inspire your next creation.
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 create pixel-perfect card layouts. Loved by designers and developers alike, Subframe ensures your UI is 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 card layouts and stunning UIs in minutes. Our drag-and-drop editor and beautifully crafted components make designing efficient and effortless.
Don't wait! Start for free and begin creating 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>The Global Insight</title> <style> @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Source+Sans+Pro:wght@300;400;600&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } :root { --color-primary: #182747; --color-secondary: #d64045; --color-tertiary: #eef2f7; --color-text: #333; --color-light: #fff; --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } body { font-family: 'Source Sans Pro', sans-serif; background-color: #f9f9f9; color: var(--color-text); padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; } .container { max-width: 700px; width: 100%; margin: 0 auto; } .header { text-align: center; margin-bottom: 30px; position: relative; } .header h1 { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 2.5rem; color: var(--color-primary); letter-spacing: -0.5px; margin-bottom: 10px; position: relative; display: inline-block; } .header h1::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background-color: var(--color-secondary); } .header p { font-size: 0.9rem; color: #777; max-width: 80%; margin: 0 auto; } .category-nav { display: flex; justify-content: center; margin-bottom: 25px; overflow-x: auto; padding-bottom: 5px; max-width: 100%; } .category-nav button { background: none; border: none; font-family: 'Source Sans Pro', sans-serif; font-size: 0.9rem; font-weight: 600; color: #888; padding: 8px 16px; margin: 0 5px; cursor: pointer; transition: var(--transition); border-radius: 20px; white-space: nowrap; } .category-nav button.active, .category-nav button:hover { color: var(--color-primary); background-color: var(--color-tertiary); } .news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; } .news-card { position: relative; background-color: var(--color-light); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); transition: var(--transition); height: 100%; cursor: pointer; } .news-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); } .card-image { height: 180px; overflow: hidden; position: relative; } .card-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); } .news-card:hover .card-image img { transform: scale(1.05); } .card-category { position: absolute; top: 15px; left: 15px; background-color: var(--color-secondary); color: white; font-size: 0.7rem; font-weight: 600; padding: 5px 10px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; } .card-content { padding: 20px; position: relative; } .card-date { font-size: 0.8rem; color: #999; margin-bottom: 8px; display: flex; align-items: center; } .card-date svg { margin-right: 5px; width: 12px; height: 12px; } .card-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin-bottom: 12px; color: var(--color-primary); transition: var(--transition); } .news-card:hover .card-title { color: var(--color-secondary); } .card-excerpt { font-size: 0.9rem; line-height: 1.5; color: #666; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: #888; } .read-more { color: var(--color-secondary); font-weight: 600; display: flex; align-items: center; transition: var(--transition); text-decoration: none; } .read-more svg { margin-left: 5px; transition: var(--transition); } .news-card:hover .read-more svg { transform: translateX(3px); } .card-footer .author { display: flex; align-items: center; } .card-footer .author img { width: 25px; height: 25px; border-radius: 50%; margin-right: 8px; object-fit: cover; } /* Featured card styling */ .featured-card { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .featured-card .card-image { height: 100%; } .featured-card .card-content { padding: 25px; display: flex; flex-direction: column; justify-content: center; } .featured-card .card-title { font-size: 1.6rem; margin-bottom: 15px; } .featured-card .card-excerpt { -webkit-line-clamp: 4; margin-bottom: 25px; } .featured-tag { position: absolute; top: 15px; right: 15px; background-color: rgba(24, 39, 71, 0.85); color: white; font-size: 0.7rem; font-weight: 600; padding: 5px 10px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; } .featured-tag svg { margin-right: 5px; width: 12px; height: 12px; } /* Loading animation */ .loading-animation { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background-color: var(--color-tertiary); z-index: 1000; } .loading-bar { height: 100%; width: 0; background-color: var(--color-secondary); transition: width 0.3s ease-in-out; } /* Reading time indicator */ .reading-time { display: flex; align-items: center; color: #888; } .reading-time svg { margin-right: 5px; width: 12px; height: 12px; } /* Responsive styles */ @media (max-width: 768px) { .featured-card { grid-template-columns: 1fr; } .featured-card .card-image { height: 200px; } .header h1 { font-size: 2rem; } .news-grid { grid-template-columns: 1fr; } } @media (max-width: 500px) { .card-footer { flex-direction: column; align-items: flex-start; gap: 10px; } .header h1 { font-size: 1.8rem; } .header p { max-width: 95%; } } /* Dark mode toggle */ .dark-mode-toggle { position: absolute; top: 0; right: 0; background: none; border: none; color: var(--color-primary); cursor: pointer; padding: 5px; display: flex; align-items: center; justify-content: center; transition: var(--transition); } .dark-mode-toggle:hover { color: var(--color-secondary); } /* Dark mode styles */ body.dark-mode { background-color: #1a1a2e; color: #ddd; } body.dark-mode .header h1 { color: #fff; } body.dark-mode .category-nav button { color: #aaa; } body.dark-mode .category-nav button.active, body.dark-mode .category-nav button:hover { color: #fff; background-color: #293b5f; } body.dark-mode .news-card { background-color: #222639; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } body.dark-mode .card-title { color: #fff; } body.dark-mode .card-excerpt { color: #bbb; } body.dark-mode .card-date, body.dark-mode .card-footer { color: #999; } /* Save button */ .save-button { position: absolute; top: 15px; right: 15px; background: none; border: none; color: #fff; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; background-color: rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; transition: var(--transition); z-index: 2; } .save-button:hover, .save-button.saved { background-color: var(--color-secondary); } .save-button svg { width: 16px; height: 16px; fill: #fff; transition: var(--transition); } .save-button.saved svg { animation: pulse 0.3s ease-in-out; } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } /* Card hover effect */ .news-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background-color: var(--color-secondary); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease-in-out; } .news-card:hover::after { transform: scaleX(1); } </style> </head> <body> <div class="loading-animation"> <div id="loadingBar" class="loading-bar"></div> </div> <div class="container"> <div class="header"> <h1>The Global Insight</h1> <p>Stay informed with our curated selection of today's most impactful stories</p> <button class="dark-mode-toggle" id="darkModeToggle" aria-label="Toggle dark mode"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path> </svg> </button> </div> <div class="category-nav"> <button class="active" data-category="all">All</button> <button data-category="technology">Technology</button> <button data-category="business">Business</button> <button data-category="climate">Climate</button> <button data-category="politics">Politics</button> <button data-category="health">Health</button> </div> <div class="news-grid" id="newsGrid"> <!-- News cards will be inserted here by JavaScript --> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Simulate loading const loadingBar = document.getElementById('loadingBar'); let width = 0; const loadingInterval = setInterval(() => { width += 5; loadingBar.style.width = width + '%'; if (width >= 100) { clearInterval(loadingInterval); setTimeout(() => { document.querySelector('.loading-animation').style.display = 'none'; }, 300); } }, 50); // Sample news data const newsData = [ { id: 1, title: "Quantum Computing Breakthrough Promises New Era in Data Processing", excerpt: "Scientists have achieved a quantum supremacy milestone by maintaining stable qubits for over 10 minutes, potentially revolutionizing machine learning and cryptography.", image: "https://images.unsplash.com/photo-1639762681057-408e52192e55?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1074&q=80", category: "technology", date: "May 18, 2023", author: { name: "Elena Mercer", avatar: "https://randomuser.me/api/portraits/women/12.jpg" }, featured: true, readingTime: 6 }, { id: 2, title: "Global Markets React to Unexpected Central Bank Decisions", excerpt: "Financial markets experienced significant volatility today as three major central banks announced contrasting policy directions within hours of each other.", image: "https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80", category: "business", date: "May 16, 2023", author: { name: "Michael Chen", avatar: "https://randomuser.me/api/portraits/men/32.jpg" }, featured: false, readingTime: 4 }, { id: 3, title: "Arctic Ice Reaches Record Low for Third Consecutive Year", excerpt: "Satellite data confirms the Arctic sea ice extent has reached its lowest level since records began, raising urgent concerns about accelerating climate feedback loops.", image: "https://images.unsplash.com/photo-1581229633144-437d9ecfc406?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1074&q=80", category: "climate", date: "May 15, 2023", author: { name: "Sarah Winters", avatar: "https://randomuser.me/api/portraits/women/67.jpg" }, featured: false, readingTime: 5 }, { id: 4, title: "Landmark Healthcare Bill Passes After Marathon Debate", excerpt: "After 27 hours of continuous debate, legislators approved a comprehensive healthcare reform package focused on prescription drug pricing and rural hospital funding.", image: "https://images.unsplash.com/photo-1631815588090-d1bcbe9a8ba8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1632&q=80", category: "politics", date: "May 14, 2023", author: { name: "David Powell", avatar: "https://randomuser.me/api/portraits/men/41.jpg" }, featured: false, readingTime: 7 }, { id: 5, title: "Biotech Startup Develops AI-Powered Diagnostic Tool", excerpt: "A promising new algorithm can detect early signs of five major diseases from standard blood tests with 93% accuracy, potentially saving millions of lives through early intervention.", image: "https://images.unsplash.com/photo-1530026186672-2cd00ffc50fe?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80", category: "health", date: "May 13, 2023", author: { name: "Leila Ahmadi", avatar: "https://randomuser.me/api/portraits/women/33.jpg" }, featured: false, readingTime: 5 }, { id: 6, title: "Tech Giants Face New Antitrust Regulations Worldwide", excerpt: "Five major economies have simultaneously announced coordinated regulatory frameworks designed to address competitive concerns in digital marketplaces.", image: "https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80", category: "technology", date: "May 12, 2023", author: { name: "Robert Jackson", avatar: "https://randomuser.me/api/portraits/men/91.jpg" }, featured: false, readingTime: 4 } ]; // Render news cards function renderNewsCards(category = 'all') { const newsGrid = document.getElementById('newsGrid'); newsGrid.innerHTML = ''; const filteredNews = category === 'all' ? newsData : newsData.filter(news => news.category === category); filteredNews.forEach((news, index) => { const cardElement = document.createElement('div'); if (news.featured && category === 'all') { cardElement.className = 'news-card featured-card'; cardElement.innerHTML = ` <div class="card-image"> <img src="${news.image}" alt="${news.title}"> <button class="save-button" data-id="${news.id}" aria-label="Save article"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path> </svg> </button> <div class="card-category">${news.category}</div> <div class="featured-tag"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="currentColor"> <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon> </svg> Featured </div> </div> <div class="card-content"> <div class="card-date"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect> <line x1="16" y1="2" x2="16" y2="6"></line> <line x1="8" y1="2" x2="8" y2="6"></line> <line x1="3" y1="10" x2="21" y2="10"></line> </svg> ${news.date} </div> <h2 class="card-title">${news.title}</h2> <p class="card-excerpt">${news.excerpt}</p> <div class="card-footer"> <div class="author"> <img src="${news.author.avatar}" alt="${news.author.name}"> <span>${news.author.name}</span> </div> <div class="reading-time"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> ${news.readingTime} min read </div> <a href="#" class="read-more"> Read Article <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="5" y1="12" x2="19" y2="12"></line> <polyline points="12 5 19 12 12 19"></polyline> </svg> </a> </div> </div> `; } else { cardElement.className = 'news-card'; cardElement.innerHTML = ` <div class="card-image"> <img src="${news.image}" alt="${news.title}"> <button class="save-button" data-id="${news.id}" aria-label="Save article"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path> </svg> </button> <div class="card-category">${news.category}</div> </div> <div class="card-content"> <div class="card-date"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect> <line x1="16" y1="2" x2="16" y2="6"></line> <line x1="8" y1="2" x2="8" y2="6"></line> <line x1="3" y1="10" x2="21" y2="10"></line> </svg> ${news.date} </div> <h2 class="card-title">${news.title}</h2> <p class="card-excerpt">${news.excerpt}</p> <div class="card-footer"> <div class="author"> <img src="${news.author.avatar}" alt="${news.author.name}"> <span>${news.author.name}</span> </div> <a href="#" class="read-more"> Read Article <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="5" y1="12" x2="19" y2="12"></line> <polyline points="12 5 19 12 12 19"></polyline> </svg> </a> </div> </div> `; } newsGrid.appendChild(cardElement); // Adding animation delay for staggered entrance setTimeout(() => { cardElement.style.opacity = '1'; }, index * 100); }); // Initialize save buttons initSaveButtons(); } // Initialize save buttons functionality function initSaveButtons() { const saveButtons = document.querySelectorAll('.save-button'); saveButtons.forEach(button => { button.addEventListener('click', function(e) { e.stopPropagation(); this.classList.toggle('saved'); // Simulate saving to user's bookmarks const articleId = this.getAttribute('data-id'); console.log(`Article ${articleId} ${this.classList.contains('saved') ? 'saved' : 'removed'}`); }); }); } // Category navigation const categoryButtons = document.querySelectorAll('.category-nav button'); categoryButtons.forEach(button => { button.addEventListener('click', function() { // Update active state categoryButtons.forEach(btn => btn.classList.remove('active')); this.classList.add('active'); // Filter news by category const category = this.getAttribute('data-category'); renderNewsCards(category); }); }); // Dark mode toggle const darkModeToggle = document.getElementById('darkModeToggle'); darkModeToggle.addEventListener('click', function() { document.body.classList.toggle('dark-mode'); // Update icon based on mode if (document.body.classList.contains('dark-mode')) { this.innerHTML = ` <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> `; } else { this.innerHTML = ` <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path> </svg> `; } }); // Initialize the page renderNewsCards(); // Add card click animation document.addEventListener('click', function(e) { if (e.target.closest('.news-card')) { const card = e.target.closest('.news-card'); card.style.transform = 'scale(0.98)'; setTimeout(() => { card.style.transform = ''; }, 150); } }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Dashboard Summary Cards</title> <style> :root { --primary: #5762D5; --secondary: #FF6B6B; --tertiary: #4ECDC4; --quaternary: #FFA500; --light: #F8F9FA; --dark: #343A40; --gray: #ADB5BD; --shadow: rgba(149, 157, 165, 0.15); --card-radius: 16px; --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: #FAFBFC; color: var(--dark); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 100vh; padding: 20px; overflow-x: hidden; } .dashboard-container { max-width: 660px; width: 100%; } .dashboard-header { margin-bottom: 24px; } .dashboard-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: var(--dark); } .dashboard-header p { font-size: 16px; color: var(--gray); line-height: 1.5; } .dashboard-header .time-select { display: flex; align-items: center; margin-top: 16px; } .time-select-option { padding: 6px 12px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: var(--transition); margin-right: 8px; color: var(--gray); } .time-select-option.active { background-color: var(--primary); color: white; font-weight: 500; box-shadow: 0 4px 12px rgba(87, 98, 213, 0.2); } .grid-container { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, auto); gap: 24px; width: 100%; } @media (max-width: 600px) { .grid-container { grid-template-columns: 1fr; } } .card { background-color: white; border-radius: var(--card-radius); padding: 24px; box-shadow: 0 4px 20px var(--shadow); transition: var(--transition); overflow: hidden; position: relative; cursor: pointer; } .card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px var(--shadow); } .card:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; transition: var(--transition); opacity: 0; } .card:hover:after { opacity: 1; } .card.user-engagement:after { background: var(--primary); } .card.revenue:after { background: var(--secondary); } .card.conversion:after { background: var(--tertiary); } .card.growth:after { background: var(--quaternary); } .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .card-title { font-size: 16px; font-weight: 600; color: var(--dark); display: flex; align-items: center; } .card-title svg { margin-right: 8px; } .card-actions { position: relative; } .card-menu-btn { background: none; border: none; color: var(--gray); cursor: pointer; transition: var(--transition); } .card-menu-btn:hover { color: var(--dark); } .card-value { font-size: 32px; font-weight: 700; margin-bottom: 8px; transition: var(--transition); } .user-engagement .card-value { color: var(--primary); } .revenue .card-value { color: var(--secondary); } .conversion .card-value { color: var(--tertiary); } .growth .card-value { color: var(--quaternary); } .card-trend { display: flex; align-items: center; font-size: 14px; margin-bottom: 16px; } .trend-up { color: #28a745; } .trend-down { color: #dc3545; } .trend-icon { margin-right: 4px; } .trend-value { font-weight: 600; margin-right: 4px; } .trend-period { color: var(--gray); } .card-chart { height: 80px; width: 100%; position: relative; margin-top: 8px; } .tooltip { position: absolute; display: none; background: white; padding: 10px; border-radius: 6px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); pointer-events: none; z-index: 10; font-size: 12px; transition: var(--transition); } .tooltip-date { font-weight: 600; margin-bottom: 4px; } .tooltip-value { color: var(--primary); font-weight: 600; } .tooltip-label { color: var(--gray); margin-right: 4px; } .sparkline { stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; } .sparkline-area { fill-opacity: 0.2; } .user-engagement .sparkline { stroke: var(--primary); } .user-engagement .sparkline-area { fill: var(--primary); } .revenue .sparkline { stroke: var(--secondary); } .revenue .sparkline-area { fill: var(--secondary); } .conversion .sparkline { stroke: var(--tertiary); } .conversion .sparkline-area { fill: var(--tertiary); } .growth .sparkline { stroke: var(--quaternary); } .growth .sparkline-area { fill: var(--quaternary); } .sparkline-dot { fill: white; stroke-width: 2; r: 4; transition: r 0.2s ease-out; } .user-engagement .sparkline-dot { stroke: var(--primary); } .revenue .sparkline-dot { stroke: var(--secondary); } .conversion .sparkline-dot { stroke: var(--tertiary); } .growth .sparkline-dot { stroke: var(--quaternary); } .card:hover .sparkline-dot { r: 5; } .data-points { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .data-point { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer; z-index: 5; opacity: 0; } .card-progress { margin-top: 24px; } .progress-bar { height: 8px; background-color: rgba(173, 181, 189, 0.15); border-radius: 4px; overflow: hidden; position: relative; } .progress-fill { height: 100%; border-radius: 4px; position: absolute; top: 0; left: 0; transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1); } .user-engagement .progress-fill { background-color: var(--primary); } .revenue .progress-fill { background-color: var(--secondary); } .conversion .progress-fill { background-color: var(--tertiary); } .growth .progress-fill { background-color: var(--quaternary); } .progress-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--gray); } .progress-target { font-weight: 600; } .doughnut-container { position: relative; width: 120px; height: 120px; margin: 0 auto; } .doughnut-percentage { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; font-weight: 700; } .doughnut-label { text-align: center; margin-top: 16px; font-size: 14px; color: var(--gray); } .doughnut-info { display: flex; justify-content: space-between; margin-top: 16px; } .doughnut-item { display: flex; align-items: center; } .doughnut-color { width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; } .doughnut-text { font-size: 12px; } .doughnut-value { font-weight: 600; margin-left: 4px; } .pulsar { animation: pulse 2s infinite; position: absolute; top: 0; right: 5px; height: 8px; width: 8px; background-color: #28a745; border-radius: 50%; } @keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); } } .mini-stats { display: flex; justify-content: space-between; margin-top: 20px; } .mini-stat { display: flex; flex-direction: column; align-items: center; } .mini-stat-value { font-size: 18px; font-weight: 600; margin-bottom: 4px; } .mini-stat-label { font-size: 12px; color: var(--gray); } /* Animations */ .fade-in { opacity: 0; animation: fadeIn 0.5s forwards; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .counting { animation: countUp 2s ease-out forwards; } @keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .shimmer { position: relative; overflow: hidden; } .shimmer::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100% ); animation: shimmer 2s infinite; } @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } </style> </head> <body> <div class="dashboard-container"> <div class="dashboard-header"> <h1>Performance Dashboard</h1> <p>Real-time metrics and insights for your digital platform</p> <div class="time-select"> <div class="time-select-option">Today</div> <div class="time-select-option active">This Week</div> <div class="time-select-option">This Month</div> <div class="time-select-option">This Quarter</div> </div> </div> <div class="grid-container"> <!-- User Engagement Card --> <div class="card user-engagement fade-in" style="animation-delay: 0s;"> <div class="card-header"> <div class="card-title"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z" stroke="#5762D5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 14C8.13401 14 5 17.134 5 21H19C19 17.134 15.866 14 12 14Z" stroke="#5762D5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> User Engagement </div> <div class="card-actions"> <button class="card-menu-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 20C12.5523 20 13 19.5523 13 19C13 18.4477 12.5523 18 12 18C11.4477 18 11 18.4477 11 19C11 19.5523 11.4477 20 12 20Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <div class="pulsar"></div> </div> </div> <div class="card-value counting">8,427</div> <div class="card-trend"> <span class="trend-icon trend-up"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 19V5M12 5L5 12M12 5L19 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </span> <span class="trend-value">14.2%</span> <span class="trend-period">vs previous week</span> </div> <div class="card-chart"> <svg width="100%" height="100%" preserveAspectRatio="none" id="engagement-chart"></svg> <div class="data-points" id="engagement-data-points"></div> </div> <div class="tooltip" id="engagement-tooltip"> <div class="tooltip-date">Jun 15, 2023</div> <div> <span class="tooltip-label">Active users:</span> <span class="tooltip-value">1,245</span> </div> </div> <div class="mini-stats"> <div class="mini-stat"> <div class="mini-stat-value">11m 27s</div> <div class="mini-stat-label">Avg. Time</div> </div> <div class="mini-stat"> <div class="mini-stat-value">7.2</div> <div class="mini-stat-label">Pages/Session</div> </div> <div class="mini-stat"> <div class="mini-stat-value">17.8%</div> <div class="mini-stat-label">Bounce Rate</div> </div> </div> </div> <!-- Revenue Card --> <div class="card revenue fade-in" style="animation-delay: 0.1s;"> <div class="card-header"> <div class="card-title"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z" stroke="#FF6B6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M15 8.5C14.315 7.81501 13.1087 7.33855 12 7.30872M9 15C9.64448 15.8593 10.8428 16.3494 12 16.391M12 7.30872C10.6809 7.27322 9.5 7.86998 9.5 9.50001C9.5 12.5 15 11 15 14C15 15.711 13.5362 16.4462 12 16.391M12 7.30872V5.5M12 16.391V18.5" stroke="#FF6B6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Revenue </div> <div class="card-actions"> <button class="card-menu-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 20C12.5523 20 13 19.5523 13 19C13 18.4477 12.5523 18 12 18C11.4477 18 11 18.4477 11 19C11 19.5523 11.4477 20 12 20Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> <div class="card-value counting">$74,582</div> <div class="card-trend"> <span class="trend-icon trend-up"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 19V5M12 5L5 12M12 5L19 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </span> <span class="trend-value">8.7%</span> <span class="trend-period">vs previous week</span> </div> <div class="card-chart"> <svg width="100%" height="100%" preserveAspectRatio="none" id="revenue-chart"></svg> <div class="data-points" id="revenue-data-points"></div> </div> <div class="tooltip" id="revenue-tooltip"> <div class="tooltip-date">Jun 15, 2023</div> <div> <span class="tooltip-label">Revenue:</span> <span class="tooltip-value">$12,458</span> </div> </div> <div class="card-progress"> <div class="progress-bar"> <div class="progress-fill" style="width: 0%;"></div> </div> <div class="progress-labels"> <div>$0</div> <div class="progress-target">Target: $100,000</div> </div> </div> </div> <!-- Conversion Rate Card --> <div class="card conversion fade-in" style="animation-delay: 0.2s;"> <div class="card-header"> <div class="card-title"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 3H21V8" stroke="#4ECDC4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 21H3V16" stroke="#4ECDC4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M21 16V21H16" stroke="#4ECDC4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M3 8V3H8" stroke="#4ECDC4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <rect x="8" y="8" width="8" height="8" stroke="#4ECDC4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Conversion Rate </div> <div class="card-actions"> <button class="card-menu-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 20C12.5523 20 13 19.5523 13 19C13 18.4477 12.5523 18 12 18C11.4477 18 11 18.4477 11 19C11 19.5523 11.4477 20 12 20Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> <div class="doughnut-container"> <canvas id="conversion-doughnut" width="120" height="120"></canvas> <div class="doughnut-percentage">4.7%</div> </div> <div class="card-trend" style="justify-content: center;"> <span class="trend-icon trend-up"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 19V5M12 5L5 12M12 5L19 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </span> <span class="trend-value">1.3%</span> <span class="trend-period">vs previous week</span> </div> <div class="doughnut-info"> <div class="doughnut-item"> <div class="doughnut-color" style="background-color: #4ECDC4;"></div> <div class="doughnut-text">Converted <span class="doughnut-value">483</span></div> </div> <div class="doughnut-item"> <div class="doughnut-color" style="background-color: #E0E0E0;"></div> <div class="doughnut-text">Total <span class="doughnut-value">10,274</span></div> </div> </div> </div> <!-- Growth Metrics Card --> <div class="card growth fade-in" style="animation-delay: 0.3s;"> <div class="card-header"> <div class="card-title"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M23 6L13.5 15.5L8.5 10.5L1 18" stroke="#FFA500" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M17 6H23V12" stroke="#FFA500" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Growth Metrics </div> <div class="card-actions"> <button class="card-menu-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 20C12.5523 20 13 19.5523 13 19C13 18.4477 12.5523 18 12 18C11.4477 18 11 18.4477 11 19C11 19.5523 11.4477 20 12 20Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> </div> </div> <div class="card-value counting">32.7%</div> <div class="card-trend"> <span class="trend-icon trend-up"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 19V5M12 5L5 12M12 5L19 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </span> <span class="trend-value">5.8%</span> <span class="trend-period">vs previous quarter</span> </div> <div class="card-chart"> <svg width="100%" height="100%" preserveAspectRatio="none" id="growth-chart"></svg> <div class="data-points" id="growth-data-points"></div> </div> <div class="tooltip" id="growth-tooltip"> <div class="tooltip-date">Jun 15, 2023</div> <div> <span class="tooltip-label">Growth rate:</span> <span class="tooltip-value">28.4%</span> </div> </div> <div class="mini-stats"> <div class="mini-stat"> <div class="mini-stat-value">41.2%</div> <div class="mini-stat-label">New Users</div> </div> <div class="mini-stat"> <div class="mini-stat-value">27.9%</div> <div class="mini-stat-label">Retention</div> </div> <div class="mini-stat"> <div class="mini-stat-value">19.3%</div> <div class="mini-stat-label">Expansion</div> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Time selector functionality const timeOptions = document.querySelectorAll('.time-select-option'); timeOptions.forEach(option => { option.addEventListener('click', function() { timeOptions.forEach(opt => opt.classList.remove('active')); this.classList.add('active'); }); }); // Generate sample data function generateData(count, min, max, trend = 'up') { const data = []; let current = Math.floor(Math.random() * (max - min) + min); for (let i = 0; i < count; i++) { // Trend adjustment const trendFactor = trend === 'up' ? 1.2 : 0.8; const change = Math.floor(Math.random() * 10) - (trend === 'up' ? 3 : 7); current += change; current = Math.max(min, Math.min(max, current)); data.push(current); } return data; } // Format dates for tooltips function formatDate(daysAgo) { const date = new Date(); date.setDate(date.getDate() - daysAgo); return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }); } // Create sparkline chart function createSparkline(elementId, data, colorClass) { const svg = document.getElementById(elementId); const width = svg.clientWidth; const height = svg.clientHeight; // Find min and max for scaling const min = Math.min(...data) * 0.9; const max = Math.max(...data) * 1.1; // Scale functions const xScale = index => index * (width / (data.length - 1)); const yScale = value => height - ((value - min) / (max - min)) * height; // Create path let pathD = `M${xScale(0)},${yScale(data[0])}`; for (let i = 1; i < data.length; i++) { pathD += ` L${xScale(i)},${yScale(data[i])}`; } // Create path for area let areaD = pathD + ` L${xScale(data.length - 1)},${height} L${xScale(0)},${height} Z`; // Create SVG elements const path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); path.setAttribute('d', pathD); path.setAttribute('class', `sparkline ${colorClass}-sparkline`); const area = document.createElementNS('http://www.w3.org/2000/svg', 'path'); area.setAttribute('d', areaD); area.setAttribute('class', `sparkline-area ${colorClass}-sparkline-area`); svg.appendChild(area); svg.appendChild(path); // Add interactive dots for data points const dataPointsContainer = document.getElementById(`${colorClass}-data-points`); const tooltip = document.getElementById(`${colorClass}-tooltip`); data.forEach((value, index) => { const dot = document.createElementNS('http://www.w3.org/2000/svg', 'circle'); dot.setAttribute('cx', xScale(index)); dot.setAttribute('cy', yScale(value)); dot.setAttribute('class', `sparkline-dot ${colorClass}-sparkline-dot`); svg.appendChild(dot); const hitArea = document.createElement('div'); hitArea.className = 'data-point'; hitArea.style.left = `${xScale(index)}px`; hitArea.style.top = `${yScale(value)}px`; hitArea.addEventListener('mouseenter', function(e) { // Set tooltip content const tooltipDate = tooltip.querySelector('.tooltip-date'); const tooltipValue = tooltip.querySelector('.tooltip-value'); tooltipDate.textContent = formatDate(data.length - 1 - index);
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Artisanal Home Products</title> <style> :root { --primary: #283044; --secondary: #78a1bb; --accent: #ebf5ee; --highlight: #f96e46; --gray: #f0f0f0; --dark-gray: #888; --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(--accent); color: var(--primary); display: flex; flex-direction: column; align-items: center; height: 100vh; width: 100%; padding: 20px; overflow-x: hidden; } .container { width: 100%; max-width: 700px; margin: 0 auto; } h1 { font-size: 28px; margin-bottom: 12px; color: var(--primary); text-align: center; position: relative; } h1::after { content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 80px; height: 3px; background-color: var(--highlight); border-radius: 2px; } .filters { display: flex; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; } .filter-btn { background: none; border: 1px solid var(--primary); color: var(--primary); padding: 8px 16px; border-radius: 20px; cursor: pointer; transition: var(--transition); margin: 5px 3px; font-size: 14px; } .filter-btn:hover, .filter-btn.active { background-color: var(--primary); color: white; } .products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; margin-top: 20px; } .product-card { background-color: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: var(--transition); position: relative; transform-origin: center; border: 1px solid rgba(0,0,0,0.08); } .product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); } .card-badge { position: absolute; top: 12px; left: 12px; background-color: var(--highlight); color: white; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 20px; z-index: 2; transform: translateY(-5px); opacity: 0; transition: var(--transition); } .product-card:hover .card-badge { transform: translateY(0); opacity: 1; } .image-container { position: relative; height: 200px; overflow: hidden; background-color: var(--gray); } .product-image { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); transform-origin: center; } .product-card:hover .product-image { transform: scale(1.08); } .quick-actions { position: absolute; bottom: 0; left: 0; right: 0; padding: 15px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); display: flex; justify-content: center; gap: 10px; opacity: 0; transform: translateY(10px); transition: var(--transition); } .product-card:hover .quick-actions { opacity: 1; transform: translateY(0); } .action-btn { background-color: white; color: var(--primary); border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .action-btn:hover { background-color: var(--highlight); color: white; transform: scale(1.1); } .cart-btn { background-color: var(--highlight); color: white; padding: 0 20px; border-radius: 20px; width: auto; } .cart-btn:hover { background-color: var(--primary); } .card-content { padding: 20px; } .product-name { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; transition: var(--transition); } .product-card:hover .product-name { color: var(--highlight); } .product-description { font-size: 14px; color: var(--dark-gray); margin-bottom: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .product-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; } .product-price { font-size: 18px; font-weight: 700; color: var(--primary); } .original-price { text-decoration: line-through; color: var(--dark-gray); font-size: 14px; margin-right: 8px; } .product-rating { display: flex; align-items: center; gap: 5px; } .stars { color: #FFD700; position: relative; display: inline-block; } .review-count { font-size: 13px; color: var(--dark-gray); } .notification { position: fixed; bottom: 20px; right: 20px; background-color: var(--primary); color: white; padding: 12px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(100px); opacity: 0; transition: var(--transition); z-index: 100; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; } .notification.show { transform: translateY(0); opacity: 1; } .check-icon { color: white; background-color: var(--highlight); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } .pulse { animation: pulse 0.6s ease-in-out; } @media (max-width: 700px) { .products-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } h1 { font-size: 24px; } .filters { justify-content: center; gap: 8px; } } @media (max-width: 480px) { .products-grid { grid-template-columns: 1fr; } } </style> </head> <body> <div class="container"> <h1>Artisanal Home Collection</h1> <div class="filters"> <button class="filter-btn active" data-filter="all">All Products</button> <button class="filter-btn" data-filter="kitchen">Kitchen</button> <button class="filter-btn" data-filter="decor">Home Decor</button> <button class="filter-btn" data-filter="bestseller">Best Sellers</button> </div> <div class="products-grid"> <!-- Product 1 --> <div class="product-card" data-category="kitchen bestseller"> <div class="card-badge">20% OFF</div> <div class="image-container"> <img src="https://images.unsplash.com/photo-1547592166-23ac45744acd" alt="Ceramic Serving Bowl Set" class="product-image"> <div class="quick-actions"> <button class="action-btn" title="Add to Wishlist"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"/> </svg> </button> <button class="action-btn" title="Quick View"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> </svg> </button> <button class="action-btn cart-btn" title="Add to Cart"> <span>Add to Cart</span> </button> </div> </div> <div class="card-content"> <h3 class="product-name">Handcrafted Ceramic Serving Bowl Set</h3> <p class="product-description">Artisan-made ceramic bowl set with organic form and reactive glaze finish. Perfect for everyday dining or serving guests.</p> <div class="product-meta"> <div class="price-container"> <span class="original-price">$89.99</span> <span class="product-price">$71.99</span> </div> <div class="product-rating"> <div class="stars">★★★★★</div> <span class="review-count">(48)</span> </div> </div> </div> </div> <!-- Product 2 --> <div class="product-card" data-category="decor"> <div class="image-container"> <img src="https://images.unsplash.com/photo-1556020685-ae41abfc9365" alt="Minimalist Wall Clock" class="product-image"> <div class="quick-actions"> <button class="action-btn" title="Add to Wishlist"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"/> </svg> </button> <button class="action-btn" title="Quick View"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> </svg> </button> <button class="action-btn cart-btn" title="Add to Cart"> <span>Add to Cart</span> </button> </div> </div> <div class="card-content"> <h3 class="product-name">Minimalist Scandinavian Wall Clock</h3> <p class="product-description">Clean lines and natural materials blend in this contemporary timepiece. Crafted from sustainable ash wood with brass accents.</p> <div class="product-meta"> <div class="price-container"> <span class="product-price">$64.50</span> </div> <div class="product-rating"> <div class="stars">★★★★☆</div> <span class="review-count">(36)</span> </div> </div> </div> </div> <!-- Product 3 --> <div class="product-card" data-category="kitchen bestseller"> <div class="card-badge">Best Seller</div> <div class="image-container"> <img src="https://images.unsplash.com/photo-1577918285533-32a58755166f" alt="Copper Cookware" class="product-image"> <div class="quick-actions"> <button class="action-btn" title="Add to Wishlist"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"/> </svg> </button> <button class="action-btn" title="Quick View"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> </svg> </button> <button class="action-btn cart-btn" title="Add to Cart"> <span>Add to Cart</span> </button> </div> </div> <div class="card-content"> <h3 class="product-name">Professional Copper Sauté Pan with Lid</h3> <p class="product-description">Heirloom-quality cookware with superior heat conductivity. Features a stainless steel interior and hand-polished copper exterior.</p> <div class="product-meta"> <div class="price-container"> <span class="product-price">$129.00</span> </div> <div class="product-rating"> <div class="stars">★★★★★</div> <span class="review-count">(87)</span> </div> </div> </div> </div> <!-- Product 4 --> <div class="product-card" data-category="decor"> <div class="image-container"> <img src="https://images.unsplash.com/photo-1534349762230-e0cadf78f5da" alt="Linen Throw Pillows" class="product-image"> <div class="quick-actions"> <button class="action-btn" title="Add to Wishlist"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"/> </svg> </button> <button class="action-btn" title="Quick View"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> </svg> </button> <button class="action-btn cart-btn" title="Add to Cart"> <span>Add to Cart</span> </button> </div> </div> <div class="card-content"> <h3 class="product-name">Stone-Washed Linen Throw Pillow Set</h3> <p class="product-description">Ultra-soft European flax linen pillows in complementary earth tones. Texture improves with each wash for a lived-in luxury feel.</p> <div class="product-meta"> <div class="price-container"> <span class="product-price">$78.50</span> </div> <div class="product-rating"> <div class="stars">★★★★☆</div> <span class="review-count">(24)</span> </div> </div> </div> </div> </div> </div> <div class="notification" id="notification"> <div class="check-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> <path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z"/> </svg> </div> <span id="notification-text">Item added to your cart!</span> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Filter functionality const filterButtons = document.querySelectorAll('.filter-btn'); const productCards = document.querySelectorAll('.product-card'); filterButtons.forEach(button => { button.addEventListener('click', () => { // Update active state filterButtons.forEach(btn => btn.classList.remove('active')); button.classList.add('active'); const filter = button.getAttribute('data-filter'); productCards.forEach(card => { if (filter === 'all') { card.style.display = 'block'; } else { const categories = card.getAttribute('data-category'); if (categories && categories.includes(filter)) { card.style.display = 'block'; } else { card.style.display = 'none'; } } }); }); }); // Add to cart functionality const cartButtons = document.querySelectorAll('.cart-btn'); const notification = document.getElementById('notification'); const notificationText = document.getElementById('notification-text'); cartButtons.forEach(button => { button.addEventListener('click', (e) => { e.preventDefault(); // Get product info const card = button.closest('.product-card'); const productName = card.querySelector('.product-name').textContent; // Add pulse effect to the button button.classList.add('pulse'); setTimeout(() => { button.classList.remove('pulse'); }, 600); // Show notification notificationText.textContent = `${productName.substring(0, 20)}... added to your cart!`; notification.classList.add('show'); // Hide notification after 3 seconds setTimeout(() => { notification.classList.remove('show'); }, 3000); }); }); // Wishlist and Quick view interactions const actionButtons = document.querySelectorAll('.action-btn:not(.cart-btn)'); actionButtons.forEach(button => { button.addEventListener('click', (e) => { e.preventDefault(); button.classList.add('pulse'); setTimeout(() => { button.classList.remove('pulse'); }, 600); const action = button.getAttribute('title') === 'Add to Wishlist' ? 'added to wishlist' : 'quick view opened'; const productName = button.closest('.product-card').querySelector('.product-name').textContent; // Show notification notificationText.textContent = `${productName.substring(0, 20)}... ${action}!`; notification.classList.add('show'); // Hide notification after 3 seconds setTimeout(() => { 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"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; background-color: #f9f4ff; padding: 20px; overflow-x: hidden; } .container { width: 100%; max-width: 650px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; perspective: 1000px; } .card { background: white; border-radius: 22px; overflow: hidden; box-shadow: 0 10px 25px rgba(135, 90, 235, 0.1); transition: all 0.5s ease; position: relative; transform-style: preserve-3d; cursor: pointer; } .card:hover { transform: translateY(-10px) rotateX(5deg); box-shadow: 0 15px 35px rgba(135, 90, 235, 0.2); } .card-header { height: 120px; position: relative; overflow: hidden; } .gradient-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; transition: all 0.5s ease; } .card:nth-child(1) .gradient-bg { background: linear-gradient(135deg, #FF9AA2, #FFB7B2); } .card:nth-child(2) .gradient-bg { background: linear-gradient(135deg, #7685DB, #B5A3E5); } .card:nth-child(3) .gradient-bg { background: linear-gradient(135deg, #95D1CC, #5BC0BE); } .card:nth-child(4) .gradient-bg { background: linear-gradient(135deg, #FFB347, #FFCC33); } .avatar-container { position: absolute; bottom: -50px; left: 25px; width: 100px; height: 100px; border-radius: 50%; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); overflow: hidden; z-index: 10; border: 5px solid white; transition: all 0.3s ease; } .card:hover .avatar-container { transform: scale(1.05); } .avatar { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .pattern { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 2%, transparent 2%), radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 3%, transparent 3%), radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 2%, transparent 2%); background-size: 30px 30px; opacity: 0.5; mix-blend-mode: overlay; } .card-body { padding: 60px 25px 25px; } .name { font-size: 1.4rem; font-weight: 700; margin-bottom: 5px; color: #333; } .title { color: #666; font-size: 0.95rem; margin-bottom: 15px; font-weight: 500; } .bio { color: #555; font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; } .stats { display: flex; gap: 15px; margin-bottom: 20px; font-size: 0.85rem; } .stat { display: flex; flex-direction: column; align-items: center; } .stat-value { font-weight: 700; color: #333; } .stat-label { color: #777; font-size: 0.8rem; } .actions { display: flex; gap: 10px; } .btn { flex: 1; border: none; padding: 12px 0; border-radius: 12px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .btn-primary { background: #6c5ce7; color: white; box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3); } .btn-secondary { background: #f1f1f1; color: #333; } .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } .btn-primary .ripple { background: rgba(255, 255, 255, 0.4); } .btn-secondary .ripple { background: rgba(0, 0, 0, 0.1); } @keyframes ripple { to { transform: scale(2.5); opacity: 0; } } .badge { background: #FCD34D; color: #7C4700; padding: 4px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; position: absolute; top: 15px; right: 15px; display: flex; align-items: center; gap: 4px; box-shadow: 0 4px 10px rgba(252, 211, 77, 0.3); z-index: 5; } .badge i { font-size: 0.8rem; } .badge.premium { background: #FCD34D; color: #7C4700; } .badge.new { background: #86EFAC; color: #14532D; } /* Sparkle effect */ .sparkle { position: absolute; width: 10px; height: 10px; border-radius: 50%; background-color: white; pointer-events: none; opacity: 0; z-index: 20; } @keyframes sparkle { 0% { transform: scale(0) rotate(0deg); opacity: 0; } 50% { opacity: 1; } 100% { transform: scale(1.5) rotate(180deg); opacity: 0; } } .online-indicator { position: absolute; bottom: 10px; right: 10px; width: 12px; height: 12px; border-radius: 50%; background: #42d392; border: 2px solid white; z-index: 10; box-shadow: 0 0 0 rgba(66, 211, 146, 0.4); animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(66, 211, 146, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(66, 211, 146, 0); } 100% { box-shadow: 0 0 0 0 rgba(66, 211, 146, 0); } } /* Loading animation */ .loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #f9f4ff; display: flex; justify-content: center; align-items: center; z-index: 1000; transition: opacity 0.5s ease; } .loader { width: 60px; height: 60px; border-radius: 50%; border: 5px solid transparent; border-top-color: #6c5ce7; border-bottom-color: #6c5ce7; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .fade-out { opacity: 0; pointer-events: none; } /* Responsive adjustments */ @media (max-width: 700px) { .container { grid-template-columns: 1fr; max-width: 350px; } } /* Hover state indicators */ .btn:hover { transform: translateY(-2px); } .btn-primary:hover { background: #5d4dd6; box-shadow: 0 6px 15px rgba(108, 92, 231, 0.4); } .btn-secondary:hover { background: #e8e8e8; } .btn:active { transform: translateY(0); } /* Following state */ .btn-primary.following { background: #e9e6ff; color: #6c5ce7; } .btn-primary.following:hover { background: #ffeeee; color: #e74c3c; } .btn-primary.following:hover .follow-text { display: none; } .btn-primary.following:hover .unfollow-text { display: inline; } .unfollow-text { display: none; } /* Card flip effect */ .flip-container { perspective: 1000px; } .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; background: white; border-radius: 20px; text-align: center; box-shadow: 0 10px 25px rgba(135, 90, 235, 0.1); color: #666; grid-column: 1 / -1; display: none; } .empty-state h3 { margin: 15px 0; color: #333; } .empty-state p { margin-bottom: 20px; } .empty-illustration { width: 120px; height: 120px; background: #f0ebfd; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #6c5ce7; margin-bottom: 15px; } </style> </head> <body> <div class="loading-overlay"> <div class="loader"></div> </div> <div class="container"> <div class="card"> <div class="card-header"> <div class="gradient-bg"></div> <div class="pattern"></div> <div class="badge premium"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon> </svg> Premium </div> </div> <div class="avatar-container"> <img src="https://images.unsplash.com/photo-1567532939604-b6b5b0db2604?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="Avatar" class="avatar"> <div class="online-indicator"></div> </div> <div class="card-body"> <h2 class="name">Emma Rodriguez</h2> <div class="title">Travel Photographer & Filmmaker</div> <p class="bio">Capturing untold stories from 30+ countries. Currently documenting indigenous crafts across Southeast Asia. Sony Ambassador.</p> <div class="stats"> <div class="stat"> <span class="stat-value">254</span> <span class="stat-label">Posts</span> </div> <div class="stat"> <span class="stat-value">15.4K</span> <span class="stat-label">Followers</span> </div> <div class="stat"> <span class="stat-value">348</span> <span class="stat-label">Following</span> </div> </div> <div class="actions"> <button class="btn btn-primary" data-action="follow"> <span class="follow-text">Follow</span> <span class="unfollow-text">Unfollow</span> </button> <button class="btn btn-secondary" data-action="message">Message</button> </div> </div> </div> <div class="card"> <div class="card-header"> <div class="gradient-bg"></div> <div class="pattern"></div> <div class="badge new"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <line x1="12" y1="8" x2="12" y2="12"></line> <line x1="12" y1="16" x2="12.01" y2="16"></line> </svg> New </div> </div> <div class="avatar-container"> <img src="https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="Avatar" class="avatar"> </div> <div class="card-body"> <h2 class="name">Marcus Chen</h2> <div class="title">UI/UX Designer & Accessibility Advocate</div> <p class="bio">Designing inclusive experiences at DesignLab. Specializing in voice UI and assistive technology. Mentor for design newcomers.</p> <div class="stats"> <div class="stat"> <span class="stat-value">76</span> <span class="stat-label">Posts</span> </div> <div class="stat"> <span class="stat-value">3.8K</span> <span class="stat-label">Followers</span> </div> <div class="stat"> <span class="stat-value">127</span> <span class="stat-label">Following</span> </div> </div> <div class="actions"> <button class="btn btn-primary" data-action="follow"> <span class="follow-text">Follow</span> <span class="unfollow-text">Unfollow</span> </button> <button class="btn btn-secondary" data-action="message">Message</button> </div> </div> </div> <div class="card"> <div class="card-header"> <div class="gradient-bg"></div> <div class="pattern"></div> </div> <div class="avatar-container"> <img src="https://images.unsplash.com/photo-1531123897727-8f129e1688ce?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="Avatar" class="avatar"> <div class="online-indicator"></div> </div> <div class="card-body"> <h2 class="name">Zoe Patel</h2> <div class="title">Culinary Scientist & Food Educator</div> <p class="bio">Exploring the intersection of food science and traditional cooking. Host of "Molecular Kitchen" podcast. Teaching food preservation workshops.</p> <div class="stats"> <div class="stat"> <span class="stat-value">418</span> <span class="stat-label">Posts</span> </div> <div class="stat"> <span class="stat-value">22.1K</span> <span class="stat-label">Followers</span> </div> <div class="stat"> <span class="stat-value">201</span> <span class="stat-label">Following</span> </div> </div> <div class="actions"> <button class="btn btn-primary" data-action="follow"> <span class="follow-text">Follow</span> <span class="unfollow-text">Unfollow</span> </button> <button class="btn btn-secondary" data-action="message">Message</button> </div> </div> </div> <div class="card"> <div class="card-header"> <div class="gradient-bg"></div> <div class="pattern"></div> </div> <div class="avatar-container"> <img src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="Avatar" class="avatar"> </div> <div class="card-body"> <h2 class="name">Liam Jackson</h2> <div class="title">Urban Ecologist & Community Garden Developer</div> <p class="bio">Transforming city spaces into thriving ecosystems. Helped create 16 community gardens in underserved neighborhoods. Plant medicine researcher.</p> <div class="stats"> <div class="stat"> <span class="stat-value">132</span> <span class="stat-label">Posts</span> </div> <div class="stat"> <span class="stat-value">5.7K</span> <span class="stat-label">Followers</span> </div> <div class="stat"> <span class="stat-value">95</span> <span class="stat-label">Following</span> </div> </div> <div class="actions"> <button class="btn btn-primary" data-action="follow"> <span class="follow-text">Follow</span> <span class="unfollow-text">Unfollow</span> </button> <button class="btn btn-secondary" data-action="message">Message</button> </div> </div> </div> <div class="empty-state"> <div class="empty-illustration"> <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path> <circle cx="9" cy="7" r="4"></circle> <path d="M23 21v-2a4 4 0 0 0-3-3.87"></path> <path d="M16 3.13a4 4 0 0 1 0 7.75"></path> </svg> </div> <h3>No profiles found</h3> <p>Try adjusting your search or filter to find what you're looking for.</p> <button class="btn btn-primary" id="reset-search">Reset Filters</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Loading screen setTimeout(() => { document.querySelector('.loading-overlay').classList.add('fade-out'); }, 1000); // Create ripple effect on buttons const buttons = document.querySelectorAll('.btn'); buttons.forEach(button => { button.addEventListener('click', function(e) { const x = e.clientX - e.target.getBoundingClientRect().left; const y = e.clientY - e.target.getBoundingClientRect().top; const ripple = document.createElement('span'); ripple.classList.add('ripple'); ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; this.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 600); // Handle follow button state if (this.dataset.action === 'follow') { this.classList.toggle('following'); if (this.classList.contains('following')) { this.querySelector('.follow-text').textContent = 'Following'; } else { this.querySelector('.follow-text').textContent = 'Follow'; } } // Handle message button click if (this.dataset.action === 'message') { // Simulate message interaction const card = this.closest('.card'); const userName = card.querySelector('.name').textContent; addSparkleEffect(card); // Show visual feedback (we don't actually navigate away) const originalText = this.textContent; this.textContent = 'Messaging...'; setTimeout(() => { this.textContent = originalText; }, 1500); } }); }); // Avatar hover effect const avatars = document.querySelectorAll('.avatar-container'); avatars.forEach(avatar => { avatar.addEventListener('mouseover', function() { const img = this.querySelector('.avatar'); img.style.transform = 'scale(1.1)'; }); avatar.addEventListener('mouseout', function() { const img = this.querySelector('.avatar'); img.style.transform = 'scale(1)'; }); }); // Reset search button document.getElementById('reset-search')?.addEventListener('click', function() { document.querySelector('.empty-state').style.display = 'none'; document.querySelectorAll('.card').forEach(card => { card.style.display = 'block'; }); }); // Search filter demo (just for show) let searchTimeoutId; window.filterProfiles = function(query) { clearTimeout(searchTimeoutId); searchTimeoutId = setTimeout(() => { const cards = document.querySelectorAll('.card'); let anyVisible = false; cards.forEach(card => { const name = card.querySelector('.name').textContent.toLowerCase(); const bio = card.querySelector('.bio').textContent.toLowerCase(); const title = card.querySelector('.title').textContent.toLowerCase(); if (name.includes(query) || bio.includes(query) || title.includes(query)) { card.style.display = 'block'; anyVisible = true; } else { card.style.display = 'none'; } }); document.querySelector('.empty-state').style.display = anyVisible ? 'none' : 'flex'; }, 300); }; // Sparkle effect function function addSparkleEffect(element) { for (let i = 0; i < 5; i++) { const sparkle = document.createElement('div'); sparkle.classList.add('sparkle'); // Random position around the element const posX = Math.random() * element.offsetWidth; const posY = Math.random() * element.offsetHeight / 2 + element.offsetHeight / 4; sparkle.style.left = `${posX}px`; sparkle.style.top = `${posY}px`; sparkle.style.animation = `sparkle ${0.6 + Math.random() * 0.6}s forwards`; element.appendChild(sparkle); setTimeout(() => { sparkle.remove(); }, 1200); } } // Optional: Add card tilt effect const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('mousemove', function(e) { const cardRect = this.getBoundingClientRect(); const x = e.clientX - cardRect.left; const y = e.clientY - cardRect.top; const centerX = cardRect.width / 2; const centerY = cardRect.height / 2; const rotateY = (x - centerX) / 20; const rotateX = (centerY - y) / 20; this.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-10px)`; }); card.addEventListener('mouseleave', function() { this.style.transform = 'translateY(-10px) rotateX(5deg)'; setTimeout(() => { this.style.transform = ''; }, 500); }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Gourmet Recipe Cards</title> <style> @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Montserrat:wght@300;400;500;600&display=swap'); :root { --primary: #FF6B6B; --primary-light: #FFE1E1; --secondary: #4ECDC4; --dark: #292F36; --light: #F7FFF7; --accent: #FFD166; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Montserrat', sans-serif; background-color: #f8f9fa; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f1f2f3' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 700px; max-width: 700px; margin: 0 auto; } .container { width: 100%; max-width: 650px; height: 100%; overflow-y: auto; padding: 10px; } .title { font-family: 'Playfair Display', serif; color: var(--dark); text-align: center; margin-bottom: 20px; position: relative; } .title h1 { font-size: 2.3rem; font-weight: 700; position: relative; display: inline-block; } .title h1::after { content: ''; position: absolute; height: 8px; width: 40%; background-color: var(--accent); bottom: 0; left: 30%; border-radius: 4px; z-index: -1; } .filters { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; justify-content: center; } .filter-btn { background-color: white; border: 2px solid var(--primary-light); color: var(--dark); padding: 8px 16px; border-radius: 30px; cursor: pointer; font-family: 'Montserrat', sans-serif; font-weight: 500; font-size: 0.85rem; transition: all 0.3s ease; display: flex; align-items: center; gap: 5px; } .filter-btn.active, .filter-btn:hover { background-color: var(--primary); border-color: var(--primary); color: white; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(255, 107, 107, 0.2); } .recipe-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; padding-bottom: 20px; } .recipe-card { background: white; border-radius: 15px; overflow: hidden; position: relative; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 380px; display: flex; flex-direction: column; } .recipe-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); } .card-img-container { height: 180px; overflow: hidden; position: relative; } .card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; } .recipe-card:hover .card-img { transform: scale(1.05); } .card-time { position: absolute; top: 15px; left: 15px; background-color: rgba(255, 255, 255, 0.9); padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; color: var(--dark); display: flex; align-items: center; gap: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .card-favorite { position: absolute; top: 15px; right: 15px; background-color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; z-index: 1; } .card-favorite:hover { transform: scale(1.1); } .card-favorite svg { transition: all 0.3s ease; fill: transparent; stroke: var(--dark); stroke-width: 2; } .card-favorite.active svg { fill: var(--primary); stroke: var(--primary); animation: heartBeat 0.3s ease-in-out; } @keyframes heartBeat { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } .difficulty { position: absolute; bottom: -10px; right: 15px; background-color: var(--accent); padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; color: var(--dark); text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .card-content { padding: 20px 15px 15px; flex: 1; display: flex; flex-direction: column; } .card-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.3rem; color: var(--dark); margin-bottom: 8px; line-height: 1.3; } .card-description { font-size: 0.85rem; color: #666; margin-bottom: 15px; line-height: 1.5; flex: 1; } .ingredients-title { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 0.9rem; color: var(--dark); margin-bottom: 8px; } .ingredients-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; } .ingredient-tag { background-color: var(--primary-light); color: var(--primary); font-size: 0.75rem; padding: 4px 8px; border-radius: 20px; display: inline-block; } .card-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background-color: #f9f9f9; border-top: 1px solid #eee; } .card-chef { display: flex; align-items: center; gap: 8px; } .chef-img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; } .chef-name { font-size: 0.75rem; font-weight: 500; color: var(--dark); } .card-actions { display: flex; gap: 15px; } .btn-action { background: none; border: none; cursor: pointer; transition: transform 0.3s ease; color: #777; } .btn-action:hover { transform: translateY(-2px); color: var(--primary); } /* Hand-drawn style icons */ .icon { display: inline-block; vertical-align: middle; position: relative; } .icon-clock { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; position: relative; } .icon-clock::after { content: ''; position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; background-color: currentColor; border-radius: 50%; transform: translate(-50%, -50%); } .icon-clock::before { content: ''; position: absolute; top: 3px; left: 50%; width: 1px; height: 5px; background-color: currentColor; transform: translateX(-50%); } .icon-utensils { display: inline-block; width: 16px; height: 16px; position: relative; } .icon-utensils::before { content: ''; position: absolute; top: 0; left: 4px; width: 2px; height: 12px; background-color: currentColor; border-radius: 4px; transform: rotate(-15deg); } .icon-utensils::after { content: ''; position: absolute; top: 0; right: 4px; width: 2px; height: 12px; background-color: currentColor; border-radius: 4px; transform: rotate(15deg); } /* Responsive adjustments */ @media (max-width: 600px) { .recipe-cards { grid-template-columns: 1fr; } .title h1 { font-size: 1.8rem; } .recipe-card { height: auto; min-height: 350px; } } /* Animations */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .recipe-card { animation: fadeIn 0.5s ease-out forwards; } /* Staggered animation for cards */ .recipe-card:nth-child(1) { animation-delay: 0.1s; } .recipe-card:nth-child(2) { animation-delay: 0.2s; } .recipe-card:nth-child(3) { animation-delay: 0.3s; } .recipe-card:nth-child(4) { animation-delay: 0.4s; } /* Tooltip styles */ .tooltip { position: relative; display: inline-block; } .tooltip .tooltiptext { visibility: hidden; width: 120px; background-color: rgba(0, 0, 0, 0.8); color: #fff; text-align: center; border-radius: 6px; padding: 5px; position: absolute; z-index: 1; bottom: 125%; left: 50%; margin-left: -60px; opacity: 0; transition: opacity 0.3s; font-size: 0.75rem; } .tooltip .tooltiptext::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent; } .tooltip:hover .tooltiptext { visibility: visible; opacity: 1; } /* Animation for filter buttons */ .filter-btn { position: relative; overflow: hidden; } .filter-btn::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.2); transform: translateY(100%); transition: transform 0.3s ease; z-index: -1; } .filter-btn:hover::after { transform: translateY(0); } </style> </head> <body> <div class="container"> <div class="title"> <h1>Seasonal Recipes</h1> </div> <div class="filters"> <button class="filter-btn active">All Recipes</button> <button class="filter-btn">Quick & Easy</button> <button class="filter-btn">Vegetarian</button> <button class="filter-btn">Desserts</button> <button class="filter-btn">Seasonal</button> </div> <div class="recipe-cards"> <!-- Recipe Card 1 --> <div class="recipe-card"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1601314002592-b8734bca6604?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=400&ixid=MnwxfDB8MXxyYW5kb218MHx8Zm9vZCxwYXN0YXx8fHx8fDE2ODcyNTI3Njk&ixlib=rb-4.0.3&q=80&w=600" alt="Lemon Garlic Pasta" class="card-img"> <div class="card-time"> <span class="icon-clock"></span> 25 min </div> <div class="card-favorite"> <svg width="18" height="18" viewBox="0 0 24 24"> <path d="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"/> </svg> </div> <div class="difficulty">Medium</div> </div> <div class="card-content"> <h3 class="card-title">Summer Lemon Garlic Pasta</h3> <p class="card-description">A bright, zesty pasta that comes together in minutes. Perfect for warm summer evenings when you need something light yet satisfying.</p> <div class="ingredients-title"> <span class="icon-utensils"></span> Key Ingredients </div> <div class="ingredients-list"> <span class="ingredient-tag">Linguine</span> <span class="ingredient-tag">Lemon</span> <span class="ingredient-tag">Garlic</span> <span class="ingredient-tag">Parmesan</span> <span class="ingredient-tag">Basil</span> </div> </div> <div class="card-footer"> <div class="card-chef"> <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Chef" class="chef-img"> <span class="chef-name">Chef Olivia</span> </div> <div class="card-actions"> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path> </svg> <span class="tooltiptext">Share on Facebook</span> </button> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path> </svg> <span class="tooltiptext">Share on Twitter</span> </button> </div> </div> </div> <!-- Recipe Card 2 --> <div class="recipe-card"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1504674900247-0877df9cc836?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=400&ixid=MnwxfDB8MXxyYW5kb218MHx8Zm9vZCxzdGVha3x8fHx8fDE2ODcyNTI4NzA&ixlib=rb-4.0.3&q=80&w=600" alt="Herb Crusted Steak" class="card-img"> <div class="card-time"> <span class="icon-clock"></span> 40 min </div> <div class="card-favorite"> <svg width="18" height="18" viewBox="0 0 24 24"> <path d="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"/> </svg> </div> <div class="difficulty">Advanced</div> </div> <div class="card-content"> <h3 class="card-title">Rosemary & Thyme Crusted Ribeye</h3> <p class="card-description">A perfectly seared steak with a fragrant herb crust. The secret lies in the 24-hour dry brine that ensures a melt-in-your-mouth texture.</p> <div class="ingredients-title"> <span class="icon-utensils"></span> Key Ingredients </div> <div class="ingredients-list"> <span class="ingredient-tag">Ribeye</span> <span class="ingredient-tag">Rosemary</span> <span class="ingredient-tag">Thyme</span> <span class="ingredient-tag">Garlic</span> <span class="ingredient-tag">Sea Salt</span> </div> </div> <div class="card-footer"> <div class="card-chef"> <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Chef" class="chef-img"> <span class="chef-name">Chef Marcus</span> </div> <div class="card-actions"> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path> </svg> <span class="tooltiptext">Share on Facebook</span> </button> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path> </svg> <span class="tooltiptext">Share on Twitter</span> </button> </div> </div> </div> <!-- Recipe Card 3 --> <div class="recipe-card"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1534766555764-ce878a5e3a2b?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=400&ixid=MnwxfDB8MXxyYW5kb218MHx8Y2hvY29sYXRlLGRlc3NlcnR8fHx8fDE2ODcyNTI5MzU&ixlib=rb-4.0.3&q=80&w=600" alt="Chocolate Soufflé" class="card-img"> <div class="card-time"> <span class="icon-clock"></span> 35 min </div> <div class="card-favorite"> <svg width="18" height="18" viewBox="0 0 24 24"> <path d="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"/> </svg> </div> <div class="difficulty">Medium</div> </div> <div class="card-content"> <h3 class="card-title">Dark Chocolate Soufflé</h3> <p class="card-description">A decadent chocolate soufflé with a molten center. This impressive dessert is actually easier to make than you think, and will wow your dinner guests.</p> <div class="ingredients-title"> <span class="icon-utensils"></span> Key Ingredients </div> <div class="ingredients-list"> <span class="ingredient-tag">Dark Chocolate</span> <span class="ingredient-tag">Butter</span> <span class="ingredient-tag">Eggs</span> <span class="ingredient-tag">Sugar</span> <span class="ingredient-tag">Vanilla</span> </div> </div> <div class="card-footer"> <div class="card-chef"> <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Chef" class="chef-img"> <span class="chef-name">Chef Sophie</span> </div> <div class="card-actions"> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path> </svg> <span class="tooltiptext">Share on Facebook</span> </button> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path> </svg> <span class="tooltiptext">Share on Twitter</span> </button> </div> </div> </div> <!-- Recipe Card 4 --> <div class="recipe-card"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1600335895229-6e75511892c8?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=400&ixid=MnwxfDB8MXxyYW5kb218MHx8c2FsYWQsaGVhbHRoeXx8fHx8fDE2ODcyNTI5OTU&ixlib=rb-4.0.3&q=80&w=600" alt="Mediterranean Salad" class="card-img"> <div class="card-time"> <span class="icon-clock"></span> 15 min </div> <div class="card-favorite"> <svg width="18" height="18" viewBox="0 0 24 24"> <path d="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"/> </svg> </div> <div class="difficulty">Easy</div> </div> <div class="card-content"> <h3 class="card-title">Rainbow Harvest Bowl</h3> <p class="card-description">A vibrant salad packed with seasonal vegetables, protein-rich quinoa, and a zesty lemon-tahini dressing. Perfect for meal prep or a quick healthy lunch.</p> <div class="ingredients-title"> <span class="icon-utensils"></span> Key Ingredients </div> <div class="ingredients-list"> <span class="ingredient-tag">Quinoa</span> <span class="ingredient-tag">Kale</span> <span class="ingredient-tag">Avocado</span> <span class="ingredient-tag">Chickpeas</span> <span class="ingredient-tag">Tahini</span> </div> </div> <div class="card-footer"> <div class="card-chef"> <img src="https://randomuser.me/api/portraits/women/65.jpg" alt="Chef" class="chef-img"> <span class="chef-name">Chef Aria</span> </div> <div class="card-actions"> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path> </svg> <span class="tooltiptext">Share on Facebook</span> </button> <button class="btn-action tooltip"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path> </svg> <span class="tooltiptext">Share on Twitter</span> </button> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Filter buttons const filterBtns = document.querySelectorAll('.filter-btn'); filterBtns.forEach(btn => { btn.addEventListener('click', function() { // Remove active class from all buttons filterBtns.forEach(b => b.classList.remove('active')); // Add active class to clicked button this.classList.add('active'); // In a real app, you would filter the recipes here // For this demo, we'll just show an animation const recipeCards = document.querySelectorAll('.recipe-card'); recipeCards.forEach(card => { card.style.animation = 'none'; card.offsetHeight; // Trigger reflow card.style.animation = 'fadeIn 0.5s ease-out forwards'; }); }); }); // Favorite button functionality const favBtns = document.querySelectorAll('.card-favorite'); favBtns.forEach(btn => { btn.addEventListener('click', function() { this.classList.toggle('active'); }); }); // Share buttons (in a real app, these would open share dialogs) const shareBtns = document.querySelectorAll('.btn-action'); shareBtns.forEach(btn => { btn.addEventListener('click', function(e) { e.preventDefault(); // Create a small animation to indicate the button was clicked const icon = this.querySelector('svg'); icon.style.transform = 'scale(1.2)'; setTimeout(() => { icon.style.transform = 'scale(1)'; }, 200); }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Luxury Real Estate Property Cards</title> <style> :root { --primary-color: #272a34; --accent-color: #c9b18c; --bg-color: #f8f6f3; --text-color: #333; --text-light: #666; --shadow: 0 4px 20px rgba(0, 0, 0, 0.08); --transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Playfair Display', 'Georgia', serif; } body { background-color: var(--bg-color); display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; overflow-x: hidden; padding: 20px; color: var(--text-color); } .container { width: 100%; max-width: 680px; height: 100%; max-height: 680px; overflow: hidden; position: relative; } .filter-bar { width: 100%; display: flex; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); } .search-bar { position: relative; flex: 1; max-width: 260px; } .search-bar input { width: 100%; padding: 10px 16px; padding-left: 40px; border: none; background: rgba(255, 255, 255, 0.8); border-radius: 30px; font-size: 14px; letter-spacing: 0.4px; color: var(--text-color); box-shadow: var(--shadow); transition: var(--transition); } .search-bar input:focus { outline: none; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); background: white; } .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 16px; } .filter-options { display: flex; gap: 10px; } .filter-btn { background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); padding: 8px 14px; border-radius: 25px; font-size: 13px; cursor: pointer; transition: var(--transition); letter-spacing: 0.5px; } .filter-btn:hover, .filter-btn.active { background: var(--accent-color); color: white; } .filter-btn.active { font-weight: 500; } .property-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; height: calc(100% - 60px); overflow-y: auto; padding-right: 8px; padding-bottom: 20px; } .property-grid::-webkit-scrollbar { width: 4px; } .property-grid::-webkit-scrollbar-thumb { background-color: var(--accent-color); border-radius: 10px; } .property-card { position: relative; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); height: 300px; background-color: white; transition: var(--transition); cursor: pointer; transform-origin: center; } .property-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); } .property-image { height: 60%; width: 100%; position: relative; overflow: hidden; } .property-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; } .property-card:hover .property-image img { transform: scale(1.08); } .property-status { position: absolute; top: 15px; left: 15px; background-color: rgba(255, 255, 255, 0.9); color: var(--primary-color); padding: 6px 12px; font-size: 12px; border-radius: 20px; letter-spacing: 0.5px; font-weight: 500; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); backdrop-filter: blur(5px); transition: var(--transition); } .property-card:hover .property-status { background-color: var(--accent-color); color: white; } .favorite-btn { position: absolute; top: 15px; right: 15px; background-color: rgba(255, 255, 255, 0.9); color: #999; border: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); transition: var(--transition); z-index: 10; } .favorite-btn:hover, .favorite-btn.active { background-color: #ff5c5c; color: white; } .favorite-btn i { font-size: 16px; } .property-details { padding: 16px; height: 40%; display: flex; flex-direction: column; justify-content: space-between; } .property-price { font-size: 18px; font-weight: 600; color: var(--primary-color); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; } .property-price .per-month { font-size: 14px; color: var(--text-light); font-weight: normal; } .property-title { font-size: 16px; font-weight: 500; line-height: 1.3; margin-bottom: 6px; transition: var(--transition); } .property-card:hover .property-title { color: var(--accent-color); } .property-location { font-size: 13px; color: var(--text-light); display: flex; align-items: center; margin-bottom: 8px; } .property-location i { font-size: 14px; margin-right: 6px; } .property-features { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid rgba(0, 0, 0, 0.05); font-size: 13px; } .feature { display: flex; align-items: center; color: var(--text-light); } .feature i { margin-right: 5px; font-size: 14px; } .property-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); padding: 20px; color: white; opacity: 0; transform: translateY(20px); transition: var(--transition); pointer-events: none; z-index: 5; } .property-card:hover .property-overlay { opacity: 1; transform: translateY(0); } .overlay-title { font-size: 18px; font-weight: 500; margin-bottom: 10px; } .overlay-features { display: flex; gap: 15px; margin-bottom: 10px; } .overlay-feature { display: flex; align-items: center; font-size: 13px; } .overlay-feature i { margin-right: 5px; } .overlay-description { font-size: 13px; line-height: 1.5; margin-bottom: 10px; opacity: 0.9; } .view-property-btn { display: inline-block; background-color: var(--accent-color); color: white; border: none; padding: 8px 16px; border-radius: 25px; font-size: 13px; cursor: pointer; transition: var(--transition); margin-top: 10px; letter-spacing: 0.5px; } .view-property-btn:hover { background-color: #b7a07a; transform: translateY(-2px); } .header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; } .title { font-size: 22px; font-weight: 600; letter-spacing: 0.5px; } .view-all { color: var(--accent-color); font-size: 14px; text-decoration: none; transition: var(--transition); display: flex; align-items: center; } .view-all i { margin-left: 5px; transition: transform 0.3s ease; } .view-all:hover i { transform: translateX(3px); } .view-all:hover { text-decoration: underline; } /* Responsive Styles */ @media (max-width: 650px) { .property-grid { grid-template-columns: 1fr; } .filter-bar { flex-direction: column; gap: 10px; } .search-bar { max-width: 100%; } .filter-options { justify-content: space-between; width: 100%; } .filter-btn { padding: 6px 10px; font-size: 12px; } } /* Property Card Reveal Animation */ @keyframes revealCard { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } } .property-card { animation: revealCard 0.6s forwards; opacity: 0; } .property-card:nth-child(1) { animation-delay: 0.1s; } .property-card:nth-child(2) { animation-delay: 0.2s; } .property-card:nth-child(3) { animation-delay: 0.3s; } .property-card:nth-child(4) { animation-delay: 0.4s; } .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; background-color: var(--bg-color); display: flex; align-items: center; justify-content: center; z-index: 100; transition: opacity 0.5s ease, visibility 0.5s ease; } .loader.hidden { opacity: 0; visibility: hidden; } .loader-circle { width: 40px; height: 40px; border: 3px solid rgba(201, 177, 140, 0.2); border-top: 3px solid var(--accent-color); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .property-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.4s ease; } .property-modal.active { opacity: 1; visibility: visible; } .modal-content { width: 90%; max-width: 600px; max-height: 85vh; background-color: white; border-radius: 12px; overflow: hidden; position: relative; transform: translateY(50px); opacity: 0; transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1); } .property-modal.active .modal-content { transform: translateY(0); opacity: 1; } .modal-close { position: absolute; top: 15px; right: 15px; background-color: rgba(255, 255, 255, 0.9); border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); transition: var(--transition); } .modal-close:hover { background-color: var(--accent-color); color: white; } .modal-image { width: 100%; height: 300px; } .modal-image img { width: 100%; height: 100%; object-fit: cover; } .modal-details { padding: 24px; } .modal-price { font-size: 24px; font-weight: 600; color: var(--primary-color); margin-bottom: 10px; } .modal-title { font-size: 20px; font-weight: 500; margin-bottom: 10px; } .modal-location { display: flex; align-items: center; font-size: 14px; color: var(--text-light); margin-bottom: 20px; } .modal-location i { margin-right: 8px; } .modal-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); } .modal-feature { display: flex; flex-direction: column; align-items: center; text-align: center; } .modal-feature i { font-size: 20px; color: var(--accent-color); margin-bottom: 5px; } .modal-feature span { font-size: 14px; color: var(--text-light); } .modal-feature strong { font-size: 16px; color: var(--primary-color); } .modal-description { margin-bottom: 20px; line-height: 1.6; color: var(--text-color); font-size: 14px; } .modal-actions { display: flex; gap: 15px; } .modal-btn { flex: 1; padding: 12px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: var(--transition); } .modal-btn.primary { background-color: var(--accent-color); color: white; } .modal-btn.secondary { background-color: #f0f0f0; color: var(--primary-color); } .modal-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); } .modal-btn.primary:hover { background-color: #b7a07a; } .modal-btn.secondary:hover { background-color: #e5e5e5; } </style> </head> <body> <div class="container"> <div class="loader"> <div class="loader-circle"></div> </div> <div class="header"> <h1 class="title">Curated Properties</h1> <a href="#" class="view-all">View all <i class="fas fa-arrow-right"></i></a> </div> <div class="filter-bar"> <div class="search-bar"> <i class="fas fa-search search-icon"></i> <input type="text" placeholder="Search location or property..."> </div> <div class="filter-options"> <button class="filter-btn active">All</button> <button class="filter-btn">For Sale</button> <button class="filter-btn">For Rent</button> </div> </div> <div class="property-grid"> <!-- Property Card 1 --> <div class="property-card" data-id="1"> <div class="property-image"> <img src="https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80" alt="Luxury Riverside Residence"> <div class="property-status">For Sale</div> <button class="favorite-btn"><i class="far fa-heart"></i></button> </div> <div class="property-details"> <div> <div class="property-price"> $2,450,000 </div> <h3 class="property-title">Riverside Modern Villa</h3> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> Palisades, New York </div> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> 5 Beds </div> <div class="feature"> <i class="fas fa-bath"></i> 4 Baths </div> <div class="feature"> <i class="fas fa-vector-square"></i> 4,200 sqft </div> </div> </div> <div class="property-overlay"> <h3 class="overlay-title">Riverside Modern Villa</h3> <div class="overlay-features"> <div class="overlay-feature"> <i class="fas fa-calendar"></i> Built 2019 </div> <div class="overlay-feature"> <i class="fas fa-car"></i> 2 Garage </div> </div> <p class="overlay-description">Sophisticated waterfront property with panoramic river views. Features floor-to-ceiling windows and a private dock.</p> <button class="view-property-btn">View Property</button> </div> </div> <!-- Property Card 2 --> <div class="property-card" data-id="2"> <div class="property-image"> <img src="https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80" alt="Downtown Penthouse"> <div class="property-status">For Rent</div> <button class="favorite-btn"><i class="far fa-heart"></i></button> </div> <div class="property-details"> <div> <div class="property-price"> $8,500 <span class="per-month">/ month</span> </div> <h3 class="property-title">Downtown Luxury Penthouse</h3> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> Financial District, San Francisco </div> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> 3 Beds </div> <div class="feature"> <i class="fas fa-bath"></i> 3.5 Baths </div> <div class="feature"> <i class="fas fa-vector-square"></i> 2,800 sqft </div> </div> </div> <div class="property-overlay"> <h3 class="overlay-title">Downtown Luxury Penthouse</h3> <div class="overlay-features"> <div class="overlay-feature"> <i class="fas fa-star"></i> Concierge </div> <div class="overlay-feature"> <i class="fas fa-dumbbell"></i> Gym Access </div> </div> <p class="overlay-description">Exquisite penthouse with 360° city views, gourmet kitchen, and expansive private terrace ideal for entertaining.</p> <button class="view-property-btn">View Property</button> </div> </div> <!-- Property Card 3 --> <div class="property-card" data-id="3"> <div class="property-image"> <img src="https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80" alt="Hamptons Estate"> <div class="property-status">For Sale</div> <button class="favorite-btn"><i class="far fa-heart"></i></button> </div> <div class="property-details"> <div> <div class="property-price"> $3,975,000 </div> <h3 class="property-title">Hampton Waterfront Estate</h3> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> East Hampton, New York </div> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> 6 Beds </div> <div class="feature"> <i class="fas fa-bath"></i> 5 Baths </div> <div class="feature"> <i class="fas fa-vector-square"></i> 5,800 sqft </div> </div> </div> <div class="property-overlay"> <h3 class="overlay-title">Hampton Waterfront Estate</h3> <div class="overlay-features"> <div class="overlay-feature"> <i class="fas fa-swimming-pool"></i> Pool </div> <div class="overlay-feature"> <i class="fas fa-leaf"></i> 1.2 Acre Lot </div> </div> <p class="overlay-description">Refined coastal estate with private beach access, guest house, and meticulously landscaped grounds.</p> <button class="view-property-btn">View Property</button> </div> </div> <!-- Property Card 4 --> <div class="property-card" data-id="4"> <div class="property-image"> <img src="https://images.unsplash.com/photo-1605276374104-dee2a0ed3cd6?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80" alt="Minimalist Loft"> <div class="property-status">For Rent</div> <button class="favorite-btn"><i class="far fa-heart"></i></button> </div> <div class="property-details"> <div> <div class="property-price"> $5,200 <span class="per-month">/ month</span> </div> <h3 class="property-title">Designer Soho Loft</h3> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> SoHo, New York City </div> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> 2 Beds </div> <div class="feature"> <i class="fas fa-bath"></i> 2 Baths </div> <div class="feature"> <i class="fas fa-vector-square"></i> 1,950 sqft </div> </div> </div> <div class="property-overlay"> <h3 class="overlay-title">Designer Soho Loft</h3> <div class="overlay-features"> <div class="overlay-feature"> <i class="fas fa-building"></i> Doorman </div> <div class="overlay-feature"> <i class="fas fa-clock"></i> Furnished </div> </div> <p class="overlay-description">Architecturally significant loft with exposed brick, 14-foot ceilings, and custom Italian kitchen fixtures.</p> <button class="view-property-btn">View Property</button> </div> </div> </div> <!-- Property Detail Modal --> <div class="property-modal"> <div class="modal-content"> <button class="modal-close"><i class="fas fa-times"></i></button> <div class="modal-image"> <img src="" alt="Property Image"> </div> <div class="modal-details"> <div class="modal-price"></div> <h2 class="modal-title"></h2> <div class="modal-location"><i class="fas fa-map-marker-alt"></i> <span></span></div> <div class="modal-features"> <div class="modal-feature"> <i class="fas fa-bed"></i> <strong class="beds"></strong> <span>Bedrooms</span> </div> <div class="modal-feature"> <i class="fas fa-bath"></i> <strong class="baths"></strong> <span>Bathrooms</span> </div> <div class="modal-feature"> <i class="fas fa-vector-square"></i> <strong class="area"></strong> <span>Square Feet</span> </div> </div> <p class="modal-description"></p> <div class="modal-actions"> <button class="modal-btn primary">Schedule Viewing</button> <button class="modal-btn secondary">Contact Agent</button> </div> </div> </div> </div> </div> <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> <script> document.addEventListener('DOMContentLoaded', function() { // Simulate loading setTimeout(() => { document.querySelector('.loader').classList.add('hidden'); }, 1500); // Property data const properties = [ { id: 1, title: "Riverside Modern Villa", location: "Palisades, New York", price: "$2,450,000", status: "For Sale", beds: 5, baths: 4, area: "4,200 sqft", image: "https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", description: "This elegant waterfront villa offers unparalleled luxury living with breathtaking river views. The contemporary design features floor-to-ceiling windows that flood the space with natural light and create a seamless transition between indoor and outdoor spaces. The home includes a chef's kitchen with top-of-the-line appliances, a primary suite with a spa-like bathroom, and a private dock for boating enthusiasts. The expansive outdoor area offers multiple entertainment spaces and a heated infinity pool overlooking the water." }, { id: 2, title: "Downtown Luxury Penthouse", location: "Financial District, San Francisco", price: "$8,500 / month", status: "For Rent", beds: 3, baths: 3.5, area: "2,800 sqft", image: "https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", description: "Experience urban luxury in this stunning penthouse located in the heart of the Financial District. The residence offers panoramic city views from its wraparound terrace, perfect for entertaining guests. High-end finishes include marble countertops, hardwood floors, and smart home technology throughout. The building amenities include 24-hour concierge service, a state-of-the-art fitness center, and a rooftop lounge. Walking distance to premium dining, shopping, and transit options." }, { id: 3, title: "Hampton Waterfront Estate", location: "East Hampton, New York", price: "$3,975,000", status: "For Sale", beds: 6, baths: 5, area: "5,800 sqft", image: "https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", description: "This magnificent Hampton estate represents the pinnacle of coastal luxury living. Set on 1.2 acres of meticulously landscaped grounds, the property features direct beach access and sweeping ocean views. The main residence offers generous entertaining spaces including a formal dining room, library, and wine cellar. The expansive outdoor area includes a heated pool, tennis court, and beautifully designed gardens. A separate guest house provides additional accommodation for visitors. Perfectly positioned for privacy while remaining just minutes from town." }, { id: 4, title: "Designer Soho Loft", location: "SoHo, New York City", price: "$5,200 / month", status: "For Rent", beds: 2, baths: 2, area: "1,950 sqft", image: "https://images.unsplash.com/photo-1605276374104-dee2a0ed3cd6?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80", description: "This architecturally significant loft in the heart of SoHo showcases the perfect blend of historic character and modern design. Original features including exposed brick walls, cast-iron columns, and soaring 14-foot ceilings create a dramatic living space. The open concept floor plan includes a chef's kitchen with custom Italian cabinetry and professional-grade appliances. Large windows allow abundant natural light throughout the day. The building offers doorman service and a common roof deck with stunning city views. Furnished option available." } ]; // Favorite toggle const favoriteButtons = document.querySelectorAll('.favorite-btn'); favoriteButtons.forEach(btn => { btn.addEventListener('click', function(e) { e.stopPropagation(); this.classList.toggle('active'); const icon = this.querySelector('i'); if (this.classList.contains('active')) { icon.classList.remove('far'); icon.classList.add('fas'); } else { icon.classList.remove('fas'); icon.classList.add('far'); } }); }); // Filter buttons const filterButtons = document.querySelectorAll('.filter-btn'); filterButtons.forEach(btn => { btn.addEventListener('click', function() { filterButtons.forEach(b => b.classList.remove('active')); this.classList.add('active'); const filter = this.textContent.trim(); const propertyCards = document.querySelectorAll('.property-card'); propertyCards.forEach(card => { const status = card.querySelector('.property-status').textContent; if (filter === 'All' || status === filter) { card.style.display = 'block'; } else { card.style.display = 'none'; } }); }); }); // Search functionality const searchInput = document.querySelector('.search-bar input'); searchInput.addEventListener('input', function() { const searchTerm = this.value.toLowerCase(); const propertyCards = document.querySelectorAll('.property-card'); propertyCards.forEach(card => { const title = card.querySelector('.property-title').textContent.toLowerCase(); const location = card.querySelector('.property-location').textContent.toLowerCase(); if (title.includes(searchTerm) || location.includes(searchTerm)) { card.style.display = 'block'; } else { card.style.display = 'none'; } }); }); // Modal functionality const modal = document.querySelector('.property-modal'); const modalClose = document.querySelector('.modal-close'); const propertyCards = document.querySelectorAll('.property-card'); const viewButtons = document.querySelectorAll('.view-property-btn'); function openModal(id) { const property = properties.find(p => p.id === id); if (property) { const modalImage = modal.querySelector('.modal-image img'); const modalPrice = modal.querySelector('.modal-price'); const modalTitle = modal.querySelector('.modal-title'); const modalLocation = modal.querySelector('.modal-location span'); const modalBeds = modal.querySelector('.beds'); const modalBaths = modal.querySelector('.baths'); const modalArea = modal.querySelector('.area'); const modalDescription = modal.querySelector('.modal-description'); modalImage.src = property.image; modalImage.alt = property.title; modalPrice.textContent = property.price; modalTitle.textContent = property.title; modalLocation.textContent = property.location; modalBeds.textContent = property.beds; modalBaths.textContent = property.baths; modalArea.textContent = property.area; modalDescription.textContent = property.description; modal.classList.add('active'); document.body.style.overflow = 'hidden'; } } function closeModal() { modal.classList.remove('active'); document.body.style.overflow = ''; } propertyCards.forEach(card => { card.addEventListener('click', function() { const id = parseInt(this.getAttribute('data-id'));
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NeXus Gaming Dashboard</title> <style> @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Chakra+Petch:wght@300;400;500;600&display=swap'); :root { --neon-blue: #00f3ff; --neon-purple: #bc13fe; --neon-pink: #ff2cdf; --neon-green: #0fff50; --dark-bg: #0a0b18; --card-bg: #131429; --card-dark: #0c0d1c; --glass-effect: rgba(255, 255, 255, 0.05); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Chakra Petch', sans-serif; background-color: var(--dark-bg); color: white; height: 700px; width: 700px; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; background-image: radial-gradient(circle at 10% 20%, rgba(188, 19, 254, 0.1) 0%, transparent 40%), radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 40%); background-size: 100% 100%; background-position: center; } .container { max-width: 700px; margin: 0 auto; padding: 15px; } h1, h2, h3, h4 { font-family: 'Orbitron', sans-serif; text-transform: uppercase; } header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 10px 5px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } header h1 { font-size: 1.6rem; background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 1px; } .live-indicator { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--neon-green); } .pulse { width: 10px; height: 10px; background-color: var(--neon-green); border-radius: 50%; animation: pulse 1.5s infinite; } .tabs { display: flex; gap: 10px; margin-bottom: 20px; } .tab { padding: 8px 15px; background: transparent; border: none; border-radius: 4px; color: white; font-family: 'Chakra Petch', sans-serif; font-size: 0.9rem; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; } .tab::before { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple)); transition: width 0.3s ease; } .tab:hover::before { width: 100%; } .tab.active { background: rgba(188, 19, 254, 0.15); border-bottom: 2px solid var(--neon-purple); } .card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 20px; } .card { background: var(--card-bg); border-radius: 12px; padding: 15px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); transition: all 0.4s ease; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.05); } .card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(188, 19, 254, 0.1), 0 0 15px rgba(188, 19, 254, 0.3); } .card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent); transform: translateX(-100%); transition: transform 0.6s ease; } .card:hover::before { transform: translateX(100%); } .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .card-title { font-size: 1rem; color: white; letter-spacing: 0.5px; } .card-icon { font-size: 1.2rem; color: var(--neon-blue); } .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } .stat { display: flex; flex-direction: column; } .stat-label { font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 2px; } .stat-value { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.5px; } .highlighted { color: var(--neon-blue); } .achievement-card { display: flex; align-items: center; gap: 12px; } .achievement-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); border-radius: 8px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 15px rgba(188, 19, 254, 0.3); } .achievement-details h3 { font-size: 0.9rem; margin-bottom: 3px; } .achievement-details p { font-size: 0.7rem; color: rgba(255, 255, 255, 0.7); } .progress-container { margin-top: 8px; width: 100%; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; } .progress-bar { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple)); position: relative; overflow: hidden; } .progress-bar::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100% ); transform: translateX(-100%); animation: shimmer 2s infinite; } .leader-card { height: 100%; } .leader-list { display: flex; flex-direction: column; gap: 12px; max-height: 180px; overflow-y: auto; padding-right: 5px; } .leader-list::-webkit-scrollbar { width: 4px; } .leader-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; } .leader-list::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 10px; } .leader-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); transition: all 0.3s; } .leader-item:hover { background: rgba(255, 255, 255, 0.07); transform: translateX(3px); } .leader-rank { font-size: 0.9rem; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--neon-purple); color: white; } .top-rank { background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); box-shadow: 0 0 10px rgba(188, 19, 254, 0.6); } .leader-info { flex: 1; } .leader-name { font-size: 0.85rem; font-weight: 500; } .leader-score { font-size: 0.75rem; color: var(--neon-blue); } .live-matches-card { grid-column: 1 / -1; } .match-list { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; scroll-behavior: smooth; } .match-list::-webkit-scrollbar { height: 4px; } .match-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; } .match-list::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 10px; } .match-item { min-width: 220px; background: var(--card-dark); border-radius: 12px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.3s; } .match-item:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 243, 255, 0.2); border: 1px solid rgba(0, 243, 255, 0.2); } .match-header { display: flex; justify-content: space-between; margin-bottom: 8px; } .match-mode { font-size: 0.75rem; color: var(--neon-blue); font-weight: 500; } .match-time { font-size: 0.7rem; color: rgba(255, 255, 255, 0.7); display: flex; align-items: center; gap: 3px; } .match-teams { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; } .team { display: flex; flex-direction: column; align-items: center; text-align: center; width: 40%; } .team-name { font-size: 0.8rem; font-weight: 600; margin-bottom: 3px; } .team-score { font-size: 1.1rem; font-weight: 700; } .team-left .team-score { color: var(--neon-pink); } .team-right .team-score { color: var(--neon-blue); } .vs { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); } .match-info { display: flex; justify-content: space-between; font-size: 0.7rem; color: rgba(255, 255, 255, 0.7); } .btn-watch { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; margin-top: 10px; padding: 6px; background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink)); border: none; border-radius: 6px; color: white; font-family: 'Chakra Petch', sans-serif; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.3s; box-shadow: 0 0 10px rgba(188, 19, 254, 0.3); } .btn-watch:hover { box-shadow: 0 0 15px rgba(188, 19, 254, 0.5); transform: translateY(-2px); } .recently-played { grid-column: 1 / -1; } .game-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; } .game-item { min-width: 100px; max-width: 120px; background: var(--card-dark); border-radius: 12px; overflow: hidden; position: relative; transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.05); } .game-item:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 243, 255, 0.2); border: 1px solid rgba(0, 243, 255, 0.2); } .game-cover { width: 100%; height: 70px; object-fit: cover; position: relative; } .game-cover img { width: 100%; height: 100%; object-fit: cover; } .game-cover::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 30%; background: linear-gradient(to top, var(--card-dark), transparent); } .game-details { padding: 8px; } .game-title { font-size: 0.8rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .game-time { font-size: 0.65rem; color: rgba(255, 255, 255, 0.6); } .loading-bar { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; } .loading-progress { height: 100%; background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple)); width: 60%; } .tooltip { position: absolute; background: rgba(13, 14, 33, 0.95); color: white; padding: 8px 12px; border-radius: 6px; font-size: 0.8rem; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1); z-index: 10; opacity: 0; transform: translateY(10px); transition: all 0.3s; pointer-events: none; max-width: 200px; border: 1px solid var(--neon-purple); } .tooltip-trigger:hover .tooltip { opacity: 1; transform: translateY(0); } .player-info { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; } .player-avatar { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple)); box-shadow: 0 0 15px rgba(0, 243, 255, 0.3); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; border: 2px solid rgba(255, 255, 255, 0.1); } .player-details h2 { font-size: 1.2rem; margin-bottom: 3px; } .player-level { display: flex; align-items: center; gap: 5px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); } .level-badge { padding: 1px 6px; background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple)); border-radius: 4px; font-size: 0.7rem; font-weight: 600; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } } @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } /* Responsive fixes for small screens */ @media (max-width: 500px) { .card-grid { grid-template-columns: 1fr; } header h1 { font-size: 1.2rem; } .match-item { min-width: 180px; } } /* Loading animation */ .loading { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--dark-bg); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 1; transition: opacity 0.5s; } .loading.hidden { opacity: 0; pointer-events: none; } .loading-spinner { width: 60px; height: 60px; border: 3px solid transparent; border-top-color: var(--neon-blue); border-bottom-color: var(--neon-purple); border-radius: 50%; animation: loadingSpin 1.5s linear infinite; } .loading-spinner::before { content: ''; position: absolute; top: 5px; right: 5px; bottom: 5px; left: 5px; border: 3px solid transparent; border-top-color: var(--neon-pink); border-radius: 50%; animation: loadingSpin 2s linear infinite reverse; } @keyframes loadingSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Notification popup */ .notification { position: fixed; bottom: 20px; right: 20px; background: rgba(13, 14, 33, 0.95); border-left: 3px solid var(--neon-purple); border-radius: 6px; padding: 12px; width: 280px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); transform: translateX(120%); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 100; } .notification.show { transform: translateX(0); } .notification-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .notification-title { font-size: 0.85rem; font-weight: 600; color: white; } .notification-close { background: none; border: none; color: rgba(255, 255, 255, 0.6); cursor: pointer; font-size: 0.9rem; } .notification-message { font-size: 0.75rem; color: rgba(255, 255, 255, 0.8); } </style> </head> <body> <div class="loading"> <div class="loading-spinner"></div> </div> <div class="container"> <header> <h1>NeXus Gaming Hub</h1> <div class="live-indicator"> <div class="pulse"></div> <span>LIVE DATA</span> </div> </header> <div class="player-info"> <div class="player-avatar">VX</div> <div class="player-details"> <h2>VoidXplorer</h2> <div class="player-level"> <span class="level-badge">87</span> <span>Quantum Elite</span> </div> </div> </div> <div class="tabs"> <button class="tab active">Overview</button> <button class="tab">Achievements</button> <button class="tab">Matches</button> <button class="tab">Friends</button> </div> <div class="card-grid"> <div class="card"> <div class="card-header"> <h3 class="card-title">Current Stats</h3> <div class="card-icon">📊</div> </div> <div class="stats-grid"> <div class="stat"> <span class="stat-label">Kills</span> <span class="stat-value">2,847</span> </div> <div class="stat"> <span class="stat-label">K/D Ratio</span> <span class="stat-value highlighted">3.2</span> </div> <div class="stat"> <span class="stat-label">Win Rate</span> <span class="stat-value">68%</span> </div> <div class="stat"> <span class="stat-label">Total Matches</span> <span class="stat-value">512</span> </div> </div> </div> <div class="card tooltip-trigger"> <div class="tooltip">Complete 5 more Special Ops missions to unlock this achievement</div> <div class="card-header"> <h3 class="card-title">Achievement Progress</h3> <div class="card-icon">🏆</div> </div> <div class="achievement-card"> <div class="achievement-icon">🎯</div> <div class="achievement-details"> <h3>Shadow Operative</h3> <p>Complete 25 Special Ops missions</p> <div class="progress-container"> <div class="progress-bar" style="width: 80%"></div> </div> </div> </div> </div> <div class="card leader-card"> <div class="card-header"> <h3 class="card-title">Leaderboard</h3> <div class="card-icon">👑</div> </div> <div class="leader-list"> <div class="leader-item"> <div class="leader-rank top-rank">1</div> <div class="leader-info"> <div class="leader-name">QuantumSlayer</div> <div class="leader-score">15,892 pts</div> </div> </div> <div class="leader-item"> <div class="leader-rank top-rank">2</div> <div class="leader-info"> <div class="leader-name">NeonViper</div> <div class="leader-score">14,203 pts</div> </div> </div> <div class="leader-item"> <div class="leader-rank top-rank">3</div> <div class="leader-info"> <div class="leader-name">CyberPhantom</div> <div class="leader-score">13,908 pts</div> </div> </div> <div class="leader-item"> <div class="leader-rank">4</div> <div class="leader-info"> <div class="leader-name">VoidXplorer</div> <div class="leader-score">13,547 pts</div> </div> </div> <div class="leader-item"> <div class="leader-rank">5</div> <div class="leader-info"> <div class="leader-name">ZeroGravity</div> <div class="leader-score">12,754 pts</div> </div> </div> <div class="leader-item"> <div class="leader-rank">6</div> <div class="leader-info"> <div class="leader-name">SynthWave</div> <div class="leader-score">11,932 pts</div> </div> </div> </div> </div> <div class="card live-matches-card"> <div class="card-header"> <h3 class="card-title">Live Matches</h3> <div class="card-icon">🔴</div> </div> <div class="match-list"> <div class="match-item"> <div class="match-header"> <div class="match-mode">Deathzone Assault</div> <div class="match-time"> <span class="pulse"></span> LIVE: 24:18 </div> </div> <div class="match-teams"> <div class="team team-left"> <div class="team-name">Phantom Six</div> <div class="team-score">87</div> </div> <div class="vs">VS</div> <div class="team team-right"> <div class="team-name">Apex Raiders</div> <div class="team-score">79</div> </div> </div> <div class="match-info"> <span>Viewers: 1,428</span> <span>Map: Nova Outpost</span> </div> <button class="btn-watch">WATCH NOW</button> </div> <div class="match-item"> <div class="match-header"> <div class="match-mode">Tournament Finals</div> <div class="match-time"> <span class="pulse"></span> LIVE: 42:03 </div> </div> <div class="match-teams"> <div class="team team-left"> <div class="team-name">Neon Eclipse</div> <div class="team-score">4</div> </div> <div class="vs">VS</div> <div class="team team-right"> <div class="team-name">Quantum Force</div> <div class="team-score">2</div> </div> </div> <div class="match-info"> <span>Viewers: 8,756</span> <span>Map: Void Station</span> </div> <button class="btn-watch">WATCH NOW</button> </div> <div class="match-item"> <div class="match-header"> <div class="match-mode">Capture Points</div> <div class="match-time"> <span class="pulse"></span> LIVE: 08:42 </div> </div> <div class="match-teams"> <div class="team team-left"> <div class="team-name">Void Walkers</div> <div class="team-score">142</div> </div> <div class="vs">VS</div> <div class="team team-right"> <div class="team-name">Cyber Wolves</div> <div class="team-score">98</div> </div> </div> <div class="match-info"> <span>Viewers: 953</span> <span>Map: Echo Canyon</span> </div> <button class="btn-watch">WATCH NOW</button> </div> </div> </div> <div class="card recently-played"> <div class="card-header"> <h3 class="card-title">Recently Played</h3> <div class="card-icon">🎮</div> </div> <div class="game-list"> <div class="game-item"> <div class="game-cover"> <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='70' viewBox='0 0 120 70'%3E%3Crect width='120' height='70' fill='%230c0d1c'/%3E%3Cpath d='M0 0 L 120 70 M 0 70 L 120 0' stroke='%23131429' stroke-width='2'/%3E%3Ccircle cx='60' cy='35' r='20' fill='%23bc13fe' opacity='0.7'/%3E%3Ctext x='60' y='39' font-family='Arial' font-size='11' fill='white' text-anchor='middle'%3ENeXus Zero%3C/text%3E%3C/svg%3E" alt="NeXus Zero"> </div> <div class="game-details"> <h4 class="game-title">NeXus Zero</h4> <div class="game-time">2 hrs today</div> </div> <div class="loading-bar"> <div class="loading-progress"></div> </div> </div> <div class="game-item"> <div class="game-cover"> <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='70' viewBox='0 0 120 70'%3E%3Crect width='120' height='70' fill='%230c0d1c'/%3E%3Cpath d='M0 0 L 120 70 M 0 70 L 120 0' stroke='%23131429' stroke-width='2'/%3E%3Cpolygon points='60,15 85,60 35,60' fill='%2300f3ff' opacity='0.7'/%3E%3Ctext x='60' y='55' font-family='Arial' font-size='9' fill='white' text-anchor='middle'%3ECyber Siege%3C/text%3E%3C/svg%3E" alt="Cyber Siege"> </div> <div class="game-details"> <h4 class="game-title">Cyber Siege</h4> <div class="game-time">8 hrs total</div> </div> <div class="loading-bar"> <div class="loading-progress" style="width: 42%"></div> </div> </div> <div class="game-item"> <div class="game-cover"> <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='70' viewBox='0 0 120 70'%3E%3Crect width='120' height='70' fill='%230c0d1c'/%3E%3Cpath d='M0 0 L 120 70 M 0 70 L 120 0' stroke='%23131429' stroke-width='2'/%3E%3Crect x='35' y='20' width='50' height='30' fill='%23ff2cdf' opacity='0.7'/%3E%3Ctext x='60' y='39' font-family='Arial' font-size='8' fill='white' text-anchor='middle'%3EQuantum Raiders%3C/text%3E%3C/svg%3E" alt="Quantum Raiders"> </div> <div class="game-details"> <h4 class="game-title">Quantum Raiders</h4> <div class="game-time">3 days ago</div> </div> <div class="loading-bar"> <div class="loading-progress" style="width: 85%"></div> </div> </div> <div class="game-item"> <div class="game-cover"> <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='70' viewBox='0 0 120 70'%3E%3Crect width='120' height='70' fill='%230c0d1c'/%3E%3Cpath d='M0 0 L 120 70 M 0 70 L 120 0' stroke='%23131429' stroke-width='2'/%3E%3Ccircle cx='40' cy='35' r='15' fill='%230fff50' opacity='0.7'/%3E%3Ccircle cx='80' cy='35' r='15' fill='%23bc13fe' opacity='0.7'/%3E%3Ctext x='60' y='39' font-family='Arial' font-size='9' fill='white' text-anchor='middle'%3EVoid Runners%3C/text%3E%3C/svg%3E" alt="Void Runners"> </div> <div class="game-details"> <h4 class="game-title">Void Runners</h4> <div class="game-time">1 week ago</div> </div> <div class="loading-bar"> <div class="loading-progress" style="width: 23%"></div> </div> </div> </div> </div> </div> </div> <div class="
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Educational Content Cards</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } :root { --primary-color: #4768fd; --secondary-color: #ff6b6b; --tertiary-color: #10b981; --quaternary-color: #f59e0b; --dark-color: #374151; --light-color: #f9fafb; --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); --hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); --animation-duration: 0.3s; } body { background-color: #f0f4f8; background-image: radial-gradient(circle at 25px 25px, rgba(71, 104, 253, 0.15) 2px, transparent 0), radial-gradient(circle at 75px 75px, rgba(255, 107, 107, 0.1) 2px, transparent 0); background-size: 100px 100px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; overflow-x: hidden; } .container { max-width: 700px; width: 100%; height: 700px; overflow-y: auto; padding: 20px; scrollbar-width: thin; scrollbar-color: var(--primary-color) #edf2f7; } .container::-webkit-scrollbar { width: 8px; } .container::-webkit-scrollbar-track { background: #edf2f7; border-radius: 10px; } .container::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 10px; } .header { text-align: center; margin-bottom: 30px; position: relative; } .header h1 { font-size: 2rem; font-weight: 700; color: var(--dark-color); margin-bottom: 10px; letter-spacing: -0.5px; } .header p { color: #6b7280; font-size: 1rem; line-height: 1.5; max-width: 500px; margin: 0 auto; } .filter-tabs { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 25px; flex-wrap: wrap; } .filter-tab { background: white; border: 2px solid transparent; padding: 8px 15px; border-radius: 20px; font-size: 0.9rem; font-weight: 600; color: var(--dark-color); cursor: pointer; transition: all var(--animation-duration) ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); } .filter-tab.active { border-color: var(--primary-color); color: var(--primary-color); background-color: rgba(71, 104, 253, 0.1); } .filter-tab:hover:not(.active) { background-color: #f9fafb; transform: translateY(-2px); } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; } .card { background: white; border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); transition: all var(--animation-duration) cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; cursor: pointer; height: 300px; display: flex; flex-direction: column; } .card:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); } .card:hover .card-img { transform: scale(1.05); } .card-img-container { height: 130px; overflow: hidden; position: relative; } .card-img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--animation-duration) ease; } .card-difficulty { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.9); padding: 4px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .beginner { color: var(--tertiary-color); } .intermediate { color: var(--quaternary-color); } .advanced { color: var(--secondary-color); } .card-content { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; } .card-icon { background: rgba(71, 104, 253, 0.1); width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; } .card-icon i { font-size: 1.2rem; color: var(--primary-color); } .card-title { font-size: 1.1rem; font-weight: 600; color: var(--dark-color); margin-bottom: 8px; line-height: 1.3; } .card-description { font-size: 0.85rem; color: #6b7280; line-height: 1.5; margin-bottom: 15px; flex-grow: 1; } .card-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #edf2f7; } .card-stats { display: flex; gap: 12px; font-size: 0.75rem; color: #6b7280; } .card-stat { display: flex; align-items: center; gap: 4px; } .progress-ring-container { position: relative; width: 36px; height: 36px; } .progress-ring { transform: rotate(-90deg); transform-origin: 50% 50%; } .progress-ring__circle { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset var(--animation-duration) ease; } .progress-ring__background { stroke: #edf2f7; } .progress-ring__progress { stroke: var(--primary-color); } .progress-ring__text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.6rem; font-weight: 600; color: var(--primary-color); } .hidden { display: none; } .empty-state { text-align: center; padding: 30px; background: white; border-radius: 12px; box-shadow: var(--card-shadow); margin-top: 20px; } .empty-state i { font-size: 2.5rem; color: #d1d5db; margin-bottom: 15px; } .empty-state h3 { font-size: 1.2rem; font-weight: 600; color: var(--dark-color); margin-bottom: 10px; } .empty-state p { color: #6b7280; font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; } .btn { background: var(--primary-color); color: white; border: none; padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all var(--animation-duration) ease; } .btn:hover { background: #3252e8; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(71, 104, 253, 0.3); } .wave-animation { position: absolute; top: -15px; right: 40px; width: 50px; height: 50px; transform: rotate(15deg); } .wave { position: absolute; width: 100%; height: 100%; border: 2px dashed var(--tertiary-color); border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; animation: morph 6s linear infinite; } .wave:nth-child(2) { border-color: var(--secondary-color); animation-duration: 8s; } .wave:nth-child(3) { border-color: var(--quaternary-color); animation-duration: 10s; } @keyframes morph { 0% { transform: rotate(0deg) scale(1); opacity: 0.8; } 50% { transform: rotate(180deg) scale(1.1); opacity: 0.6; } 100% { transform: rotate(360deg) scale(1); opacity: 0.8; } } /* Animation for the cards */ @keyframes fade-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } } .card { animation: fade-in 0.5s ease forwards; } .card:nth-child(2) { animation-delay: 0.1s; } .card:nth-child(3) { animation-delay: 0.2s; } .card:nth-child(4) { animation-delay: 0.3s; } .card:nth-child(5) { animation-delay: 0.4s; } .card:nth-child(6) { animation-delay: 0.5s; } @media (max-width: 600px) { .cards-container { grid-template-columns: 1fr; } .header h1 { font-size: 1.8rem; } .filter-tabs { gap: 8px; } .filter-tab { padding: 6px 12px; font-size: 0.8rem; } } /* Add a card hover interaction */ .card::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--tertiary-color), var(--quaternary-color)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; } .card:hover::after { transform: scaleX(1); } /* Completion badge */ .completion-badge { position: absolute; bottom: 10px; right: 10px; background: var(--tertiary-color); color: white; font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 20px; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; } .card[data-completed="true"]:hover .completion-badge { opacity: 1; transform: translateY(0); } </style> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> </head> <body> <div class="container"> <div class="header"> <h1>Learning Pathways</h1> <p>Discover courses tailored to your learning journey. Track your progress and master new skills at your own pace.</p> <div class="wave-animation"> <div class="wave"></div> <div class="wave"></div> <div class="wave"></div> </div> </div> <div class="filter-tabs"> <div class="filter-tab active" data-category="all">All Courses</div> <div class="filter-tab" data-category="design">Design</div> <div class="filter-tab" data-category="development">Development</div> <div class="filter-tab" data-category="data">Data Science</div> <div class="filter-tab" data-category="business">Business</div> </div> <div class="cards-container"> <!-- Card 1 --> <div class="card" data-category="design" data-completed="true"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1523726491678-bf852e717f6a?ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" alt="UI/UX Fundamentals" class="card-img"> <div class="card-difficulty beginner">Beginner</div> </div> <div class="card-content"> <div class="card-icon"> <i class="fas fa-paint-brush"></i> </div> <h3 class="card-title">UI/UX Fundamentals</h3> <p class="card-description">Master the essential principles of user interfaces and experiences. Learn to craft intuitive designs that delight users.</p> <div class="card-meta"> <div class="card-stats"> <div class="card-stat"> <i class="fas fa-book"></i> <span>8 modules</span> </div> <div class="card-stat"> <i class="fas fa-clock"></i> <span>12 hours</span> </div> </div> <div class="progress-ring-container"> <svg class="progress-ring" width="36" height="36"> <circle class="progress-ring__circle progress-ring__background" stroke-width="3" cx="18" cy="18" r="15" /> <circle class="progress-ring__circle progress-ring__progress" stroke-width="3" cx="18" cy="18" r="15" stroke-dasharray="94.2" stroke-dashoffset="0" /> </svg> <div class="progress-ring__text">100%</div> </div> </div> </div> <div class="completion-badge">Completed</div> </div> <!-- Card 2 --> <div class="card" data-category="development" data-completed="false"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" alt="Modern JavaScript" class="card-img"> <div class="card-difficulty intermediate">Intermediate</div> </div> <div class="card-content"> <div class="card-icon"> <i class="fab fa-js"></i> </div> <h3 class="card-title">Modern JavaScript Essentials</h3> <p class="card-description">From ES6 features to advanced patterns. Build interactive web applications with modern JavaScript techniques.</p> <div class="card-meta"> <div class="card-stats"> <div class="card-stat"> <i class="fas fa-book"></i> <span>10 modules</span> </div> <div class="card-stat"> <i class="fas fa-clock"></i> <span>18 hours</span> </div> </div> <div class="progress-ring-container"> <svg class="progress-ring" width="36" height="36"> <circle class="progress-ring__circle progress-ring__background" stroke-width="3" cx="18" cy="18" r="15" /> <circle class="progress-ring__circle progress-ring__progress" stroke-width="3" cx="18" cy="18" r="15" stroke-dasharray="94.2" stroke-dashoffset="47.1" /> </svg> <div class="progress-ring__text">50%</div> </div> </div> </div> <div class="completion-badge">Completed</div> </div> <!-- Card 3 --> <div class="card" data-category="data" data-completed="false"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" alt="Data Visualization" class="card-img"> <div class="card-difficulty advanced">Advanced</div> </div> <div class="card-content"> <div class="card-icon"> <i class="fas fa-chart-bar"></i> </div> <h3 class="card-title">Data Visualization Mastery</h3> <p class="card-description">Create compelling visual stories with your data using D3.js, Tableau, and modern visualization techniques.</p> <div class="card-meta"> <div class="card-stats"> <div class="card-stat"> <i class="fas fa-book"></i> <span>12 modules</span> </div> <div class="card-stat"> <i class="fas fa-clock"></i> <span>24 hours</span> </div> </div> <div class="progress-ring-container"> <svg class="progress-ring" width="36" height="36"> <circle class="progress-ring__circle progress-ring__background" stroke-width="3" cx="18" cy="18" r="15" /> <circle class="progress-ring__circle progress-ring__progress" stroke-width="3" cx="18" cy="18" r="15" stroke-dasharray="94.2" stroke-dashoffset="75.36" /> </svg> <div class="progress-ring__text">20%</div> </div> </div> </div> <div class="completion-badge">Completed</div> </div> <!-- Card 4 --> <div class="card" data-category="business" data-completed="false"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1556761175-5973dc0f32e7?ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" alt="Project Management" class="card-img"> <div class="card-difficulty intermediate">Intermediate</div> </div> <div class="card-content"> <div class="card-icon"> <i class="fas fa-tasks"></i> </div> <h3 class="card-title">Agile Project Management</h3> <p class="card-description">Learn to lead projects with agile methodologies. Master Scrum, Kanban, and lean approaches for optimal team performance.</p> <div class="card-meta"> <div class="card-stats"> <div class="card-stat"> <i class="fas fa-book"></i> <span>9 modules</span> </div> <div class="card-stat"> <i class="fas fa-clock"></i> <span>15 hours</span> </div> </div> <div class="progress-ring-container"> <svg class="progress-ring" width="36" height="36"> <circle class="progress-ring__circle progress-ring__background" stroke-width="3" cx="18" cy="18" r="15" /> <circle class="progress-ring__circle progress-ring__progress" stroke-width="3" cx="18" cy="18" r="15" stroke-dasharray="94.2" stroke-dashoffset="66.12" /> </svg> <div class="progress-ring__text">30%</div> </div> </div> </div> <div class="completion-badge">Completed</div> </div> <!-- Card 5 --> <div class="card" data-category="development" data-completed="false"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1547658719-da2b51169166?ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" alt="React Framework" class="card-img"> <div class="card-difficulty advanced">Advanced</div> </div> <div class="card-content"> <div class="card-icon"> <i class="fab fa-react"></i> </div> <h3 class="card-title">React & Redux Architecture</h3> <p class="card-description">Build scalable applications with React. Master component design, state management, and performance optimization.</p> <div class="card-meta"> <div class="card-stats"> <div class="card-stat"> <i class="fas fa-book"></i> <span>14 modules</span> </div> <div class="card-stat"> <i class="fas fa-clock"></i> <span>22 hours</span> </div> </div> <div class="progress-ring-container"> <svg class="progress-ring" width="36" height="36"> <circle class="progress-ring__circle progress-ring__background" stroke-width="3" cx="18" cy="18" r="15" /> <circle class="progress-ring__circle progress-ring__progress" stroke-width="3" cx="18" cy="18" r="15" stroke-dasharray="94.2" stroke-dashoffset="28.26" /> </svg> <div class="progress-ring__text">70%</div> </div> </div> </div> <div class="completion-badge">Completed</div> </div> <!-- Card 6 --> <div class="card" data-category="design" data-completed="false"> <div class="card-img-container"> <img src="https://images.unsplash.com/photo-1518893494013-481c1d8ed3fd?ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" alt="Animation Design" class="card-img"> <div class="card-difficulty intermediate">Intermediate</div> </div> <div class="card-content"> <div class="card-icon"> <i class="fas fa-film"></i> </div> <h3 class="card-title">Motion Design Principles</h3> <p class="card-description">Create engaging animations that enhance user experience. Learn timing, easing, and meaningful motion design.</p> <div class="card-meta"> <div class="card-stats"> <div class="card-stat"> <i class="fas fa-book"></i> <span>7 modules</span> </div> <div class="card-stat"> <i class="fas fa-clock"></i> <span>10 hours</span> </div> </div> <div class="progress-ring-container"> <svg class="progress-ring" width="36" height="36"> <circle class="progress-ring__circle progress-ring__background" stroke-width="3" cx="18" cy="18" r="15" /> <circle class="progress-ring__circle progress-ring__progress" stroke-width="3" cx="18" cy="18" r="15" stroke-dasharray="94.2" stroke-dashoffset="0" /> </svg> <div class="progress-ring__text">0%</div> </div> </div> </div> <div class="completion-badge">Completed</div> </div> </div> <div class="empty-state hidden"> <i class="far fa-folder-open"></i> <h3>No courses found</h3> <p>There are no courses matching your current filter. Try selecting a different category or check back later.</p> <button class="btn reset-filter">Reset Filter</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Filter functionality const filterTabs = document.querySelectorAll('.filter-tab'); const cards = document.querySelectorAll('.card'); const emptyState = document.querySelector('.empty-state'); const resetButton = document.querySelector('.reset-filter'); // Handle filter click filterTabs.forEach(tab => { tab.addEventListener('click', () => { // Update active class filterTabs.forEach(t => t.classList.remove('active')); tab.classList.add('active'); const category = tab.dataset.category; let hasVisibleCards = false; // Filter cards cards.forEach(card => { if (category === 'all' || card.dataset.category === category) { card.classList.remove('hidden'); hasVisibleCards = true; } else { card.classList.add('hidden'); } }); // Show/hide empty state if (hasVisibleCards) { emptyState.classList.add('hidden'); } else { emptyState.classList.remove('hidden'); } }); }); // Reset filter resetButton.addEventListener('click', () => { filterTabs.forEach(t => t.classList.remove('active')); const allTab = document.querySelector('[data-category="all"]'); allTab.classList.add('active'); cards.forEach(card => { card.classList.remove('hidden'); }); emptyState.classList.add('hidden'); }); // Card click interaction cards.forEach(card => { card.addEventListener('click', () => { const isCompleted = card.getAttribute('data-completed') === 'true'; if (!isCompleted) { const progressRing = card.querySelector('.progress-ring__progress'); const progressText = card.querySelector('.progress-ring__text'); const currentProgress = parseInt(progressText.textContent); // Increment progress by 10% when clicked const newProgress = Math.min(currentProgress + 10, 100); const circumference = 2 * Math.PI * 15; const offset = circumference - (newProgress / 100) * circumference; progressRing.style.strokeDashoffset = offset; progressText.textContent = `${newProgress}%`; // Mark as completed if 100% if (newProgress === 100) { card.setAttribute('data-completed', 'true'); } } }); }); // Initialize progress rings const progressRings = document.querySelectorAll('.progress-ring__progress'); progressRings.forEach(ring => { const progress = parseInt(ring.parentElement.nextElementSibling.textContent); const circumference = 2 * Math.PI * 15; const offset = circumference - (progress / 100) * circumference; ring.style.strokeDashoffset = offset; }); // Add hover animation to cards cards.forEach(card => { card.addEventListener('mouseenter', () => { const icon = card.querySelector('.card-icon i'); icon.style.transition = 'transform 0.3s ease'; icon.style.transform = 'scale(1.2)'; }); card.addEventListener('mouseleave', () => { const icon = card.querySelector('.card-icon i'); icon.style.transform = 'scale(1)'; }); }); // Staggered animation on load cards.forEach((card, index) => { card.style.opacity = '0'; card.style.transform = 'translateY(15px)'; setTimeout(() => { card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, 100 * index); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Mobile App Dashboard Cards</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background: #f7f9fc; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; overflow-x: hidden; } .container { width: 100%; max-width: 650px; display: flex; flex-direction: column; gap: 18px; } header { text-align: left; margin-bottom: 10px; } h1 { font-size: 28px; color: #293241; font-weight: 600; margin-bottom: 8px; } .subtitle { color: #6c757d; font-size: 16px; margin-bottom: 15px; } .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; width: 100%; } .card-wrapper { perspective: 1000px; position: relative; height: 190px; transition: transform 0.3s ease; } .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); border-radius: 16px; overflow: hidden; cursor: pointer; user-select: none; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07); } .card:active { transform: scale(0.97); } .card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; } .card-front { background-color: white; z-index: 2; } .card-back { transform: rotateY(180deg); z-index: 1; } .flipped { transform: rotateY(180deg); } .card-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px; } .card-title { font-weight: 600; font-size: 18px; line-height: 1.2; margin-bottom: 10px; } .card-value { font-size: 32px; font-weight: 700; margin-bottom: 6px; } .card-trend { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; } .positive { color: #34c759; } .negative { color: #ff3b30; } .neutral { color: #8e8e93; } .card-detail { font-size: 14px; color: #6c757d; margin-top: auto; } .card-tap-hint { position: absolute; bottom: 12px; right: 12px; font-size: 12px; color: #8e8e93; display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.3s ease; } .card:hover .card-tap-hint { opacity: 1; } .bar-graph { display: flex; align-items: flex-end; height: 70px; margin-top: 10px; gap: 6px; margin-bottom: 20px; } .bar { flex: 1; background: var(--bar-color, #5e5ce6); border-radius: 4px 4px 0 0; height: var(--height); min-height: 10px; transition: height 0.4s ease; position: relative; } .bar::before { content: attr(data-label); position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #8e8e93; } .progress-container { width: 100%; height: 8px; background-color: #e9ecef; border-radius: 4px; margin: 15px 0; overflow: hidden; } .progress-bar { height: 100%; background-color: var(--progress-color, #5e5ce6); border-radius: 4px; transition: width 0.5s ease; width: var(--progress); } .actions { display: flex; gap: 10px; margin-top: auto; } .action-btn { background: #f1f3f5; border: none; border-radius: 8px; padding: 10px; color: #495057; font-weight: 500; font-size: 14px; cursor: pointer; flex: 1; transition: background 0.2s, transform 0.1s; display: flex; align-items: center; justify-content: center; gap: 6px; } .action-btn:hover { background: #e9ecef; } .action-btn:active { transform: scale(0.96); } /* Card specific styles */ #revenue-card .card-front { background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); } #revenue-card .card-back { background: linear-gradient(135deg, #f1f6ff 0%, #e6f0ff 100%); } #revenue-card .card-icon { background-color: #e6f2ff; color: #0a84ff; } #users-card .card-front { background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); } #users-card .card-back { background: linear-gradient(135deg, #f5fff7 0%, #e6ffea 100%); } #users-card .card-icon { background-color: #e6faea; color: #34c759; } #conversion-card .card-front { background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); } #conversion-card .card-back { background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%); } #conversion-card .card-icon { background-color: #ffeeee; color: #ff3b30; } #retention-card .card-front { background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); } #retention-card .card-back { background: linear-gradient(135deg, #f5f3ff 0%, #ebe6ff 100%); } #retention-card .card-icon { background-color: #eee6ff; color: #5e5ce6; } .floating-circles { position: absolute; top: 0; right: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: -1; } .circle { position: absolute; border-radius: 50%; opacity: 0.07; } #revenue-card .floating-circles .circle { background-color: #0a84ff; } #users-card .floating-circles .circle { background-color: #34c759; } #conversion-card .floating-circles .circle { background-color: #ff3b30; } #retention-card .floating-circles .circle { background-color: #5e5ce6; } /* Notification badge */ .notification-badge { position: absolute; top: 15px; right: 15px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background-color: #ff3b30; color: white; border-radius: 50%; font-size: 12px; font-weight: 600; transform: scale(0); animation: pulse 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 1.5s; } @keyframes pulse { 0% { transform: scale(0); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } /* Switch toggle */ .switch-container { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; } .switch-label { font-size: 14px; color: #6c757d; } .switch { position: relative; display: inline-block; width: 42px; 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: #e9ecef; transition: .4s; border-radius: 34px; } .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } input:checked + .slider { background-color: var(--switch-color, #5e5ce6); } input:checked + .slider:before { transform: translateX(18px); } /* Responsive tweaks */ @media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } h1 { font-size: 24px; } .subtitle { font-size: 14px; } } /* Card swipe up effect */ .swipe-indicator { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); width: 36px; height: 5px; background-color: rgba(142, 142, 147, 0.2); border-radius: 3px; display: none; } #pulldown-refresh { position: absolute; top: -60px; left: 0; width: 100%; text-align: center; height: 60px; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease; transform: translateY(0); } .refresh-spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid rgba(94, 92, 230, 0.2); border-radius: 50%; border-top-color: #5e5ce6; margin-right: 10px; animation: spin 1s linear infinite; opacity: 0; transition: opacity 0.2s; } @keyframes spin { to { transform: rotate(360deg); } } .refresh-text { color: #6c757d; font-size: 14px; font-weight: 500; } /* Visual touch feedback */ .touch-ripple { position: absolute; border-radius: 50%; background-color: rgba(0, 0, 0, 0.05); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } </style> </head> <body> <div id="pulldown-refresh"> <div class="refresh-spinner"></div> <span class="refresh-text">Pull down to refresh</span> </div> <div class="container"> <header> <h1>Your Dashboard</h1> <p class="subtitle">Today's analytics at a glance</p> </header> <div class="card-grid"> <div id="revenue-card" class="card-wrapper"> <div class="card"> <div class="card-front"> <div class="floating-circles"> <div class="circle" style="width: 80px; height: 80px; top: -20px; right: -20px;"></div> <div class="circle" style="width: 40px; height: 40px; bottom: 30px; right: 20px;"></div> </div> <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 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 20ZM12.31 11.14C10.54 10.69 9.97 10.2 9.97 9.47C9.97 8.63 10.76 8.04 12.07 8.04C13.45 8.04 13.97 8.7 14.01 9.68H15.72C15.67 8.34 14.85 7.11 13.23 6.71V5H10.9V6.69C9.39 7.01 8.18 7.99 8.18 9.5C8.18 11.29 9.67 12.19 11.84 12.71C13.79 13.17 14.18 13.86 14.18 14.58C14.18 15.11 13.79 15.97 12.08 15.97C10.48 15.97 9.85 15.25 9.76 14.33H8.04C8.14 16.03 9.4 16.99 10.9 17.3V19H13.24V17.33C14.76 17.04 15.98 16.17 15.98 14.56C15.98 12.36 14.07 11.6 12.31 11.14Z" fill="currentColor"/> </svg> </div> <h3 class="card-title">Daily Revenue</h3> <div class="card-value">$12,845</div> <div class="card-trend positive"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 14L12 9L17 14H7Z" fill="currentColor"/> </svg> +8.2% from yesterday </div> <div class="card-detail">Tap for 7-day breakdown</div> <div class="notification-badge">3</div> <div class="card-tap-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16.01 11H4V13H16.01V16L20 12L16.01 8V11Z" fill="currentColor"/> </svg> Tap </div> </div> <div class="card-back"> <h3 class="card-title">Weekly Revenue</h3> <div class="bar-graph"> <div class="bar" style="--height: 30%; --bar-color: #0a84ff;" data-label="Mon"></div> <div class="bar" style="--height: 50%; --bar-color: #0a84ff;" data-label="Tue"></div> <div class="bar" style="--height: 40%; --bar-color: #0a84ff;" data-label="Wed"></div> <div class="bar" style="--height: 60%; --bar-color: #0a84ff;" data-label="Thu"></div> <div class="bar" style="--height: 45%; --bar-color: #0a84ff;" data-label="Fri"></div> <div class="bar" style="--height: 70%; --bar-color: #0a84ff;" data-label="Sat"></div> <div class="bar" style="--height: 95%; --bar-color: #0a84ff;" data-label="Sun"></div> </div> <div class="switch-container"> <span class="switch-label">Auto-deposit to savings</span> <label class="switch"> <input type="checkbox" checked> <span class="slider" style="--switch-color: #0a84ff;"></span> </label> </div> <div class="actions"> <button class="action-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM9 17H7V10H9V17ZM13 17H11V7H13V17ZM17 17H15V13H17V17Z" fill="currentColor"/> </svg> Details </button> <button class="action-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M18 16.08C17.24 16.08 16.56 16.38 16.04 16.85L8.91 12.7C8.96 12.47 9 12.24 9 12C9 11.76 8.96 11.53 8.91 11.3L15.96 7.19C16.5 7.69 17.21 8 18 8C19.66 8 21 6.66 21 5C21 3.34 19.66 2 18 2C16.34 2 15 3.34 15 5C15 5.24 15.04 5.47 15.09 5.7L8.04 9.81C7.5 9.31 6.79 9 6 9C4.34 9 3 10.34 3 12C3 13.66 4.34 15 6 15C6.79 15 7.5 14.69 8.04 14.19L15.16 18.35C15.11 18.56 15.08 18.78 15.08 19C15.08 20.61 16.39 21.92 18 21.92C19.61 21.92 20.92 20.61 20.92 19C20.92 17.39 19.61 16.08 18 16.08Z" fill="currentColor"/> </svg> Share </button> </div> </div> </div> </div> <div id="users-card" class="card-wrapper"> <div class="card"> <div class="card-front"> <div class="floating-circles"> <div class="circle" style="width: 60px; height: 60px; top: -10px; right: -10px;"></div> <div class="circle" style="width: 35px; height: 35px; bottom: 40px; right: 30px;"></div> </div> <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="M16 11C17.66 11 18.99 9.66 18.99 8C18.99 6.34 17.66 5 16 5C14.34 5 13 6.34 13 8C13 9.66 14.34 11 16 11ZM8 11C9.66 11 10.99 9.66 10.99 8C10.99 6.34 9.66 5 8 5C6.34 5 5 6.34 5 8C5 9.66 6.34 11 8 11ZM8 13C5.67 13 1 14.17 1 16.5V19H15V16.5C15 14.17 10.33 13 8 13ZM16 13C15.71 13 15.38 13.02 15.03 13.05C16.19 13.89 17 15.02 17 16.5V19H23V16.5C23 14.17 18.33 13 16 13Z" fill="currentColor"/> </svg> </div> <h3 class="card-title">Active Users</h3> <div class="card-value">4,872</div> <div class="card-trend positive"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 14L12 9L17 14H7Z" fill="currentColor"/> </svg> +12.4% from last week </div> <div class="card-detail">Tap for user segments</div> <div class="card-tap-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16.01 11H4V13H16.01V16L20 12L16.01 8V11Z" fill="currentColor"/> </svg> Tap </div> </div> <div class="card-back"> <h3 class="card-title">User Segments</h3> <div style="margin-top: 10px; font-size: 14px; color: #495057;">Desktop vs Mobile</div> <div class="progress-container"> <div class="progress-bar" style="--progress: 65%; --progress-color: #34c759;"></div> </div> <div style="display: flex; justify-content: space-between; font-size: 12px; color: #6c757d;"> <span>Desktop: 35%</span> <span>Mobile: 65%</span> </div> <div style="margin-top: 15px; font-size: 14px; color: #495057;">New vs Returning</div> <div class="progress-container"> <div class="progress-bar" style="--progress: 28%; --progress-color: #34c759;"></div> </div> <div style="display: flex; justify-content: space-between; font-size: 12px; color: #6c757d;"> <span>New: 28%</span> <span>Returning: 72%</span> </div> <div class="actions"> <button class="action-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM9 17H7V10H9V17ZM13 17H11V7H13V17ZM17 17H15V13H17V17Z" fill="currentColor"/> </svg> Full Report </button> <button class="action-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z" fill="currentColor"/> </svg> Set Alert </button> </div> </div> </div> </div> <div id="conversion-card" class="card-wrapper"> <div class="card"> <div class="card-front"> <div class="floating-circles"> <div class="circle" style="width: 70px; height: 70px; top: -15px; right: -15px;"></div> <div class="circle" style="width: 30px; height: 30px; bottom: 30px; right: 10px;"></div> </div> <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="M3.5 18.49L9.5 12.48L13.5 16.48L22 6.92L20.59 5.51L13.5 13.48L9.5 9.48L2 16.99L3.5 18.49Z" fill="currentColor"/> </svg> </div> <h3 class="card-title">Conversion Rate</h3> <div class="card-value">3.8%</div> <div class="card-trend negative"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 10L12 15L17 10H7Z" fill="currentColor"/> </svg> -0.6% from last week </div> <div class="card-detail">Tap for conversion funnel</div> <div class="card-tap-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16.01 11H4V13H16.01V16L20 12L16.01 8V11Z" fill="currentColor"/> </svg> Tap </div> </div> <div class="card-back"> <h3 class="card-title">Conversion Funnel</h3> <div style="display: flex; flex-direction: column; gap: 12px; margin-top: 15px;"> <div> <div style="display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px;"> <span style="color: #495057;">Visits</span> <span style="font-weight: 600; color: #212529;">10,245</span> </div> <div class="progress-container" style="margin: 0;"> <div class="progress-bar" style="--progress: 100%; --progress-color: #ff3b30;"></div> </div> </div> <div> <div style="display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px;"> <span style="color: #495057;">Product Views</span> <span style="font-weight: 600; color: #212529;">5,782</span> </div> <div class="progress-container" style="margin: 0;"> <div class="progress-bar" style="--progress: 56%; --progress-color: #ff3b30;"></div> </div> </div> <div> <div style="display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px;"> <span style="color: #495057;">Add to Cart</span> <span style="font-weight: 600; color: #212529;">1,245</span> </div> <div class="progress-container" style="margin: 0;"> <div class="progress-bar" style="--progress: 12%; --progress-color: #ff3b30;"></div> </div> </div> <div> <div style="display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px;"> <span style="color: #495057;">Checkout</span> <span style="font-weight: 600; color: #212529;">389</span> </div> <div class="progress-container" style="margin: 0;"> <div class="progress-bar" style="--progress: 3.8%; --progress-color: #ff3b30;"></div> </div> </div> </div> <div class="actions"> <button class="action-btn"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 8C13.1 8 14 7.1 14 6C14 4.9 13.1 4 12 4C10.9 4 10 4.9 10 6C10 7.1 10.9 8 12 8ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM12 16C10.9 16 10 16.9 10 18C10 19.1 10.9 20 12 20C13.1 20 14 19.1 14 18C14 16.9 13.1 16 12 16Z" fill="currentColor"/> </svg> Optimize </button> </div> </div> </div> </div> <div id="retention-card" class="card-wrapper"> <div class="card"> <div class="card-front"> <div class="floating-circles"> <div class="circle" style="width: 65px; height: 65px; top: -10px; right: -10px;"></div> <div class="circle" style="width: 45px; height: 45px; bottom: 20px; right: 25px;"></div> </div> <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 21.35L10.55 20.03C5.4 15.36 2 12.28 2 8.5C2 5.42 4.42 3 7.5 3C9.24 3 10.91 3.81 12 5.09C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.42 22 8.5C22 12.28 18.6 15.36 13.45 20.04L12 21.35Z" fill="currentColor"/> </svg> </div> <h3 class="card-title">User Retention</h3> <div class="card-value">76%</div> <div class="card-trend neutral"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 11H19V13H5Z" fill="currentColor"/> </svg> No change from last month </div> <div class="card-detail">Tap for cohort analysis</div> <div class="card-tap-hint"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16.01 11H4V13H16.01V16L20 12L16.01 8V11Z" fill="currentColor"/> </svg> Tap </div> </div> <div class="card-back"> <h3 class="card-title">Retention by Age</h3> <div style="margin-top: 15px;"> <div style="display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px;"> <span style="color: #495057;">Day 1</span> <span style="font-weight: 600; color: #212529;">96%</span> </div> <div class="progress-container" style="margin: 0 0 10px 0;"> <div class="progress-bar" style="--progress: 96%; --progress-color: #5e5ce6;"></div> </div> <div style="display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px;"> <span style="color: #495057;">Day 7</span> <span style="font-weight: 600; color: #212529;">82%</span> </div> <div class="progress-container" style="margin: 0 0 10px 0;"> <div class="progress-bar" style="--progress: 82%; --progress-color: #5e5ce6;"></div> </div> <div style="display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px;"> <span style="color: #495057;">Day 30</span> <span style="font-weight: 600; color: #212529;">76%</span> </div> <div class="progress-container" style="margin: 0 0 10px 0;"> <div class="progress-bar" style="--progress: 76%; --progress-color: #5e5ce6;"></div> </div> </div> <div class="switch-container"> <span class="switch-label">Compare with previous period</span> <label class="switch"> <input type="checkbox
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Travel Itinerary Cards</title> <style> :root { --primary: #ff7e5f; --secondary: #feb47b; --accent: #5ce1e6; --dark: #2d3748; --light: #f8f9fa; --shadow: 0 10px 30px rgba(0, 0, 0, 0.1); --card-radius: 12px; --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif; } body { background: linear-gradient(135deg, #f5f7fa, #e4e8f0); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; overflow-x: hidden; } .container { width: 100%; max-width: 700px; margin: 0 auto; } h1 { color: var(--dark); text-align: center; margin-bottom: 40px; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.5px; position: relative; display: inline-block; } h1::after { content: ""; position: absolute; width: 60px; height: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary)); bottom: -10px; left: 50%; transform: translateX(-50%); border-radius: 10px; } .filter-bar { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; justify-content: center; } .filter-btn { background: white; border: none; padding: 8px 16px; border-radius: 30px; font-size: 14px; color: var(--dark); cursor: pointer; transition: var(--transition); box-shadow: 0 2px 5px rgba(0,0,0,0.05); font-weight: 500; } .filter-btn:hover, .filter-btn.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; transform: translateY(-2px); box-shadow: var(--shadow); } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; width: 100%; max-height: 550px; overflow-y: auto; padding: 10px 5px 10px 10px; margin-right: -5px; } .cards-container::-webkit-scrollbar { width: 6px; } .cards-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); border-radius: 10px; } .cards-container::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; } .cards-container::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); } .card { background: white; border-radius: var(--card-radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); position: relative; height: 350px; transform-style: preserve-3d; perspective: 1000px; } .card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); } .card.expanded { height: auto; } .card-inner { transition: var(--transition); position: relative; height: 100%; } .card.expanded .card-inner { transform: rotateY(180deg); } .card-front, .card-back { backface-visibility: hidden; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: var(--card-radius); overflow: hidden; } .card-back { transform: rotateY(180deg); background: white; padding: 20px; display: flex; flex-direction: column; } .card-image { height: 180px; position: relative; overflow: hidden; } .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .card:hover .card-image img { transform: scale(1.05); } .category-badge { position: absolute; top: 15px; left: 15px; background: var(--accent); color: var(--dark); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; z-index: 2; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } .card-content { padding: 20px; flex: 1; } .card-date { display: flex; align-items: center; font-size: 13px; color: #666; margin-bottom: 8px; } .card-date svg { margin-right: 6px; color: var(--primary); } .card-title { font-size: 1.2rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; line-height: 1.3; } .card-description { font-size: 14px; color: #666; line-height: 1.5; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .activity-list { margin-top: 10px; } .activity-item { display: flex; align-items: center; margin-bottom: 8px; font-size: 14px; } .activity-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; margin-right: 10px; border-radius: 50%; background: rgba(255, 126, 95, 0.1); color: var(--primary); font-size: 12px; flex-shrink: 0; } .card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px solid #eee; } .price { font-weight: 700; font-size: 18px; color: var(--primary); } .expand-btn { background: none; border: none; color: var(--dark); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; transition: color 0.3s; padding: 5px 0; } .expand-btn:hover { color: var(--primary); } .expand-btn svg { margin-left: 5px; transition: transform 0.3s; } .expanded .expand-btn svg { transform: rotate(180deg); } .back-btn { align-self: flex-end; background: none; border: none; color: var(--dark); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; transition: color 0.3s; padding: 5px 0; margin-top: 15px; } .back-btn:hover { color: var(--primary); } .back-btn svg { margin-right: 5px; } .detailed-section { margin-bottom: 20px; } .detailed-section h4 { font-size: 16px; color: var(--dark); margin-bottom: 10px; font-weight: 600; } .detailed-section p, .detailed-section li { font-size: 14px; line-height: 1.5; color: #666; } .detailed-section ul { padding-left: 20px; margin-top: 5px; } .timeline { position: relative; margin: 15px 0; padding-left: 20px; } .timeline::before { content: ''; position: absolute; left: 0; top: 8px; height: calc(100% - 16px); width: 2px; background: linear-gradient(to bottom, var(--primary), var(--secondary)); } .timeline-item { position: relative; padding-bottom: 15px; } .timeline-item:last-child { padding-bottom: 0; } .timeline-item::before { content: ''; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid white; box-shadow: 0 0 0 2px var(--primary); } .timeline-time { font-weight: 600; color: var(--dark); margin-bottom: 3px; font-size: 14px; } .timeline-activity { font-size: 13px; color: #666; } .weather-info { display: flex; align-items: center; margin-top: 8px; font-size: 13px; color: #666; } .weather-icon { font-size: 16px; margin-right: 5px; color: var(--accent); } .loader { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 1000; justify-content: center; align-items: center; } .loader-circle { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @media (max-width: 768px) { .cards-container { grid-template-columns: 1fr; max-height: 480px; } h1 { font-size: 1.8rem; } .card { height: 320px; } } @media (max-width: 480px) { .filter-bar { gap: 6px; } .filter-btn { padding: 6px 12px; font-size: 12px; } .card-image { height: 150px; } .card-content { padding: 15px; } .card-title { font-size: 1.1rem; } .card { height: 300px; } } /* Card Entrance Animation */ @keyframes cardEnter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .card { animation: cardEnter 0.5s ease forwards; } .card:nth-child(2) { animation-delay: 0.1s; } .card:nth-child(3) { animation-delay: 0.2s; } .card:nth-child(4) { animation-delay: 0.3s; } .card:nth-child(5) { animation-delay: 0.4s; } .card:nth-child(6) { animation-delay: 0.5s; } </style> </head> <body> <div class="container"> <h1>Discovery Journeys</h1> <div class="filter-bar"> <button class="filter-btn active" data-filter="all">All</button> <button class="filter-btn" data-filter="adventure">Adventure</button> <button class="filter-btn" data-filter="cultural">Cultural</button> <button class="filter-btn" data-filter="beach">Beach</button> <button class="filter-btn" data-filter="urban">Urban</button> </div> <div class="cards-container"> <!-- Card 1 --> <div class="card" data-category="adventure"> <div class="card-inner"> <div class="card-front"> <div class="category-badge">Adventure</div> <div class="card-image"> <img src="https://images.unsplash.com/photo-1501785888041-af3ef285b470?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="New Zealand Landscapes"> </div> <div class="card-content"> <div class="card-date"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect> <line x1="16" y1="2" x2="16" y2="6"></line> <line x1="8" y1="2" x2="8" y2="6"></line> <line x1="3" y1="10" x2="21" y2="10"></line> </svg> May 15 - May 28, 2024 </div> <h3 class="card-title">New Zealand Alpine Explorer</h3> <p class="card-description">Trek through Fiordland National Park and explore the majestic Southern Alps with expert wilderness guides.</p> <div class="activity-list"> <div class="activity-item"> <div class="activity-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M18 8h1a4 4 0 0 1 0 8h-1"></path> <path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path> <line x1="6" y1="1" x2="6" y2="4"></line> <line x1="10" y1="1" x2="10" y2="4"></line> <line x1="14" y1="1" x2="14" y2="4"></line> </svg> </div> Milford Sound Overnight Cruise </div> <div class="activity-item"> <div class="activity-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M6 9l6 6 6-6"></path> </svg> </div> Routeburn Track Guided Hike </div> </div> </div> <div class="card-footer"> <div class="price">$3,495</div> <button class="expand-btn"> Details <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="6 9 12 15 18 9"></polyline> </svg> </button> </div> </div> <div class="card-back"> <div class="detailed-section"> <h4>Expedition Overview</h4> <p>This 14-day alpine adventure takes you through New Zealand's most stunning mountain landscapes. Perfect for experienced hikers seeking challenging trails and spectacular scenery.</p> </div> <div class="detailed-section"> <h4>Daily Itinerary Highlights</h4> <div class="timeline"> <div class="timeline-item"> <div class="timeline-time">Day 1-3</div> <div class="timeline-activity">Queenstown arrival, equipment check, acclimatization hike at Ben Lomond</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 4-6</div> <div class="timeline-activity">Routeburn Track (32km), overnight at wilderness huts</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 7-8</div> <div class="timeline-activity">Milford Sound cruise, kayaking with marine wildlife</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 9-11</div> <div class="timeline-activity">Mount Cook region, Hooker Valley and Mueller Hut trek</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 12-14</div> <div class="timeline-activity">Franz Josef Glacier hike, helicopter tour, Christchurch departure</div> </div> </div> </div> <div class="detailed-section"> <h4>What's Included</h4> <ul> <li>Professional wilderness guides (1:6 ratio)</li> <li>All accommodation (mix of lodges and alpine huts)</li> <li>Most meals (13 breakfasts, 12 lunches, 10 dinners)</li> <li>Internal transport including scenic flights</li> <li>All permits and entrance fees</li> </ul> </div> <div class="weather-info"> <span class="weather-icon">☀️</span> Expected weather: 40-65°F (4-18°C), prepare for all conditions </div> <button class="back-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="15 18 9 12 15 6"></polyline> </svg> Back </button> </div> </div> </div> <!-- Card 2 --> <div class="card" data-category="cultural"> <div class="card-inner"> <div class="card-front"> <div class="category-badge">Cultural</div> <div class="card-image"> <img src="https://images.unsplash.com/photo-1596423742709-3796a4a8880e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Japan Cultural Tour"> </div> <div class="card-content"> <div class="card-date"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect> <line x1="16" y1="2" x2="16" y2="6"></line> <line x1="8" y1="2" x2="8" y2="6"></line> <line x1="3" y1="10" x2="21" y2="10"></line> </svg> April 3 - April 15, 2024 </div> <h3 class="card-title">Japan Cherry Blossom Journey</h3> <p class="card-description">Experience the magic of sakura season while exploring ancient temples, traditional tea ceremonies, and culinary delights.</p> <div class="activity-list"> <div class="activity-item"> <div class="activity-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path> <circle cx="9" cy="7" r="4"></circle> <path d="M23 21v-2a4 4 0 0 0-3-3.87"></path> <path d="M16 3.13a4 4 0 0 1 0 7.75"></path> </svg> </div> Private Tea Ceremony in Kyoto </div> <div class="activity-item"> <div class="activity-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path> <polyline points="9 22 9 12 15 12 15 22"></polyline> </svg> </div> Overnight Ryokan Stay with Onsen </div> </div> </div> <div class="card-footer"> <div class="price">$4,250</div> <button class="expand-btn"> Details <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="6 9 12 15 18 9"></polyline> </svg> </button> </div> </div> <div class="card-back"> <div class="detailed-section"> <h4>Cultural Immersion</h4> <p>This 13-day journey is timed perfectly for cherry blossom season, taking you from Tokyo to Kyoto and beyond. Immerse yourself in Japanese traditions while witnessing the breathtaking sakura bloom.</p> </div> <div class="detailed-section"> <h4>Journey Highlights</h4> <div class="timeline"> <div class="timeline-item"> <div class="timeline-time">Day 1-3</div> <div class="timeline-activity">Tokyo exploration, Ueno Park hanami, Asakusa temple district</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 4-5</div> <div class="timeline-activity">Hakone region, Mt. Fuji views, traditional ryokan stay</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 6-9</div> <div class="timeline-activity">Kyoto temples, Philosopher's Path, private tea ceremony, Arashiyama bamboo grove</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 10-11</div> <div class="timeline-activity">Nara deer park, historic shrines, sake tasting experience</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 12-13</div> <div class="timeline-activity">Hiroshima Peace Memorial, Miyajima Island, return to Tokyo</div> </div> </div> </div> <div class="detailed-section"> <h4>Unique Experiences</h4> <ul> <li>Private calligraphy lesson with master artist</li> <li>After-hours access to selected temples</li> <li>Kaiseki dinner with maiko (apprentice geisha) performance</li> <li>Hands-on traditional pottery workshop</li> <li>Guided night photography session during cherry blossom illuminations</li> </ul> </div> <div class="weather-info"> <span class="weather-icon">🌸</span> Spring weather: 45-65°F (7-18°C), occasional rain showers </div> <button class="back-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="15 18 9 12 15 6"></polyline> </svg> Back </button> </div> </div> </div> <!-- Card 3 --> <div class="card" data-category="beach"> <div class="card-inner"> <div class="card-front"> <div class="category-badge">Beach</div> <div class="card-image"> <img src="https://images.unsplash.com/photo-1506929562872-bb421503ef21?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Maldives Island Hopping"> </div> <div class="card-content"> <div class="card-date"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect> <line x1="16" y1="2" x2="16" y2="6"></line> <line x1="8" y1="2" x2="8" y2="6"></line> <line x1="3" y1="10" x2="21" y2="10"></line> </svg> July 10 - July 20, 2024 </div> <h3 class="card-title">Maldives Island Hopping Safari</h3> <p class="card-description">Discover hidden gems across multiple Maldivian atolls with luxurious accommodations and world-class marine encounters.</p> <div class="activity-list"> <div class="activity-item"> <div class="activity-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="23 4 23 10 17 10"></polyline> <polyline points="1 20 1 14 7 14"></polyline> <path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path> </svg> </div> Manta Ray Night Snorkeling </div> <div class="activity-item"> <div class="activity-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path> <circle cx="12" cy="10" r="3"></circle> </svg> </div> Private Island Sunset Dinner </div> </div> </div> <div class="card-footer"> <div class="price">$5,890</div> <button class="expand-btn"> Details <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="6 9 12 15 18 9"></polyline> </svg> </button> </div> </div> <div class="card-back"> <div class="detailed-section"> <h4>Island Paradise Experience</h4> <p>Experience the Maldives beyond the typical resort stay. This 11-day aquatic journey takes you across multiple atolls on a luxury yacht, combining overwater bungalows with authentic local island experiences.</p> </div> <div class="detailed-section"> <h4>Island-by-Island Itinerary</h4> <div class="timeline"> <div class="timeline-item"> <div class="timeline-time">Day 1-2</div> <div class="timeline-activity">Arrival in Malé, seaplane transfer to North Malé Atoll luxury resort</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 3-5</div> <div class="timeline-activity">Baa Atoll UNESCO Biosphere Reserve, Hanifaru Bay manta encounters</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 6-7</div> <div class="timeline-activity">South Ari Atoll, whale shark conservation expedition, local island visit</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 8-9</div> <div class="timeline-activity">Vaavu Atoll, night reef diving with nurse sharks, sandbank picnic</div> </div> <div class="timeline-item"> <div class="timeline-time">Day 10-11</div> <div class="timeline-activity">Return to North Malé, overwater spa treatment, departure</div> </div> </div> </div> <div class="detailed-section"> <h4>Premium Inclusions</h4> <ul> <li>Mix of luxury resort stays and private yacht accommodation</li> <li>All water activities with professional marine biologist guides</li> <li>Full board gourmet dining with dietary customization</li> <li>Exclusive beach access on uninhabited islands</li> <li>Underwater photography session with equipment</li> <li>Sustainability contribution to local coral restoration project</li> </ul> </div> <div class="weather-info"> <span class="weather-icon">☀️</span> Tropical climate: 80-90°F (27-32°C), warm water temperatures </div> <button class="back-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="15 18 9 12 15 6"></polyline> </svg> Back </button> </div> </div> </div> <!-- Card 4 --> <div class="card" data-category="urban"> <div class="card-inner"> <div class="card-front"> <div class="category-badge">Urban</div> <div class="card-image"> <img src="https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="London Paris Amsterdam"> </div> <div class="card-content"> <div class="card-date"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none